pi-extensible-workflows 0.3.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 +72 -0
- package/dist/src/agent-execution.d.ts +213 -0
- package/dist/src/agent-execution.js +537 -0
- package/dist/src/ambient-workflow-evals.d.ts +112 -0
- package/dist/src/ambient-workflow-evals.js +375 -0
- package/dist/src/cli.d.ts +6 -0
- package/dist/src/cli.js +26 -0
- package/dist/src/doctor.d.ts +59 -0
- package/dist/src/doctor.js +269 -0
- package/dist/src/eval-capture-extension.d.ts +5 -0
- package/dist/src/eval-capture-extension.js +48 -0
- package/dist/src/index.d.ts +362 -0
- package/dist/src/index.js +2839 -0
- package/dist/src/persistence.d.ts +90 -0
- package/dist/src/persistence.js +530 -0
- package/dist/src/session-inspector.d.ts +59 -0
- package/dist/src/session-inspector.js +396 -0
- package/dist/src/workflow-evals-child.d.ts +1 -0
- package/dist/src/workflow-evals-child.js +13 -0
- package/dist/src/workflow-evals.d.ts +290 -0
- package/dist/src/workflow-evals.js +1221 -0
- package/evals/cases/custom-model-read.yaml +15 -0
- package/evals/cases/direct-answer.yaml +6 -0
- package/evals/cases/mixed-parallel-pipeline.yaml +18 -0
- package/evals/cases/output-schema.yaml +22 -0
- package/evals/cases/parallel.yaml +15 -0
- package/evals/cases/pipeline.yaml +10 -0
- package/evals/cases/ready-for-agent-parallel-merge.yaml +32 -0
- package/evals/cases/required-role.yaml +14 -0
- package/evals/cases/role-model-mixed.yaml +18 -0
- package/evals/cases/two-agents.yaml +10 -0
- package/package.json +65 -0
- package/skills/pi-extensible-workflows/SKILL.md +109 -0
- package/src/agent-execution.ts +529 -0
- package/src/ambient-workflow-evals.ts +452 -0
- package/src/cli.ts +23 -0
- package/src/doctor.ts +285 -0
- package/src/eval-capture-extension.ts +54 -0
- package/src/index.ts +2519 -0
- package/src/persistence.ts +470 -0
- package/src/session-inspector.ts +370 -0
- package/src/workflow-evals-child.ts +15 -0
- package/src/workflow-evals.ts +876 -0
- package/test/fixtures/ready-for-agent-tasks.md +9 -0
- package/test/fixtures/workflow-eval-roles/developer.md +18 -0
- package/test/fixtures/workflow-eval-roles/reviewer.md +18 -0
- package/test/fixtures/workflow-eval-roles/scout.md +17 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { Type } from "@earendil-works/pi-ai";
|
|
2
|
+
import { copyToClipboard, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { type AgentActivity, type AgentAttempt, type AgentDefinition, type SessionFactory } from "./agent-execution.js";
|
|
4
|
+
import { RunStore } from "./persistence.js";
|
|
5
|
+
import type { AwaitingCheckpoint, PersistedRun, WorktreeReference } from "./persistence.js";
|
|
6
|
+
export declare const RUN_STATES: readonly ["queued", "running", "pausing", "paused", "awaiting_input", "completed", "failed", "stopped", "interrupted"];
|
|
7
|
+
export declare const AGENT_STATES: readonly ["queued", "running", "waiting_for_child", "paused", "retrying", "completed", "failed", "cancelled"];
|
|
8
|
+
export declare const WORKFLOW_ASYNC_STARTED_EVENT = "workflow:async-started";
|
|
9
|
+
export declare const WORKFLOW_ASYNC_COMPLETE_EVENT = "workflow:async-complete";
|
|
10
|
+
export declare const ERROR_CODES: readonly ["INVALID_SETTINGS", "INVALID_SYNTAX", "INVALID_METADATA", "DUPLICATE_NAME", "INVALID_SCHEMA", "UNKNOWN_MODEL", "UNKNOWN_TOOL", "UNKNOWN_AGENT_TYPE", "RUN_LIMIT_EXCEEDED", "RUN_OWNED", "REGISTRY_FROZEN", "GLOBAL_COLLISION", "MISSING_WORKFLOW", "RPC_LIMIT_EXCEEDED", "AGENT_TIMEOUT", "AGENT_FAILED", "RESULT_INVALID", "CANCELLED", "WORKER_UNRESPONSIVE", "WORKTREE_FAILED", "RESUME_INCOMPATIBLE", "INTERNAL_ERROR"];
|
|
11
|
+
export type RunState = (typeof RUN_STATES)[number];
|
|
12
|
+
export type AgentState = (typeof AGENT_STATES)[number];
|
|
13
|
+
export type WorkflowErrorCode = (typeof ERROR_CODES)[number];
|
|
14
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
15
|
+
[key: string]: JsonValue;
|
|
16
|
+
};
|
|
17
|
+
export type JsonSchema = {
|
|
18
|
+
[key: string]: JsonValue;
|
|
19
|
+
};
|
|
20
|
+
export interface WorkflowErrorShape {
|
|
21
|
+
code: WorkflowErrorCode;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ModelSpec {
|
|
25
|
+
provider: string;
|
|
26
|
+
model: string;
|
|
27
|
+
thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
28
|
+
}
|
|
29
|
+
export interface WorkflowMetadata {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface WorkflowSettings {
|
|
34
|
+
concurrency: number;
|
|
35
|
+
maxAgentLaunches: number;
|
|
36
|
+
}
|
|
37
|
+
export interface AgentAttemptSummary {
|
|
38
|
+
attempt: number;
|
|
39
|
+
sessionId: string;
|
|
40
|
+
sessionFile: string;
|
|
41
|
+
error?: {
|
|
42
|
+
code: string;
|
|
43
|
+
message: string;
|
|
44
|
+
};
|
|
45
|
+
accounting: {
|
|
46
|
+
input: number;
|
|
47
|
+
output: number;
|
|
48
|
+
cacheRead: number;
|
|
49
|
+
cacheWrite: number;
|
|
50
|
+
cost: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export interface AgentRecord {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
path: string;
|
|
58
|
+
state: AgentState;
|
|
59
|
+
parentId?: string;
|
|
60
|
+
parentBreadcrumb?: string;
|
|
61
|
+
role?: string;
|
|
62
|
+
model: ModelSpec;
|
|
63
|
+
tools: readonly string[];
|
|
64
|
+
attempts: number;
|
|
65
|
+
attemptDetails?: readonly AgentAttemptSummary[];
|
|
66
|
+
accounting?: {
|
|
67
|
+
input: number;
|
|
68
|
+
output: number;
|
|
69
|
+
cacheRead: number;
|
|
70
|
+
cacheWrite: number;
|
|
71
|
+
cost: number;
|
|
72
|
+
};
|
|
73
|
+
toolCalls?: readonly {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
state: "running" | "completed" | "failed";
|
|
77
|
+
}[];
|
|
78
|
+
activity?: AgentActivity | undefined;
|
|
79
|
+
}
|
|
80
|
+
export interface RunRecord {
|
|
81
|
+
id: string;
|
|
82
|
+
workflowName: string;
|
|
83
|
+
cwd: string;
|
|
84
|
+
sessionId: string;
|
|
85
|
+
state: RunState;
|
|
86
|
+
phase?: string;
|
|
87
|
+
agents: readonly AgentRecord[];
|
|
88
|
+
error?: WorkflowErrorShape;
|
|
89
|
+
}
|
|
90
|
+
export interface LaunchSnapshot {
|
|
91
|
+
identityVersion?: number;
|
|
92
|
+
script: string;
|
|
93
|
+
args: JsonValue;
|
|
94
|
+
metadata: WorkflowMetadata;
|
|
95
|
+
settings: WorkflowSettings;
|
|
96
|
+
models: readonly string[];
|
|
97
|
+
tools: readonly string[];
|
|
98
|
+
agentTypes: readonly string[];
|
|
99
|
+
roles?: Readonly<Record<string, AgentDefinition>>;
|
|
100
|
+
projectRoles?: readonly string[];
|
|
101
|
+
schemas: readonly JsonSchema[];
|
|
102
|
+
}
|
|
103
|
+
export interface PreflightCapabilities {
|
|
104
|
+
models: ReadonlySet<string>;
|
|
105
|
+
tools: ReadonlySet<string>;
|
|
106
|
+
agentTypes: ReadonlySet<string>;
|
|
107
|
+
}
|
|
108
|
+
export interface PreflightResult {
|
|
109
|
+
metadata: WorkflowMetadata;
|
|
110
|
+
referenced: {
|
|
111
|
+
phases: readonly string[];
|
|
112
|
+
models: readonly string[];
|
|
113
|
+
tools: readonly string[];
|
|
114
|
+
agentTypes: readonly string[];
|
|
115
|
+
};
|
|
116
|
+
schemas: readonly JsonSchema[];
|
|
117
|
+
dynamicAgentRoles: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface WorkflowOrchestrationContext {
|
|
120
|
+
agent: (...args: readonly unknown[]) => Promise<JsonValue>;
|
|
121
|
+
prompt: (template: string, values: Readonly<Record<string, JsonValue>>) => string;
|
|
122
|
+
parallel: (...args: readonly unknown[]) => Promise<JsonValue>;
|
|
123
|
+
pipeline: (...args: readonly unknown[]) => Promise<JsonValue>;
|
|
124
|
+
withWorktree: (...args: readonly unknown[]) => Promise<JsonValue>;
|
|
125
|
+
checkpoint: (...args: readonly unknown[]) => Promise<boolean>;
|
|
126
|
+
phase: (name: string) => void;
|
|
127
|
+
log: (message: string) => void;
|
|
128
|
+
}
|
|
129
|
+
export interface WorkflowRunContext {
|
|
130
|
+
cwd: string;
|
|
131
|
+
sessionId: string;
|
|
132
|
+
runId: string;
|
|
133
|
+
workflow: Readonly<WorkflowMetadata>;
|
|
134
|
+
args: JsonValue;
|
|
135
|
+
signal: AbortSignal;
|
|
136
|
+
}
|
|
137
|
+
export interface WorkflowFunctionContext extends WorkflowOrchestrationContext {
|
|
138
|
+
run: Readonly<WorkflowRunContext>;
|
|
139
|
+
}
|
|
140
|
+
export interface WorkflowFunction {
|
|
141
|
+
description: string;
|
|
142
|
+
input: JsonSchema;
|
|
143
|
+
output: JsonSchema;
|
|
144
|
+
run: (input: Readonly<Record<string, JsonValue>>, context: Readonly<WorkflowFunctionContext>) => Promise<JsonValue> | JsonValue;
|
|
145
|
+
}
|
|
146
|
+
export interface WorkflowVariable {
|
|
147
|
+
description: string;
|
|
148
|
+
schema: JsonSchema;
|
|
149
|
+
resolve: (run: Readonly<WorkflowRunContext>) => Promise<JsonValue> | JsonValue;
|
|
150
|
+
}
|
|
151
|
+
export interface WorkflowScriptDefinition {
|
|
152
|
+
description: string;
|
|
153
|
+
script: string;
|
|
154
|
+
}
|
|
155
|
+
export interface WorkflowExtension {
|
|
156
|
+
namespace: string;
|
|
157
|
+
version: string;
|
|
158
|
+
headline: string;
|
|
159
|
+
description: string;
|
|
160
|
+
functions?: Readonly<Record<string, WorkflowFunction>>;
|
|
161
|
+
variables?: Readonly<Record<string, WorkflowVariable>>;
|
|
162
|
+
workflows?: Readonly<Record<string, WorkflowScriptDefinition>>;
|
|
163
|
+
}
|
|
164
|
+
export interface WorkflowJournal {
|
|
165
|
+
get(path: string): JsonValue | undefined;
|
|
166
|
+
put(path: string, value: JsonValue): void;
|
|
167
|
+
}
|
|
168
|
+
export declare class WorkflowError extends Error {
|
|
169
|
+
readonly code: WorkflowErrorCode;
|
|
170
|
+
constructor(code: WorkflowErrorCode, message: string);
|
|
171
|
+
}
|
|
172
|
+
export declare function formatWorkflowFailure(error: unknown): string;
|
|
173
|
+
export declare class RunLifecycle {
|
|
174
|
+
#private;
|
|
175
|
+
private readonly changed?;
|
|
176
|
+
constructor(state?: RunState, changed?: ((state: RunState) => void | Promise<void>) | undefined);
|
|
177
|
+
get state(): RunState;
|
|
178
|
+
enter(): Promise<void>;
|
|
179
|
+
leave(): Promise<void>;
|
|
180
|
+
enterAwaitingInput(): Promise<void>;
|
|
181
|
+
resolveAwaitingInput(): Promise<void>;
|
|
182
|
+
pause(): Promise<void>;
|
|
183
|
+
resume(): Promise<void>;
|
|
184
|
+
providerPause(): Promise<void>;
|
|
185
|
+
terminal(state: "completed" | "failed" | "stopped" | "interrupted"): Promise<void>;
|
|
186
|
+
}
|
|
187
|
+
export declare const DEFAULT_SETTINGS: Readonly<WorkflowSettings>;
|
|
188
|
+
export declare function parseModelReference(value: string): ModelSpec;
|
|
189
|
+
export interface CheckpointInput {
|
|
190
|
+
name: string;
|
|
191
|
+
prompt: string;
|
|
192
|
+
context: JsonValue;
|
|
193
|
+
}
|
|
194
|
+
export declare function validateCheckpoint(value: unknown): CheckpointInput;
|
|
195
|
+
export declare function workflowSettingsPath(agentDir?: string): string;
|
|
196
|
+
export declare function loadSettings(path?: string): Readonly<WorkflowSettings>;
|
|
197
|
+
export declare function parseRoleMarkdown(content: string, strict?: boolean): AgentDefinition;
|
|
198
|
+
export declare function workflowRoleDirectories(agentDir?: string): readonly string[];
|
|
199
|
+
export declare function loadAgentDefinitions(cwd: string, agentDir?: string, projectTrusted?: boolean): Readonly<Record<string, AgentDefinition>>;
|
|
200
|
+
export type StaticWorkflowExecution = "parallel" | "sequential";
|
|
201
|
+
export interface StaticWorkflowScope {
|
|
202
|
+
kind: "parallel" | "pipeline";
|
|
203
|
+
name: string | null;
|
|
204
|
+
key: string | null;
|
|
205
|
+
}
|
|
206
|
+
export interface StaticWorkflowCall {
|
|
207
|
+
kind: "agent" | "parallel" | "pipeline" | "checkpoint" | "phase" | "withWorktree";
|
|
208
|
+
start: number;
|
|
209
|
+
end: number;
|
|
210
|
+
name: string | null;
|
|
211
|
+
prompt: string | null;
|
|
212
|
+
model: string | null;
|
|
213
|
+
label?: string | null;
|
|
214
|
+
role: string | null;
|
|
215
|
+
retries?: number | null;
|
|
216
|
+
outputSchema?: JsonSchema | null;
|
|
217
|
+
options?: Readonly<Record<string, JsonValue>> | null;
|
|
218
|
+
optionKeys?: readonly string[];
|
|
219
|
+
execution?: StaticWorkflowExecution;
|
|
220
|
+
structure?: readonly StaticWorkflowScope[];
|
|
221
|
+
}
|
|
222
|
+
export declare function inspectWorkflowScript(script: string): StaticWorkflowCall[];
|
|
223
|
+
export interface WorkflowCatalogFunction {
|
|
224
|
+
name: string;
|
|
225
|
+
namespace: string;
|
|
226
|
+
version: string;
|
|
227
|
+
headline: string;
|
|
228
|
+
extensionDescription: string;
|
|
229
|
+
description: string;
|
|
230
|
+
input: JsonSchema;
|
|
231
|
+
output: JsonSchema;
|
|
232
|
+
}
|
|
233
|
+
export interface WorkflowCatalogVariable {
|
|
234
|
+
name: string;
|
|
235
|
+
namespace: string;
|
|
236
|
+
version: string;
|
|
237
|
+
headline: string;
|
|
238
|
+
extensionDescription: string;
|
|
239
|
+
description: string;
|
|
240
|
+
schema: JsonSchema;
|
|
241
|
+
}
|
|
242
|
+
export interface WorkflowCatalogWorkflow {
|
|
243
|
+
name: string;
|
|
244
|
+
namespace: string;
|
|
245
|
+
version: string;
|
|
246
|
+
headline: string;
|
|
247
|
+
extensionDescription: string;
|
|
248
|
+
description: string;
|
|
249
|
+
}
|
|
250
|
+
export interface WorkflowCatalog {
|
|
251
|
+
functions: readonly WorkflowCatalogFunction[];
|
|
252
|
+
variables: readonly WorkflowCatalogVariable[];
|
|
253
|
+
workflows: readonly WorkflowCatalogWorkflow[];
|
|
254
|
+
}
|
|
255
|
+
export declare class WorkflowRegistry {
|
|
256
|
+
#private;
|
|
257
|
+
get frozen(): boolean;
|
|
258
|
+
freeze(): void;
|
|
259
|
+
register(extension: WorkflowExtension): void;
|
|
260
|
+
workflow(name: string): WorkflowScriptDefinition;
|
|
261
|
+
workflows(): Readonly<Record<string, WorkflowScriptDefinition>>;
|
|
262
|
+
catalog(): WorkflowCatalog;
|
|
263
|
+
globals(): Readonly<Record<string, {
|
|
264
|
+
namespace: string;
|
|
265
|
+
name: string;
|
|
266
|
+
}>>;
|
|
267
|
+
invokeFunction(namespace: string, name: string, input: unknown, context: Readonly<WorkflowFunctionContext>, path: string, journal: WorkflowJournal): Promise<JsonValue>;
|
|
268
|
+
variables(): readonly {
|
|
269
|
+
namespace: string;
|
|
270
|
+
name: string;
|
|
271
|
+
variable: WorkflowVariable;
|
|
272
|
+
}[];
|
|
273
|
+
}
|
|
274
|
+
export declare function registerWorkflowExtension(extension: WorkflowExtension): void;
|
|
275
|
+
export declare function workflowCatalog(): WorkflowCatalog;
|
|
276
|
+
export declare function registeredWorkflowDefinitions(): Readonly<Record<string, WorkflowScriptDefinition>>;
|
|
277
|
+
export declare function formatWorkflowPreview(args: {
|
|
278
|
+
script?: unknown;
|
|
279
|
+
workflow?: unknown;
|
|
280
|
+
name?: unknown;
|
|
281
|
+
description?: unknown;
|
|
282
|
+
}): string;
|
|
283
|
+
export declare const WORKFLOW_TOOL_LABEL = "Workflow";
|
|
284
|
+
export declare const WORKFLOW_TOOL_DESCRIPTION = "Run a deterministic JavaScript workflow";
|
|
285
|
+
export declare const WORKFLOW_TOOL_PROMPT_SNIPPET = "Run a deterministic, resumable JavaScript workflow that orchestrates subagents. Inline scripts require a name; registered workflows use their workflow name. Runs in the background by default; completion arrives as a follow-up message.";
|
|
286
|
+
export declare const WORKFLOW_TOOL_PARAMETERS: Type.TObject<{
|
|
287
|
+
name: Type.TOptional<Type.TString>;
|
|
288
|
+
description: Type.TOptional<Type.TString>;
|
|
289
|
+
script: Type.TOptional<Type.TString>;
|
|
290
|
+
workflow: Type.TOptional<Type.TString>;
|
|
291
|
+
args: Type.TOptional<Type.TUnknown>;
|
|
292
|
+
foreground: Type.TOptional<Type.TBoolean>;
|
|
293
|
+
concurrency: Type.TOptional<Type.TInteger>;
|
|
294
|
+
maxAgentLaunches: Type.TOptional<Type.TInteger>;
|
|
295
|
+
}>;
|
|
296
|
+
export declare function preflight(script: string, capabilities: PreflightCapabilities, schemas?: readonly unknown[], metadata?: WorkflowMetadata): PreflightResult;
|
|
297
|
+
export interface WorkflowValidationParameters {
|
|
298
|
+
name?: string;
|
|
299
|
+
description?: string;
|
|
300
|
+
script?: string;
|
|
301
|
+
workflow?: string;
|
|
302
|
+
}
|
|
303
|
+
export interface WorkflowValidationContext {
|
|
304
|
+
cwd: string;
|
|
305
|
+
projectTrusted: boolean;
|
|
306
|
+
availableModels: ReadonlySet<string>;
|
|
307
|
+
rootTools: ReadonlySet<string>;
|
|
308
|
+
}
|
|
309
|
+
export interface ValidatedWorkflowLaunch {
|
|
310
|
+
script: string;
|
|
311
|
+
checked: PreflightResult;
|
|
312
|
+
agentDefinitions: Readonly<Record<string, AgentDefinition>>;
|
|
313
|
+
projectAgentDefinitions: Readonly<Record<string, AgentDefinition>>;
|
|
314
|
+
roleNames: readonly string[];
|
|
315
|
+
}
|
|
316
|
+
export declare function validateWorkflowLaunch(params: WorkflowValidationParameters, context: WorkflowValidationContext): ValidatedWorkflowLaunch;
|
|
317
|
+
type LaunchSnapshotInput = Omit<LaunchSnapshot, "identityVersion"> & {
|
|
318
|
+
identityVersion?: number;
|
|
319
|
+
};
|
|
320
|
+
export declare function createLaunchSnapshot(input: LaunchSnapshotInput): Readonly<LaunchSnapshot>;
|
|
321
|
+
export declare function loadLaunchSnapshot(input: LaunchSnapshot): Readonly<LaunchSnapshot>;
|
|
322
|
+
export declare const RPC_LIMIT_BYTES: number;
|
|
323
|
+
export declare const HEARTBEAT_TIMEOUT_MS = 5000;
|
|
324
|
+
export interface AgentIdentity {
|
|
325
|
+
structuralPath: readonly string[];
|
|
326
|
+
callSite: string;
|
|
327
|
+
occurrence: number;
|
|
328
|
+
parentBreadcrumb?: string;
|
|
329
|
+
worktreeOwner?: string;
|
|
330
|
+
}
|
|
331
|
+
export interface WorkflowBridge {
|
|
332
|
+
agent?: (prompt: string, options: Readonly<Record<string, JsonValue>>, signal: AbortSignal, identity: AgentIdentity) => Promise<JsonValue>;
|
|
333
|
+
checkpoint?: (input: Readonly<Record<string, JsonValue>>, signal: AbortSignal) => boolean | Promise<boolean>;
|
|
334
|
+
function?: (namespace: string, name: string, input: Readonly<Record<string, JsonValue>>, path: string, signal: AbortSignal, worktreeOwner?: string) => Promise<JsonValue>;
|
|
335
|
+
functions?: Readonly<Record<string, {
|
|
336
|
+
namespace: string;
|
|
337
|
+
name: string;
|
|
338
|
+
}>>;
|
|
339
|
+
variables?: Readonly<Record<string, JsonValue>>;
|
|
340
|
+
phase?: (name: string) => void | Promise<void>;
|
|
341
|
+
log?: (message: string) => void | Promise<void>;
|
|
342
|
+
}
|
|
343
|
+
export interface WorkflowExecution {
|
|
344
|
+
result: Promise<JsonValue>;
|
|
345
|
+
cancel: () => void;
|
|
346
|
+
}
|
|
347
|
+
export declare function runWorkflow(script: string, args?: JsonValue, bridge?: WorkflowBridge, signal?: AbortSignal): WorkflowExecution;
|
|
348
|
+
export declare function persistActiveAgentAttempt(store: RunStore, id: string, active: Pick<AgentAttempt, "attempt" | "sessionId" | "sessionFile">): Promise<void>;
|
|
349
|
+
export declare function persistAgentAttempts(store: RunStore, id: string, attempts: readonly AgentAttempt[]): Promise<void>;
|
|
350
|
+
export declare function formatWorkflowProgress(run: PersistedRun, spinner?: string): string;
|
|
351
|
+
export declare function formatNavigatorDashboard(run: PersistedRun, checkpoints: readonly AwaitingCheckpoint[], worktrees: readonly WorktreeReference[]): string;
|
|
352
|
+
export declare function formatNavigatorRun(loaded: {
|
|
353
|
+
run: PersistedRun;
|
|
354
|
+
snapshot: Readonly<LaunchSnapshot>;
|
|
355
|
+
}, checkpoints: readonly AwaitingCheckpoint[], worktrees: readonly WorktreeReference[]): string;
|
|
356
|
+
export default function workflowExtension(pi: ExtensionAPI, home?: string, clipboard?: typeof copyToClipboard, createSession?: SessionFactory): void;
|
|
357
|
+
export { acquireSessionLease, projectStorageKey, RunStore, runsDirectory, SessionLease, structuralPath } from "./persistence.js";
|
|
358
|
+
export type { AwaitingCheckpoint, CompletedOperation, NativeSessionReference, PersistedOwnershipNode, PersistedRun, WorktreeReference } from "./persistence.js";
|
|
359
|
+
export { FairAgentScheduler, WorkflowAgentExecutor } from "./agent-execution.js";
|
|
360
|
+
export type { AgentAccounting, AgentAttempt, AgentDefinition, AgentExecutionOptions, AgentExecutionResult, AgentExecutionRoot, AgentProgress, AgentToolCallProgress } from "./agent-execution.js";
|
|
361
|
+
export { doctor, doctorExitCode, formatDoctorReport } from "./doctor.js";
|
|
362
|
+
export type { DoctorDiagnostic, DoctorOptions, DoctorPiState, DoctorReport, DoctorRole, DoctorSeverity, DoctorTrust, DoctorWorkflow } from "./doctor.js";
|