@agent-compose/sdk 0.8.5 → 0.8.6
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 +213 -189
- package/dist/agent/agent-context.d.ts +3 -3
- package/dist/agent/agent-loop.d.ts +4 -5
- package/dist/agent/perf-sampler.d.ts +27 -2
- package/dist/agent/run-agent.d.ts +1 -1
- package/dist/client.d.ts +105 -52
- package/dist/directives.d.ts +3 -3
- package/dist/display.d.ts +7 -0
- package/dist/errors.d.ts +1 -1
- package/dist/generated/agentc-commands.d.ts +34 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.js +716 -203
- package/dist/request-context/request-context.d.ts +1 -1
- package/dist/runtimes/_cli-agent.d.ts +182 -68
- package/dist/runtimes/claude-code.d.ts +60 -1
- package/dist/runtimes/claude.d.ts +1 -1
- package/dist/runtimes/codex.d.ts +94 -6
- package/dist/runtimes/codex.mid-turn-hook.test.d.ts +10 -0
- package/dist/runtimes/openai-desktop.js +686 -199
- package/dist/runtimes/opencode.d.ts +48 -11
- package/dist/runtimes/opencode.test.d.ts +14 -0
- package/dist/sandbox/baked-clis.d.ts +75 -0
- package/dist/sandbox/exec-stream.d.ts +1 -2
- package/dist/sandbox/network-policy.d.ts +23 -5
- package/dist/sandbox.d.ts +4 -2
- package/dist/step-invocation/protocol.d.ts +3 -4
- package/dist/step-invocation/server.d.ts +2 -2
- package/dist/step-invocation/types.d.ts +1 -1
- package/dist/types/api-conversations.d.ts +442 -29
- package/dist/types/api-factory.d.ts +78 -8
- package/dist/types/api-projects.d.ts +480 -0
- package/dist/types/api-runs.d.ts +8 -0
- package/dist/types/api-scopes.d.ts +32 -3
- package/dist/types/conversation-stream.d.ts +5 -0
- package/dist/types/execution-context.d.ts +1 -1
- package/dist/types/protocol.d.ts +65 -2
- package/dist/types/runtime.d.ts +9 -2
- package/dist/types/workflow-metadata.d.ts +2 -4
- package/dist/types/workflow-plan.d.ts +1 -3
- package/dist/utils/bundler.d.ts +23 -0
- package/dist/workflow-steps/observability.d.ts +2 -3
- package/dist/workflow-steps/runner.d.ts +5 -8
- package/dist/workflow-steps/types.d.ts +8 -10
- package/dist/workflow-steps/workflow.d.ts +2 -1
- package/dist/workflows/engine.d.ts +3 -5
- package/dist/workflows/invoke-child.d.ts +2 -2
- package/package.json +2 -2
- package/src/agent/agent-context.ts +168 -125
- package/src/agent/agent-loop.ts +5 -4
- package/src/agent/perf-sampler.ts +54 -3
- package/src/agent/run-agent.ts +1 -1
- package/src/client.ts +191 -71
- package/src/directives.ts +3 -3
- package/src/display.ts +12 -0
- package/src/errors.ts +1 -0
- package/src/generated/agentc-commands.ts +571 -0
- package/src/index.ts +54 -21
- package/src/pause/pause-core.ts +2 -1
- package/src/request-context/request-context.ts +1 -1
- package/src/runtimes/_cli-agent.ts +306 -122
- package/src/runtimes/claude-code.ts +179 -9
- package/src/runtimes/claude.ts +1 -1
- package/src/runtimes/codex.ts +188 -19
- package/src/runtimes/opencode.ts +195 -26
- package/src/sandbox/baked-clis.ts +86 -0
- package/src/sandbox/exec-stream.ts +1 -2
- package/src/sandbox/network-policy.ts +51 -7
- package/src/sandbox/providers/e2b.ts +3 -3
- package/src/sandbox/providers/vercel.ts +6 -6
- package/src/sandbox.ts +8 -2
- package/src/step-invocation/invoker.ts +2 -6
- package/src/step-invocation/protocol.ts +3 -4
- package/src/step-invocation/server.ts +2 -2
- package/src/types/api-conversations.ts +366 -23
- package/src/types/api-factory.ts +74 -8
- package/src/types/api-projects.ts +443 -0
- package/src/types/api-runs.ts +5 -0
- package/src/types/api-scopes.ts +32 -3
- package/src/types/conversation-stream.ts +5 -0
- package/src/types/execution-context.ts +1 -1
- package/src/types/protocol.ts +67 -1
- package/src/types/runtime.ts +8 -2
- package/src/types/sandbox-environment.ts +1 -2
- package/src/types/workflow-metadata.ts +2 -4
- package/src/types/workflow-plan.ts +1 -3
- package/src/utils/bundler.ts +88 -19
- package/src/workflow-steps/observability.ts +2 -3
- package/src/workflow-steps/runner.ts +5 -8
- package/src/workflow-steps/types.ts +8 -10
- package/src/workflow-steps/workflow.ts +2 -1
- package/src/workflows/engine.ts +3 -5
- package/src/workflows/invoke-child.ts +2 -2
- package/dist/generated/verb-synopsis.d.ts +0 -34
- package/dist/pause/__tests__/errors.test.d.ts +0 -1
- package/dist/pause/__tests__/wrappers.test.d.ts +0 -1
- package/dist/step-invocation/__tests__/protocol.test.d.ts +0 -1
- package/src/generated/verb-synopsis.ts +0 -544
|
@@ -234,10 +234,8 @@ export interface WorkflowMetadata {
|
|
|
234
234
|
* BUILD — a setup-only workflow whose job is to leave its VM configured and
|
|
235
235
|
* snapshot it (base-env / agent-env). Environment builds build a platform
|
|
236
236
|
* IMAGE and never use the shared factory drive, so the server SKIPS mounting
|
|
237
|
-
* /factory for them
|
|
238
|
-
*
|
|
239
|
-
* for this mountpoint"), degrading /factory for every workflow booting from
|
|
240
|
-
* that snapshot. Absent on ordinary workflows — which mount /factory exactly
|
|
237
|
+
* /factory for them and no live drive mount bakes into the captured
|
|
238
|
+
* snapshot. Absent on ordinary workflows — which mount /factory exactly
|
|
241
239
|
* as before. Optional + additive: an ABSENT flag contributes nothing to the
|
|
242
240
|
* canonical metadata hash (frozen-metadata rule), so existing workflows are
|
|
243
241
|
* not forced to re-register. */
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* dispatch time. The CLI/bundler inspects the bundled module in the user's
|
|
6
6
|
* environment and sends this compact plan as metadata.
|
|
7
7
|
*
|
|
8
|
-
* Every workflow has a step plan.
|
|
9
|
-
* workflows are wrapped at the SDK boundary as a single-step compiled
|
|
10
|
-
* workflow (step name = "run"); the bundler sees the same shape regardless.
|
|
8
|
+
* Every workflow has a step plan.
|
|
11
9
|
*/
|
|
12
10
|
|
|
13
11
|
/** One artifact a step promises to produce — mirrors `StepDeliverable`,
|
package/src/utils/bundler.ts
CHANGED
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
import { createHash } from "node:crypto";
|
|
37
|
-
import {
|
|
37
|
+
import { realpathSync } from "node:fs";
|
|
38
|
+
import { dirname, join, resolve as resolvePath, sep } from "node:path";
|
|
38
39
|
import { parse as babelParse } from "@babel/parser";
|
|
39
40
|
import type { File, ExportDefaultDeclaration, CallExpression, Expression, Statement } from "@babel/types";
|
|
40
41
|
import { importSourceModule } from "./source-loader.js";
|
|
@@ -194,38 +195,107 @@ interface BunPluginBuild {
|
|
|
194
195
|
): void;
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
198
|
+
/**
|
|
199
|
+
* The packages the PLATFORM provides to every workflow source — the SDK and
|
|
200
|
+
* its zod peer — which therefore resolve from the platform's own install
|
|
201
|
+
* roots when the source file's directory has no node_modules of its own.
|
|
202
|
+
* The live incident (2026-09-20, a claude-code session at the drive root):
|
|
203
|
+
* `agentc invoke --source /factory/files/wf.ts` died with `Could not
|
|
204
|
+
* resolve "@agent-compose/sdk", "zod"` because Bun walked up from
|
|
205
|
+
* /factory/files and found nothing, while the baked SDK sat in
|
|
206
|
+
* /workspace/node_modules the whole time (infra/e2b-template/template.ts —
|
|
207
|
+
* "SDK into /workspace/node_modules so any script written under /workspace
|
|
208
|
+
* can import it"). A workflow's OWN third-party deps still have to be
|
|
209
|
+
* installed beside the source; only these two are platform-resolved.
|
|
210
|
+
*/
|
|
211
|
+
export const PLATFORM_RESOLVED_PACKAGES: readonly string[] = [SDK_PACKAGE, "zod"];
|
|
212
|
+
|
|
213
|
+
/** Env override for the fallback roots (colon-separated, tried first) — the
|
|
214
|
+
* test seam, and an ops knob for a sandbox image that plants the SDK
|
|
215
|
+
* elsewhere. */
|
|
216
|
+
export const SDK_FALLBACK_ROOTS_ENV = "AGENT_COMPOSE_SDK_FALLBACK_ROOTS";
|
|
217
|
+
|
|
218
|
+
/** Where the platform SDK lives when the source's own walk-up finds nothing:
|
|
219
|
+
* the env override's roots, the sandbox's baked /workspace install, then
|
|
220
|
+
* the bundling process's cwd (the CLI's own resolution context). Exported
|
|
221
|
+
* for the unit test. */
|
|
222
|
+
export function sdkFallbackRoots(env: Record<string, string | undefined> = process.env): string[] {
|
|
223
|
+
const fromEnv = (env[SDK_FALLBACK_ROOTS_ENV] ?? "")
|
|
224
|
+
.split(":")
|
|
225
|
+
.map((s) => s.trim())
|
|
226
|
+
.filter((s) => s.length > 0);
|
|
227
|
+
const roots = [...fromEnv, "/workspace", process.cwd()];
|
|
228
|
+
return roots.filter((r, i) => roots.indexOf(r) === i);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Anchored regex over the alias table PLUS the platform-resolved packages
|
|
232
|
+
* — the plugin filter. Specifiers are literal package names, but escape
|
|
233
|
+
* anyway so a future entry with a `.` or `+` can't widen the filter. */
|
|
200
234
|
function aliasFilter(): RegExp {
|
|
201
|
-
const alternation = SDK_SPECIFIER_ALIASES
|
|
235
|
+
const alternation = [...SDK_SPECIFIER_ALIASES, ...PLATFORM_RESOLVED_PACKAGES]
|
|
202
236
|
.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
|
203
237
|
.join("|");
|
|
204
238
|
return new RegExp(`^(?:${alternation})$`);
|
|
205
239
|
}
|
|
206
240
|
|
|
207
241
|
/**
|
|
208
|
-
* The TOLERATE layer: a Bun resolve plugin that maps every known
|
|
209
|
-
* specifier onto the real SDK
|
|
210
|
-
* from the
|
|
242
|
+
* The TOLERATE layer: a Bun resolve plugin that (a) maps every known
|
|
243
|
+
* near-miss specifier onto the real SDK and (b) resolves the platform's own
|
|
244
|
+
* packages from the platform's install roots when the importing file's
|
|
245
|
+
* directory can't. Resolution goes through Bun's own resolver from the
|
|
246
|
+
* importing file's directory FIRST, so the alias lands on exactly the
|
|
211
247
|
* `@agent-compose/sdk` the build would have used had the source spelled it
|
|
212
|
-
* correctly
|
|
213
|
-
*
|
|
248
|
+
* correctly and a source that ships its own node_modules is untouched; only
|
|
249
|
+
* when that fails do the fallback roots (`sdkFallbackRoots`) get a turn, and
|
|
250
|
+
* `zod` additionally resolves from beside the SDK that was found (its
|
|
251
|
+
* peer, hoisted or nested). When nothing resolves, the plugin declines and
|
|
252
|
+
* Bun's failure flows into `explainBundleFailure` below.
|
|
214
253
|
*/
|
|
215
254
|
function sdkAliasPlugin(bun: BunSurface): { name: string; setup(build: BunPluginBuild): void } {
|
|
255
|
+
// A resolution counts ONLY when it lands in a node_modules on `from`'s own
|
|
256
|
+
// walk-up (through symlinks — a workspace link's realpath is compared
|
|
257
|
+
// against the link's realpath). Bun's resolver otherwise "succeeds" via
|
|
258
|
+
// its global install cache (~/.bun/install/cache/<pkg>@<ver>/…), a bare
|
|
259
|
+
// package whose own dependencies are NOT installed — the build then dies
|
|
260
|
+
// on the SDK's deps ("Could not resolve @babel/parser, ai, e2b, …"), a
|
|
261
|
+
// far more confusing failure than the honest fallback below.
|
|
262
|
+
const tryResolve = (specifier: string, from: string): string | null => {
|
|
263
|
+
let resolved: string;
|
|
264
|
+
try { resolved = realpathSync(bun.resolveSync(specifier, from)); } catch { return null; }
|
|
265
|
+
let dir = resolvePath(from);
|
|
266
|
+
for (;;) {
|
|
267
|
+
try {
|
|
268
|
+
const real = realpathSync(join(dir, "node_modules", specifier));
|
|
269
|
+
if (resolved === real || resolved.startsWith(real + sep)) return resolved;
|
|
270
|
+
} catch { /* no node_modules/<specifier> at this level */ }
|
|
271
|
+
const parent = dirname(dir);
|
|
272
|
+
if (parent === dir) return null;
|
|
273
|
+
dir = parent;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
216
276
|
return {
|
|
217
277
|
name: "agent-compose-sdk-alias",
|
|
218
278
|
setup(build) {
|
|
219
279
|
build.onResolve({ filter: aliasFilter() }, (args) => {
|
|
220
|
-
const target = resolveSdkAlias(args.path)
|
|
280
|
+
const target = resolveSdkAlias(args.path)
|
|
281
|
+
?? (PLATFORM_RESOLVED_PACKAGES.includes(args.path) ? args.path : null);
|
|
221
282
|
if (!target) return undefined;
|
|
222
283
|
// `importer` is the importing FILE, `resolveDir` already a directory.
|
|
223
284
|
const from = args.importer ? dirname(args.importer) : args.resolveDir;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
285
|
+
const own = tryResolve(target, from && from.length > 0 ? from : process.cwd());
|
|
286
|
+
if (own) return { path: own };
|
|
287
|
+
for (const root of sdkFallbackRoots()) {
|
|
288
|
+
const hit = tryResolve(target, root);
|
|
289
|
+
if (hit) return { path: hit };
|
|
290
|
+
// zod is the SDK's peer: a root that holds the SDK resolves zod
|
|
291
|
+
// from the SDK's own directory even when it isn't hoisted.
|
|
292
|
+
if (target !== SDK_PACKAGE) {
|
|
293
|
+
const sdk = tryResolve(SDK_PACKAGE, root);
|
|
294
|
+
const beside = sdk ? tryResolve(target, dirname(sdk)) : null;
|
|
295
|
+
if (beside) return { path: beside };
|
|
296
|
+
}
|
|
228
297
|
}
|
|
298
|
+
return undefined;
|
|
229
299
|
});
|
|
230
300
|
},
|
|
231
301
|
};
|
|
@@ -557,10 +627,9 @@ export async function bundleWorkflow(
|
|
|
557
627
|
// schemas → compact JSON-Schema-shaped descriptions carried in
|
|
558
628
|
// template metadata. Used by the dashboard's "Registered" panel to
|
|
559
629
|
// render schema tables and (eventually) client-side validation in
|
|
560
|
-
// the playground.
|
|
561
|
-
//
|
|
562
|
-
//
|
|
563
|
-
// of a meaningless empty table.
|
|
630
|
+
// the playground. `extractIOSchema` filters a `z.unknown()` schema
|
|
631
|
+
// down to undefined so the dashboard renders the "no declared
|
|
632
|
+
// schema" empty state instead of a meaningless empty table.
|
|
564
633
|
const inputSchema = extractIOSchema(workflow.input);
|
|
565
634
|
const outputSchema = extractIOSchema(workflow.output);
|
|
566
635
|
|
|
@@ -78,9 +78,8 @@ const LIVE_EMIT_DRAIN_TIMEOUT_MS = 1_500;
|
|
|
78
78
|
* this instance. After the step finishes, the engine calls `snapshot()`
|
|
79
79
|
* to extract the bundle for transport.
|
|
80
80
|
*
|
|
81
|
-
* Metadata writes merge (later keys win)
|
|
82
|
-
*
|
|
83
|
-
* across migrations.
|
|
81
|
+
* Metadata writes merge (later keys win), as the server's run-metadata
|
|
82
|
+
* merge does.
|
|
84
83
|
*/
|
|
85
84
|
export class StepObservabilityCollector {
|
|
86
85
|
private metadata: Record<string, unknown> = {};
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* 2. For each step:
|
|
7
7
|
* a. Optionally check `getCachedOutput(stepIndex, step.name)` — if a
|
|
8
8
|
* previous run completed this step, skip and reuse its output.
|
|
9
|
-
* (Phase 1b uses this for crash recovery.)
|
|
10
9
|
* b. Validate current input against `step.input`.
|
|
11
10
|
* c. Call `step.run({ input, ... })`.
|
|
12
11
|
* d. Validate return value against `step.output`.
|
|
@@ -17,9 +16,10 @@
|
|
|
17
16
|
* Errors during any step bubble through `onStepFailed` and re-throw so the
|
|
18
17
|
* caller can decide whether to mark the run failed.
|
|
19
18
|
*
|
|
20
|
-
* The cache + completion hooks are injection points
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* The cache + completion hooks are injection points; without a cache every
|
|
20
|
+
* step runs. The platform's sandbox path does not walk the chain here: the
|
|
21
|
+
* Temporal `executeStep` activity runs one step per runner subprocess via
|
|
22
|
+
* `runWorkflowSingleStep` below.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import { z } from "zod";
|
|
@@ -76,13 +76,10 @@ export interface RunWorkflowStepsOpts<TInput, TOutput> {
|
|
|
76
76
|
/**
|
|
77
77
|
* Crash-recovery hook. Called before a step executes. Return the cached
|
|
78
78
|
* output to skip execution; return undefined to run the step.
|
|
79
|
-
*
|
|
80
|
-
* Phase 1b implementations will look up `workflow_step_runs` rows for
|
|
81
|
-
* (runId, stepIndex, stepName) and return completed step outputs here.
|
|
82
79
|
* Default: always undefined (no caching).
|
|
83
80
|
*/
|
|
84
81
|
getCachedOutput?(stepIndex: number, stepName: string): unknown | undefined | Promise<unknown | undefined>;
|
|
85
|
-
/** Fire after a step's `
|
|
82
|
+
/** Fire after a step's `run` and output validation succeed. */
|
|
86
83
|
onStepCompleted?(stepIndex: number, stepName: string, output: unknown, durationMs: number): void | Promise<void>;
|
|
87
84
|
/** Fire when a step throws or fails validation. The error is re-thrown after this returns. */
|
|
88
85
|
onStepFailed?(stepIndex: number, stepName: string, error: Error, durationMs: number): void | Promise<void>;
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Why: durable suspend/resume requires step boundaries to be addressable as
|
|
8
8
|
* data, not opaque async-function bodies. Each step's input + output is
|
|
9
|
-
* serialisable JSON so engine
|
|
10
|
-
*
|
|
11
|
-
* completed step.
|
|
9
|
+
* serialisable JSON so the durable engine (Temporal, one activity per step)
|
|
10
|
+
* can record completion and replay from the last completed step.
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
import type { z } from "zod";
|
|
@@ -18,7 +17,7 @@ import type { WorkflowMetadata } from "../types/workflow-metadata.js";
|
|
|
18
17
|
import type { StepObservability } from "./observability.js";
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
|
-
* Per-step execution context. Threaded into every step's `
|
|
20
|
+
* Per-step execution context. Threaded into every step's `run(...)` so
|
|
22
21
|
* the step can read tenant identity and run identity, log progress, and
|
|
23
22
|
* invoke sandbox commands.
|
|
24
23
|
*
|
|
@@ -33,9 +32,9 @@ export interface StepContext<TInput = unknown> extends BaseExecutionContext {
|
|
|
33
32
|
abortSignal: AbortSignal;
|
|
34
33
|
/**
|
|
35
34
|
* Merge key-value metadata onto the run record. Buffered during the
|
|
36
|
-
* step and flushed when the step completes; the durable engine
|
|
37
|
-
* it
|
|
38
|
-
*
|
|
35
|
+
* step and flushed when the step completes; the durable engine merges
|
|
36
|
+
* it into the run's metadata (`persistStepObservability`). Later keys
|
|
37
|
+
* win.
|
|
39
38
|
*/
|
|
40
39
|
setMetadata(data: Record<string, unknown>): Promise<void>;
|
|
41
40
|
/**
|
|
@@ -98,9 +97,8 @@ export interface Step<TInput, TOutput> {
|
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
|
-
* The result of running one step
|
|
102
|
-
* `
|
|
103
|
-
* completed steps. `observability` carries the snapshot of
|
|
100
|
+
* The result of running one step, as `runWorkflowSteps` reports it per
|
|
101
|
+
* step. `observability` carries the snapshot of
|
|
104
102
|
* `ctx.setMetadata` / `ctx.step` / `ctx.agentEvents` recorded during
|
|
105
103
|
* the step; undefined when no hooks were used.
|
|
106
104
|
*/
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* matches the final step's `output` schema.
|
|
17
17
|
*
|
|
18
18
|
* Workflows-as-data — the result is consumable by any engine adapter
|
|
19
|
-
* (in-process
|
|
19
|
+
* (in-process `runWorkflow`; the sandbox runner one step at a time under
|
|
20
|
+
* Temporal).
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
import type { z } from "zod";
|
package/src/workflows/engine.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* runner.
|
|
7
7
|
*
|
|
8
8
|
* Errors classified into `WorkflowError` (user code threw) vs `EngineError`
|
|
9
|
-
* (platform problem)
|
|
9
|
+
* (platform problem).
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type { WorkflowHooks } from "../types/workflow.js";
|
|
@@ -53,7 +53,7 @@ export class EngineError extends Error {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/** Classify any thrown value
|
|
56
|
+
/** Classify any thrown value as a `workflow` or an `engine` failure. */
|
|
57
57
|
export function classifyError(err: unknown): "workflow" | "engine" {
|
|
58
58
|
if (err instanceof WorkflowError) return "workflow";
|
|
59
59
|
if (err instanceof EngineError) return "engine";
|
|
@@ -92,9 +92,7 @@ export interface RunWorkflowOptions {
|
|
|
92
92
|
onStepStarted?: RunWorkflowStepsOpts<unknown, unknown>["onStepStarted"];
|
|
93
93
|
onStepCompleted?: RunWorkflowStepsOpts<unknown, unknown>["onStepCompleted"];
|
|
94
94
|
onStepFailed?: RunWorkflowStepsOpts<unknown, unknown>["onStepFailed"];
|
|
95
|
-
/**
|
|
96
|
-
* inject their native child-workflow primitive; the LocalProvider injects
|
|
97
|
-
* the public Agent Compose API client. */
|
|
95
|
+
/** Child workflow invocation. Unset, a step's `invokeChild` throws. */
|
|
98
96
|
invokeChild?: InvokeChild;
|
|
99
97
|
}
|
|
100
98
|
|
|
@@ -28,8 +28,8 @@ export function deriveInvokeChildIdempotencyKey(parentRunId: string, childName:
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Build the public-API child workflow invoker used by
|
|
32
|
-
*
|
|
31
|
+
* Build the public-API child workflow invoker used by sandboxed workflow
|
|
32
|
+
* execution (the step runner). Provider-backed engines may inject a different
|
|
33
33
|
* implementation (Temporal child workflow, Inngest invoke, etc.).
|
|
34
34
|
*/
|
|
35
35
|
export function buildInvokeChild(
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED FILE — DO NOT EDIT.
|
|
3
|
-
*
|
|
4
|
-
* Regenerate with `cd cli && bun run generate:verbs` (the CLI build chains
|
|
5
|
-
* it). Source of truth: the commander registry in `cli/src/program.ts`.
|
|
6
|
-
* Generator: `cli/scripts/generate-verb-synopsis.ts`.
|
|
7
|
-
*
|
|
8
|
-
* This is the complete list of `agentc` verbs, shipped verbatim into every
|
|
9
|
-
* agent-facing context — the cloud-session system prompt
|
|
10
|
-
* (server/src/agent/cloud-executor.ts) and the in-sandbox platform manual
|
|
11
|
-
* (sdk/src/agent/agent-context.ts). It exists because a hand-maintained
|
|
12
|
-
* subset drifted: an agent told its owner the CLI "has no cancel verb"
|
|
13
|
-
* while `agentc cancel` had shipped long before. A lockstep test
|
|
14
|
-
* (cli/src/__tests__/verb-synopsis.test.ts) fails the build if a registered
|
|
15
|
-
* command is missing here, so the drift cannot recur.
|
|
16
|
-
*/
|
|
17
|
-
/** One top-level verb, one subcommand level deep. `args` is a leaf verb's
|
|
18
|
-
* typed shape (positional args + mandatory options); subcommand entries
|
|
19
|
-
* carry their own signatures inline. */
|
|
20
|
-
export interface AgentcVerbEntry {
|
|
21
|
-
name: string;
|
|
22
|
-
aliases: readonly string[];
|
|
23
|
-
args: string;
|
|
24
|
-
description: string;
|
|
25
|
-
subcommands: readonly string[];
|
|
26
|
-
}
|
|
27
|
-
/** Every registered top-level verb, sorted by name. */
|
|
28
|
-
export declare const AGENTC_VERBS: readonly AgentcVerbEntry[];
|
|
29
|
-
/** The rendered block: title, one framing line, then one line per verb.
|
|
30
|
-
* Ships verbatim in the server's cloud-session system prompt. */
|
|
31
|
-
export declare const AGENTC_VERB_SYNOPSIS = "agentc verbs \u2014 the complete list:\nGenerated from the CLI's own registry \u2014 if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n- agentc auth login <key>, logout, status \u2014 Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status \u2014 Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout \u2014 Connect a local coding agent (Claude Code / OpenCode) to\u2026\n- agentc calendar \u2014 Check your owner's calendar\n- agentc cancel <run-id> \u2014 Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> \u2014 Break-glass compliance sessions\n- agentc connect \u2014 Connect this machine: sign in if needed (one browser approval),\u2026\n- agentc conv list, read <conversationId>, post <channelId> [text], members <conversationId>, invite <conversationId> <users...>, role \u2014 List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> \u2014 Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] \u2014 Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show \u2014 Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> \u2014 Read/write documents on a factory's drive\n- agentc import \u2014 Move a local Claude Code session into Agent Compose: history,\u2026\n- agentc init \u2014 Install agentc skills\n- agentc invoke [template] \u2014 Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list \u2014 Manage API keys\n- agentc list \u2014 List workflow templates you can invoke\n- agentc login \u2014 Log in via your browser\n- agentc logout \u2014 Clear this machine's browser-login credentials\n- agentc logs <run-id> \u2014 Stream logs for a run\n- agentc machine upsize \u2014 Resize this session's machine\n- agentc mail search [query...], read <message-id> \u2014 Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> \u2014 List teammates and flag them for attention\n- agentc merge \u2014 Merge THIS session's own drive branch into the shared drive's\u2026\n- agentc navigate <path> \u2014 Take the user's dashboard to a page\n- agentc notify [need...] \u2014 Push a non-blocking need OR FINDING to your owner's queue\u2026\n- agentc pause --reason <text> \u2014 Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> \u2014 Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> \u2014 Create and manage projects\n- agentc register <workflow> \u2014 Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> \u2014 Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> \u2014 In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest \u2014 Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> \u2014 Manage cron schedules attached to registered workflows\n- agentc search <query> \u2014 Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session \u2014 Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] \u2014 Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text] \u2014 Interactive terminal chat on a conversation\n- agentc setup \u2014 Set this machine up so any agent on it can\u2026\n- agentc share <ref> \u2014 Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> \u2014 Bring your own skills: import local Claude Code skills into\u2026\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> \u2014 Manage captured sandbox snapshots\n- agentc takeover \u2014 Offer the human this desktop\n- agentc thread progress [note...] \u2014 Read this session's thread queue on your owner's board\n- agentc upgrade \u2014 Update the agentc CLI to the latest published version\n- agentc usage \u2014 Show billable usage\n- agentc watch \u2014 Connect the claude-code session already running in this directory to\u2026\n- agentc web <query...> \u2014 Search the web\n- agentc work hold, watch --cmd <shell>, release \u2014 Hold or release this session's background-work busy lease";
|
|
32
|
-
/** The same block as a markdown `##` section — ships verbatim inside the
|
|
33
|
-
* in-sandbox platform manual (`AGENT_COMPOSE_MANUAL`). Same verb lines. */
|
|
34
|
-
export declare const AGENTC_VERB_SYNOPSIS_MD = "## agentc verbs \u2014 the complete list\n\nGenerated from the CLI's own registry \u2014 if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n\n- agentc auth login <key>, logout, status \u2014 Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status \u2014 Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout \u2014 Connect a local coding agent (Claude Code / OpenCode) to\u2026\n- agentc calendar \u2014 Check your owner's calendar\n- agentc cancel <run-id> \u2014 Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> \u2014 Break-glass compliance sessions\n- agentc connect \u2014 Connect this machine: sign in if needed (one browser approval),\u2026\n- agentc conv list, read <conversationId>, post <channelId> [text], members <conversationId>, invite <conversationId> <users...>, role \u2014 List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> \u2014 Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] \u2014 Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show \u2014 Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> \u2014 Read/write documents on a factory's drive\n- agentc import \u2014 Move a local Claude Code session into Agent Compose: history,\u2026\n- agentc init \u2014 Install agentc skills\n- agentc invoke [template] \u2014 Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list \u2014 Manage API keys\n- agentc list \u2014 List workflow templates you can invoke\n- agentc login \u2014 Log in via your browser\n- agentc logout \u2014 Clear this machine's browser-login credentials\n- agentc logs <run-id> \u2014 Stream logs for a run\n- agentc machine upsize \u2014 Resize this session's machine\n- agentc mail search [query...], read <message-id> \u2014 Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> \u2014 List teammates and flag them for attention\n- agentc merge \u2014 Merge THIS session's own drive branch into the shared drive's\u2026\n- agentc navigate <path> \u2014 Take the user's dashboard to a page\n- agentc notify [need...] \u2014 Push a non-blocking need OR FINDING to your owner's queue\u2026\n- agentc pause --reason <text> \u2014 Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> \u2014 Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> \u2014 Create and manage projects\n- agentc register <workflow> \u2014 Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> \u2014 Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> \u2014 In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest \u2014 Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> \u2014 Manage cron schedules attached to registered workflows\n- agentc search <query> \u2014 Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session \u2014 Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] \u2014 Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text] \u2014 Interactive terminal chat on a conversation\n- agentc setup \u2014 Set this machine up so any agent on it can\u2026\n- agentc share <ref> \u2014 Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> \u2014 Bring your own skills: import local Claude Code skills into\u2026\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> \u2014 Manage captured sandbox snapshots\n- agentc takeover \u2014 Offer the human this desktop\n- agentc thread progress [note...] \u2014 Read this session's thread queue on your owner's board\n- agentc upgrade \u2014 Update the agentc CLI to the latest published version\n- agentc usage \u2014 Show billable usage\n- agentc watch \u2014 Connect the claude-code session already running in this directory to\u2026\n- agentc web <query...> \u2014 Search the web\n- agentc work hold, watch --cmd <shell>, release \u2014 Hold or release this session's background-work busy lease";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|