@agent-compose/sdk 0.5.8 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/agent-context.d.ts +1 -1
- package/dist/agent/agent-loop.d.ts +14 -12
- package/dist/agent/pause-client.d.ts +50 -0
- package/dist/agent/pause-client.test.d.ts +1 -0
- package/dist/agent/steer-control.d.ts +22 -6
- package/dist/client.d.ts +12 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +2379 -1463
- package/dist/pause/checkpoint.d.ts +27 -10
- package/dist/pause/manager.d.ts +1 -0
- package/dist/pause/pause-core.d.ts +23 -0
- package/dist/pause/state-dir.d.ts +1 -1
- package/dist/processors/builtins.d.ts +20 -1
- package/dist/processors/gate-pause.d.ts +46 -0
- package/dist/processors/gate-pause.test.d.ts +1 -0
- package/dist/processors/index.d.ts +3 -1
- package/dist/processors/processor.d.ts +13 -0
- package/dist/runtimes/_acp-client.d.ts +140 -0
- package/dist/runtimes/_cli-agent.d.ts +155 -3
- package/dist/runtimes/amp.d.ts +2 -2
- package/dist/runtimes/cli-agent-acp-live.test.d.ts +30 -0
- package/dist/runtimes/cli-agent.test.d.ts +22 -6
- package/dist/runtimes/codex.d.ts +7 -2
- package/dist/runtimes/openai-desktop.js +2365 -1463
- package/dist/runtimes/vercel.js +389 -2
- package/dist/sandbox.d.ts +113 -19
- package/dist/step-invocation/__tests__/background-invoker.test.d.ts +1 -0
- package/dist/step-invocation/index.d.ts +2 -1
- package/dist/step-invocation/invoker.d.ts +36 -0
- package/dist/types/__tests__/environment-build-flag.test.d.ts +1 -0
- package/dist/types/__tests__/workflow-metadata-provider.test.d.ts +1 -0
- package/dist/types/execution-context.d.ts +0 -8
- package/dist/types/protocol.d.ts +32 -1
- package/dist/types/runtime.d.ts +14 -0
- package/dist/types/sandbox-environment.d.ts +6 -1
- package/dist/types/sandbox.d.ts +86 -6
- package/dist/types/workflow-metadata.d.ts +40 -10
- package/dist/types/workflow.d.ts +22 -6
- package/dist/utils/bundler.d.ts +5 -1
- package/dist/workflow-steps/observability.d.ts +28 -2
- package/dist/workflow-steps/types.d.ts +11 -7
- package/dist/workflow-steps/workflow.d.ts +3 -2
- package/package.json +3 -2
- package/src/agent/agent-context.ts +14 -6
- package/src/agent/agent-loop.ts +32 -10
- package/src/agent/pause-client.ts +108 -0
- package/src/agent/run-agent.ts +9 -4
- package/src/agent/steer-control.ts +21 -7
- package/src/client.ts +35 -1
- package/src/index.ts +20 -2
- package/src/pause/checkpoint.ts +33 -14
- package/src/pause/manager.ts +2 -2
- package/src/pause/pause-core.ts +35 -0
- package/src/pause/state-dir.ts +2 -2
- package/src/processors/builtins.ts +44 -1
- package/src/processors/gate-pause.ts +94 -0
- package/src/processors/index.ts +7 -0
- package/src/processors/processor.ts +13 -0
- package/src/runtimes/_acp-client.ts +516 -0
- package/src/runtimes/_cli-agent.ts +416 -3
- package/src/runtimes/claude.ts +31 -3
- package/src/runtimes/codex.ts +21 -1
- package/src/runtimes/vercel.ts +4 -1
- package/src/sandbox.ts +426 -56
- package/src/step-invocation/index.ts +2 -1
- package/src/step-invocation/invoker.ts +195 -84
- package/src/types/execution-context.ts +0 -8
- package/src/types/protocol.ts +27 -1
- package/src/types/runtime.ts +14 -0
- package/src/types/sandbox-environment.ts +12 -1
- package/src/types/sandbox.ts +84 -6
- package/src/types/workflow-metadata.ts +42 -10
- package/src/types/workflow.ts +22 -7
- package/src/utils/bundler.ts +6 -1
- package/src/workflow-steps/observability.ts +51 -5
- package/src/workflow-steps/runner.ts +9 -5
- package/src/workflow-steps/types.ts +11 -7
- package/src/workflow-steps/workflow.ts +3 -2
|
@@ -19,7 +19,7 @@ import type { SandboxProvider } from "../types/sandbox.js";
|
|
|
19
19
|
* that credentials are network-injected (never in the env). The live
|
|
20
20
|
* "Connectors & access" section is appended per-run by `buildAgentContextDoc`.
|
|
21
21
|
*/
|
|
22
|
-
export declare const AGENT_COMPOSE_MANUAL = "# Working inside an Agent Compose sandbox\n\nYou are an agent running in a per-run sandbox on the Agent Compose platform.\nUse the **`agentc` CLI** and the **`@agent-compose/sdk`** for everything below \u2014\ndo NOT hand-roll raw HTTP/curl calls against the platform API. The CLI is on\nyour PATH and already authenticated from the environment\n(`AGENT_COMPOSE_URL` / `AGENT_COMPOSE_API_KEY` / `AGENT_COMPOSE_FACTORY` are\ninjected for this run), so commands just work \u2014 no login, no keys to manage.\n\nThe `/ac:*` skills are installed as Claude Code slash commands (`/ac:invoke`,\n`/ac:events`, `/ac:logs`, `/ac:register`, \u2026) \u2014 reach for them too.\n\n## Files \u2014 your outputs persist by default\n\nYour working directory defaults to **`$AGENT_COMPOSE_RUN_DIR`** \u2014 a per-run\ndirectory on the shared factory drive\n(`$AGENT_COMPOSE_FACTORY_DIR/<workflow>/<version>/<run-id>/`) the platform\ncreates and attributes to this run. **Files you write here persist by\ndefault** \u2014 they show up in the dashboard's Files tab and the run's Artifacts\ncard, with no API calls to save them. The dir already exists and is writable.\n\nNeed throwaway scratch \u2014 heavy build output, package caches, temp files?\n`cd /tmp` (or any path outside `/factory`): anything off the factory drive is\nephemeral and discarded when the sandbox ends. In short: **stay in your working\ndir to keep something, `cd` out to throw it away.**\n\nThe whole shared drive is POSIX-mounted at `/factory`; the dashboard-visible\nroot is `$AGENT_COMPOSE_FACTORY_DIR` (`/factory/files`). Earlier versions and\nruns live in sibling dirs under\n`$AGENT_COMPOSE_FACTORY_DIR/$AGENT_COMPOSE_WORKFLOW/` \u2014 read them for prior\ncontext. Other workflows' dirs are present but not your concern.\n\n## Events \u2014 the factory timeline\n\nRecord something on the run/factory timeline (the dashboard renders these)\nwith the CLI \u2014 your run id is `$RUN_ID`:\n\n agentc events send \"$RUN_ID\" <name> --summary \"<one line>\" [--body '<json>']\n\nNames like `note.created` / `brief.posted` surface in the Workbench;\n`agentc events list` reads them back. `/ac:events` is the skill equivalent.\n\n## Runs\n\n agentc list # registered workflows (/ac:list)\n agentc logs \"$RUN_ID\" # a run's logs (/ac:logs)\n agentc invoke <workflow> -i '<json>' # dispatch a workflow (/ac:invoke)\n\n## Writing workflow / agent code \u2014 the SDK\n\n`@agent-compose/sdk` is installed in `/workspace` \u2014 import it from any script\nyou write there:\n\n import { defineWorkflow, agent, AgentComposeClient } from \"@agent-compose/sdk\";\n\nUse `/ac:generate-workflow` / `/ac:generate-agent` to scaffold, then\n`agentc register <file.ts>` (or `/ac:register`).\n\n## Pausing to ask the human \u2014 `agentc pause`\n\nWhen you can't or shouldn't proceed without a human, run `agentc pause
|
|
22
|
+
export declare const AGENT_COMPOSE_MANUAL = "# Working inside an Agent Compose sandbox\n\nYou are an agent running in a per-run sandbox on the Agent Compose platform.\nUse the **`agentc` CLI** and the **`@agent-compose/sdk`** for everything below \u2014\ndo NOT hand-roll raw HTTP/curl calls against the platform API. The CLI is on\nyour PATH and already authenticated from the environment\n(`AGENT_COMPOSE_URL` / `AGENT_COMPOSE_API_KEY` / `AGENT_COMPOSE_FACTORY` are\ninjected for this run), so commands just work \u2014 no login, no keys to manage.\n\nThe `/ac:*` skills are installed as Claude Code slash commands (`/ac:invoke`,\n`/ac:events`, `/ac:logs`, `/ac:register`, \u2026) \u2014 reach for them too.\n\n## Files \u2014 your outputs persist by default\n\nYour working directory defaults to **`$AGENT_COMPOSE_RUN_DIR`** \u2014 a per-run\ndirectory on the shared factory drive\n(`$AGENT_COMPOSE_FACTORY_DIR/<workflow>/<version>/<run-id>/`) the platform\ncreates and attributes to this run. **Files you write here persist by\ndefault** \u2014 they show up in the dashboard's Files tab and the run's Artifacts\ncard, with no API calls to save them. The dir already exists and is writable.\n\nNeed throwaway scratch \u2014 heavy build output, package caches, temp files?\n`cd /tmp` (or any path outside `/factory`): anything off the factory drive is\nephemeral and discarded when the sandbox ends. In short: **stay in your working\ndir to keep something, `cd` out to throw it away.**\n\nThe whole shared drive is POSIX-mounted at `/factory`; the dashboard-visible\nroot is `$AGENT_COMPOSE_FACTORY_DIR` (`/factory/files`). Earlier versions and\nruns live in sibling dirs under\n`$AGENT_COMPOSE_FACTORY_DIR/$AGENT_COMPOSE_WORKFLOW/` \u2014 read them for prior\ncontext. Other workflows' dirs are present but not your concern.\n\n## Events \u2014 the factory timeline\n\nRecord something on the run/factory timeline (the dashboard renders these)\nwith the CLI \u2014 your run id is `$RUN_ID`:\n\n agentc events send \"$RUN_ID\" <name> --summary \"<one line>\" [--body '<json>']\n\nNames like `note.created` / `brief.posted` surface in the Workbench;\n`agentc events list` reads them back. `/ac:events` is the skill equivalent.\n\n## Runs\n\n agentc list # registered workflows (/ac:list)\n agentc logs \"$RUN_ID\" # a run's logs (/ac:logs)\n agentc invoke <workflow> -i '<json>' # dispatch a workflow (/ac:invoke)\n\n## Writing workflow / agent code \u2014 the SDK\n\n`@agent-compose/sdk` is installed in `/workspace` \u2014 import it from any script\nyou write there:\n\n import { defineWorkflow, agent, AgentComposeClient } from \"@agent-compose/sdk\";\n\nUse `/ac:generate-workflow` / `/ac:generate-agent` to scaffold, then\n`agentc register <file.ts>` (or `/ac:register`).\n\n## Pausing to ask the human \u2014 `agentc pause`\n\nWhen you can't or shouldn't proceed without a human, run `agentc pause`, then\n**END YOUR TURN**:\n\n agentc pause --reason \"Notion returned 401 \u2014 connect Notion to continue\" \\\n --option retry --option skip\n\n`agentc pause` does NOT block and does NOT print the answer. It records your\nquestion and returns immediately. The moment you end your turn, the run pauses\n(your sandbox is snapshotted and compute stops while the human decides) and the\nhuman's answer is delivered to you as your **next message** \u2014 you pick up\nexactly where you left off, with the answer in hand. So: ask, end your turn,\nand wait. Do NOT keep working, do NOT call more tools, and do NOT mark the task\ncomplete after pausing.\n\nReach for it the moment you hit \u2014 or foresee \u2014 any of these:\n- **A wall only a human can clear:** a 401/403, a missing credential, an\n unconnected provider, a host the network refuses. Do NOT retry blindly or try\n to work around it \u2014 pause and say what needs enabling.\n- **A durable or outward-facing action that needs sign-off:** registering a\n workflow, deploying, sending email/messages, deleting or overwriting shared\n data, spending money. Prepare everything, then pause for approval BEFORE you\n commit it.\n- **A judgment call only the human can settle:** an under-specified request,\n several valid paths, a conflict with existing state, missing input only they have.\n\nYou compose the `--reason` (the ask) yourself; pass `--option` choices when\nthere are clear ones, omit them for a free-form answer. Each agent pauses\nindependently \u2014 pausing doesn't stop the others.\n\n## Credentials\n\nConnector credentials (Google, GitHub, \u2026) are NEVER in your environment.\nThey're injected at the network layer when you call an allowed host \u2014 make the\nrequest **without** an Authorization header and the platform adds it. Don't try\nto read or exfiltrate tokens; they aren't here. The \"Connectors & access\"\nsection below (when present) lists exactly which providers this run can reach.\n\n## Tools in this environment\n\n- `agentc` \u2014 Agent Compose CLI (your primary interface; authed from env)\n- `@agent-compose/sdk` \u2014 installed in /workspace for writing workflows\n- `/ac:*` Claude Code skills \u2014 slash commands for the above\n- `archil` (factory drive), `rtk`, `bun`\n- A world-writable `/workspace` working directory";
|
|
23
23
|
/**
|
|
24
24
|
* One connector this run can reach, as the agent should see it. Strictly
|
|
25
25
|
* NON-SECRET — hosts, methods, paths, identity only. The access token is
|
|
@@ -6,6 +6,7 @@ import type { RuntimeOptions, ModelExecutionContract } from "../index.js";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import type { AgentStatus, AgentMessage } from "./protocol.js";
|
|
8
8
|
import type { Processor } from "../processors/processor.js";
|
|
9
|
+
import { type BoundaryPauseFn } from "../pause/pause-core.js";
|
|
9
10
|
import { RequestContext } from "../request-context/request-context.js";
|
|
10
11
|
import { type SteerPayload } from "./steer-control.js";
|
|
11
12
|
export declare const DEFAULT_CLAUDE_MODEL = "claude-fable-5";
|
|
@@ -53,6 +54,13 @@ export type AgentMessageSummary = {
|
|
|
53
54
|
} | {
|
|
54
55
|
type: "error";
|
|
55
56
|
text: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "plan";
|
|
59
|
+
entries: {
|
|
60
|
+
content: string;
|
|
61
|
+
priority: "high" | "medium" | "low";
|
|
62
|
+
status: "pending" | "in_progress" | "completed";
|
|
63
|
+
}[];
|
|
56
64
|
};
|
|
57
65
|
export declare function summarizeAgentMessage(msg: AgentMessage): AgentMessageSummary;
|
|
58
66
|
export type AgentLifecycleEvent = {
|
|
@@ -128,18 +136,12 @@ export interface AgentLoopOpts<TResponse = unknown> {
|
|
|
128
136
|
text: string;
|
|
129
137
|
senderName?: string | null;
|
|
130
138
|
}>;
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* Absent ⇒ no
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
correlationKey?: string;
|
|
138
|
-
schema?: z.ZodType<T>;
|
|
139
|
-
}, agentScope: {
|
|
140
|
-
agentId: string;
|
|
141
|
-
iteration: number;
|
|
142
|
-
}) => Promise<T>;
|
|
139
|
+
/** The run's pause boundary. agent() builds it (a corePause closed over
|
|
140
|
+
* runId/stepIndex); the loop supplies the agentScope so the pauseId is
|
|
141
|
+
* stable across resume. Drives both PR-7 steer-pause AND a processor's
|
|
142
|
+
* `ctx.pause` (human-approval gate). Absent ⇒ no pause (local tests,
|
|
143
|
+
* non-sandbox callers). */
|
|
144
|
+
pause?: BoundaryPauseFn;
|
|
143
145
|
/** PR 7: take-once read of this agent's pending steer (set by the control
|
|
144
146
|
* poller). Returns the steer's payload (reason / correlationKey) or null.
|
|
145
147
|
* The boundary consumes it once per check, and only when no steer is
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-sandbox pause client (ADR-0028). The single way an agent pauses its OWN
|
|
3
|
+
* run: `agentc pause` and the gate-pause processor both call
|
|
4
|
+
* `requestPauseAndAwait`, which drives the server pause API and blocks until a
|
|
5
|
+
* human resolves it.
|
|
6
|
+
*
|
|
7
|
+
* Create-then-poll, NOT a held connection:
|
|
8
|
+
* 1. POST /pauses creates the pending row. The server wakes the step
|
|
9
|
+
* activity, which freezes the live VM in place (E2B native suspend). The
|
|
10
|
+
* poll loop below is part of that frozen process — between polls it costs
|
|
11
|
+
* ZERO compute while the run is parked.
|
|
12
|
+
* 2. GET /pauses/:id long-polls (each request a bounded ~5s server-side
|
|
13
|
+
* LISTEN race) until the row is terminal, then returns the human's answer.
|
|
14
|
+
*
|
|
15
|
+
* There is no marker file and no exception threaded through workflow code — the
|
|
16
|
+
* pause is a server operation, so nothing a `try/catch` can swallow.
|
|
17
|
+
*/
|
|
18
|
+
export interface PauseDecision {
|
|
19
|
+
status: "resolved" | "expired" | "cancelled";
|
|
20
|
+
/** The human's answer (present on `resolved`). Caller-defined shape; the
|
|
21
|
+
* dashboard sends `{ decision: string }`. Null on expiry/cancel. */
|
|
22
|
+
decision: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface RequestPauseOptions {
|
|
25
|
+
/** `AGENT_COMPOSE_URL` — the server base URL injected into the sandbox. */
|
|
26
|
+
baseUrl: string;
|
|
27
|
+
/** `AGENT_COMPOSE_RUN_TOKEN` — the run credential the agent already carries. */
|
|
28
|
+
token: string;
|
|
29
|
+
/** `RUN_ID`. */
|
|
30
|
+
runId: string;
|
|
31
|
+
/** Human-readable reason shown on the pause feed / approval UI. */
|
|
32
|
+
reason: string;
|
|
33
|
+
/** Optional pause TTL; the workflow auto-expires the pause after this. */
|
|
34
|
+
ttlMs?: number;
|
|
35
|
+
/** Optional decision options the human picks from (e.g. approve / deny). */
|
|
36
|
+
options?: Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}>;
|
|
40
|
+
/** The action under review (e.g. the tool call), surfaced to the human. */
|
|
41
|
+
action?: Record<string, unknown>;
|
|
42
|
+
/** Optional second-key resume route. */
|
|
43
|
+
correlationKey?: string;
|
|
44
|
+
/** Abort the wait (the agent loop's signal). */
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}
|
|
47
|
+
/** Inject a custom fetch (tests). Defaults to global fetch. */
|
|
48
|
+
type FetchFn = typeof fetch;
|
|
49
|
+
export declare function requestPauseAndAwait(opts: RequestPauseOptions, fetchImpl?: FetchFn): Promise<PauseDecision>;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,13 +15,29 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
/** What a steer/resume answer carries. Used as the boundary pause's `schema`
|
|
18
|
-
* so it is validated client-side in the re-spawned runner —
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
* so it is validated client-side in the re-spawned runner — an empty answer
|
|
19
|
+
* is rejected (PauseSchemaError) so an agent never resumes on nothing. The
|
|
20
|
+
* normalised `message` becomes the agent's next user turn.
|
|
21
|
+
*
|
|
22
|
+
* Accepts BOTH resume-payload conventions and normalises to `{ message }`:
|
|
23
|
+
* - `{ message }` — the SDK / API steer convention (`answerSteer`).
|
|
24
|
+
* - `{ decision }` — what the dashboard's RunPausePanel universally sends
|
|
25
|
+
* for every pause (option click or free text). Without this, resuming an
|
|
26
|
+
* agent steer / `needs_input` / `agentc pause` pause from the dashboard
|
|
27
|
+
* failed schema validation in the re-spawned runner and the agent never
|
|
28
|
+
* got the answer — the resume looked like it did nothing. */
|
|
29
|
+
export declare const SteerDecisionSchema: z.ZodPipe<z.ZodObject<{
|
|
30
|
+
message: z.ZodOptional<z.ZodString>;
|
|
31
|
+
decision: z.ZodOptional<z.ZodString>;
|
|
23
32
|
actor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
-
}, z.core.$strip
|
|
33
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
34
|
+
message: string;
|
|
35
|
+
actor: string | null;
|
|
36
|
+
}, {
|
|
37
|
+
message?: string | undefined;
|
|
38
|
+
decision?: string | undefined;
|
|
39
|
+
actor?: string | null | undefined;
|
|
40
|
+
}>>;
|
|
25
41
|
export type SteerDecision = z.infer<typeof SteerDecisionSchema>;
|
|
26
42
|
/** Metadata a pending steer carries from the control message to the boundary
|
|
27
43
|
* that turns it into a durable pause row. The flag store used to be a bare
|
package/dist/client.d.ts
CHANGED
|
@@ -67,7 +67,8 @@ export interface RegisterWorkflowInput {
|
|
|
67
67
|
/** All snapshot config — `bootFrom` (where to restore at run start),
|
|
68
68
|
* `save`, `retain`. See `WorkflowMetadata.snapshots`. */
|
|
69
69
|
snapshots?: SnapshotConfig;
|
|
70
|
-
/** Sandbox machine size (template
|
|
70
|
+
/** Sandbox machine resources — size + provider (template defaults).
|
|
71
|
+
* See `WorkflowMetadata.resources`. */
|
|
71
72
|
resources?: SandboxResources;
|
|
72
73
|
/** Provider-neutral execution plan detected by the CLI bundler. */
|
|
73
74
|
workflowPlan?: WorkflowPlan;
|
|
@@ -85,6 +86,10 @@ export interface RegisterWorkflowInput {
|
|
|
85
86
|
inputSchema?: IOSchema;
|
|
86
87
|
/** Output schema extracted from the workflow's `output` zod schema. */
|
|
87
88
|
outputSchema?: IOSchema;
|
|
89
|
+
/** Set by `defineSandboxEnvironment` — marks an environment build so the
|
|
90
|
+
* server skips the /factory mount for its runs (#13). See
|
|
91
|
+
* `WorkflowMetadata.environmentBuild`. */
|
|
92
|
+
environmentBuild?: boolean;
|
|
88
93
|
/** Factory slug. Defaults to `"default"`. */
|
|
89
94
|
factorySlug?: string;
|
|
90
95
|
}
|
|
@@ -736,6 +741,12 @@ export declare class AgentComposeClient {
|
|
|
736
741
|
listSecrets(workflowName: string, opts?: SecretOptions): Promise<SecretListEntry[]>;
|
|
737
742
|
/** Delete a workflow secret. */
|
|
738
743
|
deleteSecret(workflowName: string, key: string, opts?: SecretOptions): Promise<void>;
|
|
744
|
+
/** Create or update a factory-level secret. */
|
|
745
|
+
setFactorySecret(key: string, value: string, opts?: SecretOptions): Promise<SetSecretResult>;
|
|
746
|
+
/** List factory-level secret keys (metadata only — values are never returned). */
|
|
747
|
+
listFactorySecrets(opts?: SecretOptions): Promise<SecretListEntry[]>;
|
|
748
|
+
/** Delete a factory-level secret. */
|
|
749
|
+
deleteFactorySecret(key: string, opts?: SecretOptions): Promise<void>;
|
|
739
750
|
/** Create a new API key on the caller's team. The plaintext `key` is
|
|
740
751
|
* returned once — it cannot be retrieved later.
|
|
741
752
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export type { WorkflowPlan, WorkflowStepPlan } from "./types/workflow-plan.js";
|
|
|
23
23
|
export type { BaseExecutionContext, InvokeChild } from "./types/execution-context.js";
|
|
24
24
|
export { RequestContext, ReservedKeyError, NonSerialisableValueError, AC_RESERVED_PREFIX, AC_TEAM_ID, AC_RUN_ID, AC_WORKFLOW_ID, AC_FACTORY_ID, AC_API_KEY_SCOPES, AC_PARENT_RUN_ID, AC_ABORT_SIGNAL, } from "./request-context/index.js";
|
|
25
25
|
export type { RequestContextReserved, RequestContextWire, } from "./request-context/index.js";
|
|
26
|
-
export { Verdict, runProcessorChain, denyTools, requireScope, redactPattern, } from "./processors/index.js";
|
|
27
|
-
export type { Processor, ProcessorContext, ProcessorVerdict, ToolCall, } from "./processors/index.js";
|
|
26
|
+
export { Verdict, runProcessorChain, denyTools, humanApproval, requireScope, redactPattern, createGatePauseProcessor, } from "./processors/index.js";
|
|
27
|
+
export type { Processor, ProcessorContext, ProcessorVerdict, ToolCall, GatePausePolicy, GatePauseApproval, GatePauseConnection, } from "./processors/index.js";
|
|
28
28
|
export type { AgentMessage, AgentMessageInit, AgentMessageText, AgentMessageThinking, AgentMessageToolUse, AgentMessageToolResult, AgentMessageDone, AgentMessageError, AgentMessageUsage, AgentStatus, } from "./types/protocol.js";
|
|
29
29
|
export type { SandboxProvider, DesktopSandboxProvider, } from "./types/sandbox.js";
|
|
30
30
|
export { AgentComposeClient } from "./client.js";
|
|
@@ -50,7 +50,7 @@ export { default as ampRuntime } from "./runtimes/amp.js";
|
|
|
50
50
|
export { bashTool, codingTools, editTool, readTool, writeTool } from "./tools/index.js";
|
|
51
51
|
export type { CodingTool } from "./tools/index.js";
|
|
52
52
|
export type { RunEvent } from "./types/events.js";
|
|
53
|
-
export { createSandbox, reconnectSandbox, killAllSandboxes, killSandboxById, getSandboxQuotas, listOwnedSandboxes, deleteSandboxSnapshot, makeSandboxProvider, makeDesktopSandboxProvider, parseSseExecStream, AGENT_COMPOSE_TAG } from "./sandbox.js";
|
|
53
|
+
export { createSandbox, reconnectSandbox, killAllSandboxes, killSandboxById, getSandboxQuotas, listOwnedSandboxes, deleteSandboxSnapshot, snapshotResolves, makeSandboxProvider, makeDesktopSandboxProvider, parseSseExecStream, AGENT_COMPOSE_TAG, SANDBOX_VCPUS, DEFAULT_SANDBOX_SIZE, E2B_TEMPLATE_SIZES, isE2bSupportedSize, e2bMachineSpec, e2bBaseTemplate, e2bAgentEnvTemplate, isPlatformE2bTemplateAlias } from "./sandbox.js";
|
|
54
54
|
export { SandboxUnavailableError, SANDBOX_UNAVAILABLE_PREFIX } from "./sandbox-errors.js";
|
|
55
55
|
export type { SandboxCreateOpts, SandboxNetworkPolicy, SandboxNetworkHeaderTransform, SandboxNetworkAllowRule, SandboxNetworkSubnetPolicy, SandboxProviderName, SandboxQuotaResult, OwnedSandboxResult, OwnedSandbox, SandboxSize, ParseSseExecStreamOptions, SandboxCommandRunOptions, SandboxCommandResult, } from "./sandbox.js";
|
|
56
56
|
export type { SandboxResources } from "./types/workflow-metadata.js";
|
|
@@ -59,12 +59,14 @@ export type { WorkflowResult, RunWorkflowOptions, EngineSubsystem } from "./work
|
|
|
59
59
|
export { buildInvokeChild } from "./workflows/invoke-child.js";
|
|
60
60
|
export { defineStep, isWorkflow, runWorkflowSteps, runWorkflowSingleStep, StepValidationError, WorkflowInputValidationError, WorkflowOutputValidationError, } from "./workflow-steps/index.js";
|
|
61
61
|
export type { Step, StepContext, StepRunResult, Workflow, DefineStepOpts, StepWorkflowDefinition, WorkflowBuilder, RunWorkflowStepsOpts, RunWorkflowStepsResult, RunWorkflowSingleStepOpts, RunWorkflowSingleStepResult, StepObservability, SubStepEvent, } from "./workflow-steps/index.js";
|
|
62
|
-
export { invokeStep, serveStep, parseStepResult, buildStepEnvs, StepExecutionError, STEP_RESULT_PREFIX, STEP_PAUSE_PREFIX, STEP_ENV, RUNNER_BUNDLE_PATH, RUNNER_COMMAND, stepInputPath, requestContextPath, } from "./step-invocation/index.js";
|
|
62
|
+
export { invokeStep, launchStep, reconnectStep, serveStep, parseStepResult, buildStepEnvs, StepExecutionError, STEP_RESULT_PREFIX, STEP_PAUSE_PREFIX, STEP_ENV, RUNNER_BUNDLE_PATH, RUNNER_COMMAND, stepInputPath, requestContextPath, } from "./step-invocation/index.js";
|
|
63
63
|
export { PauseError, PauseExpiredError, PauseSchemaError, PauseRequestError, } from "./pause/errors.js";
|
|
64
64
|
export type { PauseErrorCode } from "./pause/errors.js";
|
|
65
65
|
export type { PauseRequest } from "./pause/pause-core.js";
|
|
66
66
|
export type { WaitForEventRequest } from "./pause/wrappers.js";
|
|
67
|
-
export
|
|
67
|
+
export { requestPauseAndAwait } from "./agent/pause-client.js";
|
|
68
|
+
export type { PauseDecision, RequestPauseOptions } from "./agent/pause-client.js";
|
|
69
|
+
export type { StepRequest, StepResult, StepInvocationError, StepPauseRequest, StepHandler, StepHandlerResult, ServeStepRequest, RunningStep, InvokeStepOptions, } from "./step-invocation/index.js";
|
|
68
70
|
export { agentLoop, parseAgentStatus, DEFAULT_CLAUDE_MODEL } from "./agent/agent-loop.js";
|
|
69
71
|
export type { AgentLifecycleEvent, AgentLoopOpts, AgentLoopResult } from "./agent/agent-loop.js";
|
|
70
72
|
export { agent } from "./agent/run-agent.js";
|