@cat-factory/contracts 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/accounts.d.ts +103 -0
- package/dist/accounts.d.ts.map +1 -0
- package/dist/accounts.js +102 -0
- package/dist/accounts.js.map +1 -0
- package/dist/agent-config.d.ts +77 -0
- package/dist/agent-config.d.ts.map +1 -0
- package/dist/agent-config.js +78 -0
- package/dist/agent-config.js.map +1 -0
- package/dist/api-keys.d.ts +44 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +49 -0
- package/dist/api-keys.js.map +1 -0
- package/dist/auth.d.ts +24 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +15 -0
- package/dist/auth.js.map +1 -0
- package/dist/board-scan.d.ts +89 -0
- package/dist/board-scan.d.ts.map +1 -0
- package/dist/board-scan.js +122 -0
- package/dist/board-scan.js.map +1 -0
- package/dist/bootstrap.d.ts +168 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +148 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/clarity.d.ts +75 -0
- package/dist/clarity.d.ts.map +1 -0
- package/dist/clarity.js +66 -0
- package/dist/clarity.js.map +1 -0
- package/dist/companion.d.ts +32 -0
- package/dist/companion.d.ts.map +1 -0
- package/dist/companion.js +43 -0
- package/dist/companion.js.map +1 -0
- package/dist/consensus.d.ts +195 -0
- package/dist/consensus.d.ts.map +1 -0
- package/dist/consensus.js +164 -0
- package/dist/consensus.js.map +1 -0
- package/dist/documents.d.ts +197 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +161 -0
- package/dist/documents.js.map +1 -0
- package/dist/entities.d.ts +1691 -0
- package/dist/entities.d.ts.map +1 -0
- package/dist/entities.js +853 -0
- package/dist/entities.js.map +1 -0
- package/dist/environments.d.ts +426 -0
- package/dist/environments.d.ts.map +1 -0
- package/dist/environments.js +190 -0
- package/dist/environments.js.map +1 -0
- package/dist/events.d.ts +98 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +2 -0
- package/dist/events.js.map +1 -0
- package/dist/fragment-library.d.ts +123 -0
- package/dist/fragment-library.d.ts.map +1 -0
- package/dist/fragment-library.js +88 -0
- package/dist/fragment-library.js.map +1 -0
- package/dist/github.d.ts +215 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +204 -0
- package/dist/github.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/iteration-cap.d.ts +17 -0
- package/dist/iteration-cap.d.ts.map +1 -0
- package/dist/iteration-cap.js +25 -0
- package/dist/iteration-cap.js.map +1 -0
- package/dist/localModels.d.ts +54 -0
- package/dist/localModels.d.ts.map +1 -0
- package/dist/localModels.js +79 -0
- package/dist/localModels.js.map +1 -0
- package/dist/merge.d.ts +106 -0
- package/dist/merge.d.ts.map +1 -0
- package/dist/merge.js +129 -0
- package/dist/merge.js.map +1 -0
- package/dist/model-defaults.d.ts +23 -0
- package/dist/model-defaults.d.ts.map +1 -0
- package/dist/model-defaults.js +34 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/notifications.d.ts +136 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +125 -0
- package/dist/notifications.js.map +1 -0
- package/dist/observability.d.ts +271 -0
- package/dist/observability.d.ts.map +1 -0
- package/dist/observability.js +152 -0
- package/dist/observability.js.map +1 -0
- package/dist/personal-subscriptions.d.ts +66 -0
- package/dist/personal-subscriptions.d.ts.map +1 -0
- package/dist/personal-subscriptions.js +70 -0
- package/dist/personal-subscriptions.js.map +1 -0
- package/dist/primitives.d.ts +57 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +66 -0
- package/dist/primitives.js.map +1 -0
- package/dist/provisioning.d.ts +46 -0
- package/dist/provisioning.d.ts.map +1 -0
- package/dist/provisioning.js +107 -0
- package/dist/provisioning.js.map +1 -0
- package/dist/recurring.d.ts +117 -0
- package/dist/recurring.d.ts.map +1 -0
- package/dist/recurring.js +99 -0
- package/dist/recurring.js.map +1 -0
- package/dist/release.d.ts +60 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +75 -0
- package/dist/release.js.map +1 -0
- package/dist/requests.d.ts +451 -0
- package/dist/requests.d.ts.map +1 -0
- package/dist/requests.js +231 -0
- package/dist/requests.js.map +1 -0
- package/dist/requirements.d.ts +127 -0
- package/dist/requirements.d.ts.map +1 -0
- package/dist/requirements.js +137 -0
- package/dist/requirements.js.map +1 -0
- package/dist/runners.d.ts +387 -0
- package/dist/runners.d.ts.map +1 -0
- package/dist/runners.js +117 -0
- package/dist/runners.js.map +1 -0
- package/dist/sandbox.d.ts +300 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +243 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/service-fragment-defaults.d.ts +16 -0
- package/dist/service-fragment-defaults.d.ts.map +1 -0
- package/dist/service-fragment-defaults.js +23 -0
- package/dist/service-fragment-defaults.js.map +1 -0
- package/dist/services.d.ts +81 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +77 -0
- package/dist/services.js.map +1 -0
- package/dist/slack.d.ts +104 -0
- package/dist/slack.d.ts.map +1 -0
- package/dist/slack.js +98 -0
- package/dist/slack.js.map +1 -0
- package/dist/snapshot.d.ts +522 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +104 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/spec.d.ts +174 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +173 -0
- package/dist/spec.js.map +1 -0
- package/dist/tasks.d.ts +150 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +146 -0
- package/dist/tasks.js.map +1 -0
- package/dist/testing.d.ts +67 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +64 -0
- package/dist/testing.js.map +1 -0
- package/dist/tracker.d.ts +18 -0
- package/dist/tracker.d.ts.map +1 -0
- package/dist/tracker.js +24 -0
- package/dist/tracker.js.map +1 -0
- package/dist/vendor-credentials.d.ts +37 -0
- package/dist/vendor-credentials.d.ts.map +1 -0
- package/dist/vendor-credentials.js +40 -0
- package/dist/vendor-credentials.js.map +1 -0
- package/dist/workspace-settings.d.ts +36 -0
- package/dist/workspace-settings.d.ts.map +1 -0
- package/dist/workspace-settings.js +41 -0
- package/dist/workspace-settings.js.map +1 -0
- package/package.json +31 -0
|
@@ -0,0 +1,1691 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* A lightweight link from a block to the pull request an implementation agent
|
|
4
|
+
* opened for it. Distinct from the richer {@link GitHubPullRequest} projection
|
|
5
|
+
* (synced from GitHub): this is just enough to display the PR on the board and
|
|
6
|
+
* navigate to it. Recorded on a task when its container ("implementer") agent
|
|
7
|
+
* pushes a branch and opens a PR.
|
|
8
|
+
*/
|
|
9
|
+
export declare const pullRequestRefSchema: v.ObjectSchema<{
|
|
10
|
+
/** The PR's web URL, opened when the user clicks through from the board. */
|
|
11
|
+
readonly url: v.StringSchema<undefined>;
|
|
12
|
+
/** The PR number within the repo, shown as `#<number>` when known. */
|
|
13
|
+
readonly number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
14
|
+
/** The head branch the agent pushed its work to, when known. */
|
|
15
|
+
readonly branch: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
export type PullRequestRef = v.InferOutput<typeof pullRequestRefSchema>;
|
|
18
|
+
export declare const blockSchema: v.ObjectSchema<{
|
|
19
|
+
readonly id: v.StringSchema<undefined>;
|
|
20
|
+
readonly title: v.StringSchema<undefined>;
|
|
21
|
+
readonly type: v.PicklistSchema<["frontend", "service", "api", "database", "queue", "integration", "external", "environment"], undefined>;
|
|
22
|
+
readonly description: v.StringSchema<undefined>;
|
|
23
|
+
readonly position: v.ObjectSchema<{
|
|
24
|
+
readonly x: v.NumberSchema<undefined>;
|
|
25
|
+
readonly y: v.NumberSchema<undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* An explicit, user-set pixel size for the block (service frames are resizable
|
|
29
|
+
* by dragging their borders). Absent means the board auto-sizes the frame from
|
|
30
|
+
* its contents; present is the dragged size (the client never shrinks it below
|
|
31
|
+
* the content's natural extent). Only frames carry this today.
|
|
32
|
+
*/
|
|
33
|
+
readonly size: v.OptionalSchema<v.ObjectSchema<{
|
|
34
|
+
readonly w: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
35
|
+
readonly h: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
36
|
+
}, undefined>, undefined>;
|
|
37
|
+
readonly status: v.PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
38
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
39
|
+
readonly dependsOn: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
40
|
+
readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
41
|
+
readonly level: v.PicklistSchema<["frame", "module", "task"], undefined>;
|
|
42
|
+
readonly parentId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
43
|
+
readonly confidence: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* The `task-estimator` agent's triage of this task (complexity / risk / impact,
|
|
46
|
+
* each 0..1, + rationale). Written by a `task-estimator` pipeline step once it
|
|
47
|
+
* runs; surfaced in the UI and used to gate consensus steps. Absent until a
|
|
48
|
+
* task-estimator step has run. Only meaningful on `task`-level blocks.
|
|
49
|
+
*/
|
|
50
|
+
readonly estimate: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
51
|
+
readonly complexity: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
52
|
+
readonly risk: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
53
|
+
readonly impact: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
54
|
+
readonly rationale: v.StringSchema<undefined>;
|
|
55
|
+
readonly model: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
56
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
57
|
+
}, undefined>, undefined>, undefined>;
|
|
58
|
+
readonly moduleName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* The kind of work this task represents (feature / bug / document / spike / recurring),
|
|
61
|
+
* chosen by the human at creation. Drives the card's icon/badge, the per-type creation
|
|
62
|
+
* fields, and the per-service running-task limit's optional per-type bucketing. Only
|
|
63
|
+
* meaningful on `task`-level blocks; absent ⇒ treated as `feature`.
|
|
64
|
+
*/
|
|
65
|
+
readonly taskType: v.OptionalSchema<v.PicklistSchema<["feature", "bug", "document", "spike", "recurring"], undefined>, undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Small per-type fields collected on the create-task form (see {@link taskTypeFieldsSchema}),
|
|
68
|
+
* e.g. a bug's severity / repro steps, a spike's time-box. Only meaningful on `task`-level
|
|
69
|
+
* blocks; absent ⇒ none collected.
|
|
70
|
+
*/
|
|
71
|
+
readonly taskTypeFields: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
72
|
+
readonly severity: v.OptionalSchema<v.PicklistSchema<["low", "medium", "high", "critical"], undefined>, undefined>;
|
|
73
|
+
readonly stepsToReproduce: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
74
|
+
readonly timeboxHours: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, undefined>;
|
|
75
|
+
readonly docKind: v.OptionalSchema<v.PicklistSchema<["prd", "rfc", "runbook", "reference", "other"], undefined>, undefined>;
|
|
76
|
+
}, undefined>, undefined>, undefined>;
|
|
77
|
+
/**
|
|
78
|
+
* Ids of curated best-practice prompt fragments selected for this block. Their
|
|
79
|
+
* bodies are composed into the agent system prompt at run time. The catalog
|
|
80
|
+
* itself lives in @cat-factory/prompt-fragments and is served separately.
|
|
81
|
+
*/
|
|
82
|
+
readonly fragmentIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Service-level (frame-only): ids of the best-practice / guideline prompt fragments
|
|
85
|
+
* selected as this service's programming standards (drawn from the universal pool in
|
|
86
|
+
* @cat-factory/prompt-fragments). At run time the execution engine folds their bodies
|
|
87
|
+
* into the system prompt of every agent under this service that carries the
|
|
88
|
+
* `code-aware` trait. Seeded from the workspace default on new services; absent ⇒ no
|
|
89
|
+
* service-level fragments (only the block's own `fragmentIds` apply).
|
|
90
|
+
*/
|
|
91
|
+
readonly serviceFragmentIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* Id of the LLM model selected for this block from the shared model catalog
|
|
94
|
+
* (see MODEL_CATALOG in @cat-factory/kernel). When set it overrides the agent
|
|
95
|
+
* routing's default model at run time; absent means "use the routing default".
|
|
96
|
+
*/
|
|
97
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* Task-level configuration values contributed by the agents in the task's
|
|
100
|
+
* pipeline (see {@link agentConfigValuesSchema}) — a sparse id→value map. Each
|
|
101
|
+
* value is editable until its contributing agent's step starts, then freezes.
|
|
102
|
+
* Used e.g. for the Tester's `tester.environment` (local vs ephemeral) choice.
|
|
103
|
+
* Only meaningful on `task`-level blocks.
|
|
104
|
+
*/
|
|
105
|
+
readonly agentConfig: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>, undefined>;
|
|
106
|
+
/**
|
|
107
|
+
* Service-level (frame-only): path to the service's docker-compose file used to
|
|
108
|
+
* stand up the Tester's local infra dependencies, relative to the repo root
|
|
109
|
+
* (e.g. `docker-compose.yml`). Autodiscovered when the service is added but may
|
|
110
|
+
* be set later. Mutually exclusive with {@link noInfraDependencies}; a Tester
|
|
111
|
+
* pipeline cannot start until one of the two is set.
|
|
112
|
+
*/
|
|
113
|
+
readonly testComposePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
/**
|
|
115
|
+
* Service-level (frame-only): the service has no infra dependencies to stand up,
|
|
116
|
+
* so the Tester spins nothing up. When true {@link testComposePath} is ignored.
|
|
117
|
+
*/
|
|
118
|
+
readonly noInfraDependencies: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* Service-level (frame-only): the cloud provider this service's container jobs
|
|
121
|
+
* run on. Absent means the owning account's `defaultCloudProvider`.
|
|
122
|
+
*/
|
|
123
|
+
readonly cloudProvider: v.OptionalSchema<v.PicklistSchema<["cloudflare", "docker", "aws", "gcp", "azure", "custom"], undefined>, undefined>;
|
|
124
|
+
/**
|
|
125
|
+
* Service-level (frame-only): the abstract instance size for this service's
|
|
126
|
+
* container jobs, resolved to a provider-specific id at dispatch. Absent means
|
|
127
|
+
* the built-in default size.
|
|
128
|
+
*/
|
|
129
|
+
readonly instanceSize: v.OptionalSchema<v.PicklistSchema<["small", "medium", "large", "xlarge"], undefined>, undefined>;
|
|
130
|
+
/**
|
|
131
|
+
* The pull request the block's implementation ("implementer") agent opened for
|
|
132
|
+
* its work. Set on a task once its container agent pushes a branch and opens a
|
|
133
|
+
* PR; surfaced on the board so the PR can be opened from the selected task.
|
|
134
|
+
*/
|
|
135
|
+
readonly pullRequest: v.OptionalSchema<v.ObjectSchema<{
|
|
136
|
+
/** The PR's web URL, opened when the user clicks through from the board. */
|
|
137
|
+
readonly url: v.StringSchema<undefined>;
|
|
138
|
+
/** The PR number within the repo, shown as `#<number>` when known. */
|
|
139
|
+
readonly number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
140
|
+
/** The head branch the agent pushed its work to, when known. */
|
|
141
|
+
readonly branch: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
142
|
+
}, undefined>, undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* Id of the merge threshold preset selected for this task (see
|
|
145
|
+
* {@link mergeThresholdPresetSchema}). Drives the `merger` step's auto-merge
|
|
146
|
+
* decision and the CI-fixer attempt budget. Absent means "use the workspace's
|
|
147
|
+
* default preset".
|
|
148
|
+
*/
|
|
149
|
+
readonly mergePresetId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
150
|
+
/**
|
|
151
|
+
* Id of the pipeline chosen for this task at creation (see {@link pipelineSchema}).
|
|
152
|
+
* The task's "Start"/"Run" controls default to it; absent means the user picks a
|
|
153
|
+
* pipeline at run time (the board falls back to the first defined pipeline).
|
|
154
|
+
*/
|
|
155
|
+
readonly pipelineId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
156
|
+
/**
|
|
157
|
+
* Internal user id (`usr_*`) of the person who created this block, captured from
|
|
158
|
+
* the authenticated session at creation (tasks today). Drives "notify the task
|
|
159
|
+
* creator" routing for notifications. Absent/null on blocks created before this
|
|
160
|
+
* was recorded, or with auth disabled (local/dev), where there is no user.
|
|
161
|
+
*/
|
|
162
|
+
readonly createdBy: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Internal user id (`usr_*`) of the account member (a `product` role-holder) made
|
|
165
|
+
* responsible for this task. They are notified when requirement review flags findings.
|
|
166
|
+
* Absent/null when no responsible product person is assigned.
|
|
167
|
+
*/
|
|
168
|
+
readonly responsibleProductUserId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
169
|
+
}, undefined>;
|
|
170
|
+
export type Block = v.InferOutput<typeof blockSchema>;
|
|
171
|
+
/**
|
|
172
|
+
* A curated best-practice "prompt fragment" (e.g. Node performance, React state
|
|
173
|
+
* management). The catalog is authored in @cat-factory/prompt-fragments and
|
|
174
|
+
* surfaced to the frontend read-only so a user can pick which apply to a block.
|
|
175
|
+
*/
|
|
176
|
+
export declare const promptFragmentSchema: v.ObjectSchema<{
|
|
177
|
+
/** Stable id, e.g. `node.performance`. Selection persists this. */
|
|
178
|
+
readonly id: v.StringSchema<undefined>;
|
|
179
|
+
/** Semver of the body content, for display and future version pinning. */
|
|
180
|
+
readonly version: v.StringSchema<undefined>;
|
|
181
|
+
/** Human title shown in the picker, e.g. `Node.js performance`. */
|
|
182
|
+
readonly title: v.StringSchema<undefined>;
|
|
183
|
+
/** Grouping label for the picker, e.g. `Node`, `React`. */
|
|
184
|
+
readonly category: v.StringSchema<undefined>;
|
|
185
|
+
/** One-line description shown in the picker. */
|
|
186
|
+
readonly summary: v.StringSchema<undefined>;
|
|
187
|
+
/** The guidance injected into the agent system prompt. */
|
|
188
|
+
readonly body: v.StringSchema<undefined>;
|
|
189
|
+
/** Optional hints for filtering which blocks/agents a fragment suits. */
|
|
190
|
+
readonly appliesTo: v.OptionalSchema<v.ObjectSchema<{
|
|
191
|
+
readonly blockTypes: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["frontend", "service", "api", "database", "queue", "integration", "external", "environment"], undefined>, undefined>, undefined>;
|
|
192
|
+
readonly agentKinds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
|
|
193
|
+
}, undefined>, undefined>;
|
|
194
|
+
/**
|
|
195
|
+
* Free-form tags used by the relevance selector to decide whether a fragment
|
|
196
|
+
* is pertinent to a given run (e.g. `backend`, `frontend`, `db`). Optional and
|
|
197
|
+
* absent on the built-in catalog tier; managed fragments may set them.
|
|
198
|
+
*/
|
|
199
|
+
readonly tags: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
200
|
+
/**
|
|
201
|
+
* Provenance for a fragment sourced from a repo: which {@link FragmentSource}
|
|
202
|
+
* it came from, the file path within that source, and the blob sha last synced
|
|
203
|
+
* (so a "changed?" check is a cheap comparison). Absent for hand-authored
|
|
204
|
+
* fragments and the built-in catalog.
|
|
205
|
+
*/
|
|
206
|
+
readonly source: v.OptionalSchema<v.ObjectSchema<{
|
|
207
|
+
readonly sourceId: v.StringSchema<undefined>;
|
|
208
|
+
readonly path: v.StringSchema<undefined>;
|
|
209
|
+
readonly sha: v.StringSchema<undefined>;
|
|
210
|
+
}, undefined>, undefined>;
|
|
211
|
+
}, undefined>;
|
|
212
|
+
export type PromptFragment = v.InferOutput<typeof promptFragmentSchema>;
|
|
213
|
+
/** The full catalog as served by `GET /prompt-fragments`. */
|
|
214
|
+
export declare const promptFragmentCatalogSchema: v.ArraySchema<v.ObjectSchema<{
|
|
215
|
+
/** Stable id, e.g. `node.performance`. Selection persists this. */
|
|
216
|
+
readonly id: v.StringSchema<undefined>;
|
|
217
|
+
/** Semver of the body content, for display and future version pinning. */
|
|
218
|
+
readonly version: v.StringSchema<undefined>;
|
|
219
|
+
/** Human title shown in the picker, e.g. `Node.js performance`. */
|
|
220
|
+
readonly title: v.StringSchema<undefined>;
|
|
221
|
+
/** Grouping label for the picker, e.g. `Node`, `React`. */
|
|
222
|
+
readonly category: v.StringSchema<undefined>;
|
|
223
|
+
/** One-line description shown in the picker. */
|
|
224
|
+
readonly summary: v.StringSchema<undefined>;
|
|
225
|
+
/** The guidance injected into the agent system prompt. */
|
|
226
|
+
readonly body: v.StringSchema<undefined>;
|
|
227
|
+
/** Optional hints for filtering which blocks/agents a fragment suits. */
|
|
228
|
+
readonly appliesTo: v.OptionalSchema<v.ObjectSchema<{
|
|
229
|
+
readonly blockTypes: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["frontend", "service", "api", "database", "queue", "integration", "external", "environment"], undefined>, undefined>, undefined>;
|
|
230
|
+
readonly agentKinds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
|
|
231
|
+
}, undefined>, undefined>;
|
|
232
|
+
/**
|
|
233
|
+
* Free-form tags used by the relevance selector to decide whether a fragment
|
|
234
|
+
* is pertinent to a given run (e.g. `backend`, `frontend`, `db`). Optional and
|
|
235
|
+
* absent on the built-in catalog tier; managed fragments may set them.
|
|
236
|
+
*/
|
|
237
|
+
readonly tags: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
238
|
+
/**
|
|
239
|
+
* Provenance for a fragment sourced from a repo: which {@link FragmentSource}
|
|
240
|
+
* it came from, the file path within that source, and the blob sha last synced
|
|
241
|
+
* (so a "changed?" check is a cheap comparison). Absent for hand-authored
|
|
242
|
+
* fragments and the built-in catalog.
|
|
243
|
+
*/
|
|
244
|
+
readonly source: v.OptionalSchema<v.ObjectSchema<{
|
|
245
|
+
readonly sourceId: v.StringSchema<undefined>;
|
|
246
|
+
readonly path: v.StringSchema<undefined>;
|
|
247
|
+
readonly sha: v.StringSchema<undefined>;
|
|
248
|
+
}, undefined>, undefined>;
|
|
249
|
+
}, undefined>, undefined>;
|
|
250
|
+
export type PromptFragmentCatalog = v.InferOutput<typeof promptFragmentCatalogSchema>;
|
|
251
|
+
/** Informational list price for a model, surfaced in the picker. */
|
|
252
|
+
export declare const modelCostSchema: v.ObjectSchema<{
|
|
253
|
+
/** List price per 1M input tokens. */
|
|
254
|
+
readonly inputPerMillion: v.NumberSchema<undefined>;
|
|
255
|
+
/** List price per 1M output tokens. */
|
|
256
|
+
readonly outputPerMillion: v.NumberSchema<undefined>;
|
|
257
|
+
/** ISO 4217 currency the prices are expressed in (e.g. `EUR`). */
|
|
258
|
+
readonly currency: v.StringSchema<undefined>;
|
|
259
|
+
}, undefined>;
|
|
260
|
+
export type ModelCost = v.InferOutput<typeof modelCostSchema>;
|
|
261
|
+
/**
|
|
262
|
+
* A selectable LLM model, resolved to the flavour actually in use for this
|
|
263
|
+
* deployment (`GET /models`). `flavor` is `direct` when the model's own provider
|
|
264
|
+
* API key is configured, `cloudflare` for the Workers AI fallback, or
|
|
265
|
+
* `subscription` for a Claude Code / Codex model run via a stored subscription
|
|
266
|
+
* token. `provider`/`model` are the effective {@link ModelRef} parts the agent
|
|
267
|
+
* will run with; the picker stores only `id`.
|
|
268
|
+
*/
|
|
269
|
+
export declare const modelOptionSchema: v.ObjectSchema<{
|
|
270
|
+
/** Stable id persisted on a block (`Block.modelId`). */
|
|
271
|
+
readonly id: v.StringSchema<undefined>;
|
|
272
|
+
/** Model-family label, e.g. `Qwen3`. */
|
|
273
|
+
readonly label: v.StringSchema<undefined>;
|
|
274
|
+
/** One-line description shown in the picker. */
|
|
275
|
+
readonly description: v.StringSchema<undefined>;
|
|
276
|
+
/** Which flavour is active for this deployment. */
|
|
277
|
+
readonly flavor: v.PicklistSchema<["cloudflare", "direct", "subscription"], undefined>;
|
|
278
|
+
/**
|
|
279
|
+
* Whether this model is actually selectable given what the workspace has
|
|
280
|
+
* configured: a direct key for its provider, a subscription token for its vendor,
|
|
281
|
+
* or the opt-in Cloudflare lib enabled. The picker disables an unavailable model.
|
|
282
|
+
*/
|
|
283
|
+
readonly available: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
284
|
+
/** Short provider label for the active flavour, e.g. `Cloudflare`, `DashScope`. */
|
|
285
|
+
readonly providerLabel: v.StringSchema<undefined>;
|
|
286
|
+
/** Effective provider id the agent runs with. */
|
|
287
|
+
readonly provider: v.StringSchema<undefined>;
|
|
288
|
+
/** Effective model id within the provider. */
|
|
289
|
+
readonly model: v.StringSchema<undefined>;
|
|
290
|
+
/**
|
|
291
|
+
* For a `subscription` model, the vendor whose pooled token authenticates it;
|
|
292
|
+
* the frontend enables the option only when the workspace has a token for it.
|
|
293
|
+
*/
|
|
294
|
+
readonly vendor: v.OptionalSchema<v.PicklistSchema<["claude", "codex", "glm", "kimi", "deepseek"], undefined>, undefined>;
|
|
295
|
+
/** Informational list price for the model, when known. */
|
|
296
|
+
readonly cost: v.OptionalSchema<v.ObjectSchema<{
|
|
297
|
+
/** List price per 1M input tokens. */
|
|
298
|
+
readonly inputPerMillion: v.NumberSchema<undefined>;
|
|
299
|
+
/** List price per 1M output tokens. */
|
|
300
|
+
readonly outputPerMillion: v.NumberSchema<undefined>;
|
|
301
|
+
/** ISO 4217 currency the prices are expressed in (e.g. `EUR`). */
|
|
302
|
+
readonly currency: v.StringSchema<undefined>;
|
|
303
|
+
}, undefined>, undefined>;
|
|
304
|
+
/** The model's context window at the effective provider, when known. */
|
|
305
|
+
readonly contextTokens: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
306
|
+
/**
|
|
307
|
+
* True when the effective flavour runs on a flat-rate subscription. Its `cost`
|
|
308
|
+
* is illustrative of quota burn rate only — quota-based usage does NOT draw on
|
|
309
|
+
* the monetary spend budget.
|
|
310
|
+
*/
|
|
311
|
+
readonly quotaBased: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
312
|
+
/**
|
|
313
|
+
* An alternative subscription flavour for a model that ALSO has a Cloudflare /
|
|
314
|
+
* direct base (e.g. GLM-5.2, Kimi). The frontend renders ONLY this flavour when
|
|
315
|
+
* the workspace has a token for `vendor` (hiding the base), and the executor
|
|
316
|
+
* always prefers it at dispatch. Absent for subscription-only models (whose base
|
|
317
|
+
* IS the subscription) and for models with no subscription path.
|
|
318
|
+
*/
|
|
319
|
+
readonly subscription: v.OptionalSchema<v.ObjectSchema<{
|
|
320
|
+
readonly vendor: v.PicklistSchema<["claude", "codex", "glm", "kimi", "deepseek"], undefined>;
|
|
321
|
+
readonly providerLabel: v.StringSchema<undefined>;
|
|
322
|
+
readonly provider: v.StringSchema<undefined>;
|
|
323
|
+
readonly model: v.StringSchema<undefined>;
|
|
324
|
+
readonly cost: v.OptionalSchema<v.ObjectSchema<{
|
|
325
|
+
/** List price per 1M input tokens. */
|
|
326
|
+
readonly inputPerMillion: v.NumberSchema<undefined>;
|
|
327
|
+
/** List price per 1M output tokens. */
|
|
328
|
+
readonly outputPerMillion: v.NumberSchema<undefined>;
|
|
329
|
+
/** ISO 4217 currency the prices are expressed in (e.g. `EUR`). */
|
|
330
|
+
readonly currency: v.StringSchema<undefined>;
|
|
331
|
+
}, undefined>, undefined>;
|
|
332
|
+
readonly contextTokens: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
333
|
+
}, undefined>, undefined>;
|
|
334
|
+
}, undefined>;
|
|
335
|
+
export type ModelOption = v.InferOutput<typeof modelOptionSchema>;
|
|
336
|
+
/** The full catalog as served by `GET /models`. */
|
|
337
|
+
export declare const modelCatalogSchema: v.ArraySchema<v.ObjectSchema<{
|
|
338
|
+
/** Stable id persisted on a block (`Block.modelId`). */
|
|
339
|
+
readonly id: v.StringSchema<undefined>;
|
|
340
|
+
/** Model-family label, e.g. `Qwen3`. */
|
|
341
|
+
readonly label: v.StringSchema<undefined>;
|
|
342
|
+
/** One-line description shown in the picker. */
|
|
343
|
+
readonly description: v.StringSchema<undefined>;
|
|
344
|
+
/** Which flavour is active for this deployment. */
|
|
345
|
+
readonly flavor: v.PicklistSchema<["cloudflare", "direct", "subscription"], undefined>;
|
|
346
|
+
/**
|
|
347
|
+
* Whether this model is actually selectable given what the workspace has
|
|
348
|
+
* configured: a direct key for its provider, a subscription token for its vendor,
|
|
349
|
+
* or the opt-in Cloudflare lib enabled. The picker disables an unavailable model.
|
|
350
|
+
*/
|
|
351
|
+
readonly available: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
352
|
+
/** Short provider label for the active flavour, e.g. `Cloudflare`, `DashScope`. */
|
|
353
|
+
readonly providerLabel: v.StringSchema<undefined>;
|
|
354
|
+
/** Effective provider id the agent runs with. */
|
|
355
|
+
readonly provider: v.StringSchema<undefined>;
|
|
356
|
+
/** Effective model id within the provider. */
|
|
357
|
+
readonly model: v.StringSchema<undefined>;
|
|
358
|
+
/**
|
|
359
|
+
* For a `subscription` model, the vendor whose pooled token authenticates it;
|
|
360
|
+
* the frontend enables the option only when the workspace has a token for it.
|
|
361
|
+
*/
|
|
362
|
+
readonly vendor: v.OptionalSchema<v.PicklistSchema<["claude", "codex", "glm", "kimi", "deepseek"], undefined>, undefined>;
|
|
363
|
+
/** Informational list price for the model, when known. */
|
|
364
|
+
readonly cost: v.OptionalSchema<v.ObjectSchema<{
|
|
365
|
+
/** List price per 1M input tokens. */
|
|
366
|
+
readonly inputPerMillion: v.NumberSchema<undefined>;
|
|
367
|
+
/** List price per 1M output tokens. */
|
|
368
|
+
readonly outputPerMillion: v.NumberSchema<undefined>;
|
|
369
|
+
/** ISO 4217 currency the prices are expressed in (e.g. `EUR`). */
|
|
370
|
+
readonly currency: v.StringSchema<undefined>;
|
|
371
|
+
}, undefined>, undefined>;
|
|
372
|
+
/** The model's context window at the effective provider, when known. */
|
|
373
|
+
readonly contextTokens: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
374
|
+
/**
|
|
375
|
+
* True when the effective flavour runs on a flat-rate subscription. Its `cost`
|
|
376
|
+
* is illustrative of quota burn rate only — quota-based usage does NOT draw on
|
|
377
|
+
* the monetary spend budget.
|
|
378
|
+
*/
|
|
379
|
+
readonly quotaBased: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
380
|
+
/**
|
|
381
|
+
* An alternative subscription flavour for a model that ALSO has a Cloudflare /
|
|
382
|
+
* direct base (e.g. GLM-5.2, Kimi). The frontend renders ONLY this flavour when
|
|
383
|
+
* the workspace has a token for `vendor` (hiding the base), and the executor
|
|
384
|
+
* always prefers it at dispatch. Absent for subscription-only models (whose base
|
|
385
|
+
* IS the subscription) and for models with no subscription path.
|
|
386
|
+
*/
|
|
387
|
+
readonly subscription: v.OptionalSchema<v.ObjectSchema<{
|
|
388
|
+
readonly vendor: v.PicklistSchema<["claude", "codex", "glm", "kimi", "deepseek"], undefined>;
|
|
389
|
+
readonly providerLabel: v.StringSchema<undefined>;
|
|
390
|
+
readonly provider: v.StringSchema<undefined>;
|
|
391
|
+
readonly model: v.StringSchema<undefined>;
|
|
392
|
+
readonly cost: v.OptionalSchema<v.ObjectSchema<{
|
|
393
|
+
/** List price per 1M input tokens. */
|
|
394
|
+
readonly inputPerMillion: v.NumberSchema<undefined>;
|
|
395
|
+
/** List price per 1M output tokens. */
|
|
396
|
+
readonly outputPerMillion: v.NumberSchema<undefined>;
|
|
397
|
+
/** ISO 4217 currency the prices are expressed in (e.g. `EUR`). */
|
|
398
|
+
readonly currency: v.StringSchema<undefined>;
|
|
399
|
+
}, undefined>, undefined>;
|
|
400
|
+
readonly contextTokens: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
401
|
+
}, undefined>, undefined>;
|
|
402
|
+
}, undefined>, undefined>;
|
|
403
|
+
export type ModelCatalog = v.InferOutput<typeof modelCatalogSchema>;
|
|
404
|
+
export declare const pipelineSchema: v.ObjectSchema<{
|
|
405
|
+
readonly id: v.StringSchema<undefined>;
|
|
406
|
+
readonly name: v.StringSchema<undefined>;
|
|
407
|
+
readonly agentKinds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
408
|
+
/**
|
|
409
|
+
* Per-step human approval gates, parallel to {@link agentKinds}: when
|
|
410
|
+
* `gates[i]` is true the run pauses after step `i` completes so a human can
|
|
411
|
+
* review (and edit) its proposal before the next step runs. Absent / shorter
|
|
412
|
+
* than `agentKinds` means "no gate" for the missing indices, so legacy
|
|
413
|
+
* pipelines run straight through unchanged.
|
|
414
|
+
*/
|
|
415
|
+
readonly gates: v.OptionalSchema<v.ArraySchema<v.BooleanSchema<undefined>, undefined>, undefined>;
|
|
416
|
+
/**
|
|
417
|
+
* Per-step companion quality thresholds, parallel to {@link agentKinds}: when step
|
|
418
|
+
* `i` is a companion kind, `thresholds[i]` is the minimum rating (0..1) its review
|
|
419
|
+
* must reach for the run to proceed; below it the preceding producer is re-run, and
|
|
420
|
+
* once the rework budget is spent the step parks for a human (the iteration-cap gate).
|
|
421
|
+
* `null`/absent on a companion step means "use the companion's default threshold";
|
|
422
|
+
* ignored on non-companion steps.
|
|
423
|
+
*/
|
|
424
|
+
readonly thresholds: v.OptionalSchema<v.ArraySchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>, undefined>, undefined>;
|
|
425
|
+
/**
|
|
426
|
+
* Per-step enable flags, parallel to {@link agentKinds}: when `enabled[i]` is
|
|
427
|
+
* explicitly `false` the step is kept in the pipeline (so it can be toggled back
|
|
428
|
+
* on) but SKIPPED at run start — the execution instance is built only from the
|
|
429
|
+
* enabled steps. Absent / shorter than `agentKinds`, or `true`, means the step
|
|
430
|
+
* runs, so legacy pipelines run every step unchanged.
|
|
431
|
+
*/
|
|
432
|
+
readonly enabled: v.OptionalSchema<v.ArraySchema<v.BooleanSchema<undefined>, undefined>, undefined>;
|
|
433
|
+
/**
|
|
434
|
+
* Per-step consensus configuration, parallel to {@link agentKinds}: when
|
|
435
|
+
* `consensus[i]` is set and its `enabled` is true AND step `i`'s kind carries a
|
|
436
|
+
* consensus capability trait, the step runs through the multi-model consensus
|
|
437
|
+
* mechanism (specialist panel / debate / ranked voting) instead of a single LLM
|
|
438
|
+
* call — optionally gated on the task estimate (sub-threshold ⇒ standard agent).
|
|
439
|
+
* `null`/absent means "standard single-actor agent" (the default). Copied onto
|
|
440
|
+
* the run's step at start, like {@link gates}. See {@link consensusStepConfigSchema}.
|
|
441
|
+
*/
|
|
442
|
+
readonly consensus: v.OptionalSchema<v.ArraySchema<v.NullableSchema<v.ObjectSchema<{
|
|
443
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
444
|
+
readonly strategy: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
445
|
+
readonly participants: v.ArraySchema<v.ObjectSchema<{
|
|
446
|
+
readonly id: v.StringSchema<undefined>;
|
|
447
|
+
readonly role: v.StringSchema<undefined>;
|
|
448
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
449
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
450
|
+
}, undefined>, undefined>;
|
|
451
|
+
readonly synthesizerModelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
452
|
+
readonly rounds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
453
|
+
readonly gating: v.OptionalSchema<v.ObjectSchema<{
|
|
454
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
455
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
456
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
457
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
458
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["consensus", "standard"], undefined>, "consensus">;
|
|
459
|
+
}, undefined>, undefined>;
|
|
460
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
461
|
+
/**
|
|
462
|
+
* Per-step gating, parallel to {@link agentKinds}: when `gating[i]` is set and its
|
|
463
|
+
* `enabled` is true, step `i` runs only if the task estimate meets the threshold
|
|
464
|
+
* (OR across the supplied axes); otherwise it is transparently SKIPPED at runtime.
|
|
465
|
+
* `null`/absent means "always run" (the default). Copied onto the run's step at
|
|
466
|
+
* start, like {@link gates}. A pipeline with any enabled gating requires a
|
|
467
|
+
* `task-estimator` step earlier in the chain. See {@link stepGatingSchema}.
|
|
468
|
+
*/
|
|
469
|
+
readonly gating: v.OptionalSchema<v.ArraySchema<v.NullableSchema<v.ObjectSchema<{
|
|
470
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
471
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
472
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
473
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
474
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["run", "skip"], undefined>, "run">;
|
|
475
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
476
|
+
/**
|
|
477
|
+
* Free-form organizational labels for the saved-pipeline library (filter/search).
|
|
478
|
+
* Absent ⇒ no labels. Applies to built-in and custom pipelines alike.
|
|
479
|
+
*/
|
|
480
|
+
readonly labels: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
481
|
+
/**
|
|
482
|
+
* When true the pipeline is archived: kept but hidden from the default library view
|
|
483
|
+
* (a "show archived" toggle reveals it). Organizational only — an archived built-in
|
|
484
|
+
* is still read-only for structure. Absent / false ⇒ active.
|
|
485
|
+
*/
|
|
486
|
+
readonly archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
487
|
+
/**
|
|
488
|
+
* True for the curated built-in catalog pipelines (`seedPipelines()`). Built-ins
|
|
489
|
+
* are read-only templates: they can be cloned (into an editable copy) but not
|
|
490
|
+
* edited in place. Absent / false on user-created and cloned pipelines.
|
|
491
|
+
*/
|
|
492
|
+
readonly builtin: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
493
|
+
}, undefined>;
|
|
494
|
+
export type Pipeline = v.InferOutput<typeof pipelineSchema>;
|
|
495
|
+
export declare const decisionSchema: v.ObjectSchema<{
|
|
496
|
+
readonly id: v.StringSchema<undefined>;
|
|
497
|
+
readonly question: v.StringSchema<undefined>;
|
|
498
|
+
readonly options: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
499
|
+
readonly chosen: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
500
|
+
}, undefined>;
|
|
501
|
+
export type Decision = v.InferOutput<typeof decisionSchema>;
|
|
502
|
+
/** One entry of a running step's todo list — its label and current status. */
|
|
503
|
+
export declare const stepSubtaskItemSchema: v.ObjectSchema<{
|
|
504
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
505
|
+
readonly label: v.StringSchema<undefined>;
|
|
506
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
507
|
+
}, undefined>;
|
|
508
|
+
export type StepSubtaskItem = v.InferOutput<typeof stepSubtaskItemSchema>;
|
|
509
|
+
/**
|
|
510
|
+
* Live subtask counts for a running step, reported by the container agent from
|
|
511
|
+
* the coding tool's own todo list (e.g. "3/8 done, 1 in progress"). Present only
|
|
512
|
+
* while an async job is in flight and the agent maintains a todo list; the board
|
|
513
|
+
* renders it as a finer-grained progress indicator than `progress` alone.
|
|
514
|
+
*
|
|
515
|
+
* `items` carries the individual todo entries (label + status) so a zoomed-in
|
|
516
|
+
* card can render the actual task list, not just the count. It is optional — an
|
|
517
|
+
* older agent/poll that only reported counts, or the simpler `todos[].done`
|
|
518
|
+
* fallback shape, still validates without it.
|
|
519
|
+
*/
|
|
520
|
+
export declare const stepSubtasksSchema: v.ObjectSchema<{
|
|
521
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
522
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
523
|
+
readonly total: v.NumberSchema<undefined>;
|
|
524
|
+
readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
525
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
526
|
+
readonly label: v.StringSchema<undefined>;
|
|
527
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
528
|
+
}, undefined>, undefined>, undefined>;
|
|
529
|
+
}, undefined>;
|
|
530
|
+
export type StepSubtasks = v.InferOutput<typeof stepSubtasksSchema>;
|
|
531
|
+
/**
|
|
532
|
+
* One GitHub-review-style comment left on a specific block or item of an agent's
|
|
533
|
+
* proposal — either by a human reviewing an approval gate, or by a quality
|
|
534
|
+
* companion (e.g. the Spec Reviewer) grading a structured output. `quotedSource`
|
|
535
|
+
* is the verbatim raw markdown of the block the comment targets (sliced from the
|
|
536
|
+
* proposal by its source line range), so a "request changes" re-run can quote the
|
|
537
|
+
* agent's own text back to it rather than a re-rendered approximation. It is
|
|
538
|
+
* OPTIONAL because a comment may instead anchor to a structured item via
|
|
539
|
+
* {@link anchorId} (e.g. a spec requirement / acceptance-criterion id), where the
|
|
540
|
+
* reviewed output is rendered as discrete items rather than free prose and there is
|
|
541
|
+
* no quoted source range — the shape a companion returns.
|
|
542
|
+
*/
|
|
543
|
+
export declare const stepReviewCommentSchema: v.ObjectSchema<{
|
|
544
|
+
/**
|
|
545
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
546
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
547
|
+
* prose source to quote.
|
|
548
|
+
*/
|
|
549
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
550
|
+
/**
|
|
551
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
552
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
553
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
554
|
+
* there is no prose line range.
|
|
555
|
+
*/
|
|
556
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
557
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
558
|
+
/**
|
|
559
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
560
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
561
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
562
|
+
*/
|
|
563
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
564
|
+
/** The reviewer's note on this block / item. */
|
|
565
|
+
readonly body: v.StringSchema<undefined>;
|
|
566
|
+
}, undefined>;
|
|
567
|
+
export type StepReviewComment = v.InferOutput<typeof stepReviewCommentSchema>;
|
|
568
|
+
/**
|
|
569
|
+
* The standardized, stored verdict a quality companion produced for an output it
|
|
570
|
+
* graded — shared by every companion site (the pipeline companion step and the
|
|
571
|
+
* requirements-rework gate). The raw model response is {@link companionAssessmentSchema}
|
|
572
|
+
* (rating + summary + comments); this is the persisted, self-describing record of how
|
|
573
|
+
* that assessment was applied: the `rating`, the `threshold` it was judged against,
|
|
574
|
+
* whether it `passed`, and the `feedback` surfaced to the human / fed into a rework.
|
|
575
|
+
*/
|
|
576
|
+
export declare const companionVerdictSchema: v.ObjectSchema<{
|
|
577
|
+
/** Overall quality of the graded output (0..1, higher = better). */
|
|
578
|
+
readonly rating: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
579
|
+
/** The quality bar the rating had to reach to pass. */
|
|
580
|
+
readonly threshold: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
581
|
+
/** Whether the rating met the threshold. */
|
|
582
|
+
readonly passed: v.BooleanSchema<undefined>;
|
|
583
|
+
/** The companion's challenge / justification (its assessment summary). */
|
|
584
|
+
readonly feedback: v.StringSchema<undefined>;
|
|
585
|
+
}, undefined>;
|
|
586
|
+
export type CompanionVerdict = v.InferOutput<typeof companionVerdictSchema>;
|
|
587
|
+
/**
|
|
588
|
+
* A human approval gate raised after a step whose pipeline marked it
|
|
589
|
+
* `requiresApproval`. Unlike a {@link Decision} (which an agent raises and which
|
|
590
|
+
* re-runs the same step on resolution), an approval gate fires once the step has
|
|
591
|
+
* already produced its `proposal`; approving advances the run (carrying the —
|
|
592
|
+
* possibly edited — proposal forward as context), requesting changes re-runs the
|
|
593
|
+
* same step with the human's `feedback` (+ per-block `comments`), and rejecting
|
|
594
|
+
* stops the run entirely (a terminal `rejected` failure the board can retry).
|
|
595
|
+
*/
|
|
596
|
+
export declare const stepApprovalSchema: v.ObjectSchema<{
|
|
597
|
+
/** Unique id of this gate; the durable run parks on it like a decision. */
|
|
598
|
+
readonly id: v.StringSchema<undefined>;
|
|
599
|
+
/** `pending` while awaiting the human; terminal `approved`/`rejected`; `changes_requested` re-runs the step. */
|
|
600
|
+
readonly status: v.PicklistSchema<["pending", "approved", "changes_requested", "rejected"], undefined>;
|
|
601
|
+
/** The agent's output the human is reviewing (editable before approval). */
|
|
602
|
+
readonly proposal: v.StringSchema<undefined>;
|
|
603
|
+
/** When changes were requested, the human's freeform guidance fed into the re-run. */
|
|
604
|
+
readonly feedback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
605
|
+
/** When changes were requested, per-block review comments fed into the re-run. */
|
|
606
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
607
|
+
/**
|
|
608
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
609
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
610
|
+
* prose source to quote.
|
|
611
|
+
*/
|
|
612
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
613
|
+
/**
|
|
614
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
615
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
616
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
617
|
+
* there is no prose line range.
|
|
618
|
+
*/
|
|
619
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
620
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
621
|
+
/**
|
|
622
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
623
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
624
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
625
|
+
*/
|
|
626
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
627
|
+
/** The reviewer's note on this block / item. */
|
|
628
|
+
readonly body: v.StringSchema<undefined>;
|
|
629
|
+
}, undefined>, undefined>, undefined>;
|
|
630
|
+
}, undefined>;
|
|
631
|
+
export type StepApproval = v.InferOutput<typeof stepApprovalSchema>;
|
|
632
|
+
/**
|
|
633
|
+
* The agent flows that produce an "agent run" (a container-backed job whose
|
|
634
|
+
* lifecycle, progress and failure the board surfaces uniformly):
|
|
635
|
+
* - `bootstrap` — a "bootstrap repo" run that scaffolds/adapts a new repo.
|
|
636
|
+
* - `execution` — a task pipeline run that implements a board task.
|
|
637
|
+
*/
|
|
638
|
+
export declare const agentRunKindSchema: v.PicklistSchema<["bootstrap", "execution"], undefined>;
|
|
639
|
+
export type AgentRunKind = v.InferOutput<typeof agentRunKindSchema>;
|
|
640
|
+
/**
|
|
641
|
+
* How an agent run faulted, so the board can classify the failure (and hint
|
|
642
|
+
* whether a retry is likely to help). The union spans both flows; a given flow
|
|
643
|
+
* only ever produces a subset:
|
|
644
|
+
* - `preflight` — rejected before dispatch (repo missing/not empty, not connected). [bootstrap]
|
|
645
|
+
* - `dispatch` — the container accept-request itself failed (HTTP / network). [bootstrap]
|
|
646
|
+
* - `evicted` — the container vanished mid-run (eviction/crash). Retrying spins a fresh one.
|
|
647
|
+
* - `timeout` — a container watchdog fired (inactivity or max-duration).
|
|
648
|
+
* - `agent` — the agent / git push reported a failure.
|
|
649
|
+
* - `job_failed` — an async container job came back failed. [execution]
|
|
650
|
+
* - `rejected` — a human rejected a gated proposal, stopping the run. [execution]
|
|
651
|
+
* - `cancelled` — the user (or an orphan sweep) explicitly stopped the run.
|
|
652
|
+
* - `unknown` — anything not otherwise classified.
|
|
653
|
+
*/
|
|
654
|
+
export declare const agentFailureKindSchema: v.PicklistSchema<["preflight", "dispatch", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "cancelled", "unknown"], undefined>;
|
|
655
|
+
export type AgentFailureKind = v.InferOutput<typeof agentFailureKindSchema>;
|
|
656
|
+
/**
|
|
657
|
+
* Structured diagnostics captured when an agent run fails, stored on the run and
|
|
658
|
+
* surfaced on the board so a crash isn't just a one-line message. The container's
|
|
659
|
+
* stdout/stderr can't always be pulled into this record (an evicted container is
|
|
660
|
+
* gone), so for `evicted`/`timeout` failures the `hint` points at where to look.
|
|
661
|
+
*/
|
|
662
|
+
export declare const agentFailureSchema: v.ObjectSchema<{
|
|
663
|
+
readonly kind: v.PicklistSchema<["preflight", "dispatch", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "cancelled", "unknown"], undefined>;
|
|
664
|
+
/** Human-readable summary (mirrors the run's `error` for back-compat). */
|
|
665
|
+
readonly message: v.StringSchema<undefined>;
|
|
666
|
+
/** Extended detail when available (the harness's reason, an HTTP body, …). */
|
|
667
|
+
readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
668
|
+
/** Where to look next (e.g. "check the container logs for this job id"). */
|
|
669
|
+
readonly hint: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
670
|
+
/** Epoch ms the failure was recorded. */
|
|
671
|
+
readonly occurredAt: v.NumberSchema<undefined>;
|
|
672
|
+
/** Last subtask counts seen before the failure, for context (null if none). */
|
|
673
|
+
readonly lastSubtasks: v.NullableSchema<v.ObjectSchema<{
|
|
674
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
675
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
676
|
+
readonly total: v.NumberSchema<undefined>;
|
|
677
|
+
readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
678
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
679
|
+
readonly label: v.StringSchema<undefined>;
|
|
680
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
681
|
+
}, undefined>, undefined>, undefined>;
|
|
682
|
+
}, undefined>, undefined>;
|
|
683
|
+
}, undefined>;
|
|
684
|
+
export type AgentFailure = v.InferOutput<typeof agentFailureSchema>;
|
|
685
|
+
/**
|
|
686
|
+
* State a polling **gate** step carries (today `ci` and `conflicts`). A gate is
|
|
687
|
+
* special (like a `deployer` step): it is NOT itself an LLM/container agent. It
|
|
688
|
+
* runs a programmatic precheck against a provider (CI check runs / PR mergeability)
|
|
689
|
+
* for the PR head commit and only escalates to a helper container agent (`ci-fixer`
|
|
690
|
+
* / `conflict-resolver`) on a negative verdict, looping until the precheck passes or
|
|
691
|
+
* the attempt budget is spent. Which gate a step is comes from its `agentKind`, so it
|
|
692
|
+
* is not duplicated here. See the engine's `GateDefinition` registry.
|
|
693
|
+
* - `phase: 'checking'` — running the precheck / waiting for the provider.
|
|
694
|
+
* - `phase: 'working'` — a helper agent is in flight (tracked via the step's
|
|
695
|
+
* `jobId`); on completion the gate returns to `checking`.
|
|
696
|
+
*/
|
|
697
|
+
/** One failing check the CI gate's precheck saw, flattened for display. */
|
|
698
|
+
export declare const gateFailingCheckSchema: v.ObjectSchema<{
|
|
699
|
+
readonly name: v.StringSchema<undefined>;
|
|
700
|
+
/** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
|
|
701
|
+
readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
702
|
+
}, undefined>;
|
|
703
|
+
export type GateFailingCheck = v.InferOutput<typeof gateFailingCheckSchema>;
|
|
704
|
+
export declare const gateStepStateSchema: v.ObjectSchema<{
|
|
705
|
+
readonly phase: v.PicklistSchema<["checking", "working"], undefined>;
|
|
706
|
+
/** How many helper-agent attempts have been dispatched so far. */
|
|
707
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
708
|
+
/** Ceiling on attempts, resolved from the task's merge preset at step start. */
|
|
709
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
710
|
+
/** The PR head commit being gated, once resolved. */
|
|
711
|
+
readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
712
|
+
/**
|
|
713
|
+
* The most recent precheck verdict, so the UI can show why the gate is looping
|
|
714
|
+
* (failing → a helper is fixing) vs idle-passing. Set on every probe.
|
|
715
|
+
*/
|
|
716
|
+
readonly lastVerdict: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["pass", "pending", "fail"], undefined>, undefined>, undefined>;
|
|
717
|
+
/**
|
|
718
|
+
* Human-readable summary of the latest failing precheck (the failing CI checks /
|
|
719
|
+
* the conflict reason) — the conclusion detail that used to be fed only to the
|
|
720
|
+
* helper agent and then discarded. Carried across the helper dispatch so the
|
|
721
|
+
* window keeps showing what is being fixed. Null when the last probe passed.
|
|
722
|
+
*/
|
|
723
|
+
readonly lastFailureSummary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
724
|
+
/**
|
|
725
|
+
* Structured failing checks behind {@link lastFailureSummary} for the CI gate, so
|
|
726
|
+
* the UI can list each red check by name + conclusion. Absent for the conflicts
|
|
727
|
+
* gate (GitHub reports no file-level detail) and when the last probe passed.
|
|
728
|
+
*/
|
|
729
|
+
readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
730
|
+
readonly name: v.StringSchema<undefined>;
|
|
731
|
+
/** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
|
|
732
|
+
readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
733
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
734
|
+
/**
|
|
735
|
+
* Epoch ms of the release marker for a time-windowed gate (post-release-health) — the
|
|
736
|
+
* moment it began watching the deployed release. The gate keeps polling `pending`
|
|
737
|
+
* until this + the preset's watch window has elapsed (then a clean run passes) or a
|
|
738
|
+
* monitor/SLO regresses (then it escalates to the on-call agent). Absent for the
|
|
739
|
+
* CI/conflicts gates.
|
|
740
|
+
*/
|
|
741
|
+
readonly watchSince: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
742
|
+
/**
|
|
743
|
+
* The watch-window length (minutes) for a time-windowed gate (post-release-health),
|
|
744
|
+
* resolved from the task's merge preset ONCE on first entry (alongside `maxAttempts`)
|
|
745
|
+
* so the probe doesn't re-load the block + re-resolve the preset on every poll. Absent
|
|
746
|
+
* for the CI/conflicts gates.
|
|
747
|
+
*/
|
|
748
|
+
readonly watchWindowMinutes: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
749
|
+
/**
|
|
750
|
+
* The regressed signals captured when the post-release-health gate escalated to the
|
|
751
|
+
* on-call agent, so the agent's completion handler can build the `release_regression`
|
|
752
|
+
* notification + incident enrichment from the SAME evidence the agent investigated
|
|
753
|
+
* — rather than re-reading Datadog (a third round-trip that could also disagree with
|
|
754
|
+
* what the agent saw if the window moved). Absent for the CI/conflicts gates.
|
|
755
|
+
*/
|
|
756
|
+
readonly regressedSignals: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
757
|
+
readonly kind: v.PicklistSchema<["monitor", "slo"], undefined>;
|
|
758
|
+
readonly id: v.StringSchema<undefined>;
|
|
759
|
+
readonly name: v.StringSchema<undefined>;
|
|
760
|
+
readonly state: v.PicklistSchema<["ok", "warn", "alert", "no_data"], undefined>;
|
|
761
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
762
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
763
|
+
}, undefined>;
|
|
764
|
+
export type GateStepState = v.InferOutput<typeof gateStepStateSchema>;
|
|
765
|
+
/**
|
|
766
|
+
* State a `tester` step carries while it runs the Tester → Fixer loop. Unlike `ci`,
|
|
767
|
+
* the gate's own work IS a container job (the Tester); on a withheld greenlight the
|
|
768
|
+
* engine loops a `fixer` container agent and re-tests.
|
|
769
|
+
* - `phase: 'testing'` — a Tester job is in flight (tracked via the step's `jobId`).
|
|
770
|
+
* - `phase: 'fixing'` — a Fixer job is in flight; on completion the step returns to
|
|
771
|
+
* `testing` and a fresh Tester job is dispatched.
|
|
772
|
+
*/
|
|
773
|
+
export declare const testerStepStateSchema: v.ObjectSchema<{
|
|
774
|
+
readonly phase: v.PicklistSchema<["testing", "fixing"], undefined>;
|
|
775
|
+
/** How many `fixer` attempts have been dispatched so far. */
|
|
776
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
777
|
+
/** Ceiling on fixer attempts, resolved from the task's merge preset at step start. */
|
|
778
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
779
|
+
/** The most recent Tester report (what was tested, outcomes, concerns, greenlight). */
|
|
780
|
+
readonly lastReport: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
781
|
+
readonly greenlight: v.BooleanSchema<undefined>;
|
|
782
|
+
readonly summary: v.StringSchema<undefined>;
|
|
783
|
+
readonly tested: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
784
|
+
readonly outcomes: v.ArraySchema<v.ObjectSchema<{
|
|
785
|
+
readonly name: v.StringSchema<undefined>;
|
|
786
|
+
readonly status: v.PicklistSchema<["passed", "failed", "skipped"], undefined>;
|
|
787
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
788
|
+
}, undefined>, undefined>;
|
|
789
|
+
readonly concerns: v.ArraySchema<v.ObjectSchema<{
|
|
790
|
+
readonly title: v.StringSchema<undefined>;
|
|
791
|
+
readonly detail: v.StringSchema<undefined>;
|
|
792
|
+
readonly severity: v.PicklistSchema<["low", "medium", "high", "critical"], undefined>;
|
|
793
|
+
}, undefined>, undefined>;
|
|
794
|
+
readonly environment: v.OptionalSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
795
|
+
}, undefined>, undefined>, undefined>;
|
|
796
|
+
}, undefined>;
|
|
797
|
+
export type TesterStepState = v.InferOutput<typeof testerStepStateSchema>;
|
|
798
|
+
/**
|
|
799
|
+
* Per-step LLM observability rollup: a compact aggregate over every model call the
|
|
800
|
+
* step's container made, recorded by the LLM proxy and summed by the engine for the
|
|
801
|
+
* board. It surfaces, at a glance, token usage, how close the step ran to its
|
|
802
|
+
* output-token limit (truncation), the latency split between transport/proxy
|
|
803
|
+
* overhead and actual model execution, and any errors/warnings. The full per-call
|
|
804
|
+
* detail (prompts + responses) is fetched on demand for the drill-down panel.
|
|
805
|
+
* Absent when the observability sink is not wired.
|
|
806
|
+
*/
|
|
807
|
+
export declare const stepMetricsSchema: v.ObjectSchema<{
|
|
808
|
+
/** Number of model calls recorded for this step. */
|
|
809
|
+
readonly calls: v.NumberSchema<undefined>;
|
|
810
|
+
/** Sum of prompt (input) tokens across the step's calls. */
|
|
811
|
+
readonly promptTokens: v.NumberSchema<undefined>;
|
|
812
|
+
/** Sum of completion (output) tokens across the step's calls. */
|
|
813
|
+
readonly completionTokens: v.NumberSchema<undefined>;
|
|
814
|
+
/** Largest single completion the model produced (closest approach to the limit). */
|
|
815
|
+
readonly peakCompletionTokens: v.NumberSchema<undefined>;
|
|
816
|
+
/** The output ceiling in effect (max requested `max_tokens`), or null when unknown. */
|
|
817
|
+
readonly maxOutputTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
818
|
+
/** Calls cut short by the output limit (`finish_reason === 'length'`). */
|
|
819
|
+
readonly truncatedCalls: v.NumberSchema<undefined>;
|
|
820
|
+
/** Sum of model execution time (ms) — the "actual prompt/tool execution" slice. */
|
|
821
|
+
readonly upstreamMs: v.NumberSchema<undefined>;
|
|
822
|
+
/** Sum of transport/proxy overhead (ms) — the interim-layer cost. */
|
|
823
|
+
readonly overheadMs: v.NumberSchema<undefined>;
|
|
824
|
+
/** Calls that failed (non-2xx / refused / in-process error). */
|
|
825
|
+
readonly errors: v.NumberSchema<undefined>;
|
|
826
|
+
/** Successful calls that warned (truncated or content-filtered). */
|
|
827
|
+
readonly warnings: v.NumberSchema<undefined>;
|
|
828
|
+
}, undefined>;
|
|
829
|
+
export type StepMetrics = v.InferOutput<typeof stepMetricsSchema>;
|
|
830
|
+
export declare const pipelineStepSchema: v.ObjectSchema<{
|
|
831
|
+
/**
|
|
832
|
+
* Id of the execution run (the {@link executionInstanceSchema} `id`) this step
|
|
833
|
+
* belongs to — surfaced on every step so a lone step in a log line or a detail view
|
|
834
|
+
* can name its run, for easier debugging. A projection that always equals the parent
|
|
835
|
+
* instance's `id`: stamped from the enclosing instance when the run is read or
|
|
836
|
+
* emitted, not persisted independently. Absent only on steps not yet round-tripped.
|
|
837
|
+
*/
|
|
838
|
+
readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
839
|
+
readonly agentKind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
840
|
+
readonly state: v.PicklistSchema<["pending", "working", "waiting_decision", "done"], undefined>;
|
|
841
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
842
|
+
/** LLM observability rollup for this step; see {@link stepMetricsSchema}. */
|
|
843
|
+
readonly metrics: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
844
|
+
/** Number of model calls recorded for this step. */
|
|
845
|
+
readonly calls: v.NumberSchema<undefined>;
|
|
846
|
+
/** Sum of prompt (input) tokens across the step's calls. */
|
|
847
|
+
readonly promptTokens: v.NumberSchema<undefined>;
|
|
848
|
+
/** Sum of completion (output) tokens across the step's calls. */
|
|
849
|
+
readonly completionTokens: v.NumberSchema<undefined>;
|
|
850
|
+
/** Largest single completion the model produced (closest approach to the limit). */
|
|
851
|
+
readonly peakCompletionTokens: v.NumberSchema<undefined>;
|
|
852
|
+
/** The output ceiling in effect (max requested `max_tokens`), or null when unknown. */
|
|
853
|
+
readonly maxOutputTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
854
|
+
/** Calls cut short by the output limit (`finish_reason === 'length'`). */
|
|
855
|
+
readonly truncatedCalls: v.NumberSchema<undefined>;
|
|
856
|
+
/** Sum of model execution time (ms) — the "actual prompt/tool execution" slice. */
|
|
857
|
+
readonly upstreamMs: v.NumberSchema<undefined>;
|
|
858
|
+
/** Sum of transport/proxy overhead (ms) — the interim-layer cost. */
|
|
859
|
+
readonly overheadMs: v.NumberSchema<undefined>;
|
|
860
|
+
/** Calls that failed (non-2xx / refused / in-process error). */
|
|
861
|
+
readonly errors: v.NumberSchema<undefined>;
|
|
862
|
+
/** Successful calls that warned (truncated or content-filtered). */
|
|
863
|
+
readonly warnings: v.NumberSchema<undefined>;
|
|
864
|
+
}, undefined>, undefined>, undefined>;
|
|
865
|
+
/**
|
|
866
|
+
* Live gate state while a polling gate step (`ci` / `conflicts`) runs its
|
|
867
|
+
* precheck-or-escalate loop; see {@link gateStepStateSchema}. The gate kind is
|
|
868
|
+
* `agentKind`.
|
|
869
|
+
*/
|
|
870
|
+
readonly gate: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
871
|
+
readonly phase: v.PicklistSchema<["checking", "working"], undefined>;
|
|
872
|
+
/** How many helper-agent attempts have been dispatched so far. */
|
|
873
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
874
|
+
/** Ceiling on attempts, resolved from the task's merge preset at step start. */
|
|
875
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
876
|
+
/** The PR head commit being gated, once resolved. */
|
|
877
|
+
readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
878
|
+
/**
|
|
879
|
+
* The most recent precheck verdict, so the UI can show why the gate is looping
|
|
880
|
+
* (failing → a helper is fixing) vs idle-passing. Set on every probe.
|
|
881
|
+
*/
|
|
882
|
+
readonly lastVerdict: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["pass", "pending", "fail"], undefined>, undefined>, undefined>;
|
|
883
|
+
/**
|
|
884
|
+
* Human-readable summary of the latest failing precheck (the failing CI checks /
|
|
885
|
+
* the conflict reason) — the conclusion detail that used to be fed only to the
|
|
886
|
+
* helper agent and then discarded. Carried across the helper dispatch so the
|
|
887
|
+
* window keeps showing what is being fixed. Null when the last probe passed.
|
|
888
|
+
*/
|
|
889
|
+
readonly lastFailureSummary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
890
|
+
/**
|
|
891
|
+
* Structured failing checks behind {@link lastFailureSummary} for the CI gate, so
|
|
892
|
+
* the UI can list each red check by name + conclusion. Absent for the conflicts
|
|
893
|
+
* gate (GitHub reports no file-level detail) and when the last probe passed.
|
|
894
|
+
*/
|
|
895
|
+
readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
896
|
+
readonly name: v.StringSchema<undefined>;
|
|
897
|
+
/** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
|
|
898
|
+
readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
899
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
900
|
+
/**
|
|
901
|
+
* Epoch ms of the release marker for a time-windowed gate (post-release-health) — the
|
|
902
|
+
* moment it began watching the deployed release. The gate keeps polling `pending`
|
|
903
|
+
* until this + the preset's watch window has elapsed (then a clean run passes) or a
|
|
904
|
+
* monitor/SLO regresses (then it escalates to the on-call agent). Absent for the
|
|
905
|
+
* CI/conflicts gates.
|
|
906
|
+
*/
|
|
907
|
+
readonly watchSince: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
908
|
+
/**
|
|
909
|
+
* The watch-window length (minutes) for a time-windowed gate (post-release-health),
|
|
910
|
+
* resolved from the task's merge preset ONCE on first entry (alongside `maxAttempts`)
|
|
911
|
+
* so the probe doesn't re-load the block + re-resolve the preset on every poll. Absent
|
|
912
|
+
* for the CI/conflicts gates.
|
|
913
|
+
*/
|
|
914
|
+
readonly watchWindowMinutes: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
915
|
+
/**
|
|
916
|
+
* The regressed signals captured when the post-release-health gate escalated to the
|
|
917
|
+
* on-call agent, so the agent's completion handler can build the `release_regression`
|
|
918
|
+
* notification + incident enrichment from the SAME evidence the agent investigated
|
|
919
|
+
* — rather than re-reading Datadog (a third round-trip that could also disagree with
|
|
920
|
+
* what the agent saw if the window moved). Absent for the CI/conflicts gates.
|
|
921
|
+
*/
|
|
922
|
+
readonly regressedSignals: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
923
|
+
readonly kind: v.PicklistSchema<["monitor", "slo"], undefined>;
|
|
924
|
+
readonly id: v.StringSchema<undefined>;
|
|
925
|
+
readonly name: v.StringSchema<undefined>;
|
|
926
|
+
readonly state: v.PicklistSchema<["ok", "warn", "alert", "no_data"], undefined>;
|
|
927
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
928
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
929
|
+
}, undefined>, undefined>, undefined>;
|
|
930
|
+
/** Live Tester→Fixer loop state while a `tester` step runs/fixes; see {@link testerStepStateSchema}. */
|
|
931
|
+
readonly test: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
932
|
+
readonly phase: v.PicklistSchema<["testing", "fixing"], undefined>;
|
|
933
|
+
/** How many `fixer` attempts have been dispatched so far. */
|
|
934
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
935
|
+
/** Ceiling on fixer attempts, resolved from the task's merge preset at step start. */
|
|
936
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
937
|
+
/** The most recent Tester report (what was tested, outcomes, concerns, greenlight). */
|
|
938
|
+
readonly lastReport: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
939
|
+
readonly greenlight: v.BooleanSchema<undefined>;
|
|
940
|
+
readonly summary: v.StringSchema<undefined>;
|
|
941
|
+
readonly tested: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
942
|
+
readonly outcomes: v.ArraySchema<v.ObjectSchema<{
|
|
943
|
+
readonly name: v.StringSchema<undefined>;
|
|
944
|
+
readonly status: v.PicklistSchema<["passed", "failed", "skipped"], undefined>;
|
|
945
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
946
|
+
}, undefined>, undefined>;
|
|
947
|
+
readonly concerns: v.ArraySchema<v.ObjectSchema<{
|
|
948
|
+
readonly title: v.StringSchema<undefined>;
|
|
949
|
+
readonly detail: v.StringSchema<undefined>;
|
|
950
|
+
readonly severity: v.PicklistSchema<["low", "medium", "high", "critical"], undefined>;
|
|
951
|
+
}, undefined>, undefined>;
|
|
952
|
+
readonly environment: v.OptionalSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
953
|
+
}, undefined>, undefined>, undefined>;
|
|
954
|
+
}, undefined>, undefined>, undefined>;
|
|
955
|
+
/** Live subtask counts while an async (container) step runs; see {@link stepSubtasksSchema}. */
|
|
956
|
+
readonly subtasks: v.OptionalSchema<v.ObjectSchema<{
|
|
957
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
958
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
959
|
+
readonly total: v.NumberSchema<undefined>;
|
|
960
|
+
readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
961
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
962
|
+
readonly label: v.StringSchema<undefined>;
|
|
963
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
964
|
+
}, undefined>, undefined>, undefined>;
|
|
965
|
+
}, undefined>, undefined>;
|
|
966
|
+
/**
|
|
967
|
+
* True while a container-backed step is being dispatched and its per-run
|
|
968
|
+
* container is cold-booting — i.e. before the container is up and the agent has
|
|
969
|
+
* begun executing. Set the moment the job is dispatched (the dispatch blocks
|
|
970
|
+
* until the container accepts the job, so it covers the whole boot window) and
|
|
971
|
+
* cleared on the first successful poll, when the container is provably up. Lets
|
|
972
|
+
* the board show an explicit "Spinning up container…" phase instead of a blank
|
|
973
|
+
* "working" state. Only ever set on async (container) steps.
|
|
974
|
+
*/
|
|
975
|
+
readonly startingContainer: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
976
|
+
readonly decision: v.NullableSchema<v.ObjectSchema<{
|
|
977
|
+
readonly id: v.StringSchema<undefined>;
|
|
978
|
+
readonly question: v.StringSchema<undefined>;
|
|
979
|
+
readonly options: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
980
|
+
readonly chosen: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
981
|
+
}, undefined>, undefined>;
|
|
982
|
+
/**
|
|
983
|
+
* Whether a human approval gate fires after this step completes. Copied from
|
|
984
|
+
* the pipeline's `gates` at run start; absent means no gate.
|
|
985
|
+
*/
|
|
986
|
+
readonly requiresApproval: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
987
|
+
/**
|
|
988
|
+
* The live approval gate for this step (see {@link stepApprovalSchema}). Set
|
|
989
|
+
* once the step's proposal is ready and `requiresApproval` is true; null/absent
|
|
990
|
+
* otherwise.
|
|
991
|
+
*/
|
|
992
|
+
readonly approval: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
993
|
+
/** Unique id of this gate; the durable run parks on it like a decision. */
|
|
994
|
+
readonly id: v.StringSchema<undefined>;
|
|
995
|
+
/** `pending` while awaiting the human; terminal `approved`/`rejected`; `changes_requested` re-runs the step. */
|
|
996
|
+
readonly status: v.PicklistSchema<["pending", "approved", "changes_requested", "rejected"], undefined>;
|
|
997
|
+
/** The agent's output the human is reviewing (editable before approval). */
|
|
998
|
+
readonly proposal: v.StringSchema<undefined>;
|
|
999
|
+
/** When changes were requested, the human's freeform guidance fed into the re-run. */
|
|
1000
|
+
readonly feedback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1001
|
+
/** When changes were requested, per-block review comments fed into the re-run. */
|
|
1002
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1003
|
+
/**
|
|
1004
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
1005
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
1006
|
+
* prose source to quote.
|
|
1007
|
+
*/
|
|
1008
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1009
|
+
/**
|
|
1010
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
1011
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
1012
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
1013
|
+
* there is no prose line range.
|
|
1014
|
+
*/
|
|
1015
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1016
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
1019
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
1020
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
1021
|
+
*/
|
|
1022
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1023
|
+
/** The reviewer's note on this block / item. */
|
|
1024
|
+
readonly body: v.StringSchema<undefined>;
|
|
1025
|
+
}, undefined>, undefined>, undefined>;
|
|
1026
|
+
}, undefined>, undefined>, undefined>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Live state of a companion step that reviews a preceding producer step. Set when
|
|
1029
|
+
* this step's `agentKind` is a companion kind. `threshold` is the quality bar the
|
|
1030
|
+
* companion's latest rating (the last `verdicts` entry) must reach; `attempts`
|
|
1031
|
+
* counts only the AUTOMATIC reworks performed, and once it reaches `maxAttempts` the
|
|
1032
|
+
* step parks on the iteration-cap gate (`exceeded`) for a human rather than failing.
|
|
1033
|
+
* A human "request changes" on the companion's gate also re-runs the producer but does
|
|
1034
|
+
* NOT consume `attempts` (only the automatic loop is budgeted). Absent for non-companion steps.
|
|
1035
|
+
*/
|
|
1036
|
+
readonly companion: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1037
|
+
/** The quality bar (0..1) the latest verdict's rating must reach; seeded from the pipeline. */
|
|
1038
|
+
readonly threshold: v.NumberSchema<undefined>;
|
|
1039
|
+
/** The automatic rework budget: once `attempts` reaches this the gate parks for a human (`exceeded`). */
|
|
1040
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
1041
|
+
/**
|
|
1042
|
+
* How many AUTOMATIC reworks the companion has driven so far (the producer is
|
|
1043
|
+
* looped back once per failed verdict). Human "request changes" cycles are not
|
|
1044
|
+
* counted. Defaults to 0; once it reaches `maxAttempts` the step parks on the
|
|
1045
|
+
* iteration-cap gate (`exceeded`) — an "extra round" raises `maxAttempts` by one.
|
|
1046
|
+
*/
|
|
1047
|
+
readonly attempts: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
1048
|
+
/**
|
|
1049
|
+
* One standardized {@link companionVerdictSchema} per grading cycle, in order —
|
|
1050
|
+
* the full sequence of correction iterations (the producer is re-run after each
|
|
1051
|
+
* rejected verdict), including any human-driven ones. Empty before the first
|
|
1052
|
+
* grade; the last entry is the latest.
|
|
1053
|
+
*/
|
|
1054
|
+
readonly verdicts: v.ArraySchema<v.ObjectSchema<{
|
|
1055
|
+
/** Overall quality of the graded output (0..1, higher = better). */
|
|
1056
|
+
readonly rating: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
1057
|
+
/** The quality bar the rating had to reach to pass. */
|
|
1058
|
+
readonly threshold: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
1059
|
+
/** Whether the rating met the threshold. */
|
|
1060
|
+
readonly passed: v.BooleanSchema<undefined>;
|
|
1061
|
+
/** The companion's challenge / justification (its assessment summary). */
|
|
1062
|
+
readonly feedback: v.StringSchema<undefined>;
|
|
1063
|
+
}, undefined>, undefined>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Set true when the automatic rework budget (`maxAttempts`) was spent with the
|
|
1066
|
+
* rating still below the bar: instead of failing the run, the step parks on its
|
|
1067
|
+
* approval gate for a human to resolve via the shared iteration-cap surface
|
|
1068
|
+
* (one more round / proceed anyway / stop & reset). Cleared once the human grants
|
|
1069
|
+
* an extra round (the loop resumes). Absent until/unless the cap is hit.
|
|
1070
|
+
*/
|
|
1071
|
+
readonly exceeded: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1072
|
+
}, undefined>, undefined>, undefined>;
|
|
1073
|
+
/**
|
|
1074
|
+
* Transient rework feedback carried on a PRODUCER step while it is being re-run by
|
|
1075
|
+
* a downstream companion (the analogue of an approval's `changes_requested`
|
|
1076
|
+
* feedback for the automatic path). Folded into the agent's revision context on the
|
|
1077
|
+
* re-run, then cleared. Absent when no companion rework is in flight.
|
|
1078
|
+
*/
|
|
1079
|
+
readonly rework: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1080
|
+
/** The producer's previous proposal the companion challenged. */
|
|
1081
|
+
readonly previousProposal: v.StringSchema<undefined>;
|
|
1082
|
+
/** The companion's prose feedback driving the rework. */
|
|
1083
|
+
readonly feedback: v.StringSchema<undefined>;
|
|
1084
|
+
/** Optional per-item / per-block challenges to address. */
|
|
1085
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1086
|
+
/**
|
|
1087
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
1088
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
1089
|
+
* prose source to quote.
|
|
1090
|
+
*/
|
|
1091
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1092
|
+
/**
|
|
1093
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
1094
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
1095
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
1096
|
+
* there is no prose line range.
|
|
1097
|
+
*/
|
|
1098
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1099
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
1102
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
1103
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
1104
|
+
*/
|
|
1105
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1106
|
+
/** The reviewer's note on this block / item. */
|
|
1107
|
+
readonly body: v.StringSchema<undefined>;
|
|
1108
|
+
}, undefined>, undefined>, undefined>;
|
|
1109
|
+
}, undefined>, undefined>, undefined>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Transient incorporation intent carried on a parked `requirements-review` gate step.
|
|
1112
|
+
* Set when the human answers the findings and asks to incorporate: the run is signalled
|
|
1113
|
+
* to wake and the durable driver, on re-entering the gate, folds the answers into a
|
|
1114
|
+
* document and re-reviews it (the LLM work that used to block the HTTP request). Cleared
|
|
1115
|
+
* once that async cycle completes. `feedback` is the human's optional "do it differently"
|
|
1116
|
+
* direction (a redo). Absent when no incorporation is pending.
|
|
1117
|
+
*/
|
|
1118
|
+
readonly pendingIncorporation: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1119
|
+
readonly feedback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1120
|
+
}, undefined>, undefined>, undefined>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Consensus configuration for this step, copied from the pipeline's `consensus`
|
|
1123
|
+
* array at run start. Present (with `enabled: true`) when this step should run
|
|
1124
|
+
* through the multi-model consensus mechanism; read by the consensus executor
|
|
1125
|
+
* (and to decide gating against the block estimate). Absent ⇒ standard agent.
|
|
1126
|
+
* See {@link consensusStepConfigSchema}.
|
|
1127
|
+
*/
|
|
1128
|
+
readonly consensus: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1129
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1130
|
+
readonly strategy: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
1131
|
+
readonly participants: v.ArraySchema<v.ObjectSchema<{
|
|
1132
|
+
readonly id: v.StringSchema<undefined>;
|
|
1133
|
+
readonly role: v.StringSchema<undefined>;
|
|
1134
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1135
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1136
|
+
}, undefined>, undefined>;
|
|
1137
|
+
readonly synthesizerModelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1138
|
+
readonly rounds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
1139
|
+
readonly gating: v.OptionalSchema<v.ObjectSchema<{
|
|
1140
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1141
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1142
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1143
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1144
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["consensus", "standard"], undefined>, "consensus">;
|
|
1145
|
+
}, undefined>, undefined>;
|
|
1146
|
+
}, undefined>, undefined>, undefined>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Estimate-based gating for this step, copied from the pipeline's `gating` array at
|
|
1149
|
+
* run start. When present (with `enabled: true`) the step is skipped at runtime unless
|
|
1150
|
+
* the block's task estimate meets the threshold. Absent ⇒ always run. See
|
|
1151
|
+
* {@link stepGatingSchema}.
|
|
1152
|
+
*/
|
|
1153
|
+
readonly gating: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1154
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1155
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1156
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1157
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1158
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["run", "skip"], undefined>, "run">;
|
|
1159
|
+
}, undefined>, undefined>, undefined>;
|
|
1160
|
+
/**
|
|
1161
|
+
* True when this step was skipped at runtime because its `gating` was not satisfied
|
|
1162
|
+
* (the task estimate fell below the threshold). The step's `state` is `done` with no
|
|
1163
|
+
* output; the UI renders it as "skipped (gated)". Absent ⇒ the step ran normally.
|
|
1164
|
+
*/
|
|
1165
|
+
readonly skipped: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1166
|
+
/** Text the agent produced for this step (when LLM execution is enabled). */
|
|
1167
|
+
readonly output: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1168
|
+
/** Identifier of the model that produced `output`, for transparency. */
|
|
1169
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Ids of the prompt-fragment library entries that were folded into this step's
|
|
1172
|
+
* system prompt — the manual selection on the block unioned with the relevance
|
|
1173
|
+
* selector's pick. Recorded for observability and replay-stability; absent when
|
|
1174
|
+
* the fragment-library module is not configured.
|
|
1175
|
+
*/
|
|
1176
|
+
readonly selectedFragmentIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Identifier of an in-flight asynchronous agent job (a container run polled by
|
|
1179
|
+
* the durable driver). Set while the step is dispatched-but-not-yet-finished so
|
|
1180
|
+
* a Workflows replay re-attaches to the running job instead of starting a new
|
|
1181
|
+
* one; cleared once the job's result is recorded.
|
|
1182
|
+
*/
|
|
1183
|
+
readonly jobId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Epoch ms the step first began executing (transitioned to `working`). Set once
|
|
1186
|
+
* and never overwritten on subsequent state changes, so a re-run/replay keeps the
|
|
1187
|
+
* original start. Absent until the step starts.
|
|
1188
|
+
*/
|
|
1189
|
+
readonly startedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Epoch ms the step finished (transitioned to `done`). With {@link startedAt}
|
|
1192
|
+
* this yields the step's execution duration. Absent until the step completes.
|
|
1193
|
+
*/
|
|
1194
|
+
readonly finishedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Epoch ms the step parked on a human (an approval gate, a raised decision, or an
|
|
1197
|
+
* iteration-cap gate), freezing its duration clock: while parked, elapsed time stops
|
|
1198
|
+
* accruing — the symmetric counterpart of {@link finishedAt}'s terminal freeze, so a
|
|
1199
|
+
* step waiting on input is not billed for the human's deliberation. Set once on park,
|
|
1200
|
+
* cleared (null) when the step resumes working or finishes. Absent until first parked.
|
|
1201
|
+
*/
|
|
1202
|
+
readonly pausedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1203
|
+
/**
|
|
1204
|
+
* How many times this step's container was evicted/crashed and recovered by
|
|
1205
|
+
* automatically re-dispatching a fresh container (bounded by
|
|
1206
|
+
* `MAX_EVICTION_RECOVERIES`). Once spent, a further eviction fails the run as
|
|
1207
|
+
* `evicted` rather than looping. Absent/0 until the first eviction.
|
|
1208
|
+
*/
|
|
1209
|
+
readonly evictionRecoveries: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1210
|
+
/**
|
|
1211
|
+
* How many times this step's container was evicted by *transient infrastructure
|
|
1212
|
+
* churn* — an event the runtime facade flags as not-a-crash (e.g. a deploy
|
|
1213
|
+
* draining the sandbox) — and recovered by re-dispatching a fresh container.
|
|
1214
|
+
* Counted separately from {@link evictionRecoveries} and bounded by a larger
|
|
1215
|
+
* `MAX_TRANSIENT_EVICTION_RECOVERIES`, since such churn can recur several times in
|
|
1216
|
+
* a short window, unlike a crash. Absent/0 until the first transient eviction.
|
|
1217
|
+
*/
|
|
1218
|
+
readonly transientEvictionRecoveries: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1219
|
+
}, undefined>;
|
|
1220
|
+
export type PipelineStep = v.InferOutput<typeof pipelineStepSchema>;
|
|
1221
|
+
export declare const executionStatusSchema: v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>;
|
|
1222
|
+
export type ExecutionStatus = v.InferOutput<typeof executionStatusSchema>;
|
|
1223
|
+
export declare const executionInstanceSchema: v.ObjectSchema<{
|
|
1224
|
+
readonly id: v.StringSchema<undefined>;
|
|
1225
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
1226
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
1227
|
+
readonly pipelineName: v.StringSchema<undefined>;
|
|
1228
|
+
readonly steps: v.ArraySchema<v.ObjectSchema<{
|
|
1229
|
+
/**
|
|
1230
|
+
* Id of the execution run (the {@link executionInstanceSchema} `id`) this step
|
|
1231
|
+
* belongs to — surfaced on every step so a lone step in a log line or a detail view
|
|
1232
|
+
* can name its run, for easier debugging. A projection that always equals the parent
|
|
1233
|
+
* instance's `id`: stamped from the enclosing instance when the run is read or
|
|
1234
|
+
* emitted, not persisted independently. Absent only on steps not yet round-tripped.
|
|
1235
|
+
*/
|
|
1236
|
+
readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1237
|
+
readonly agentKind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1238
|
+
readonly state: v.PicklistSchema<["pending", "working", "waiting_decision", "done"], undefined>;
|
|
1239
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
1240
|
+
/** LLM observability rollup for this step; see {@link stepMetricsSchema}. */
|
|
1241
|
+
readonly metrics: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1242
|
+
/** Number of model calls recorded for this step. */
|
|
1243
|
+
readonly calls: v.NumberSchema<undefined>;
|
|
1244
|
+
/** Sum of prompt (input) tokens across the step's calls. */
|
|
1245
|
+
readonly promptTokens: v.NumberSchema<undefined>;
|
|
1246
|
+
/** Sum of completion (output) tokens across the step's calls. */
|
|
1247
|
+
readonly completionTokens: v.NumberSchema<undefined>;
|
|
1248
|
+
/** Largest single completion the model produced (closest approach to the limit). */
|
|
1249
|
+
readonly peakCompletionTokens: v.NumberSchema<undefined>;
|
|
1250
|
+
/** The output ceiling in effect (max requested `max_tokens`), or null when unknown. */
|
|
1251
|
+
readonly maxOutputTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
1252
|
+
/** Calls cut short by the output limit (`finish_reason === 'length'`). */
|
|
1253
|
+
readonly truncatedCalls: v.NumberSchema<undefined>;
|
|
1254
|
+
/** Sum of model execution time (ms) — the "actual prompt/tool execution" slice. */
|
|
1255
|
+
readonly upstreamMs: v.NumberSchema<undefined>;
|
|
1256
|
+
/** Sum of transport/proxy overhead (ms) — the interim-layer cost. */
|
|
1257
|
+
readonly overheadMs: v.NumberSchema<undefined>;
|
|
1258
|
+
/** Calls that failed (non-2xx / refused / in-process error). */
|
|
1259
|
+
readonly errors: v.NumberSchema<undefined>;
|
|
1260
|
+
/** Successful calls that warned (truncated or content-filtered). */
|
|
1261
|
+
readonly warnings: v.NumberSchema<undefined>;
|
|
1262
|
+
}, undefined>, undefined>, undefined>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Live gate state while a polling gate step (`ci` / `conflicts`) runs its
|
|
1265
|
+
* precheck-or-escalate loop; see {@link gateStepStateSchema}. The gate kind is
|
|
1266
|
+
* `agentKind`.
|
|
1267
|
+
*/
|
|
1268
|
+
readonly gate: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1269
|
+
readonly phase: v.PicklistSchema<["checking", "working"], undefined>;
|
|
1270
|
+
/** How many helper-agent attempts have been dispatched so far. */
|
|
1271
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
1272
|
+
/** Ceiling on attempts, resolved from the task's merge preset at step start. */
|
|
1273
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
1274
|
+
/** The PR head commit being gated, once resolved. */
|
|
1275
|
+
readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1276
|
+
/**
|
|
1277
|
+
* The most recent precheck verdict, so the UI can show why the gate is looping
|
|
1278
|
+
* (failing → a helper is fixing) vs idle-passing. Set on every probe.
|
|
1279
|
+
*/
|
|
1280
|
+
readonly lastVerdict: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["pass", "pending", "fail"], undefined>, undefined>, undefined>;
|
|
1281
|
+
/**
|
|
1282
|
+
* Human-readable summary of the latest failing precheck (the failing CI checks /
|
|
1283
|
+
* the conflict reason) — the conclusion detail that used to be fed only to the
|
|
1284
|
+
* helper agent and then discarded. Carried across the helper dispatch so the
|
|
1285
|
+
* window keeps showing what is being fixed. Null when the last probe passed.
|
|
1286
|
+
*/
|
|
1287
|
+
readonly lastFailureSummary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Structured failing checks behind {@link lastFailureSummary} for the CI gate, so
|
|
1290
|
+
* the UI can list each red check by name + conclusion. Absent for the conflicts
|
|
1291
|
+
* gate (GitHub reports no file-level detail) and when the last probe passed.
|
|
1292
|
+
*/
|
|
1293
|
+
readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1294
|
+
readonly name: v.StringSchema<undefined>;
|
|
1295
|
+
/** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
|
|
1296
|
+
readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1297
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Epoch ms of the release marker for a time-windowed gate (post-release-health) — the
|
|
1300
|
+
* moment it began watching the deployed release. The gate keeps polling `pending`
|
|
1301
|
+
* until this + the preset's watch window has elapsed (then a clean run passes) or a
|
|
1302
|
+
* monitor/SLO regresses (then it escalates to the on-call agent). Absent for the
|
|
1303
|
+
* CI/conflicts gates.
|
|
1304
|
+
*/
|
|
1305
|
+
readonly watchSince: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1306
|
+
/**
|
|
1307
|
+
* The watch-window length (minutes) for a time-windowed gate (post-release-health),
|
|
1308
|
+
* resolved from the task's merge preset ONCE on first entry (alongside `maxAttempts`)
|
|
1309
|
+
* so the probe doesn't re-load the block + re-resolve the preset on every poll. Absent
|
|
1310
|
+
* for the CI/conflicts gates.
|
|
1311
|
+
*/
|
|
1312
|
+
readonly watchWindowMinutes: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1313
|
+
/**
|
|
1314
|
+
* The regressed signals captured when the post-release-health gate escalated to the
|
|
1315
|
+
* on-call agent, so the agent's completion handler can build the `release_regression`
|
|
1316
|
+
* notification + incident enrichment from the SAME evidence the agent investigated
|
|
1317
|
+
* — rather than re-reading Datadog (a third round-trip that could also disagree with
|
|
1318
|
+
* what the agent saw if the window moved). Absent for the CI/conflicts gates.
|
|
1319
|
+
*/
|
|
1320
|
+
readonly regressedSignals: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1321
|
+
readonly kind: v.PicklistSchema<["monitor", "slo"], undefined>;
|
|
1322
|
+
readonly id: v.StringSchema<undefined>;
|
|
1323
|
+
readonly name: v.StringSchema<undefined>;
|
|
1324
|
+
readonly state: v.PicklistSchema<["ok", "warn", "alert", "no_data"], undefined>;
|
|
1325
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1326
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
1327
|
+
}, undefined>, undefined>, undefined>;
|
|
1328
|
+
/** Live Tester→Fixer loop state while a `tester` step runs/fixes; see {@link testerStepStateSchema}. */
|
|
1329
|
+
readonly test: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1330
|
+
readonly phase: v.PicklistSchema<["testing", "fixing"], undefined>;
|
|
1331
|
+
/** How many `fixer` attempts have been dispatched so far. */
|
|
1332
|
+
readonly attempts: v.NumberSchema<undefined>;
|
|
1333
|
+
/** Ceiling on fixer attempts, resolved from the task's merge preset at step start. */
|
|
1334
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
1335
|
+
/** The most recent Tester report (what was tested, outcomes, concerns, greenlight). */
|
|
1336
|
+
readonly lastReport: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1337
|
+
readonly greenlight: v.BooleanSchema<undefined>;
|
|
1338
|
+
readonly summary: v.StringSchema<undefined>;
|
|
1339
|
+
readonly tested: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1340
|
+
readonly outcomes: v.ArraySchema<v.ObjectSchema<{
|
|
1341
|
+
readonly name: v.StringSchema<undefined>;
|
|
1342
|
+
readonly status: v.PicklistSchema<["passed", "failed", "skipped"], undefined>;
|
|
1343
|
+
readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1344
|
+
}, undefined>, undefined>;
|
|
1345
|
+
readonly concerns: v.ArraySchema<v.ObjectSchema<{
|
|
1346
|
+
readonly title: v.StringSchema<undefined>;
|
|
1347
|
+
readonly detail: v.StringSchema<undefined>;
|
|
1348
|
+
readonly severity: v.PicklistSchema<["low", "medium", "high", "critical"], undefined>;
|
|
1349
|
+
}, undefined>, undefined>;
|
|
1350
|
+
readonly environment: v.OptionalSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
1351
|
+
}, undefined>, undefined>, undefined>;
|
|
1352
|
+
}, undefined>, undefined>, undefined>;
|
|
1353
|
+
/** Live subtask counts while an async (container) step runs; see {@link stepSubtasksSchema}. */
|
|
1354
|
+
readonly subtasks: v.OptionalSchema<v.ObjectSchema<{
|
|
1355
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
1356
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
1357
|
+
readonly total: v.NumberSchema<undefined>;
|
|
1358
|
+
readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1359
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
1360
|
+
readonly label: v.StringSchema<undefined>;
|
|
1361
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
1362
|
+
}, undefined>, undefined>, undefined>;
|
|
1363
|
+
}, undefined>, undefined>;
|
|
1364
|
+
/**
|
|
1365
|
+
* True while a container-backed step is being dispatched and its per-run
|
|
1366
|
+
* container is cold-booting — i.e. before the container is up and the agent has
|
|
1367
|
+
* begun executing. Set the moment the job is dispatched (the dispatch blocks
|
|
1368
|
+
* until the container accepts the job, so it covers the whole boot window) and
|
|
1369
|
+
* cleared on the first successful poll, when the container is provably up. Lets
|
|
1370
|
+
* the board show an explicit "Spinning up container…" phase instead of a blank
|
|
1371
|
+
* "working" state. Only ever set on async (container) steps.
|
|
1372
|
+
*/
|
|
1373
|
+
readonly startingContainer: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1374
|
+
readonly decision: v.NullableSchema<v.ObjectSchema<{
|
|
1375
|
+
readonly id: v.StringSchema<undefined>;
|
|
1376
|
+
readonly question: v.StringSchema<undefined>;
|
|
1377
|
+
readonly options: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1378
|
+
readonly chosen: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1379
|
+
}, undefined>, undefined>;
|
|
1380
|
+
/**
|
|
1381
|
+
* Whether a human approval gate fires after this step completes. Copied from
|
|
1382
|
+
* the pipeline's `gates` at run start; absent means no gate.
|
|
1383
|
+
*/
|
|
1384
|
+
readonly requiresApproval: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1385
|
+
/**
|
|
1386
|
+
* The live approval gate for this step (see {@link stepApprovalSchema}). Set
|
|
1387
|
+
* once the step's proposal is ready and `requiresApproval` is true; null/absent
|
|
1388
|
+
* otherwise.
|
|
1389
|
+
*/
|
|
1390
|
+
readonly approval: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1391
|
+
/** Unique id of this gate; the durable run parks on it like a decision. */
|
|
1392
|
+
readonly id: v.StringSchema<undefined>;
|
|
1393
|
+
/** `pending` while awaiting the human; terminal `approved`/`rejected`; `changes_requested` re-runs the step. */
|
|
1394
|
+
readonly status: v.PicklistSchema<["pending", "approved", "changes_requested", "rejected"], undefined>;
|
|
1395
|
+
/** The agent's output the human is reviewing (editable before approval). */
|
|
1396
|
+
readonly proposal: v.StringSchema<undefined>;
|
|
1397
|
+
/** When changes were requested, the human's freeform guidance fed into the re-run. */
|
|
1398
|
+
readonly feedback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1399
|
+
/** When changes were requested, per-block review comments fed into the re-run. */
|
|
1400
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1401
|
+
/**
|
|
1402
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
1403
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
1404
|
+
* prose source to quote.
|
|
1405
|
+
*/
|
|
1406
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1407
|
+
/**
|
|
1408
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
1409
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
1410
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
1411
|
+
* there is no prose line range.
|
|
1412
|
+
*/
|
|
1413
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1414
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1415
|
+
/**
|
|
1416
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
1417
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
1418
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
1419
|
+
*/
|
|
1420
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1421
|
+
/** The reviewer's note on this block / item. */
|
|
1422
|
+
readonly body: v.StringSchema<undefined>;
|
|
1423
|
+
}, undefined>, undefined>, undefined>;
|
|
1424
|
+
}, undefined>, undefined>, undefined>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Live state of a companion step that reviews a preceding producer step. Set when
|
|
1427
|
+
* this step's `agentKind` is a companion kind. `threshold` is the quality bar the
|
|
1428
|
+
* companion's latest rating (the last `verdicts` entry) must reach; `attempts`
|
|
1429
|
+
* counts only the AUTOMATIC reworks performed, and once it reaches `maxAttempts` the
|
|
1430
|
+
* step parks on the iteration-cap gate (`exceeded`) for a human rather than failing.
|
|
1431
|
+
* A human "request changes" on the companion's gate also re-runs the producer but does
|
|
1432
|
+
* NOT consume `attempts` (only the automatic loop is budgeted). Absent for non-companion steps.
|
|
1433
|
+
*/
|
|
1434
|
+
readonly companion: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1435
|
+
/** The quality bar (0..1) the latest verdict's rating must reach; seeded from the pipeline. */
|
|
1436
|
+
readonly threshold: v.NumberSchema<undefined>;
|
|
1437
|
+
/** The automatic rework budget: once `attempts` reaches this the gate parks for a human (`exceeded`). */
|
|
1438
|
+
readonly maxAttempts: v.NumberSchema<undefined>;
|
|
1439
|
+
/**
|
|
1440
|
+
* How many AUTOMATIC reworks the companion has driven so far (the producer is
|
|
1441
|
+
* looped back once per failed verdict). Human "request changes" cycles are not
|
|
1442
|
+
* counted. Defaults to 0; once it reaches `maxAttempts` the step parks on the
|
|
1443
|
+
* iteration-cap gate (`exceeded`) — an "extra round" raises `maxAttempts` by one.
|
|
1444
|
+
*/
|
|
1445
|
+
readonly attempts: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
1446
|
+
/**
|
|
1447
|
+
* One standardized {@link companionVerdictSchema} per grading cycle, in order —
|
|
1448
|
+
* the full sequence of correction iterations (the producer is re-run after each
|
|
1449
|
+
* rejected verdict), including any human-driven ones. Empty before the first
|
|
1450
|
+
* grade; the last entry is the latest.
|
|
1451
|
+
*/
|
|
1452
|
+
readonly verdicts: v.ArraySchema<v.ObjectSchema<{
|
|
1453
|
+
/** Overall quality of the graded output (0..1, higher = better). */
|
|
1454
|
+
readonly rating: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
1455
|
+
/** The quality bar the rating had to reach to pass. */
|
|
1456
|
+
readonly threshold: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
1457
|
+
/** Whether the rating met the threshold. */
|
|
1458
|
+
readonly passed: v.BooleanSchema<undefined>;
|
|
1459
|
+
/** The companion's challenge / justification (its assessment summary). */
|
|
1460
|
+
readonly feedback: v.StringSchema<undefined>;
|
|
1461
|
+
}, undefined>, undefined>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Set true when the automatic rework budget (`maxAttempts`) was spent with the
|
|
1464
|
+
* rating still below the bar: instead of failing the run, the step parks on its
|
|
1465
|
+
* approval gate for a human to resolve via the shared iteration-cap surface
|
|
1466
|
+
* (one more round / proceed anyway / stop & reset). Cleared once the human grants
|
|
1467
|
+
* an extra round (the loop resumes). Absent until/unless the cap is hit.
|
|
1468
|
+
*/
|
|
1469
|
+
readonly exceeded: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1470
|
+
}, undefined>, undefined>, undefined>;
|
|
1471
|
+
/**
|
|
1472
|
+
* Transient rework feedback carried on a PRODUCER step while it is being re-run by
|
|
1473
|
+
* a downstream companion (the analogue of an approval's `changes_requested`
|
|
1474
|
+
* feedback for the automatic path). Folded into the agent's revision context on the
|
|
1475
|
+
* re-run, then cleared. Absent when no companion rework is in flight.
|
|
1476
|
+
*/
|
|
1477
|
+
readonly rework: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1478
|
+
/** The producer's previous proposal the companion challenged. */
|
|
1479
|
+
readonly previousProposal: v.StringSchema<undefined>;
|
|
1480
|
+
/** The companion's prose feedback driving the rework. */
|
|
1481
|
+
readonly feedback: v.StringSchema<undefined>;
|
|
1482
|
+
/** Optional per-item / per-block challenges to address. */
|
|
1483
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1484
|
+
/**
|
|
1485
|
+
* Verbatim raw-markdown source of the commented prose block. Optional: a comment
|
|
1486
|
+
* may instead anchor to a structured item via {@link anchorId}, where there is no
|
|
1487
|
+
* prose source to quote.
|
|
1488
|
+
*/
|
|
1489
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1490
|
+
/**
|
|
1491
|
+
* 0-based source line range [start, end) of the commented prose block, for
|
|
1492
|
+
* best-effort re-anchoring. Optional: a comment may instead anchor to a structured
|
|
1493
|
+
* item via {@link anchorId} (e.g. a spec requirement/acceptance-criterion id), where
|
|
1494
|
+
* there is no prose line range.
|
|
1495
|
+
*/
|
|
1496
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1497
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Stable id of the structured item the comment targets (e.g. a spec
|
|
1500
|
+
* requirement/criterion id), when the reviewed output is rendered as structured
|
|
1501
|
+
* items rather than free prose. Absent for prose-range comments.
|
|
1502
|
+
*/
|
|
1503
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1504
|
+
/** The reviewer's note on this block / item. */
|
|
1505
|
+
readonly body: v.StringSchema<undefined>;
|
|
1506
|
+
}, undefined>, undefined>, undefined>;
|
|
1507
|
+
}, undefined>, undefined>, undefined>;
|
|
1508
|
+
/**
|
|
1509
|
+
* Transient incorporation intent carried on a parked `requirements-review` gate step.
|
|
1510
|
+
* Set when the human answers the findings and asks to incorporate: the run is signalled
|
|
1511
|
+
* to wake and the durable driver, on re-entering the gate, folds the answers into a
|
|
1512
|
+
* document and re-reviews it (the LLM work that used to block the HTTP request). Cleared
|
|
1513
|
+
* once that async cycle completes. `feedback` is the human's optional "do it differently"
|
|
1514
|
+
* direction (a redo). Absent when no incorporation is pending.
|
|
1515
|
+
*/
|
|
1516
|
+
readonly pendingIncorporation: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1517
|
+
readonly feedback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1518
|
+
}, undefined>, undefined>, undefined>;
|
|
1519
|
+
/**
|
|
1520
|
+
* Consensus configuration for this step, copied from the pipeline's `consensus`
|
|
1521
|
+
* array at run start. Present (with `enabled: true`) when this step should run
|
|
1522
|
+
* through the multi-model consensus mechanism; read by the consensus executor
|
|
1523
|
+
* (and to decide gating against the block estimate). Absent ⇒ standard agent.
|
|
1524
|
+
* See {@link consensusStepConfigSchema}.
|
|
1525
|
+
*/
|
|
1526
|
+
readonly consensus: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1527
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1528
|
+
readonly strategy: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
1529
|
+
readonly participants: v.ArraySchema<v.ObjectSchema<{
|
|
1530
|
+
readonly id: v.StringSchema<undefined>;
|
|
1531
|
+
readonly role: v.StringSchema<undefined>;
|
|
1532
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1533
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1534
|
+
}, undefined>, undefined>;
|
|
1535
|
+
readonly synthesizerModelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1536
|
+
readonly rounds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
1537
|
+
readonly gating: v.OptionalSchema<v.ObjectSchema<{
|
|
1538
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1539
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1540
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1541
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1542
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["consensus", "standard"], undefined>, "consensus">;
|
|
1543
|
+
}, undefined>, undefined>;
|
|
1544
|
+
}, undefined>, undefined>, undefined>;
|
|
1545
|
+
/**
|
|
1546
|
+
* Estimate-based gating for this step, copied from the pipeline's `gating` array at
|
|
1547
|
+
* run start. When present (with `enabled: true`) the step is skipped at runtime unless
|
|
1548
|
+
* the block's task estimate meets the threshold. Absent ⇒ always run. See
|
|
1549
|
+
* {@link stepGatingSchema}.
|
|
1550
|
+
*/
|
|
1551
|
+
readonly gating: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1552
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
1553
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1554
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1555
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
1556
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["run", "skip"], undefined>, "run">;
|
|
1557
|
+
}, undefined>, undefined>, undefined>;
|
|
1558
|
+
/**
|
|
1559
|
+
* True when this step was skipped at runtime because its `gating` was not satisfied
|
|
1560
|
+
* (the task estimate fell below the threshold). The step's `state` is `done` with no
|
|
1561
|
+
* output; the UI renders it as "skipped (gated)". Absent ⇒ the step ran normally.
|
|
1562
|
+
*/
|
|
1563
|
+
readonly skipped: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1564
|
+
/** Text the agent produced for this step (when LLM execution is enabled). */
|
|
1565
|
+
readonly output: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1566
|
+
/** Identifier of the model that produced `output`, for transparency. */
|
|
1567
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1568
|
+
/**
|
|
1569
|
+
* Ids of the prompt-fragment library entries that were folded into this step's
|
|
1570
|
+
* system prompt — the manual selection on the block unioned with the relevance
|
|
1571
|
+
* selector's pick. Recorded for observability and replay-stability; absent when
|
|
1572
|
+
* the fragment-library module is not configured.
|
|
1573
|
+
*/
|
|
1574
|
+
readonly selectedFragmentIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1575
|
+
/**
|
|
1576
|
+
* Identifier of an in-flight asynchronous agent job (a container run polled by
|
|
1577
|
+
* the durable driver). Set while the step is dispatched-but-not-yet-finished so
|
|
1578
|
+
* a Workflows replay re-attaches to the running job instead of starting a new
|
|
1579
|
+
* one; cleared once the job's result is recorded.
|
|
1580
|
+
*/
|
|
1581
|
+
readonly jobId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1582
|
+
/**
|
|
1583
|
+
* Epoch ms the step first began executing (transitioned to `working`). Set once
|
|
1584
|
+
* and never overwritten on subsequent state changes, so a re-run/replay keeps the
|
|
1585
|
+
* original start. Absent until the step starts.
|
|
1586
|
+
*/
|
|
1587
|
+
readonly startedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1588
|
+
/**
|
|
1589
|
+
* Epoch ms the step finished (transitioned to `done`). With {@link startedAt}
|
|
1590
|
+
* this yields the step's execution duration. Absent until the step completes.
|
|
1591
|
+
*/
|
|
1592
|
+
readonly finishedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Epoch ms the step parked on a human (an approval gate, a raised decision, or an
|
|
1595
|
+
* iteration-cap gate), freezing its duration clock: while parked, elapsed time stops
|
|
1596
|
+
* accruing — the symmetric counterpart of {@link finishedAt}'s terminal freeze, so a
|
|
1597
|
+
* step waiting on input is not billed for the human's deliberation. Set once on park,
|
|
1598
|
+
* cleared (null) when the step resumes working or finishes. Absent until first parked.
|
|
1599
|
+
*/
|
|
1600
|
+
readonly pausedAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
1601
|
+
/**
|
|
1602
|
+
* How many times this step's container was evicted/crashed and recovered by
|
|
1603
|
+
* automatically re-dispatching a fresh container (bounded by
|
|
1604
|
+
* `MAX_EVICTION_RECOVERIES`). Once spent, a further eviction fails the run as
|
|
1605
|
+
* `evicted` rather than looping. Absent/0 until the first eviction.
|
|
1606
|
+
*/
|
|
1607
|
+
readonly evictionRecoveries: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1608
|
+
/**
|
|
1609
|
+
* How many times this step's container was evicted by *transient infrastructure
|
|
1610
|
+
* churn* — an event the runtime facade flags as not-a-crash (e.g. a deploy
|
|
1611
|
+
* draining the sandbox) — and recovered by re-dispatching a fresh container.
|
|
1612
|
+
* Counted separately from {@link evictionRecoveries} and bounded by a larger
|
|
1613
|
+
* `MAX_TRANSIENT_EVICTION_RECOVERIES`, since such churn can recur several times in
|
|
1614
|
+
* a short window, unlike a crash. Absent/0 until the first transient eviction.
|
|
1615
|
+
*/
|
|
1616
|
+
readonly transientEvictionRecoveries: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1617
|
+
}, undefined>, undefined>;
|
|
1618
|
+
readonly currentStep: v.NumberSchema<undefined>;
|
|
1619
|
+
readonly status: v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>;
|
|
1620
|
+
/**
|
|
1621
|
+
* Structured failure diagnostics when `status` is `failed`; absent/null
|
|
1622
|
+
* otherwise. Lets a failed task surface the same failure banner + retry as a
|
|
1623
|
+
* failed bootstrap (shared {@link agentFailureSchema}).
|
|
1624
|
+
*/
|
|
1625
|
+
readonly failure: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1626
|
+
readonly kind: v.PicklistSchema<["preflight", "dispatch", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "cancelled", "unknown"], undefined>;
|
|
1627
|
+
/** Human-readable summary (mirrors the run's `error` for back-compat). */
|
|
1628
|
+
readonly message: v.StringSchema<undefined>;
|
|
1629
|
+
/** Extended detail when available (the harness's reason, an HTTP body, …). */
|
|
1630
|
+
readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1631
|
+
/** Where to look next (e.g. "check the container logs for this job id"). */
|
|
1632
|
+
readonly hint: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1633
|
+
/** Epoch ms the failure was recorded. */
|
|
1634
|
+
readonly occurredAt: v.NumberSchema<undefined>;
|
|
1635
|
+
/** Last subtask counts seen before the failure, for context (null if none). */
|
|
1636
|
+
readonly lastSubtasks: v.NullableSchema<v.ObjectSchema<{
|
|
1637
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
1638
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
1639
|
+
readonly total: v.NumberSchema<undefined>;
|
|
1640
|
+
readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1641
|
+
/** The task's human-readable subject, as the agent wrote it. */
|
|
1642
|
+
readonly label: v.StringSchema<undefined>;
|
|
1643
|
+
readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
|
|
1644
|
+
}, undefined>, undefined>, undefined>;
|
|
1645
|
+
}, undefined>, undefined>;
|
|
1646
|
+
}, undefined>, undefined>, undefined>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Internal user id (`usr_*`) of whoever started this run (or retried it). Recorded
|
|
1649
|
+
* so the individual-usage restricted mode can use the initiator's OWN personal
|
|
1650
|
+
* subscription (e.g. Claude) for the run's steps — a personal credential is never
|
|
1651
|
+
* shared, so only its owner's runs may use it. Absent for runs started without a
|
|
1652
|
+
* signed-in user (auth-disabled/local dev) and for legacy runs.
|
|
1653
|
+
*/
|
|
1654
|
+
readonly initiatedBy: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1655
|
+
}, undefined>;
|
|
1656
|
+
export type ExecutionInstance = v.InferOutput<typeof executionInstanceSchema>;
|
|
1657
|
+
export declare const workspaceSchema: v.ObjectSchema<{
|
|
1658
|
+
readonly id: v.StringSchema<undefined>;
|
|
1659
|
+
readonly name: v.StringSchema<undefined>;
|
|
1660
|
+
/** Optional free-text description (null when unset). */
|
|
1661
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1662
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
1663
|
+
/** The account this board belongs to, or null for a legacy/unscoped board. */
|
|
1664
|
+
readonly accountId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1665
|
+
}, undefined>;
|
|
1666
|
+
export type Workspace = v.InferOutput<typeof workspaceSchema>;
|
|
1667
|
+
/**
|
|
1668
|
+
* The spend safeguard's view of the current billing period. Token usage is
|
|
1669
|
+
* tracked per LLM call and priced into a single currency; once `costSpent`
|
|
1670
|
+
* reaches `costLimit` the engine pauses runs and the frontend shows a warning.
|
|
1671
|
+
* Global across all workspaces (an operator's budget is org-wide), attached to
|
|
1672
|
+
* every snapshot by the worker so the client can render the warning anywhere.
|
|
1673
|
+
*/
|
|
1674
|
+
export declare const spendStatusSchema: v.ObjectSchema<{
|
|
1675
|
+
/** Start of the current billing period (epoch ms; calendar month, UTC). */
|
|
1676
|
+
readonly periodStart: v.NumberSchema<undefined>;
|
|
1677
|
+
/** Input (prompt) tokens consumed this period. */
|
|
1678
|
+
readonly inputTokens: v.NumberSchema<undefined>;
|
|
1679
|
+
/** Output (completion) tokens produced this period. */
|
|
1680
|
+
readonly outputTokens: v.NumberSchema<undefined>;
|
|
1681
|
+
/** Estimated cost of this period's usage, in `currency`. */
|
|
1682
|
+
readonly costSpent: v.NumberSchema<undefined>;
|
|
1683
|
+
/** Configured budget for one period, in `currency`. */
|
|
1684
|
+
readonly costLimit: v.NumberSchema<undefined>;
|
|
1685
|
+
/** ISO 4217 currency the costs are expressed in (e.g. `EUR`). */
|
|
1686
|
+
readonly currency: v.StringSchema<undefined>;
|
|
1687
|
+
/** True once `costSpent >= costLimit`: runs are paused until the period rolls over. */
|
|
1688
|
+
readonly exceeded: v.BooleanSchema<undefined>;
|
|
1689
|
+
}, undefined>;
|
|
1690
|
+
export type SpendStatus = v.InferOutput<typeof spendStatusSchema>;
|
|
1691
|
+
//# sourceMappingURL=entities.d.ts.map
|