-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.go
More file actions
62 lines (56 loc) · 3.13 KB
/
Copy patherrors.go
File metadata and controls
62 lines (56 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package cortex
import "errors"
var (
// Store errors.
ErrNoStore = errors.New("cortex: no store configured")
ErrStoreClosed = errors.New("cortex: store closed")
ErrMigrationFailed = errors.New("cortex: migration failed")
// Not found errors.
ErrAgentNotFound = errors.New("cortex: agent not found")
ErrRunNotFound = errors.New("cortex: run not found")
ErrStepNotFound = errors.New("cortex: step not found")
ErrToolCallNotFound = errors.New("cortex: tool call not found")
ErrSkillNotFound = errors.New("cortex: skill not found")
ErrTraitNotFound = errors.New("cortex: trait not found")
ErrBehaviorNotFound = errors.New("cortex: behavior not found")
ErrPersonaNotFound = errors.New("cortex: persona not found")
ErrSessionNotFound = errors.New("cortex: session not found")
ErrCheckpointNotFound = errors.New("cortex: checkpoint not found")
ErrOrchestrationNotFound = errors.New("cortex: orchestration not found")
ErrOrchestrationRunNotFound = errors.New("cortex: orchestration run not found")
ErrWorkingMemoryNotFound = errors.New("cortex: working memory not found")
ErrOverlayNotFound = errors.New("cortex: prompt overlay not found")
// Conflict errors.
ErrAlreadyExists = errors.New("cortex: resource already exists")
// State errors.
ErrInvalidState = errors.New("cortex: invalid state transition")
ErrRunCancelled = errors.New("cortex: run cancelled")
ErrRunAlreadyDone = errors.New("cortex: run already completed")
ErrBudgetExhausted = errors.New("cortex: budget exhausted")
ErrMaxStepsReached = errors.New("cortex: maximum steps reached")
ErrMaxTokensReached = errors.New("cortex: maximum tokens reached")
// Suspension errors.
//
// ErrNotSuspended is returned by ClaimSuspension to the losing side of
// a double resume: the run was not paused (or another caller already
// claimed it) when the claim ran.
ErrNotSuspended = errors.New("cortex: run not suspended")
// ErrSuspensionExpired is returned when a resume targets a suspension
// past its ExpiresAt. The suspension row still exists for the expiry
// sweep to find and clean up; it is simply no longer resumable.
ErrSuspensionExpired = errors.New("cortex: suspension expired")
// ErrResultsMismatch is returned when the results a caller supplies to
// resume an external-tool suspension do not correspond to the pending
// calls it was waiting on.
ErrResultsMismatch = errors.New("cortex: suspension results do not match pending calls")
// ErrInvalidContinuation is returned when a suspension carries a
// continuation the loop cannot run: today that means a zero Config,
// which a resume would otherwise read as a step budget of nothing.
//
// It is its own sentinel rather than ErrMaxStepsReached, which is what
// a zero budget looks like from inside the loop. That error is a
// matched-on contract meaning "this run used up its steps", and it
// sends an operator to raise the budget for a run whose real problem
// is a continuation nothing could have resumed.
ErrInvalidContinuation = errors.New("cortex: suspension continuation is unusable")
)