# internal/core/runartifact

Package runartifact names where a task's runtime files live under .scafld/runs: its run directory, session ledger and lock, command diagnostics and provider packets.

## CommandDiagnosticsDir

```go
func CommandDiagnosticsDir(root string, taskID string) string
```

CommandDiagnosticsDir returns the ignored command-output evidence directory for one task. The session ledger stores paths to relevant diagnostics.

## ProviderPacketsDir

```go
func ProviderPacketsDir(root string, taskID string) string
```

ProviderPacketsDir returns the ignored provider packet repair directory for one task. These artifacts are operator-editable recovery inputs, not ledgers.

## RunDir

```go
func RunDir(root string, taskID string) string
```

RunDir returns the durable runtime directory for one task.

## SafeName

```go
func SafeName(name string) string
```

SafeName maps an operator-facing identifier into a stable filename fragment.

## SessionLockPath

```go
func SessionLockPath(root string, taskID string) string
```

SessionLockPath returns the ignored cross-process lock file path for one task's session ledger.

## SessionLockPathFromSessionPath

```go
func SessionLockPathFromSessionPath(path string) string
```

SessionLockPathFromSessionPath returns the clean lock path for a conventional .scafld/runs/{task}/session.json path. Unknown layouts fall back to the legacy adjacent lock path so nonstandard callers still work.

## SessionPath

```go
func SessionPath(root string, taskID string) string
```

SessionPath returns the durable session ledger path for one task.
