@artieeez/cf-sdk 0.0.0-stage → 0.1.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/README.md +96 -2
- package/dist/fragments/approval.d.ts +83 -0
- package/dist/fragments/approval.d.ts.map +1 -0
- package/dist/fragments/approval.js +170 -0
- package/dist/fragments/approval.js.map +1 -0
- package/dist/fragments/common.d.ts +65 -0
- package/dist/fragments/common.d.ts.map +1 -0
- package/dist/fragments/common.js +138 -0
- package/dist/fragments/common.js.map +1 -0
- package/dist/fragments/deliver.d.ts +178 -0
- package/dist/fragments/deliver.d.ts.map +1 -0
- package/dist/fragments/deliver.js +232 -0
- package/dist/fragments/deliver.js.map +1 -0
- package/dist/fragments/index.d.ts +6 -0
- package/dist/fragments/index.d.ts.map +1 -0
- package/dist/fragments/index.js +6 -0
- package/dist/fragments/index.js.map +1 -0
- package/dist/fragments/validated.d.ts +64 -0
- package/dist/fragments/validated.d.ts.map +1 -0
- package/dist/fragments/validated.js +95 -0
- package/dist/fragments/validated.js.map +1 -0
- package/dist/fragments/verifier-round.d.ts +128 -0
- package/dist/fragments/verifier-round.d.ts.map +1 -0
- package/dist/fragments/verifier-round.js +295 -0
- package/dist/fragments/verifier-round.js.map +1 -0
- package/dist/index.d.ts +597 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +244 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.d.ts +44 -0
- package/dist/kit.d.ts.map +1 -0
- package/dist/kit.js +32 -0
- package/dist/kit.js.map +1 -0
- package/dist/plugin.d.ts +126 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +15 -0
- package/dist/plugin.js.map +1 -0
- package/dist/prompt.d.ts +10 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +34 -0
- package/dist/prompt.js.map +1 -0
- package/dist/runner.d.ts +88 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +224 -0
- package/dist/runner.js.map +1 -0
- package/package.json +79 -3
- package/src/fragments/approval.ts +267 -0
- package/src/fragments/common.ts +195 -0
- package/src/fragments/deliver.ts +447 -0
- package/src/fragments/index.ts +57 -0
- package/src/fragments/validated.ts +217 -0
- package/src/fragments/verifier-round.ts +442 -0
- package/src/index.ts +890 -0
- package/src/kit.ts +137 -0
- package/src/plugin.ts +128 -0
- package/src/prompt.ts +29 -0
- package/src/runner.ts +278 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { FANOUT_OUTCOMES, type AgentEventData, type ArtifactRef, type Handler, type KeepWorkspace, type Affinity, type Manifest, type ManualTrigger, type Ref, type RunLink, type SettingType, type Trigger, type WaitFilterValue, type WorkerEventType } from '@artieeez/cf-core';
|
|
3
|
+
import type { CheckResult, PluginActions, PluginSlot } from './plugin.ts';
|
|
4
|
+
export type { CheckResult, PluginActions, PluginSlot } from './plugin.ts';
|
|
5
|
+
export { workflowKit, type WorkflowKit } from './kit.ts';
|
|
6
|
+
export { prompt } from './prompt.ts';
|
|
7
|
+
export { ApprovalForm, ApprovalRecordOutput, DEFAULT_MAX_OUTPUT_CHARS, DeliverOutput, EscalateForm, FindingsOutput, ReviewResultSchema, ScreensResultSchema, ValidationOutput, applyApprovalLine, approval, deliver, validated, verifierRound, type ApprovalFormData, type ApprovalFragment, type ApprovalOptions, type ApprovalRecordInfo, type ApprovePushOptions, type CommandSpec, type DefaultValidateOutcome, type DeliverCiOptions, type DeliverCiResult, type DeliverForgeOptions, type DeliverFragment, type DeliverOptions, type DeliverTarget, type DeliverTrackerOptions, type ForgeCommentArgs, type ForgeSlotName, type OpenedPr, type ReviewResult, type ScreensResult, type ScreensRoundInfo, type TrackerLinkArgs, type TrackerSlotName, type ValidatedAgentInline, type ValidatedFragment, type ValidatedOptions, type ValidationCheckResult, type ValidationScript, type VerifierRoundFragment, type VerifierRoundOptions, } from './fragments/index.ts';
|
|
8
|
+
/** `ctx.plugins`: each slot's actions (linear-plugin door 11). */
|
|
9
|
+
export type PluginApis = Record<string, PluginActions>;
|
|
10
|
+
/** `ctx.settings`: each setting's resolved value. */
|
|
11
|
+
export type Settings = Record<string, string>;
|
|
12
|
+
export type { Ref } from '@artieeez/cf-core';
|
|
13
|
+
/**
|
|
14
|
+
* A ref to data the engine reads (waivers door 1, AD-014): `input[.<key>...]`,
|
|
15
|
+
* `<step>.output[.<key>...]` or `<step>.artifacts.<glob>`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ref(source: string): Ref;
|
|
18
|
+
/** The reserved id of the optional "Anything else?" step every `questionsForm` form ends with. */
|
|
19
|
+
export declare const MORE_QUESTION_ID = "_more";
|
|
20
|
+
/** One clarifying question an agent returns for a dynamic human form (agent-questions door 2). */
|
|
21
|
+
export declare const QuestionSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
question: z.ZodString;
|
|
24
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type Question = z.infer<typeof QuestionSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Compiles a list of agent questions into a draft-07 JSON Schema object for a dynamic `human`
|
|
31
|
+
* step (`human({ form: ref('<step>.output.form') })`). Each question is required unless
|
|
32
|
+
* `required: false`. Options are suggestions (`x-cf-options`), not an enum: any string is a valid
|
|
33
|
+
* answer. The form ends with the optional `_more` ("Anything else?") and is marked `x-cf-steps`,
|
|
34
|
+
* so the dashboard asks one field at a time.
|
|
35
|
+
*/
|
|
36
|
+
export declare function questionsForm(questions: readonly Question[]): Record<string, unknown>;
|
|
37
|
+
/** A setting a workflow declares; the factory gives its value, else `default` (linear-plugin door 1). */
|
|
38
|
+
export interface SettingSpec {
|
|
39
|
+
type: SettingType;
|
|
40
|
+
default?: string;
|
|
41
|
+
}
|
|
42
|
+
/** A filter value that reads the workflow's setting `name`, e.g. `{ 'data.state.name': setting('handoff') }`. */
|
|
43
|
+
export declare function setting(name: string): {
|
|
44
|
+
setting: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Declares that a workflow may be started manually (dashboard, CLI, `POST /api/runs`, AD-033).
|
|
48
|
+
* Pass `{ key: '$.<path>' }` to extract a run key from `input` for deduplication and `on:` handlers,
|
|
49
|
+
* and `{ title: '$.<path>' }` to name the run by a string of its input (AD-085).
|
|
50
|
+
*/
|
|
51
|
+
export declare function manual(opts?: {
|
|
52
|
+
key?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
}): ManualTrigger;
|
|
55
|
+
/** The `ctx.plugins` type of a workflow's slots. */
|
|
56
|
+
export type ApisOf<P extends Record<string, PluginSlot>> = {
|
|
57
|
+
[K in keyof P]: P[K] extends PluginSlot<infer A> ? A : never;
|
|
58
|
+
};
|
|
59
|
+
/** The `ctx.settings` type of a workflow's declared settings: each one's value. */
|
|
60
|
+
export type SettingsOf<S extends Record<string, SettingSpec>> = {
|
|
61
|
+
[K in keyof S]: string;
|
|
62
|
+
};
|
|
63
|
+
/** The data each declared domain event takes, by type. */
|
|
64
|
+
export type EventsOf<E extends Record<string, z.ZodType>> = {
|
|
65
|
+
[K in keyof E]: z.input<E[K]>;
|
|
66
|
+
};
|
|
67
|
+
/** No declared events: every `EmitType` takes a plain record. */
|
|
68
|
+
export type NoEvents = Record<never, never>;
|
|
69
|
+
/**
|
|
70
|
+
* `ctx.emit`'s arguments: with declared events, a declared type and its schema's data, or a worker
|
|
71
|
+
* event type; with none, any `EmitType` and a plain record.
|
|
72
|
+
*/
|
|
73
|
+
export type EmitArgs<E> = [keyof E] extends [never] ? [type: EmitType, data: Record<string, unknown>] : {
|
|
74
|
+
[K in keyof E & string]: [type: K, data: E[K]];
|
|
75
|
+
}[keyof E & string] | [type: WorkerEventType, data: Record<string, unknown>];
|
|
76
|
+
/** Options of `ctx.exec` (run-workspace door 6). */
|
|
77
|
+
export interface ExecOptions {
|
|
78
|
+
/** relative to the context's directory; must stay inside the run folder */
|
|
79
|
+
cwd?: string;
|
|
80
|
+
/** added on top of the scrubbed worker env */
|
|
81
|
+
env?: Record<string, string>;
|
|
82
|
+
/** written to stdin, which is then closed */
|
|
83
|
+
input?: string;
|
|
84
|
+
/** kills the process group after this long */
|
|
85
|
+
timeoutMs?: number;
|
|
86
|
+
}
|
|
87
|
+
/** What `ctx.exec` resolves with; a non-zero exit resolves too (a missing binary is `code: 127`). */
|
|
88
|
+
export interface ExecResult {
|
|
89
|
+
code: number | null;
|
|
90
|
+
signal: string | null;
|
|
91
|
+
stdout: string;
|
|
92
|
+
stderr: string;
|
|
93
|
+
durationMs: number;
|
|
94
|
+
timedOut: boolean;
|
|
95
|
+
/** the unit was stopped or ended while the process ran */
|
|
96
|
+
cancelled: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Runs `cmd` without a shell, in its own process group, with the worker's env minus names matching
|
|
100
|
+
* `^(CF_|CLAUDE|ANTHROPIC_)`. Each output line becomes a `log` event. Throws before spawning when
|
|
101
|
+
* `cwd` leaves the run folder.
|
|
102
|
+
*/
|
|
103
|
+
export type Exec = (cmd: string, args: string[], opts?: ExecOptions) => Promise<ExecResult>;
|
|
104
|
+
type Log = (msg: string, level?: 'debug' | 'info' | 'warn' | 'error') => void;
|
|
105
|
+
export type { ArtifactRef } from '@artieeez/cf-core';
|
|
106
|
+
/** An artifact read back: its ref, its bytes, and the bytes as UTF-8 text. */
|
|
107
|
+
export type Artifact = ArtifactRef & {
|
|
108
|
+
bytes: Uint8Array;
|
|
109
|
+
text(): string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* The run's content-addressed files (artifact-store door 3). Paths are relative, segments of
|
|
113
|
+
* `[A-Za-z0-9._-]`, at most 200 chars. Only artifacts of the same run can be read.
|
|
114
|
+
*/
|
|
115
|
+
export interface Artifacts {
|
|
116
|
+
/** uploads the content and emits `artifact.created`; throws on a bad path or over the size limit */
|
|
117
|
+
put(path: string, content: string | Uint8Array, opts?: {
|
|
118
|
+
mediaType?: string;
|
|
119
|
+
}): Promise<ArtifactRef>;
|
|
120
|
+
/** a path gives the run's latest artifact there, `{ sha256 }` that content; `null` when the run has none */
|
|
121
|
+
get(ref: string | {
|
|
122
|
+
sha256: string;
|
|
123
|
+
}): Promise<Artifact | null>;
|
|
124
|
+
}
|
|
125
|
+
/** `ctx.emit`'s type: a worker event type, or a `<workflow-id>.*` type the workflow declares. */
|
|
126
|
+
export type EmitType = WorkerEventType | `${string}.${string}`;
|
|
127
|
+
/** `workerSetup`'s context: once per workflow when the worker starts, before it registers. */
|
|
128
|
+
export interface SetupContext {
|
|
129
|
+
workflow: {
|
|
130
|
+
id: string;
|
|
131
|
+
version: string;
|
|
132
|
+
};
|
|
133
|
+
/** `<root>/.setup/<workflow-id>`, created */
|
|
134
|
+
dir: string;
|
|
135
|
+
exec: Exec;
|
|
136
|
+
/** to the worker's own log; there is no run to send events to */
|
|
137
|
+
log: Log;
|
|
138
|
+
signal: AbortSignal;
|
|
139
|
+
}
|
|
140
|
+
/** `preInit`'s context: the run folder, before the first task unit of a run on this worker. */
|
|
141
|
+
export interface RunContext<I, P extends PluginApis = PluginApis, S = Settings, E = NoEvents> {
|
|
142
|
+
runId: string;
|
|
143
|
+
input: I;
|
|
144
|
+
/** absolute `<root>/<run-id>` */
|
|
145
|
+
runDir: string;
|
|
146
|
+
/** the run folder too */
|
|
147
|
+
wd: string;
|
|
148
|
+
exec: Exec;
|
|
149
|
+
log: Log;
|
|
150
|
+
/** a worker event type, or a type the workflow declares in `events` (artifact-store door 5) */
|
|
151
|
+
emit(...args: EmitArgs<E>): void;
|
|
152
|
+
signal: AbortSignal;
|
|
153
|
+
artifacts: Artifacts;
|
|
154
|
+
/** each slot's actions, on the instance the factory bound it to */
|
|
155
|
+
plugins: P;
|
|
156
|
+
/** each setting's value: the factory's, else the default */
|
|
157
|
+
settings: S;
|
|
158
|
+
}
|
|
159
|
+
/** `onFinish`'s context: the run has ended with `status`. */
|
|
160
|
+
export interface FinishContext<I, P extends PluginApis = PluginApis, S = Settings, E = NoEvents> extends RunContext<I, P, S, E> {
|
|
161
|
+
status: 'succeeded' | 'failed' | 'aborted';
|
|
162
|
+
/** each step's latest output or answer data */
|
|
163
|
+
outputs: Record<string, unknown>;
|
|
164
|
+
}
|
|
165
|
+
/** Code the worker runs at lifecycle points (run-workspace door 1). A throw is reported, see each. */
|
|
166
|
+
export interface Hooks<I, P extends PluginApis = PluginApis, S = Settings, E = NoEvents> {
|
|
167
|
+
/** once per workflow at worker start; a throw stops the worker before it registers */
|
|
168
|
+
workerSetup?(ctx: SetupContext): Promise<void> | void;
|
|
169
|
+
/**
|
|
170
|
+
* at worker start after register, then every `CF_CHECK_INTERVAL_MS`: whether this workflow can
|
|
171
|
+
* serve on this worker (its credentials, resources). Not ok makes it unready on this worker; a
|
|
172
|
+
* `fatal` answer at start stops the worker (AD-050)
|
|
173
|
+
*/
|
|
174
|
+
workerReady?(ctx: SetupContext): Promise<CheckResult | void> | CheckResult | void;
|
|
175
|
+
/** once per run per worker, before its first task unit; must be idempotent; a throw fails the run */
|
|
176
|
+
preInit?(ctx: RunContext<I, P, S, E>): Promise<void> | void;
|
|
177
|
+
/** before every task unit; a throw fails the run */
|
|
178
|
+
beforeUnit?(ctx: TaskContext<I, P, S, E>): Promise<void> | void;
|
|
179
|
+
/** in the `$finish` unit after the run ended; a throw is reported and the folder is kept */
|
|
180
|
+
onFinish?(ctx: FinishContext<I, P, S, E>): Promise<void> | void;
|
|
181
|
+
}
|
|
182
|
+
/** One ended visit of a step as `ctx.visits` and `ctx.visitsOf(step)` hold it (boss-sdd-gaps door 3). */
|
|
183
|
+
export interface VisitRecord<O extends string = string, Out = unknown> {
|
|
184
|
+
visit: number;
|
|
185
|
+
outcome: O;
|
|
186
|
+
/** the visit's output, answer data or wait output; absent when it had none */
|
|
187
|
+
output?: Out;
|
|
188
|
+
}
|
|
189
|
+
/** `<slot>.<action>` of the workflow's slots. */
|
|
190
|
+
export type EffectName<P extends PluginApis> = {
|
|
191
|
+
[S in keyof P & string]: `${S}.${keyof P[S] & string}`;
|
|
192
|
+
}[keyof P & string];
|
|
193
|
+
type ArgsOf<P extends PluginApis, N> = N extends `${infer S}.${infer A}` ? S extends keyof P ? A extends keyof P[S] ? Parameters<P[S][A]> : never : never : never;
|
|
194
|
+
/** What `release` resolves with: each applied effect and its action's result. */
|
|
195
|
+
export interface ReleasedEffect {
|
|
196
|
+
effectId: string;
|
|
197
|
+
name: string;
|
|
198
|
+
result: unknown;
|
|
199
|
+
}
|
|
200
|
+
/** `ctx.effects`: plugin actions recorded now and applied when a later unit releases them (door 2, AD-022). */
|
|
201
|
+
export interface Effects<P extends PluginApis = PluginApis> {
|
|
202
|
+
/** records `<slot>.<action>(...args)`; returns the effect id; throws on an unknown action or bad args */
|
|
203
|
+
defer<N extends EffectName<P>>(name: N, ...args: ArgsOf<P, N>): string;
|
|
204
|
+
/** applies the pending effects of this unit's scope in defer order; stops at the first failure */
|
|
205
|
+
release(opts?: {
|
|
206
|
+
name?: string;
|
|
207
|
+
}): Promise<ReleasedEffect[]>;
|
|
208
|
+
}
|
|
209
|
+
/** The outcomes `step` declares, as `ctx.visitsOf(step)` types each visit's `outcome`. */
|
|
210
|
+
export type OutcomesOf<St> = St extends {
|
|
211
|
+
outcomes: readonly (infer O extends string)[];
|
|
212
|
+
} ? O : string;
|
|
213
|
+
/**
|
|
214
|
+
* The latest output of `step` as `ctx.output` returns it: a task's `output` schema's output, a
|
|
215
|
+
* human step's form data (`{}` without a form), `unknown` for any other step.
|
|
216
|
+
*/
|
|
217
|
+
export type OutputOf<St> = St extends {
|
|
218
|
+
kind: 'task';
|
|
219
|
+
output?: infer Sch;
|
|
220
|
+
} ? Sch extends z.ZodType ? z.output<Sch> : unknown : St extends {
|
|
221
|
+
kind: 'human';
|
|
222
|
+
form?: infer F;
|
|
223
|
+
} ? F extends z.ZodType ? z.output<F> : F extends Ref ? Record<string, unknown> : {} : unknown;
|
|
224
|
+
export interface TaskContext<I, P extends PluginApis = PluginApis, S = Settings, E = NoEvents> {
|
|
225
|
+
runId: string;
|
|
226
|
+
unitId: string;
|
|
227
|
+
step: string;
|
|
228
|
+
visit: number;
|
|
229
|
+
attempt: number;
|
|
230
|
+
/** the run's input */
|
|
231
|
+
input: I;
|
|
232
|
+
/**
|
|
233
|
+
* Each earlier step's latest output: a task's `output`, a human step's answer data. Inside a
|
|
234
|
+
* map item or parallel branch, a step of the same branch also appears under its own id
|
|
235
|
+
* (map-steps AC 28); every step also appears under its path, `units[U1].build`.
|
|
236
|
+
*/
|
|
237
|
+
outputs: Record<string, unknown>;
|
|
238
|
+
/** the innermost map item this unit runs for; undefined outside a map (map-steps AC 25) */
|
|
239
|
+
item?: unknown;
|
|
240
|
+
log: Log;
|
|
241
|
+
/** absolute `<root>/<run-id>` on this worker */
|
|
242
|
+
runDir: string;
|
|
243
|
+
/** where this unit runs: the run folder, or the step's `wd` under it */
|
|
244
|
+
wd: string;
|
|
245
|
+
exec: Exec;
|
|
246
|
+
/**
|
|
247
|
+
* Sends an event with the unit's next heartbeat, or with its result, in call order with `log`.
|
|
248
|
+
* Worker event types (agent-steps door 2) and the workflow's declared `events` (artifact-store
|
|
249
|
+
* door 5); any other type, or data its schema refuses, throws.
|
|
250
|
+
*/
|
|
251
|
+
emit(...args: EmitArgs<E>): void;
|
|
252
|
+
/** aborted when the runtime gives up on the unit (shutdown) */
|
|
253
|
+
signal: AbortSignal;
|
|
254
|
+
artifacts: Artifacts;
|
|
255
|
+
/** a `progress` event; an unsent earlier one of this unit is dropped (door 4) */
|
|
256
|
+
progress(p: {
|
|
257
|
+
label: string;
|
|
258
|
+
pct?: number;
|
|
259
|
+
}): void;
|
|
260
|
+
/** each slot's actions, run by the server on the instance the factory bound it to (AD-048) */
|
|
261
|
+
plugins: P;
|
|
262
|
+
/** each setting's value: the factory's, else the default */
|
|
263
|
+
settings: S;
|
|
264
|
+
/** deferred plugin actions, released through the server (boss-sdd-gaps door 2, AD-048) */
|
|
265
|
+
effects: Effects<P>;
|
|
266
|
+
/** every earlier ended visit of each step in scope, oldest first (boss-sdd-gaps door 3) */
|
|
267
|
+
visits: Record<string, VisitRecord[]>;
|
|
268
|
+
/**
|
|
269
|
+
* Pauses the run (1 to 200 chars of reason): after this unit's outcome from `run`, or, from
|
|
270
|
+
* `beforeUnit`, instead of running the unit, which goes back to the queue (door 7)
|
|
271
|
+
*/
|
|
272
|
+
pause(reason: string): void;
|
|
273
|
+
/**
|
|
274
|
+
* One more key for this run (github-pr-review door 4, AD-074), e.g. the URL of the PR it opened,
|
|
275
|
+
* so a trigger keyed on it finds the run; `claimed: false` when the run already held it. A key
|
|
276
|
+
* another active run of the workflow holds rejects with `code_factory/key_taken`.
|
|
277
|
+
*/
|
|
278
|
+
claimKey(key: string): Promise<{
|
|
279
|
+
claimed: boolean;
|
|
280
|
+
}>;
|
|
281
|
+
/**
|
|
282
|
+
* Replaces this run's title (AD-085): 1 to 200 chars after trimming, else it rejects with
|
|
283
|
+
* `code_factory/invalid_input`. An agent whose completed output holds a string `_title` sets it too.
|
|
284
|
+
*/
|
|
285
|
+
setTitle(title: string): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Adds a link to this run (AD-085), e.g. the PR it opened: an http(s) url and a label of 1 to 80
|
|
288
|
+
* chars; `added: false` when the run already holds the url. Past 10 links it rejects with
|
|
289
|
+
* `code_factory/invalid_input`.
|
|
290
|
+
*/
|
|
291
|
+
addLink(link: RunLink): Promise<{
|
|
292
|
+
added: boolean;
|
|
293
|
+
}>;
|
|
294
|
+
/**
|
|
295
|
+
* Runs an agent session on the runner this worker chose (`CF_AGENT_RUNNER`, AD-029) with this
|
|
296
|
+
* unit's context; rejects when the worker lists no runner.
|
|
297
|
+
*/
|
|
298
|
+
agent<T>(request: AgentRequest<T>): Promise<AgentResult<T>>;
|
|
299
|
+
/**
|
|
300
|
+
* The latest output of `step`, a step object of this workflow: what `outputs` holds under its id
|
|
301
|
+
* (inside a body, under its path in this unit's branch). Throws for a step not in the workflow,
|
|
302
|
+
* or one used under two ids.
|
|
303
|
+
*/
|
|
304
|
+
output<St extends AnyStep>(step: St): OutputOf<St> | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Every earlier ended visit of `step`, oldest first: what `visits` holds under its id (inside a
|
|
307
|
+
* body, under its path in this unit's branch), or `[]` when it has none or lives in another
|
|
308
|
+
* branch. Throws for a step not in the workflow, or one used under two ids.
|
|
309
|
+
*/
|
|
310
|
+
visitsOf<St extends AnyStep>(step: St): VisitRecord<OutcomesOf<St>, OutputOf<St>>[];
|
|
311
|
+
}
|
|
312
|
+
/** What an agent runner is given: one session's prompt, its output contract and its limits (door 3). */
|
|
313
|
+
export interface AgentRequest<T> {
|
|
314
|
+
/** names the agent in `agent.started`, e.g. `planner` */
|
|
315
|
+
role: string;
|
|
316
|
+
prompt: string;
|
|
317
|
+
/** the structured output the agent must return */
|
|
318
|
+
output: z.ZodType<T>;
|
|
319
|
+
model?: string;
|
|
320
|
+
/** where the agent runs; default `ctx.wd` */
|
|
321
|
+
cwd?: string;
|
|
322
|
+
limits?: {
|
|
323
|
+
turns?: number;
|
|
324
|
+
timeoutSec?: number;
|
|
325
|
+
budgetUsd?: number;
|
|
326
|
+
};
|
|
327
|
+
/** the built-in tools the agent has, and may use without asking unless `allowedTools` narrows them; `[]` is none, absent is the harness default (door 6) */
|
|
328
|
+
tools?: string[];
|
|
329
|
+
allowedTools?: string[];
|
|
330
|
+
disallowedTools?: string[];
|
|
331
|
+
/** passed to the harness as is, e.g. Claude Code `--settings` */
|
|
332
|
+
settings?: Record<string, unknown>;
|
|
333
|
+
/** worker env names the agent may see, on top of the runner's allowlist */
|
|
334
|
+
envPassthrough?: string[];
|
|
335
|
+
/** facts checks on a schema-valid output; problems count as a contract failure (boss-sdd-gaps door 9) */
|
|
336
|
+
validate?: (output: T) => string[] | Promise<string[]>;
|
|
337
|
+
/** when true, ask the runner to persist this session on disk so a later step can resume it; default false (AD-066) */
|
|
338
|
+
persistSession?: boolean;
|
|
339
|
+
/** prior sessionId to resume; falls back to a fresh session when it cannot be resumed (AD-066) */
|
|
340
|
+
resume?: string;
|
|
341
|
+
}
|
|
342
|
+
export type AgentUsage = AgentEventData<'agent.usage'>;
|
|
343
|
+
/** A runner never throws for a failed agent: the task routes on `status`. */
|
|
344
|
+
export type AgentResult<T> = {
|
|
345
|
+
status: 'completed';
|
|
346
|
+
output: T;
|
|
347
|
+
usage: AgentUsage;
|
|
348
|
+
turns: number;
|
|
349
|
+
sessionId?: string;
|
|
350
|
+
resumed?: boolean;
|
|
351
|
+
} | {
|
|
352
|
+
status: 'limit' | 'error' | 'cancelled';
|
|
353
|
+
reason: string;
|
|
354
|
+
usage: AgentUsage;
|
|
355
|
+
turns: number;
|
|
356
|
+
};
|
|
357
|
+
/** How a session on a granted account ended (agent-accounts door 5). */
|
|
358
|
+
export interface AccountReport {
|
|
359
|
+
result: 'ok' | 'rate_limited' | 'unauthorized' | 'error';
|
|
360
|
+
quota?: AgentUsage['quota'];
|
|
361
|
+
reason?: string;
|
|
362
|
+
}
|
|
363
|
+
/** A server account granted for one agent session: its env, released once when the session ends. */
|
|
364
|
+
export interface AccountGrant {
|
|
365
|
+
/** the account's name, never its secret */
|
|
366
|
+
account: string;
|
|
367
|
+
env: Record<string, string>;
|
|
368
|
+
/** a folder of the worker's for this account's harness state, under its data folder */
|
|
369
|
+
home?: string;
|
|
370
|
+
release(report: AccountReport): Promise<void>;
|
|
371
|
+
}
|
|
372
|
+
/** The server's agent accounts as a runner sees them (agent-accounts door 5). */
|
|
373
|
+
export interface AgentAccounts {
|
|
374
|
+
/**
|
|
375
|
+
* An account for one session of `harness`; `null` when none is configured for this unit's
|
|
376
|
+
* workflow (use the worker's own login). Throws `AccountUnavailableError` when accounts exist
|
|
377
|
+
* but none can be used now.
|
|
378
|
+
*/
|
|
379
|
+
acquire(harness: string, opts?: {
|
|
380
|
+
model?: string;
|
|
381
|
+
exclude?: string[];
|
|
382
|
+
}): Promise<AccountGrant | null>;
|
|
383
|
+
}
|
|
384
|
+
/** Accounts exist for the harness and scope, but none is eligible (`503 agent_account_unavailable`). */
|
|
385
|
+
export declare class AccountUnavailableError extends Error {
|
|
386
|
+
/** the earliest cooldown end as ISO, or null when none is cooling down */
|
|
387
|
+
readonly retryAt: string | null;
|
|
388
|
+
constructor(retryAt: string | null, message?: string);
|
|
389
|
+
}
|
|
390
|
+
/** One persisted harness session recorded in the run's local session ledger (AD-066). */
|
|
391
|
+
export interface PersistedSession {
|
|
392
|
+
runner: string;
|
|
393
|
+
sessionId: string;
|
|
394
|
+
/** harness config dir holding this session (e.g. `CLAUDE_CONFIG_DIR`), empty when unresolved */
|
|
395
|
+
configDir: string;
|
|
396
|
+
cwd: string;
|
|
397
|
+
}
|
|
398
|
+
/** Per-run session ledger backed by the worker's local disk (AD-066). */
|
|
399
|
+
export interface AgentSessions {
|
|
400
|
+
/** records a persisted session owned by this run */
|
|
401
|
+
record(entry: PersistedSession): void;
|
|
402
|
+
/** whether this run previously persisted `sessionId` under `configDir` on this worker */
|
|
403
|
+
has(sessionId: string, configDir: string): boolean;
|
|
404
|
+
}
|
|
405
|
+
/** The part of a task's context a runner uses. */
|
|
406
|
+
export type AgentContext = Pick<TaskContext<unknown>, 'emit' | 'signal'> & {
|
|
407
|
+
wd?: string;
|
|
408
|
+
/** where the runner stores each session's transcript (artifact-store door 7) */
|
|
409
|
+
artifacts?: Pick<Artifacts, 'put'>;
|
|
410
|
+
/** the server's agent accounts; absent where none are reachable (agent-accounts door 5) */
|
|
411
|
+
accounts?: AgentAccounts;
|
|
412
|
+
/** per-run session ledger for resume isolation and `$finish` cleanup; absent outside worker-runtime (AD-066) */
|
|
413
|
+
sessions?: AgentSessions;
|
|
414
|
+
};
|
|
415
|
+
/** `runClaudeCode` and `fakeAgent(script)` both have this shape. */
|
|
416
|
+
export type AgentRunner = <T>(ctx: AgentContext, request: AgentRequest<T>) => Promise<AgentResult<T>>;
|
|
417
|
+
export interface TaskResult<O extends string, Out = unknown> {
|
|
418
|
+
outcome: O;
|
|
419
|
+
output?: Out;
|
|
420
|
+
}
|
|
421
|
+
/** What `run` may return as output: the `output` schema's input, or anything without one. */
|
|
422
|
+
type OutputIn<Sch> = Sch extends z.ZodType ? z.input<Sch> : unknown;
|
|
423
|
+
export interface TaskStep<I, O extends string, P extends PluginApis = PluginApis, Sch extends z.ZodType | undefined = undefined, S = Settings, E = NoEvents> {
|
|
424
|
+
kind: 'task';
|
|
425
|
+
outcomes: readonly O[];
|
|
426
|
+
/** with `waivable`, also `waived` */
|
|
427
|
+
next: Record<NoInfer<O>, string> & {
|
|
428
|
+
waived?: string;
|
|
429
|
+
};
|
|
430
|
+
maxVisits?: number;
|
|
431
|
+
onExhausted?: string;
|
|
432
|
+
/** a path under the run folder to run in, e.g. `repos/api` (door 3) */
|
|
433
|
+
wd?: string;
|
|
434
|
+
/** outcomes a person may waive; a waived one routes `next.waived` (waivers door 2) */
|
|
435
|
+
waivable?: readonly O[];
|
|
436
|
+
/**
|
|
437
|
+
* The output's schema (AD-031): the worker sends what it parses and fails the unit as a crash
|
|
438
|
+
* when it refuses; it types `ctx.output(thisStep)`. Not in the manifest.
|
|
439
|
+
*/
|
|
440
|
+
output?: Sch;
|
|
441
|
+
run(ctx: TaskContext<I, P, S, E>): Promise<TaskResult<O, OutputIn<Sch>>> | TaskResult<O, OutputIn<Sch>>;
|
|
442
|
+
}
|
|
443
|
+
/** A step that waits for a person: the answer's outcome routes, its data is the step's output. */
|
|
444
|
+
export interface HumanStep<O extends string, F extends z.ZodObject | Ref | undefined = z.ZodObject | Ref | undefined> {
|
|
445
|
+
kind: 'human';
|
|
446
|
+
/** what the person is asked, shown in the inbox and the prompt */
|
|
447
|
+
title: string;
|
|
448
|
+
/** the answer's data: a static zod schema, a runtime JSON Schema ref, or none (empty object) */
|
|
449
|
+
form?: F;
|
|
450
|
+
outcomes: readonly O[];
|
|
451
|
+
next: Record<O, string>;
|
|
452
|
+
maxVisits?: number;
|
|
453
|
+
onExhausted?: string;
|
|
454
|
+
/** shown with the intervention: one ref, or refs by label (waivers door 2) */
|
|
455
|
+
about?: Ref | Record<string, Ref>;
|
|
456
|
+
/** an artifacts ref; a later change to one of its artifacts voids the answer and asks again */
|
|
457
|
+
bind?: Ref;
|
|
458
|
+
/** unanswered after `after`, the intervention is voided and `outcome` routes (wait-steps door 2) */
|
|
459
|
+
timeout?: {
|
|
460
|
+
after: Duration;
|
|
461
|
+
outcome: O;
|
|
462
|
+
};
|
|
463
|
+
/** `intervention.reminded` every `every` while it is open (wait-steps door 2) */
|
|
464
|
+
remind?: {
|
|
465
|
+
every: Duration;
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
/** `'90s'`, `'10m'`, `'2h'`, `'1d'`, or a whole number of milliseconds (wait-steps door 1). */
|
|
469
|
+
export type Duration = string | number;
|
|
470
|
+
/** Milliseconds of a duration; undefined when it is not one. */
|
|
471
|
+
export declare function durationMs(d: Duration): number | undefined;
|
|
472
|
+
/** The plugin events a wait matches: a trigger's `events`, `slot` and `filter`, whose values may be refs. */
|
|
473
|
+
export interface WaitEvent {
|
|
474
|
+
events: string[];
|
|
475
|
+
slot: string;
|
|
476
|
+
filter?: Record<string, WaitFilterValue>;
|
|
477
|
+
}
|
|
478
|
+
/** Holds the run on the server until `after` passes or a matching `event` arrives (wait-steps door 1). */
|
|
479
|
+
export interface WaitStep<O extends string = string> {
|
|
480
|
+
kind: 'wait';
|
|
481
|
+
after?: Duration;
|
|
482
|
+
event?: WaitEvent;
|
|
483
|
+
/** an event wait routes `timeout` when no match came in this long */
|
|
484
|
+
timeout?: Duration;
|
|
485
|
+
outcomes: readonly O[];
|
|
486
|
+
next: Record<O, string>;
|
|
487
|
+
maxVisits?: number;
|
|
488
|
+
onExhausted?: string;
|
|
489
|
+
}
|
|
490
|
+
interface WaitRouting {
|
|
491
|
+
maxVisits?: number;
|
|
492
|
+
onExhausted?: string;
|
|
493
|
+
}
|
|
494
|
+
/** A timer, or an event with or without a timeout; the outcomes are `fired`, and `timeout` when it has one. */
|
|
495
|
+
export declare function wait(step: {
|
|
496
|
+
after: Duration;
|
|
497
|
+
next: Record<'fired', string>;
|
|
498
|
+
} & WaitRouting): WaitStep<'fired'>;
|
|
499
|
+
export declare function wait(step: {
|
|
500
|
+
event: WaitEvent;
|
|
501
|
+
timeout: Duration;
|
|
502
|
+
next: Record<'fired' | 'timeout', string>;
|
|
503
|
+
} & WaitRouting): WaitStep<'fired' | 'timeout'>;
|
|
504
|
+
export declare function wait(step: {
|
|
505
|
+
event: WaitEvent;
|
|
506
|
+
next: Record<'fired', string>;
|
|
507
|
+
} & WaitRouting): WaitStep<'fired'>;
|
|
508
|
+
/** The outcomes of every map and parallel step. */
|
|
509
|
+
export type FanoutOutcome = (typeof FANOUT_OUTCOMES)[number];
|
|
510
|
+
export type AnyStep = TaskStep<any, any, any, any, any, any> | HumanStep<any, any> | MapStep | ParallelStep | WaitStep<any>;
|
|
511
|
+
/** A sub-graph: its first step and its steps, which route to each other, `$end` or `$fail`. */
|
|
512
|
+
export interface Body {
|
|
513
|
+
start: string;
|
|
514
|
+
steps: Record<string, AnyStep>;
|
|
515
|
+
}
|
|
516
|
+
/** Runs `body` once per item of `items`, in `dependsOn` order, `concurrency` at a time (map-steps door 1). */
|
|
517
|
+
export interface MapStep {
|
|
518
|
+
kind: 'map';
|
|
519
|
+
items: Ref;
|
|
520
|
+
/** the item field holding its key; without it items are keyed by index */
|
|
521
|
+
key?: string;
|
|
522
|
+
/** the item field listing the keys it waits for */
|
|
523
|
+
dependsOn?: string;
|
|
524
|
+
/** items running at once; unset is unlimited */
|
|
525
|
+
concurrency?: number;
|
|
526
|
+
/** the default `wd` of the body's tasks: a path, or `ref('item.<field>')` */
|
|
527
|
+
wd?: string | Ref;
|
|
528
|
+
body: Body;
|
|
529
|
+
outcomes: readonly FanoutOutcome[];
|
|
530
|
+
next: Record<FanoutOutcome, string>;
|
|
531
|
+
maxVisits?: number;
|
|
532
|
+
onExhausted?: string;
|
|
533
|
+
}
|
|
534
|
+
/** Runs every branch side by side and routes when all have ended (map-steps door 1). */
|
|
535
|
+
export interface ParallelStep {
|
|
536
|
+
kind: 'parallel';
|
|
537
|
+
join: 'all';
|
|
538
|
+
branches: Record<string, Body>;
|
|
539
|
+
outcomes: readonly FanoutOutcome[];
|
|
540
|
+
next: Record<FanoutOutcome, string>;
|
|
541
|
+
maxVisits?: number;
|
|
542
|
+
onExhausted?: string;
|
|
543
|
+
}
|
|
544
|
+
export declare function map(step: Omit<MapStep, 'kind' | 'outcomes'>): MapStep;
|
|
545
|
+
export declare function parallel(step: Omit<ParallelStep, 'kind' | 'outcomes' | 'join'>): ParallelStep;
|
|
546
|
+
/** `T`, or `any` when `X` declares no names of its own (an undeclared record: any workflow's). */
|
|
547
|
+
type DeclaredOr<X, T> = string extends keyof X ? any : T;
|
|
548
|
+
/**
|
|
549
|
+
* A workflow. Without type arguments it is any workflow (what `startWorker` and `toManifest`
|
|
550
|
+
* take); its hooks see the slots, settings and events it declares, loosely typed when it
|
|
551
|
+
* declares none.
|
|
552
|
+
*/
|
|
553
|
+
export interface WorkflowDefinition<S extends z.ZodType = z.ZodType, PS extends Record<string, PluginSlot> = Record<string, PluginSlot>, ST extends Record<string, SettingSpec> = Record<string, SettingSpec>, EV extends Record<string, z.ZodType> = Record<string, z.ZodType>> {
|
|
554
|
+
id: string;
|
|
555
|
+
version: string;
|
|
556
|
+
input: S;
|
|
557
|
+
start: string;
|
|
558
|
+
steps: Record<string, TaskStep<z.infer<S>, any, any, any, any, any> | HumanStep<any, any> | MapStep | ParallelStep | WaitStep<any>>;
|
|
559
|
+
/**
|
|
560
|
+
* `concurrency`: at most this many running runs of the workflow (boss-sdd-gaps door 6);
|
|
561
|
+
* `affinity`: which replica runs the run's units, default `sticky` (run-affinity door 1)
|
|
562
|
+
*/
|
|
563
|
+
policy?: {
|
|
564
|
+
keepWorkspace?: KeepWorkspace;
|
|
565
|
+
concurrency?: number;
|
|
566
|
+
affinity?: Affinity;
|
|
567
|
+
};
|
|
568
|
+
/** typed with the declared slots' actions, settings and events */
|
|
569
|
+
hooks?: Hooks<z.infer<S>, DeclaredOr<PS, ApisOf<PS>>, DeclaredOr<ST, SettingsOf<ST>>, DeclaredOr<EV, EventsOf<EV>>>;
|
|
570
|
+
/** the plugin connections it needs, by slot name (linear-plugin door 1) */
|
|
571
|
+
plugins?: PS;
|
|
572
|
+
settings?: ST;
|
|
573
|
+
/**
|
|
574
|
+
* env names this workflow's own code reads, e.g. `['GITHUB_TOKEN']`: the worker hides them from
|
|
575
|
+
* `ctx.exec` children (AD-049). Never sent to the server.
|
|
576
|
+
*/
|
|
577
|
+
secrets?: readonly string[];
|
|
578
|
+
/** the events that start a run or answer a step; data, matched by the server */
|
|
579
|
+
triggers?: Trigger[];
|
|
580
|
+
/** domain events this workflow may emit, `<id>.<name>` (artifact-store door 5) */
|
|
581
|
+
events?: EV;
|
|
582
|
+
/**
|
|
583
|
+
* run-level handlers: plugin events that pause or resume the run their key names (boss-sdd-gaps
|
|
584
|
+
* door 4), e.g. `{ ...linear.match.issueLeftState({ slot, state }), key: '$.data.id', do: 'pause' }`;
|
|
585
|
+
* a ref in a filter is refused, as a handler has no step to resolve it at
|
|
586
|
+
*/
|
|
587
|
+
on?: (Omit<Handler, 'filter'> & {
|
|
588
|
+
filter?: WaitEvent['filter'];
|
|
589
|
+
})[];
|
|
590
|
+
}
|
|
591
|
+
export declare function task<I, const O extends string, P extends PluginApis = PluginApis, Sch extends z.ZodType | undefined = undefined>(step: Omit<TaskStep<I, O, P, Sch>, 'kind'>): TaskStep<I, O, P, Sch>;
|
|
592
|
+
export declare function human<const O extends string, F extends z.ZodObject | Ref | undefined = undefined>(step: Omit<HumanStep<O, F>, 'kind'>): HumanStep<O, F>;
|
|
593
|
+
/** Checks the definition compiles to a valid manifest; throws with every problem otherwise. */
|
|
594
|
+
export declare function defineWorkflow<S extends z.ZodType, PS extends Record<string, PluginSlot> = Record<string, PluginSlot>, ST extends Record<string, SettingSpec> = Record<string, SettingSpec>, EV extends Record<string, z.ZodType> = Record<string, z.ZodType>>(def: WorkflowDefinition<S, PS, ST, EV>): WorkflowDefinition<S, PS, ST, EV>;
|
|
595
|
+
/** The data the server reads: no functions, input as JSON Schema (draft-07). */
|
|
596
|
+
export declare function toManifest(def: WorkflowDefinition): Manifest;
|
|
597
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EAIf,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE1E,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EACb,KAAK,gBA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