antpath 0.10.12 → 0.10.14

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 CHANGED
@@ -8,23 +8,28 @@ antpath is a TypeScript-first SDK + CLI for running autonomous Claude Managed Ag
8
8
 
9
9
  ```ts
10
10
  import {
11
- AntpathClient, // the only public class — submits durable runs to a dashboard
12
- defineTemplate,
13
- string,
14
- validateProxyAuth // helper for per-run proxy endpoint auth
11
+ AntpathClient, // the only client class — submits durable runs to a dashboard
12
+ Skill, // workspace / provider / inline skill bundles
13
+ McpServer, // MCP server declarations (headers split into secrets server-side)
14
+ ProxyEndpoint, // per-run managed HTTP proxy endpoint
15
+ AgentsMd, // AGENTS.md / CLAUDE.md uploads
16
+ File, // arbitrary workspace files mounted into the session
17
+ defineRun, // type-safe wrapper around a credential-free `Blueprint`
18
+ validateProxyAuth // helper that fails fast on policy/auth mismatch
15
19
  } from "antpath";
16
20
  ```
17
21
 
18
22
  ```bash
19
- antpath run ./template.json --api-token ant_… \
20
- --anthropic-api-key sk-ant-… --follow
21
- antpath status <run-id> --api-token …
22
- antpath events <run-id> --api-token … --follow
23
- antpath outputs <run-id> --api-token …
24
- antpath download <run-id> <output-id> --out ./local --api-token …
25
- antpath cancel <run-id> --api-token …
26
- antpath delete <run-id> --api-token …
27
- antpath whoami --api-token …
23
+ antpath run --config ./blueprint.json --api-token ant_… \
24
+ --anthropic-api-key sk-ant-… --follow
25
+ antpath status <run-id> --api-token …
26
+ antpath events <run-id> [--follow] --api-token …
27
+ antpath outputs <run-id> --api-token …
28
+ antpath download <run-id> [--out path] --api-token …
29
+ antpath cancel <run-id> --api-token …
30
+ antpath delete <run-id> --api-token …
31
+ antpath whoami --api-token …
32
+ antpath skills <upload|list|get|delete> [flags] --api-token …
28
33
  ```
29
34
 
30
35
  The SDK class and the CLI are backed by the same `@antpath/shared` operations module — any read or write you can do through one, you can do through the other, against the same durable run records. The same npm package also ships the in-container `antpath` CLI as its `bin` entry; the worker mounts that CLI inside every run at `/mnt/session/uploads/antpath/antpath` (Anthropic Managed Agents rebases every session-resource mount under `/mnt/session/uploads/`, and mounted files have no execute permission so they are invoked through `node`), so skills can call `node /mnt/session/uploads/antpath/antpath proxy …` against the per-run manifest. See [Agent-first surface design](../../references/development-principles.md#agent-first-surface-design).
@@ -42,23 +47,17 @@ The dashboard URL defaults to `https://www.antpath.ai`. Self-hosted deployments
42
47
  ## Quickstart (SDK)
43
48
 
44
49
  ```ts
45
- import { AntpathClient, defineTemplate, string } from "antpath";
50
+ import { AntpathClient } from "antpath";
46
51
 
47
52
  const client = new AntpathClient({
48
53
  apiToken: process.env.ANTPATH_API_TOKEN!
49
54
  // baseUrl defaults to https://www.antpath.ai — set it for self-hosted deployments.
50
55
  });
51
56
 
52
- const template = defineTemplate({
53
- name: "hello",
57
+ const ref = await client.submitRun({
54
58
  model: "claude-haiku-4-5",
55
59
  system: "You are a concise automation agent.",
56
- messages: ["Write a short answer about {{topic}}."],
57
- variables: { topic: string() }
58
- });
59
-
60
- const ref = await client.submitRun(template, {
61
- variables: { topic: "agent-first SDK design" },
60
+ prompt: "Write a short answer about agent-first SDK design.",
62
61
  secrets: { anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! } }
63
62
  });
64
63
 
@@ -70,6 +69,23 @@ for (const output of await ref.outputs()) {
70
69
  }
71
70
  ```
72
71
 
72
+ Reusable, credential-free configs use `defineRun`:
73
+
74
+ ```ts
75
+ import { defineRun } from "antpath";
76
+
77
+ const summarise = defineRun((topic: string) => ({
78
+ model: "claude-haiku-4-5",
79
+ system: "You are a concise automation agent.",
80
+ prompt: `Write a short answer about ${topic}.`
81
+ }));
82
+
83
+ const ref = await client.submitRun({
84
+ ...summarise("agent-first SDK design"),
85
+ secrets: { anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! } }
86
+ });
87
+ ```
88
+
73
89
  Stream events live with `ref.stream()`:
74
90
 
75
91
  ```ts
@@ -80,16 +96,26 @@ for await (const event of ref.stream()) {
80
96
  }
81
97
  ```
82
98
 
83
- The same flow from the CLI:
99
+ The same flow from the CLI (two equivalent forms):
84
100
 
85
101
  ```bash
86
- antpath run ./template.json \
102
+ antpath run \
103
+ --api-token "$ANTPATH_API_TOKEN" \
104
+ --anthropic-api-key "$ANTHROPIC_API_KEY" \
105
+ --model claude-haiku-4-5 \
106
+ --system "You are a concise automation agent." \
107
+ --prompt "Write a short answer about agent-first SDK design." \
108
+ --follow
109
+
110
+ antpath run \
87
111
  --api-token "$ANTPATH_API_TOKEN" \
88
112
  --anthropic-api-key "$ANTHROPIC_API_KEY" \
89
- --var topic="agent-first SDK design" \
113
+ --config ./blueprint.json \
90
114
  --follow
91
115
  ```
92
116
 
117
+ `--config` accepts a JSON file matching the `Blueprint` shape: `{ model, system?, prompt, skills?, mcpServers?, environment?, cleanup?, proxyEndpoints?, metadata? }`. There is no template wrapper and no `{{var}}` DSL — interpolate at the call site.
118
+
93
119
  ## Test commands
94
120
 
95
121
  ```text
@@ -104,7 +130,7 @@ pnpm test:user:live # live; same but hits the real platform
104
130
  ## Guides
105
131
 
106
132
  - [Quickstart](docs/quickstart.md)
107
- - [Templates](docs/templates.md)
133
+ - [Blueprints](docs/templates.md)
108
134
  - [Credentials](docs/credentials.md)
109
135
  - [MCP](docs/mcp.md)
110
136
  - [Skills](docs/skills.md)
@@ -18,7 +18,16 @@ export interface PlatformProxyConfig {
18
18
  readonly sweeperIntervalMs: number;
19
19
  }
20
20
  export interface PlatformCaps {
21
- readonly maxRunDurationMs: number;
21
+ /**
22
+ * Wall-clock ceiling on a single run before forced termination.
23
+ * `null` means no antpath-imposed cap, but this is **not unlimited
24
+ * overall**: the upstream provider (e.g. Anthropic Managed Agents)
25
+ * still enforces its own session-lifetime ceiling, and a run that
26
+ * exceeds it terminates regardless. Override via env var
27
+ * `ANTPATH_MAX_RUN_DURATION_MS` to layer an antpath-side cap below
28
+ * the provider's.
29
+ */
30
+ readonly maxRunDurationMs: number | null;
22
31
  readonly maxActiveRunsPerWorkspace: number;
23
32
  readonly maxActiveRunsPerUserOrToken: number;
24
33
  readonly pollingBaseIntervalMs: number;
@@ -44,4 +53,11 @@ export interface PlatformConfig extends PlatformRequiredConfig {
44
53
  type Env = Record<string, string | undefined>;
45
54
  export declare function parsePlatformConfig(env: Env): PlatformConfig;
46
55
  export declare function snapshotRunCaps(config: PlatformConfig): PlatformCaps;
56
+ /**
57
+ * Single source of truth for the `ANTPATH_MAX_RUN_DURATION_MS` env override.
58
+ * Returns `null` when unset (= no antpath-imposed wall-clock cap). Used by
59
+ * `parsePlatformConfig` and by dashboard routes that mint proxy bearers and
60
+ * snapshot caps onto each run.
61
+ */
62
+ export declare function parseMaxRunDurationMs(env: Env): number | null;
47
63
  export {};
@@ -1,5 +1,5 @@
1
1
  const DEFAULT_CAPS = {
2
- maxRunDurationMs: 5 * 60 * 1000,
2
+ maxRunDurationMs: null,
3
3
  maxActiveRunsPerWorkspace: 1,
4
4
  maxActiveRunsPerUserOrToken: 1,
5
5
  pollingBaseIntervalMs: 5_000,
@@ -41,7 +41,7 @@ export function parsePlatformConfig(env) {
41
41
  throw new Error(`Missing required environment variables: ${missing.join(", ")}`);
42
42
  }
43
43
  const caps = {
44
- maxRunDurationMs: optionalPositiveInt(env, "ANTPATH_MAX_RUN_DURATION_MS", DEFAULT_CAPS.maxRunDurationMs),
44
+ maxRunDurationMs: parseMaxRunDurationMs(env),
45
45
  maxActiveRunsPerWorkspace: optionalPositiveInt(env, "ANTPATH_MAX_ACTIVE_RUNS_PER_WORKSPACE", DEFAULT_CAPS.maxActiveRunsPerWorkspace),
46
46
  maxActiveRunsPerUserOrToken: optionalPositiveInt(env, "ANTPATH_MAX_ACTIVE_RUNS_PER_USER_OR_TOKEN", DEFAULT_CAPS.maxActiveRunsPerUserOrToken),
47
47
  pollingBaseIntervalMs: optionalPositiveInt(env, "ANTPATH_POLLING_BASE_INTERVAL_MS", DEFAULT_CAPS.pollingBaseIntervalMs),
@@ -100,6 +100,23 @@ function optionalPositiveInt(env, name, fallback) {
100
100
  function optionalNonNegativeInt(env, name, fallback) {
101
101
  return optionalInt(env, name, fallback, 0);
102
102
  }
103
+ /**
104
+ * Single source of truth for the `ANTPATH_MAX_RUN_DURATION_MS` env override.
105
+ * Returns `null` when unset (= no antpath-imposed wall-clock cap). Used by
106
+ * `parsePlatformConfig` and by dashboard routes that mint proxy bearers and
107
+ * snapshot caps onto each run.
108
+ */
109
+ export function parseMaxRunDurationMs(env) {
110
+ const raw = env.ANTPATH_MAX_RUN_DURATION_MS;
111
+ if (raw === undefined || raw === "") {
112
+ return DEFAULT_CAPS.maxRunDurationMs;
113
+ }
114
+ const value = Number(raw);
115
+ if (!Number.isSafeInteger(value) || value < 1) {
116
+ throw new Error("ANTPATH_MAX_RUN_DURATION_MS must be a safe integer greater than or equal to 1");
117
+ }
118
+ return value;
119
+ }
103
120
  function optionalInt(env, name, fallback, minimum) {
104
121
  const raw = env[name];
105
122
  if (raw === undefined || raw === "") {
@@ -10,6 +10,21 @@
10
10
  */
11
11
  export declare const PROXY_PROTOCOL_VERSION: "1";
12
12
  export declare const PROXY_PROTOCOL_HEADER = "x-antpath-proxy-protocol";
13
+ /**
14
+ * Default `User-Agent` the proxy attaches to every outbound request when
15
+ * the caller did not supply one via `allowHeaders`. Some upstreams reject
16
+ * requests that arrive without a meaningful UA — notably the Wikimedia
17
+ * family (Wikidata, Wikipedia, Wikimedia Commons), whose policy requires
18
+ * a contactable identifier and otherwise returns HTTP 403 with a
19
+ * `Please identify your user agent` body.
20
+ *
21
+ * Callers can override per request by listing `user-agent` in their
22
+ * endpoint's `allowHeaders` and setting it on the proxy call; the
23
+ * default only fires when nothing was forwarded.
24
+ *
25
+ * See <https://meta.wikimedia.org/wiki/User-Agent_policy>.
26
+ */
27
+ export declare const PROXY_DEFAULT_USER_AGENT = "antpath-proxy/1.0 (+https://antpath.ai/contact)";
13
28
  export declare const PROXY_METHOD_HEADER = "x-antpath-method";
14
29
  export declare const PROXY_PATH_HEADER = "x-antpath-path";
15
30
  export declare const PROXY_QUERY_HEADER = "x-antpath-query";
@@ -22,6 +22,21 @@
22
22
  */
23
23
  export const PROXY_PROTOCOL_VERSION = "1";
24
24
  export const PROXY_PROTOCOL_HEADER = "x-antpath-proxy-protocol";
25
+ /**
26
+ * Default `User-Agent` the proxy attaches to every outbound request when
27
+ * the caller did not supply one via `allowHeaders`. Some upstreams reject
28
+ * requests that arrive without a meaningful UA — notably the Wikimedia
29
+ * family (Wikidata, Wikipedia, Wikimedia Commons), whose policy requires
30
+ * a contactable identifier and otherwise returns HTTP 403 with a
31
+ * `Please identify your user agent` body.
32
+ *
33
+ * Callers can override per request by listing `user-agent` in their
34
+ * endpoint's `allowHeaders` and setting it on the proxy call; the
35
+ * default only fires when nothing was forwarded.
36
+ *
37
+ * See <https://meta.wikimedia.org/wiki/User-Agent_policy>.
38
+ */
39
+ export const PROXY_DEFAULT_USER_AGENT = "antpath-proxy/1.0 (+https://antpath.ai/contact)";
25
40
  export const PROXY_METHOD_HEADER = "x-antpath-method";
26
41
  export const PROXY_PATH_HEADER = "x-antpath-path";
27
42
  export const PROXY_QUERY_HEADER = "x-antpath-query";
@@ -87,8 +87,14 @@ export interface WhoAmI {
87
87
  readonly storageCapBytes?: number;
88
88
  /** Current captured-output usage in bytes. */
89
89
  readonly storageUsedBytes?: number;
90
- /** Wall-clock ceiling on a single run before forced termination. */
91
- readonly maxRunDurationMs?: number;
90
+ /**
91
+ * Wall-clock ceiling on a single run before forced termination.
92
+ * `null` means no antpath-imposed cap, but this is **not unlimited
93
+ * overall**: the upstream provider (e.g. Anthropic Managed Agents)
94
+ * still enforces its own session-lifetime ceiling, and a run that
95
+ * exceeds it terminates regardless.
96
+ */
97
+ readonly maxRunDurationMs?: number | null;
92
98
  };
93
99
  readonly [key: string]: unknown;
94
100
  }
package/dist/cli.mjs CHANGED
@@ -15,7 +15,7 @@ var ANTPATH_RUN_TOKEN_PATH = "/mnt/session/uploads/antpath/run-token";
15
15
 
16
16
  // ../shared/dist/config.js
17
17
  var DEFAULT_CAPS = {
18
- maxRunDurationMs: 5 * 60 * 1e3,
18
+ maxRunDurationMs: null,
19
19
  maxActiveRunsPerWorkspace: 1,
20
20
  maxActiveRunsPerUserOrToken: 1,
21
21
  pollingBaseIntervalMs: 5e3,
@@ -1 +1 @@
1
- 0e3e0168990913d0c819793e8a0174bbe06d599f3843e731f7dce2a481d84f71 cli.mjs
1
+ e4711068466806825d0e897c6266a8cb2141e584de6ee4f0116be17a16a185b2 cli.mjs
package/dist/skill.d.ts CHANGED
@@ -12,10 +12,14 @@ import { type SkillFiles } from "./bundle.js";
12
12
  * ```
13
13
  *
14
14
  * - **Provider built-in** — references a provider-side skill (e.g.
15
- * Anthropic web-search). Not uploaded to your workspace.
15
+ * Anthropic's `pdf` / `xlsx` / `docx` / `pptx` prebuilt Agent
16
+ * Skills). Not uploaded to your workspace.
16
17
  * ```ts
17
- * const websearch = Skill.provider({ vendor: "anthropic", skillId: "web-search" });
18
+ * const pdf = Skill.provider({ vendor: "anthropic", skillId: "pdf" });
18
19
  * ```
20
+ * Note: Anthropic web search is a Messages-API *tool*
21
+ * (`{ type: "web_search_…" }`), not an Agent Skill — `Skill.provider`
22
+ * does not enable it.
19
23
  *
20
24
  * - **Transient (per-run)** — built from local files, never persisted.
21
25
  * The bytes ride alongside `submitRun` as a multipart part and the
package/dist/skill.js CHANGED
@@ -14,10 +14,14 @@ import { chooseUploadStrategy, uploadChunked } from "./asset-upload.js";
14
14
  * ```
15
15
  *
16
16
  * - **Provider built-in** — references a provider-side skill (e.g.
17
- * Anthropic web-search). Not uploaded to your workspace.
17
+ * Anthropic's `pdf` / `xlsx` / `docx` / `pptx` prebuilt Agent
18
+ * Skills). Not uploaded to your workspace.
18
19
  * ```ts
19
- * const websearch = Skill.provider({ vendor: "anthropic", skillId: "web-search" });
20
+ * const pdf = Skill.provider({ vendor: "anthropic", skillId: "pdf" });
20
21
  * ```
22
+ * Note: Anthropic web search is a Messages-API *tool*
23
+ * (`{ type: "web_search_…" }`), not an Agent Skill — `Skill.provider`
24
+ * does not enable it.
21
25
  *
22
26
  * - **Transient (per-run)** — built from local files, never persisted.
23
27
  * The bytes ride alongside `submitRun` as a multipart part and the
package/dist/skill.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"skill.js","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAKnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,OAAO,KAAK;IAChB,2FAA2F;IAClF,MAAM,CAA0B;IAEhC,IAAI,CAAW;IACf,eAAe,CAAyB;IACjD,SAAS,GAAY,KAAK,CAAC;IAE3B;;;OAGG;IACH,YAAY,GAAa,EAAE,MAAoB,EAAE,cAA2B;QAC1E,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAU;QACtB,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,KAAK,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9C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C,kBAAkB,CAAC;IACzC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACjD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,IAAI,KAAK,CACb,wEAAwE;QACtE,wDAAwD,CAC3D,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,MAAmB;IAGxC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IACzC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;IACjC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CACL,sFAAsF;QACpF,6CAA6C,CAChD,CAAC;AACJ,CAAC"}
package/dist/version.d.ts CHANGED
@@ -9,4 +9,4 @@
9
9
  * reports carry the exact build the failure came from.
10
10
  * - Future User-Agent header on outbound SDK requests.
11
11
  */
12
- export declare const SDK_VERSION = "0.10.12";
12
+ export declare const SDK_VERSION = "0.10.14";
package/dist/version.js CHANGED
@@ -9,5 +9,5 @@
9
9
  * reports carry the exact build the failure came from.
10
10
  * - Future User-Agent header on outbound SDK requests.
11
11
  */
12
- export const SDK_VERSION = "0.10.12";
12
+ export const SDK_VERSION = "0.10.14";
13
13
  //# sourceMappingURL=version.js.map
package/docs/events.md CHANGED
@@ -25,16 +25,17 @@ for await (const event of ref.stream({ intervalMs: 1000 })) {
25
25
 
26
26
  > **Transport.** `stream()` polls under the hood — it issues `GET
27
27
  > /api/runs/:id/events?since=…` calls at `intervalMs` until the run
28
- > reaches a terminal status. There is no SSE / WebSocket push from the
29
- > BFF today. For latency-sensitive UIs this is acceptable down to about
30
- > 500 ms; below that, every dashboard request is one round-trip. A push
31
- > transport is on the public backlog not committed to a release.
28
+ > reaches a terminal status. The dashboard BFF also exposes an SSE
29
+ > endpoint (`GET /api/runs/:id/events/stream`) that the dashboard UI
30
+ > consumes; an SSE-backed SDK transport is on the public backlog. For
31
+ > latency-sensitive consumers the polling baseline is acceptable down
32
+ > to about 500 ms.
32
33
 
33
34
  The CLI mirrors the same surface:
34
35
 
35
36
  ```bash
36
- antpath events <run-id> --api-token … --workspace … --dashboard-url … # snapshot
37
- antpath events <run-id> --follow --api-token … --workspace … --dashboard-url … # stream until terminal
37
+ antpath events <run-id> --api-token … [--dashboard-url …] # snapshot
38
+ antpath events <run-id> --follow --api-token … [--dashboard-url …] # stream until terminal
38
39
  ```
39
40
 
40
41
  Both surfaces observe the same events. A subscriber attached after `submitRun()` returns replays the events it missed, then continues live.
@@ -5,27 +5,20 @@ title: antpath quickstart
5
5
  # Quickstart
6
6
 
7
7
  1. Get an antpath SDK API token (`ant_…`).
8
- 2. Define a secret-free Template in TypeScript (or JSON / a `.mjs` default export).
9
- 3. Create `AntpathClient` the workspace is derived server-side from the token.
10
- 4. Submit the run with an inline `secrets` bundle. Wait for terminal status. Fetch outputs.
8
+ 2. Create `AntpathClient` the workspace is derived server-side from the token.
9
+ 3. Submit the run with the agent's brief plus an inline `secrets` bundle. Wait for terminal status. Fetch outputs.
11
10
 
12
11
  ```ts
13
- import { AntpathClient, defineTemplate, string } from "antpath";
12
+ import { AntpathClient } from "antpath";
14
13
 
15
14
  const client = new AntpathClient({
16
15
  apiToken: process.env.ANTPATH_API_TOKEN!
17
16
  // baseUrl defaults to https://www.antpath.ai — set it for self-hosted deployments.
18
17
  });
19
18
 
20
- const template = defineTemplate({
21
- name: "hello",
19
+ const ref = await client.submitRun({
22
20
  model: "claude-haiku-4-5",
23
- messages: ["Write a short answer about {{topic}}."],
24
- variables: { topic: string() }
25
- });
26
-
27
- const ref = await client.submitRun(template, {
28
- variables: { topic: "agent-first SDK design" },
21
+ prompt: "Write a short answer about agent-first SDK design.",
29
22
  secrets: { anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! } }
30
23
  });
31
24
 
@@ -34,17 +27,34 @@ console.log(run.status);
34
27
  console.log(await ref.outputs());
35
28
  ```
36
29
 
30
+ For reusable, credential-free configs, wrap a producer with `defineRun`:
31
+
32
+ ```ts
33
+ import { defineRun } from "antpath";
34
+
35
+ const summarise = defineRun((topic: string) => ({
36
+ model: "claude-haiku-4-5",
37
+ prompt: `Write a short answer about ${topic}.`
38
+ }));
39
+
40
+ const ref = await client.submitRun({
41
+ ...summarise("agent-first SDK design"),
42
+ secrets: { anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! } }
43
+ });
44
+ ```
45
+
37
46
  Or from the shell:
38
47
 
39
48
  ```bash
40
- antpath run ./template.json \
49
+ antpath run \
41
50
  --api-token "$ANTPATH_API_TOKEN" \
42
51
  --anthropic-api-key "$ANTHROPIC_API_KEY" \
43
- --var topic="agent-first SDK design" \
52
+ --model claude-haiku-4-5 \
53
+ --prompt "Write a short answer about agent-first SDK design." \
44
54
  --follow
45
55
  ```
46
56
 
47
- Both surfaces hit the same dashboard BFF and operate on the same durable run records — pick whichever is most convenient.
57
+ For a config-file flow, pass `--config <path>` with a JSON file matching the `Blueprint` shape (`{ model, system?, prompt, skills?, mcpServers?, environment?, cleanup?, proxyEndpoints?, metadata? }`). Both surfaces hit the same dashboard BFF and operate on the same durable run records — pick whichever is most convenient.
48
58
 
49
59
  ## Safe retries with `idempotencyKey`
50
60
 
@@ -57,7 +67,7 @@ Every `submitRun` call carries an `idempotencyKey`. When omitted the SDK auto-ge
57
67
  | Same key + **different** request body hash | HTTP 409 — body `{ error: { message, code: "idempotency_conflict", details: { existingRunId } } }`. The SDK throws an `HttpError` carrying that body. Use `details.existingRunId` to adopt the pre-existing run, or pick a fresh key. |
58
68
  | Omitted `idempotencyKey` | A new UUID is generated on every call — repeat submissions create new runs. |
59
69
 
60
- The request hash is computed server-side over the canonical submission JSON (model, prompt, system, environment, skill refs, MCP server descriptors, proxy endpoints, `outputDirs`, etc.) so reordering JSON keys, adding whitespace, or rotating the inline secret bundle does **not** change the hash. Bumping a variable or changing the prompt does.
70
+ The request hash is computed server-side over the canonical submission JSON (model, prompt, system, environment, skill refs, MCP server descriptors, proxy endpoints, `outputDirs`, etc.) so reordering JSON keys, adding whitespace, or rotating the inline secret bundle does **not** change the hash. Changing the prompt, model, system, or any other non-secret field does.
61
71
 
62
72
  Pattern for safe retries:
63
73
 
package/docs/skills.md CHANGED
@@ -6,7 +6,12 @@ title: Skills
6
6
 
7
7
  Skill inputs accepted by the platform:
8
8
 
9
- - provider-managed Anthropic skills (e.g. `xlsx`, `web-search`);
9
+ - provider-managed Anthropic prebuilt Agent Skills (`pdf`, `xlsx`,
10
+ `docx`, `pptx` — see the
11
+ [Anthropic Agent Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
12
+ for the live catalog). Note that Anthropic web search is a Messages
13
+ API *tool* (`{ type: "web_search_…" }`), not an Agent Skill, and is
14
+ not currently exposed through `submitRun`;
10
15
  - existing custom provider skill IDs;
11
16
  - workspace skill bundles (persistent, referenced by `skl_*` id);
12
17
  - inline-supplied bundles passed directly at `submitRun` — these
package/docs/templates.md CHANGED
@@ -1,24 +1,53 @@
1
1
  ---
2
- title: Templates
2
+ title: Blueprints (run configuration)
3
3
  ---
4
4
 
5
- # Templates
5
+ # Blueprints
6
6
 
7
- Templates are code-defined, immutable, secret-free run configurations.
7
+ A `Blueprint` is the credential-free shape that drives a run. The legacy `Template` wrapper and `{{var}}` DSL are gone — interpolate values at the call site, then pass the blueprint to `submitRun`.
8
8
 
9
- Allowed Template content:
9
+ Allowed `Blueprint` fields:
10
10
 
11
- - model;
12
- - system prompt;
13
- - queued user messages;
14
- - typed variables;
15
- - MCP server declarations;
16
- - MCP tool allow/deny policy;
17
- - environment package and network configuration;
18
- - inline/local/provider skills;
19
- - output conventions;
20
- - non-secret metadata.
11
+ - `model` — required.
12
+ - `prompt` — required (string or array of strings).
13
+ - `system` optional system message.
14
+ - `skills` — array of `Skill` instances (workspace, provider, or inline).
15
+ - `mcpServers` — array of `McpServer` instances (headers are split into `secrets.mcpServers` server-side).
16
+ - `proxyEndpoints` array of `ProxyEndpoint` instances.
17
+ - `agentsMd` / `files` array of `AgentsMd` / `File` instances.
18
+ - `environment` — packages + networking + `outputDirs`.
19
+ - `cleanup` — `{ session: "retain" | "delete" }`.
20
+ - `metadata` — non-secret structured metadata.
21
21
 
22
- Variables use `{{name}}` and are resolved before provider calls. Use `\{{name}}` for a literal placeholder.
22
+ Secrets never live in a `Blueprint`. Pass credentials through `submitRun({ ...blueprint, secrets, proxyEndpointAuth })` (SDK) or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-auth`, `--proxy-auth`).
23
23
 
24
- Secrets must not appear in Templates. Pass credentials through `submitRun(template, { secrets, proxyEndpointAuth })` (SDK) or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-secret`, `--proxy-auth`).
24
+ ## `defineRun` typed, reusable factory
25
+
26
+ `defineRun` is identity at runtime; its value is the type boundary. The producer must return a `Blueprint`, so callers cannot accidentally bake credentials into a reusable artifact.
27
+
28
+ ```ts
29
+ import { defineRun } from "antpath";
30
+
31
+ const summarise = defineRun((topic: string) => ({
32
+ model: "claude-haiku-4-5",
33
+ system: "You are a concise automation agent.",
34
+ prompt: `Write a short answer about ${topic}.`
35
+ }));
36
+
37
+ await client.submitRun({
38
+ ...summarise("agent-first SDK design"),
39
+ secrets: { anthropic: { apiKey } }
40
+ });
41
+ ```
42
+
43
+ ## CLI
44
+
45
+ The `antpath run` host subcommand accepts the same blueprint either as a JSON config file:
46
+
47
+ ```bash
48
+ antpath run --config ./blueprint.json \
49
+ --api-token "$ANTPATH_API_TOKEN" \
50
+ --anthropic-api-key "$ANTHROPIC_API_KEY"
51
+ ```
52
+
53
+ …or as explicit flags (`--model`, `--system`, `--prompt`, `--skill`, `--provider-skill`, `--mcp`, `--mcp-auth`, `--proxy-endpoint`, `--proxy-auth`, `--metadata`, `--cleanup`). The two modes are mutually exclusive.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antpath",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "description": "TypeScript SDK for running autonomous Claude Managed Agents sessions.",
5
5
  "repository": {
6
6
  "type": "git",