@agent-compose/sdk 0.5.6 → 0.5.8
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 +4 -4
- package/dist/agent/__tests__/run-agent-liveness.test.d.ts +17 -0
- package/dist/agent/agent-context.d.ts +67 -0
- package/dist/agent/agent-loop-contract.test.d.ts +1 -0
- package/dist/agent/agent-loop.d.ts +2 -1
- package/dist/client.d.ts +129 -24
- package/dist/index.d.ts +9 -4
- package/dist/index.js +553 -89
- package/dist/pause/wrappers.d.ts +7 -11
- package/dist/runtimes/claude.d.ts +9 -1
- package/dist/runtimes/openai-desktop.js +548 -89
- package/dist/sandbox-errors.d.ts +49 -0
- package/dist/sandbox.d.ts +92 -13
- package/dist/step-invocation/protocol.d.ts +6 -0
- package/dist/step-invocation/types.d.ts +1 -1
- package/dist/types/execution-context.d.ts +1 -3
- package/dist/types/sandbox-environment.d.ts +1 -10
- package/dist/types/sandbox.d.ts +27 -3
- package/dist/types/workflow-metadata.d.ts +81 -13
- package/dist/types/workflow.d.ts +45 -10
- package/dist/utils/bundler.d.ts +40 -9
- package/dist/workflow-steps/workflow.d.ts +4 -3
- package/package.json +2 -2
- package/src/agent/agent-context.ts +212 -0
- package/src/agent/agent-loop.ts +78 -10
- package/src/agent/run-agent.ts +37 -1
- package/src/client.ts +232 -26
- package/src/index.ts +9 -4
- package/src/pause/wrappers.ts +7 -21
- package/src/runtimes/claude.ts +66 -8
- package/src/sandbox-errors.ts +53 -0
- package/src/sandbox.ts +438 -61
- package/src/step-invocation/invoker.ts +66 -8
- package/src/step-invocation/protocol.ts +9 -0
- package/src/step-invocation/server.ts +27 -4
- package/src/step-invocation/types.ts +1 -1
- package/src/types/execution-context.ts +1 -3
- package/src/types/sandbox-environment.ts +1 -11
- package/src/types/sandbox.ts +28 -3
- package/src/types/workflow-metadata.ts +91 -16
- package/src/types/workflow.ts +45 -12
- package/src/utils/bundler.ts +46 -13
- package/src/workflow-steps/workflow.ts +4 -3
- package/src/workflows/invoke-child.ts +7 -1
|
@@ -23,7 +23,7 @@ import type { z } from "zod";
|
|
|
23
23
|
import type { Step, Workflow } from "./types.js";
|
|
24
24
|
import { WORKFLOW_BRAND } from "./types.js";
|
|
25
25
|
import { extractMetadata } from "../types/workflow-metadata.js";
|
|
26
|
-
import type { SnapshotConfig,
|
|
26
|
+
import type { SnapshotConfig, SandboxResources } from "../types/workflow-metadata.js";
|
|
27
27
|
import type { SandboxNetworkPolicy } from "../sandbox.js";
|
|
28
28
|
import type { Processor } from "../processors/processor.js";
|
|
29
29
|
|
|
@@ -51,8 +51,9 @@ export interface StepWorkflowDefinition<TInput, TOutput> {
|
|
|
51
51
|
networkPolicy?: SandboxNetworkPolicy;
|
|
52
52
|
placeholders?: Record<string, string>;
|
|
53
53
|
snapshots?: SnapshotConfig;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
/** Sandbox machine size — small (default) | medium | large. Vercel maps
|
|
55
|
+
* it to vCPUs; E2B sizing is template-defined. Omit → small. */
|
|
56
|
+
resources?: SandboxResources;
|
|
56
57
|
processors?: readonly Processor[];
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -24,6 +24,12 @@ export function buildInvokeChild(
|
|
|
24
24
|
return (name, input, childOpts) => getChildClient().invokeAndWait(name, input, {
|
|
25
25
|
...childOpts,
|
|
26
26
|
parentRunId: runId,
|
|
27
|
-
|
|
27
|
+
// The runner sets `AGENT_COMPOSE_FACTORY` (the run's factory slug — see
|
|
28
|
+
// activities.ts loadRunnerEnvs). Default the child to it so it lands in the
|
|
29
|
+
// SAME factory as the parent — the per-run API key is factory-scoped, so a
|
|
30
|
+
// child dispatched into another factory 403s. (Was reading the never-set
|
|
31
|
+
// `AGENT_COMPOSE_FACTORY_SLUG`, silently falling back to "default".)
|
|
32
|
+
factorySlug: childOpts?.factorySlug ?? opts.defaultFactorySlug
|
|
33
|
+
?? process.env.AGENT_COMPOSE_FACTORY ?? process.env.AGENT_COMPOSE_FACTORY_SLUG ?? "default",
|
|
28
34
|
});
|
|
29
35
|
}
|