bd7974dc8d
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
30 lines
1.5 KiB
Go
30 lines
1.5 KiB
Go
package runtime
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/kandev/kandev/internal/office/shared"
|
|
)
|
|
|
|
var (
|
|
// ErrCapabilityDenied is returned when a run lacks the requested capability.
|
|
ErrCapabilityDenied = fmt.Errorf("%w: capability denied", shared.ErrForbidden)
|
|
// ErrTaskOutOfScope is returned when a run tries to mutate an unscoped task.
|
|
ErrTaskOutOfScope = fmt.Errorf("%w: task out of scope", shared.ErrForbidden)
|
|
// ErrWorkspaceOutOfScope is returned when a run tries to mutate another workspace.
|
|
ErrWorkspaceOutOfScope = fmt.Errorf("%w: workspace out of scope", shared.ErrForbidden)
|
|
// ErrRuntimeDependencyMissing indicates that a runtime action was not fully wired.
|
|
ErrRuntimeDependencyMissing = fmt.Errorf("runtime dependency missing")
|
|
// ErrProjectRequired is returned when a root task has no resolvable
|
|
// project (no explicit project_id, and the run's current task has none
|
|
// either) in a workspace that has at least one project to choose from.
|
|
// Caller-correctable: the caller should retry with an explicit project_id.
|
|
ErrProjectRequired = fmt.Errorf("project_id is required")
|
|
// ErrReasonTooLong is returned when SpawnAgentRunInput.Reason exceeds
|
|
// maxSpawnAgentRunReasonLength. Reason is agent-supplied and becomes a
|
|
// label on the process-global office_run_dedup_total /
|
|
// office_run_dedup_keyless_total expvar maps, which never evict entries;
|
|
// an unbounded value lets a caller grow those maps without limit.
|
|
ErrReasonTooLong = fmt.Errorf("reason exceeds max length of %d characters", maxSpawnAgentRunReasonLength)
|
|
)
|