antpath 0.6.2 → 0.8.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/_shared/blueprint.d.ts +66 -7
- package/dist/_shared/blueprint.js +53 -8
- package/dist/_shared/operations.d.ts +52 -0
- package/dist/_shared/operations.js +83 -0
- package/dist/_shared/proxy-protocol.d.ts +10 -2
- package/dist/_shared/proxy-protocol.js +3 -2
- package/dist/_shared/runtime-types.d.ts +19 -0
- package/dist/_shared/submission.d.ts +21 -0
- package/dist/_shared/submission.js +102 -4
- package/dist/blueprint.d.ts +15 -6
- package/dist/blueprint.js.map +1 -1
- package/dist/bundle.d.ts +16 -1
- package/dist/bundle.js +32 -0
- package/dist/bundle.js.map +1 -1
- package/dist/cli.mjs +169 -38
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +119 -24
- package/dist/client.js +198 -52
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/proxy-endpoint.d.ts +131 -0
- package/dist/proxy-endpoint.js +147 -0
- package/dist/proxy-endpoint.js.map +1 -0
- package/dist/skill.d.ts +203 -31
- package/dist/skill.js +277 -30
- package/dist/skill.js.map +1 -1
- package/docs/credentials.md +34 -0
- package/docs/events.md +7 -0
- package/docs/mcp.md +28 -0
- package/docs/outputs.md +92 -12
- package/docs/quickstart.md +37 -0
- package/docs/skills.md +49 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { HttpClient, type FetchLike, type Output, type PlatformFlatRunSubmissionInput, type PlatformFlatSubmission, type PlatformInlineSecrets, type Run, type RunEvent, type SignedOutputLink, type Skill as SkillRecord, type WhoAmI } from "./_shared/index.js";
|
|
2
|
-
import {
|
|
1
|
+
import { HttpClient, type FetchLike, type Output, type PlatformFlatRunSubmissionInput, type PlatformFlatSubmission, type PlatformInlineSecrets, type PlatformProxyEndpoint, type PlatformProxyEndpointAuth, type Run, type RunEvent, type SignedOutputLink, type Skill as SkillRecord, type WhoAmI } from "./_shared/index.js";
|
|
2
|
+
import type { Blueprint } from "./blueprint.js";
|
|
3
3
|
import { McpServer } from "./mcp-server.js";
|
|
4
|
+
import { ProxyEndpoint } from "./proxy-endpoint.js";
|
|
4
5
|
import { Skill } from "./skill.js";
|
|
5
6
|
export interface AntpathClientOptions {
|
|
6
7
|
/** Workspace-scoped SDK API token. */
|
|
@@ -21,15 +22,24 @@ export interface AntpathClientOptions {
|
|
|
21
22
|
* spelled out at the call site:
|
|
22
23
|
*
|
|
23
24
|
* - `model` / `system` / `prompt` — the agent's brief.
|
|
24
|
-
* - `skills` — array of `Skill` instances
|
|
25
|
+
* - `skills` — array of `Skill` instances. Each instance is one of:
|
|
26
|
+
* workspace ref (`Skill.fromId` or the result of `.upload(client)`),
|
|
27
|
+
* provider ref (`Skill.provider`), or unstaged transient
|
|
28
|
+
* (`Skill.fromFiles` / `Skill.fromPath`). Unstaged transient
|
|
29
|
+
* skills cause `submitRun` to switch to multipart and upload the
|
|
30
|
+
* bytes for this one run only.
|
|
25
31
|
* - `mcpServers` — array of `McpServer` instances (headers split into
|
|
26
32
|
* `secrets.mcpServers` server-side; the public submission only
|
|
27
33
|
* carries `{ name, url }`).
|
|
34
|
+
* - `proxyEndpoints` — array of `ProxyEndpoint` instances. The auth
|
|
35
|
+
* secret is bundled into the constructor and split into
|
|
36
|
+
* `secrets.proxyEndpointAuth` server-side; the public submission
|
|
37
|
+
* only carries the declaration (`{ name, baseUrl, authShape, … }`).
|
|
28
38
|
* - `secrets.anthropic.apiKey` — REQUIRED. The platform never holds
|
|
29
39
|
* a long-lived Anthropic key on your behalf.
|
|
30
40
|
*
|
|
31
41
|
* `idempotencyKey` is auto-generated when omitted; pass one explicitly
|
|
32
|
-
* if you want client-driven retry safety.
|
|
42
|
+
* if you want client-driven retry safety across process restarts.
|
|
33
43
|
*/
|
|
34
44
|
export interface SubmitRunOptions {
|
|
35
45
|
readonly model: string;
|
|
@@ -40,7 +50,22 @@ export interface SubmitRunOptions {
|
|
|
40
50
|
readonly environment?: PlatformFlatSubmission["environment"];
|
|
41
51
|
readonly metadata?: PlatformFlatSubmission["metadata"];
|
|
42
52
|
readonly cleanup?: PlatformFlatRunSubmissionInput["cleanup"];
|
|
43
|
-
readonly proxyEndpoints?:
|
|
53
|
+
readonly proxyEndpoints?: readonly ProxyEndpoint[];
|
|
54
|
+
/**
|
|
55
|
+
* Container paths to capture as `output_objects` at session terminal.
|
|
56
|
+
*
|
|
57
|
+
* - Omitted: run metadata (status/events/snapshots/cleanup state) is
|
|
58
|
+
* still persisted, but no container file bytes are captured.
|
|
59
|
+
* - Present: the worker drives an agent-side sync at session terminal
|
|
60
|
+
* that registers every file under these paths via the Anthropic
|
|
61
|
+
* Files API. The bytes land in private Supabase Storage and can be
|
|
62
|
+
* retrieved via `RunRef.outputs()` / `RunRef.download()`.
|
|
63
|
+
*
|
|
64
|
+
* Paths are absolute UNIX paths (start with `/`), max 32 entries,
|
|
65
|
+
* max 512 bytes per entry, no `..` segments, no NUL bytes. See
|
|
66
|
+
* `packages/sdk/docs/outputs.md` for the full contract.
|
|
67
|
+
*/
|
|
68
|
+
readonly outputDirs?: readonly string[];
|
|
44
69
|
readonly secrets: PlatformInlineSecrets;
|
|
45
70
|
readonly idempotencyKey?: string;
|
|
46
71
|
readonly signal?: AbortSignal;
|
|
@@ -68,37 +93,82 @@ export declare class RunRef {
|
|
|
68
93
|
stream(options?: StreamEventsOptions): AsyncIterable<RunEvent>;
|
|
69
94
|
wait(options?: WaitForRunOptions): Promise<Run>;
|
|
70
95
|
outputs(): Promise<readonly Output[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Download the per-run archive zip. Lifecycle-aware in one method:
|
|
98
|
+
*
|
|
99
|
+
* - Pre-session (run still `queued`): rejects with a 409
|
|
100
|
+
* `run_not_started` error. Poll `RunRef.get()` until the status
|
|
101
|
+
* leaves `queued` before retrying.
|
|
102
|
+
* - Mid-session: returns whatever has been captured so far. The
|
|
103
|
+
* archive's `manifest.json` carries `partial: true` and a
|
|
104
|
+
* `missing[]` entry advising the caller to redownload after
|
|
105
|
+
* terminal for the full archive.
|
|
106
|
+
* - Terminal: returns the complete archive sourced from durable
|
|
107
|
+
* Supabase Storage. `manifest.json` carries `partial: false`.
|
|
108
|
+
*
|
|
109
|
+
* Pass `to` to write the archive zip to a file path; omit it to
|
|
110
|
+
* receive the raw streaming `Response` (use this for piping to a
|
|
111
|
+
* custom sink). `to` resolves through Node's `fs/promises` and is
|
|
112
|
+
* not available in browsers — browser callers omit `to` and pipe
|
|
113
|
+
* `Response.body` themselves.
|
|
114
|
+
*/
|
|
115
|
+
download(options?: {
|
|
116
|
+
readonly to?: string;
|
|
117
|
+
}): Promise<Response>;
|
|
71
118
|
cancel(): Promise<void>;
|
|
72
119
|
delete(): Promise<void>;
|
|
73
120
|
}
|
|
74
121
|
/**
|
|
75
|
-
* Workspace skill operations exposed under `client.skills`.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
122
|
+
* Workspace skill admin operations exposed under `client.skills`.
|
|
123
|
+
*
|
|
124
|
+
* Persisting a new skill goes through `Skill.fromFiles(...).upload(client)`
|
|
125
|
+
* or `Skill.fromPath(...).upload(client)` — there is no `client.skills.upload`
|
|
126
|
+
* or `client.skills.fromPath` verb. The class is the single creation
|
|
127
|
+
* surface; the client is the single transport.
|
|
128
|
+
*
|
|
129
|
+
* The internal `_uploadSkillBundle(args)` entry point is consumed by
|
|
130
|
+
* `Skill.upload(client)` and is not part of the public API — the
|
|
131
|
+
* leading underscore is a "do not call from user code" marker.
|
|
78
132
|
*/
|
|
79
133
|
export declare class SkillsClient {
|
|
80
134
|
#private;
|
|
81
135
|
constructor(http: HttpClient);
|
|
136
|
+
list(): Promise<readonly SkillRecord[]>;
|
|
137
|
+
get(skillId: string): Promise<SkillRecord>;
|
|
138
|
+
delete(skillId: string): Promise<void>;
|
|
82
139
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
140
|
+
* Lookup a live workspace skill by `(name, contentHash)`.
|
|
141
|
+
*
|
|
142
|
+
* Returns the matching `Skill` record or `null` when no live row
|
|
143
|
+
* carries that hash. The `contentHash` is the wire format
|
|
144
|
+
* `sha256:<hex>` returned by `hashSkillBundle` (and stored verbatim
|
|
145
|
+
* on every skill row). The hash space is unique enough that one
|
|
146
|
+
* row at most can match, so this is a single keyed lookup.
|
|
147
|
+
*
|
|
148
|
+
* Powers `Skill.uploadIfChanged(client)` internally; consumers can
|
|
149
|
+
* also call it directly when they already have a hash in hand and
|
|
150
|
+
* want to know whether the skill is already persisted.
|
|
87
151
|
*/
|
|
88
|
-
|
|
152
|
+
findByHash(args: {
|
|
89
153
|
readonly name: string;
|
|
90
|
-
readonly
|
|
91
|
-
}): Promise<
|
|
154
|
+
readonly contentHash: string;
|
|
155
|
+
}): Promise<SkillRecord | null>;
|
|
156
|
+
/**
|
|
157
|
+
* Lookup a live workspace skill by `name`. Returns the matching
|
|
158
|
+
* `Skill` record or `null` when no live row carries that name.
|
|
159
|
+
* Implemented as a list-and-filter against the existing `/api/skills`
|
|
160
|
+
* endpoint — typical workspace skill counts are small enough that
|
|
161
|
+
* the cost is negligible.
|
|
162
|
+
*/
|
|
163
|
+
findByName(name: string): Promise<SkillRecord | null>;
|
|
92
164
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
165
|
+
* Internal: post a pre-bundled skill zip to the BFF. Only
|
|
166
|
+
* `Skill.upload` calls this. NOT part of the public API.
|
|
95
167
|
*/
|
|
96
|
-
|
|
168
|
+
_uploadSkillBundle(args: {
|
|
97
169
|
readonly name: string;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
get(skillId: string): Promise<SkillRecord>;
|
|
101
|
-
delete(skillId: string): Promise<void>;
|
|
170
|
+
readonly body: Uint8Array;
|
|
171
|
+
}): Promise<SkillRecord>;
|
|
102
172
|
}
|
|
103
173
|
/**
|
|
104
174
|
* Unified user-facing client for the antpath platform. The same class
|
|
@@ -115,6 +185,15 @@ export declare class AntpathClient {
|
|
|
115
185
|
#private;
|
|
116
186
|
readonly skills: SkillsClient;
|
|
117
187
|
constructor(options: AntpathClientOptions);
|
|
188
|
+
/**
|
|
189
|
+
* Internal: a `Skill.upload(this)` shortcut that bypasses
|
|
190
|
+
* `client.skills` indirection. Forwarded to
|
|
191
|
+
* `SkillsClient._uploadSkillBundle`. NOT part of the public API.
|
|
192
|
+
*/
|
|
193
|
+
_uploadSkillBundle(args: {
|
|
194
|
+
readonly name: string;
|
|
195
|
+
readonly body: Uint8Array;
|
|
196
|
+
}): Promise<SkillRecord>;
|
|
118
197
|
/**
|
|
119
198
|
* Submit a run and wait for it to reach a terminal state. Returns the
|
|
120
199
|
* final `Run` record. For long-running flows, prefer `submitRun` +
|
|
@@ -126,9 +205,17 @@ export declare class AntpathClient {
|
|
|
126
205
|
* stream events, fetch outputs, cancel, or delete the run.
|
|
127
206
|
*
|
|
128
207
|
* The SDK splits `mcpServers[i].headers` into `secrets.mcpServers`
|
|
208
|
+
* and `proxyEndpoints[i]` auth values into `secrets.proxyEndpointAuth`
|
|
129
209
|
* before sending so credentials never enter the hashed submission or
|
|
130
|
-
* the run snapshot
|
|
131
|
-
*
|
|
210
|
+
* the run snapshot.
|
|
211
|
+
*
|
|
212
|
+
* If any of the `skills` are unstaged transient instances
|
|
213
|
+
* (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
|
|
214
|
+
* the SDK assigns each one a positional slot id (`transient-0`,
|
|
215
|
+
* `transient-1`, …) and switches to a multipart request body so the
|
|
216
|
+
* bytes ride alongside the JSON submission. The bytes never persist
|
|
217
|
+
* on antpath storage; the BFF uploads them to Anthropic Files for
|
|
218
|
+
* the lifetime of this one run.
|
|
132
219
|
*/
|
|
133
220
|
submitRun(options: SubmitRunOptions): Promise<RunRef>;
|
|
134
221
|
getRun(runId: string): Promise<Run>;
|
|
@@ -149,4 +236,12 @@ export declare class AntpathClient {
|
|
|
149
236
|
cancelRun(runId: string): Promise<void>;
|
|
150
237
|
deleteRun(runId: string): Promise<void>;
|
|
151
238
|
whoami(): Promise<WhoAmI>;
|
|
239
|
+
/**
|
|
240
|
+
* Stream the per-run archive zip body. Returned `Response` body is
|
|
241
|
+
* `application/zip` and may be piped directly to disk; the SDK never
|
|
242
|
+
* buffers the archive. Callers requiring a "write to a path" verb
|
|
243
|
+
* should use `RunRef.download({ to })`.
|
|
244
|
+
*/
|
|
245
|
+
downloadRunArchive(runId: string): Promise<Response>;
|
|
152
246
|
}
|
|
247
|
+
export type { Blueprint, PlatformProxyEndpoint, PlatformProxyEndpointAuth };
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { HttpClient, operations
|
|
2
|
-
import { bundleSkillFiles } from "./bundle.js";
|
|
1
|
+
import { HttpClient, operations } from "./_shared/index.js";
|
|
3
2
|
import { McpServer } from "./mcp-server.js";
|
|
4
|
-
import {
|
|
3
|
+
import { splitProxyEndpoints } from "./proxy-endpoint.js";
|
|
5
4
|
import { Skill } from "./skill.js";
|
|
6
5
|
/**
|
|
7
6
|
* Lightweight reference to a submitted run. All read-back operations
|
|
@@ -30,6 +29,34 @@ export class RunRef {
|
|
|
30
29
|
outputs() {
|
|
31
30
|
return this.#client.listOutputs(this.runId);
|
|
32
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Download the per-run archive zip. Lifecycle-aware in one method:
|
|
34
|
+
*
|
|
35
|
+
* - Pre-session (run still `queued`): rejects with a 409
|
|
36
|
+
* `run_not_started` error. Poll `RunRef.get()` until the status
|
|
37
|
+
* leaves `queued` before retrying.
|
|
38
|
+
* - Mid-session: returns whatever has been captured so far. The
|
|
39
|
+
* archive's `manifest.json` carries `partial: true` and a
|
|
40
|
+
* `missing[]` entry advising the caller to redownload after
|
|
41
|
+
* terminal for the full archive.
|
|
42
|
+
* - Terminal: returns the complete archive sourced from durable
|
|
43
|
+
* Supabase Storage. `manifest.json` carries `partial: false`.
|
|
44
|
+
*
|
|
45
|
+
* Pass `to` to write the archive zip to a file path; omit it to
|
|
46
|
+
* receive the raw streaming `Response` (use this for piping to a
|
|
47
|
+
* custom sink). `to` resolves through Node's `fs/promises` and is
|
|
48
|
+
* not available in browsers — browser callers omit `to` and pipe
|
|
49
|
+
* `Response.body` themselves.
|
|
50
|
+
*/
|
|
51
|
+
async download(options) {
|
|
52
|
+
const response = await this.#client.downloadRunArchive(this.runId);
|
|
53
|
+
if (options?.to !== undefined) {
|
|
54
|
+
const buffer = new Uint8Array(await response.arrayBuffer());
|
|
55
|
+
const { writeFile } = await import("node:fs/promises");
|
|
56
|
+
await writeFile(options.to, buffer);
|
|
57
|
+
}
|
|
58
|
+
return response;
|
|
59
|
+
}
|
|
33
60
|
cancel() {
|
|
34
61
|
return this.#client.cancelRun(this.runId);
|
|
35
62
|
}
|
|
@@ -38,45 +65,22 @@ export class RunRef {
|
|
|
38
65
|
}
|
|
39
66
|
}
|
|
40
67
|
/**
|
|
41
|
-
* Workspace skill operations exposed under `client.skills`.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
68
|
+
* Workspace skill admin operations exposed under `client.skills`.
|
|
69
|
+
*
|
|
70
|
+
* Persisting a new skill goes through `Skill.fromFiles(...).upload(client)`
|
|
71
|
+
* or `Skill.fromPath(...).upload(client)` — there is no `client.skills.upload`
|
|
72
|
+
* or `client.skills.fromPath` verb. The class is the single creation
|
|
73
|
+
* surface; the client is the single transport.
|
|
74
|
+
*
|
|
75
|
+
* The internal `_uploadSkillBundle(args)` entry point is consumed by
|
|
76
|
+
* `Skill.upload(client)` and is not part of the public API — the
|
|
77
|
+
* leading underscore is a "do not call from user code" marker.
|
|
44
78
|
*/
|
|
45
79
|
export class SkillsClient {
|
|
46
80
|
#http;
|
|
47
81
|
constructor(http) {
|
|
48
82
|
this.#http = http;
|
|
49
83
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Upload an inline files map as a workspace skill. The SDK validates
|
|
52
|
-
* basic safety (no path traversal, size caps, has `SKILL.md`) and
|
|
53
|
-
* deterministically zips the bundle before posting; the BFF
|
|
54
|
-
* re-canonicalises and recomputes the hash on receipt.
|
|
55
|
-
*/
|
|
56
|
-
async upload(args) {
|
|
57
|
-
if (!args || typeof args !== "object") {
|
|
58
|
-
throw new Error("client.skills.upload: args is required");
|
|
59
|
-
}
|
|
60
|
-
if (typeof args.name !== "string" || !args.name) {
|
|
61
|
-
throw new Error("client.skills.upload: name is required");
|
|
62
|
-
}
|
|
63
|
-
const bundled = bundleSkillFiles(args.files);
|
|
64
|
-
const record = await operations.createSkillBundle(this.#http, {
|
|
65
|
-
name: args.name,
|
|
66
|
-
body: bundled.zip,
|
|
67
|
-
contentType: "application/zip",
|
|
68
|
-
filename: `${args.name}.zip`
|
|
69
|
-
});
|
|
70
|
-
return new Skill({ kind: "workspace", id: record.id }, record);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Read a local directory and upload it as a workspace skill. Symlinks
|
|
74
|
-
* and non-regular files are skipped. Node-only.
|
|
75
|
-
*/
|
|
76
|
-
async fromPath(rootDir, args) {
|
|
77
|
-
const files = await readDirectoryAsFiles(rootDir);
|
|
78
|
-
return this.upload({ name: args.name, files });
|
|
79
|
-
}
|
|
80
84
|
list() {
|
|
81
85
|
return operations.listSkills(this.#http);
|
|
82
86
|
}
|
|
@@ -86,6 +90,44 @@ export class SkillsClient {
|
|
|
86
90
|
delete(skillId) {
|
|
87
91
|
return operations.deleteSkill(this.#http, skillId);
|
|
88
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Lookup a live workspace skill by `(name, contentHash)`.
|
|
95
|
+
*
|
|
96
|
+
* Returns the matching `Skill` record or `null` when no live row
|
|
97
|
+
* carries that hash. The `contentHash` is the wire format
|
|
98
|
+
* `sha256:<hex>` returned by `hashSkillBundle` (and stored verbatim
|
|
99
|
+
* on every skill row). The hash space is unique enough that one
|
|
100
|
+
* row at most can match, so this is a single keyed lookup.
|
|
101
|
+
*
|
|
102
|
+
* Powers `Skill.uploadIfChanged(client)` internally; consumers can
|
|
103
|
+
* also call it directly when they already have a hash in hand and
|
|
104
|
+
* want to know whether the skill is already persisted.
|
|
105
|
+
*/
|
|
106
|
+
findByHash(args) {
|
|
107
|
+
return operations.findSkillByHash(this.#http, args);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Lookup a live workspace skill by `name`. Returns the matching
|
|
111
|
+
* `Skill` record or `null` when no live row carries that name.
|
|
112
|
+
* Implemented as a list-and-filter against the existing `/api/skills`
|
|
113
|
+
* endpoint — typical workspace skill counts are small enough that
|
|
114
|
+
* the cost is negligible.
|
|
115
|
+
*/
|
|
116
|
+
findByName(name) {
|
|
117
|
+
return operations.findSkillByName(this.#http, name);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Internal: post a pre-bundled skill zip to the BFF. Only
|
|
121
|
+
* `Skill.upload` calls this. NOT part of the public API.
|
|
122
|
+
*/
|
|
123
|
+
async _uploadSkillBundle(args) {
|
|
124
|
+
return operations.createSkillBundle(this.#http, {
|
|
125
|
+
name: args.name,
|
|
126
|
+
body: args.body,
|
|
127
|
+
contentType: "application/zip",
|
|
128
|
+
filename: `${args.name}.zip`
|
|
129
|
+
});
|
|
130
|
+
}
|
|
89
131
|
}
|
|
90
132
|
/**
|
|
91
133
|
* Unified user-facing client for the antpath platform. The same class
|
|
@@ -112,6 +154,14 @@ export class AntpathClient {
|
|
|
112
154
|
});
|
|
113
155
|
this.skills = new SkillsClient(this.#http);
|
|
114
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Internal: a `Skill.upload(this)` shortcut that bypasses
|
|
159
|
+
* `client.skills` indirection. Forwarded to
|
|
160
|
+
* `SkillsClient._uploadSkillBundle`. NOT part of the public API.
|
|
161
|
+
*/
|
|
162
|
+
async _uploadSkillBundle(args) {
|
|
163
|
+
return this.skills._uploadSkillBundle(args);
|
|
164
|
+
}
|
|
115
165
|
/**
|
|
116
166
|
* Submit a run and wait for it to reach a terminal state. Returns the
|
|
117
167
|
* final `Run` record. For long-running flows, prefer `submitRun` +
|
|
@@ -126,9 +176,17 @@ export class AntpathClient {
|
|
|
126
176
|
* stream events, fetch outputs, cancel, or delete the run.
|
|
127
177
|
*
|
|
128
178
|
* The SDK splits `mcpServers[i].headers` into `secrets.mcpServers`
|
|
179
|
+
* and `proxyEndpoints[i]` auth values into `secrets.proxyEndpointAuth`
|
|
129
180
|
* before sending so credentials never enter the hashed submission or
|
|
130
|
-
* the run snapshot
|
|
131
|
-
*
|
|
181
|
+
* the run snapshot.
|
|
182
|
+
*
|
|
183
|
+
* If any of the `skills` are unstaged transient instances
|
|
184
|
+
* (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
|
|
185
|
+
* the SDK assigns each one a positional slot id (`transient-0`,
|
|
186
|
+
* `transient-1`, …) and switches to a multipart request body so the
|
|
187
|
+
* bytes ride alongside the JSON submission. The bytes never persist
|
|
188
|
+
* on antpath storage; the BFF uploads them to Anthropic Files for
|
|
189
|
+
* the lifetime of this one run.
|
|
132
190
|
*/
|
|
133
191
|
async submitRun(options) {
|
|
134
192
|
if (!options || typeof options !== "object") {
|
|
@@ -141,34 +199,39 @@ export class AntpathClient {
|
|
|
141
199
|
throw new Error("AntpathClient.submitRun: model is required");
|
|
142
200
|
}
|
|
143
201
|
const prompt = normalisePrompt(options.prompt);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
const skills = (options.skills ?? []).map(toSkillRef);
|
|
202
|
+
const { endpoints: proxyEndpointDeclarations, auth: proxyEndpointAuthFromInstances } = splitProxyEndpoints(options.proxyEndpoints ?? []);
|
|
203
|
+
const mergedProxyAuth = mergeProxyEndpointAuth(proxyEndpointAuthFromInstances, options.secrets.proxyEndpointAuth ?? []);
|
|
204
|
+
const { skillRefs, transientBundles } = prepareSkills(options.skills ?? []);
|
|
148
205
|
const { submissionMcpServers, mergedMcpSecrets } = mergeMcpServers(options.mcpServers ?? [], options.secrets.mcpServers ?? []);
|
|
149
206
|
const submission = {
|
|
150
207
|
model: options.model,
|
|
151
208
|
...(options.system ? { system: options.system } : {}),
|
|
152
209
|
prompt,
|
|
153
|
-
skills,
|
|
210
|
+
skills: skillRefs,
|
|
154
211
|
mcpServers: submissionMcpServers,
|
|
155
212
|
...(options.environment ? { environment: options.environment } : {}),
|
|
156
|
-
...(options.metadata ? { metadata: options.metadata } : {})
|
|
213
|
+
...(options.metadata ? { metadata: options.metadata } : {}),
|
|
214
|
+
...(options.outputDirs && options.outputDirs.length > 0
|
|
215
|
+
? { outputDirs: options.outputDirs }
|
|
216
|
+
: {})
|
|
157
217
|
};
|
|
158
218
|
const secrets = {
|
|
159
219
|
...options.secrets,
|
|
160
|
-
...(mergedMcpSecrets.length > 0 ? { mcpServers: mergedMcpSecrets } : {})
|
|
220
|
+
...(mergedMcpSecrets.length > 0 ? { mcpServers: mergedMcpSecrets } : {}),
|
|
221
|
+
...(mergedProxyAuth.length > 0 ? { proxyEndpointAuth: mergedProxyAuth } : {})
|
|
161
222
|
};
|
|
162
223
|
const request = {
|
|
163
224
|
idempotencyKey: options.idempotencyKey ?? generateIdempotencyKey(),
|
|
164
225
|
submission,
|
|
165
226
|
...(options.cleanup ? { cleanup: options.cleanup } : {}),
|
|
166
227
|
secrets,
|
|
167
|
-
...(
|
|
168
|
-
? { proxyEndpoints:
|
|
228
|
+
...(proxyEndpointDeclarations.length > 0
|
|
229
|
+
? { proxyEndpoints: proxyEndpointDeclarations }
|
|
169
230
|
: {})
|
|
170
231
|
};
|
|
171
|
-
const run =
|
|
232
|
+
const run = transientBundles.length > 0
|
|
233
|
+
? await operations.submitRunFlatMultipart(this.#http, request, transientBundles)
|
|
234
|
+
: await operations.submitRunFlat(this.#http, request);
|
|
172
235
|
return new RunRef(this, run.id);
|
|
173
236
|
}
|
|
174
237
|
getRun(runId) {
|
|
@@ -235,6 +298,15 @@ export class AntpathClient {
|
|
|
235
298
|
whoami() {
|
|
236
299
|
return operations.whoami(this.#http);
|
|
237
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Stream the per-run archive zip body. Returned `Response` body is
|
|
303
|
+
* `application/zip` and may be piped directly to disk; the SDK never
|
|
304
|
+
* buffers the archive. Callers requiring a "write to a path" verb
|
|
305
|
+
* should use `RunRef.download({ to })`.
|
|
306
|
+
*/
|
|
307
|
+
downloadRunArchive(runId) {
|
|
308
|
+
return operations.downloadRunArchive(this.#http, runId);
|
|
309
|
+
}
|
|
238
310
|
}
|
|
239
311
|
const TERMINAL_STATUSES = new Set([
|
|
240
312
|
"succeeded",
|
|
@@ -287,11 +359,60 @@ function normalisePrompt(input) {
|
|
|
287
359
|
}
|
|
288
360
|
return [...input];
|
|
289
361
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
362
|
+
/**
|
|
363
|
+
* Walk the user-provided `Skill[]`, validating each instance and
|
|
364
|
+
* producing:
|
|
365
|
+
* - `skillRefs[]` — the wire entries for `submission.skills[]`, with
|
|
366
|
+
* transient refs assigned positional slot ids (`transient-0`, …).
|
|
367
|
+
* - `transientBundles[]` — the bytes for each transient skill,
|
|
368
|
+
* parallel-indexed by slot.
|
|
369
|
+
*
|
|
370
|
+
* Throws on consumed Skills (the user kept a stale reference past an
|
|
371
|
+
* `.upload(client)` call) with the same error message documented in
|
|
372
|
+
* `Skill.upload` — that mistake is loud, not silent.
|
|
373
|
+
*/
|
|
374
|
+
function prepareSkills(skills) {
|
|
375
|
+
const skillRefs = [];
|
|
376
|
+
const transientBundles = [];
|
|
377
|
+
let transientIndex = 0;
|
|
378
|
+
for (let i = 0; i < skills.length; i++) {
|
|
379
|
+
const entry = skills[i];
|
|
380
|
+
if (!(entry instanceof Skill)) {
|
|
381
|
+
throw new Error(`AntpathClient.submitRun: skills[${i}] must be a Skill instance`);
|
|
382
|
+
}
|
|
383
|
+
if (entry.isConsumed) {
|
|
384
|
+
throw new Error(`AntpathClient.submitRun: skills[${i}] was already uploaded via skill.upload(client); ` +
|
|
385
|
+
`use the returned Skill or Skill.fromId(record.id) for subsequent runs`);
|
|
386
|
+
}
|
|
387
|
+
if (entry.isUnstaged) {
|
|
388
|
+
const bundle = entry._takeUnstagedBundle();
|
|
389
|
+
if (!bundle) {
|
|
390
|
+
// Defence-in-depth: `isUnstaged` guarantees bytes exist.
|
|
391
|
+
throw new Error(`AntpathClient.submitRun: skills[${i}] is unstaged but has no bytes (internal invariant violated)`);
|
|
392
|
+
}
|
|
393
|
+
const slot = `transient-${transientIndex++}`;
|
|
394
|
+
skillRefs.push({
|
|
395
|
+
kind: "transient",
|
|
396
|
+
slot,
|
|
397
|
+
name: bundle.name,
|
|
398
|
+
contentHash: bundle.contentHash
|
|
399
|
+
});
|
|
400
|
+
// Anthropic filenames forbid `<>:"|?*\/` and control chars 0-31,
|
|
401
|
+
// so the multipart filename uses hyphen separators. The 12-char
|
|
402
|
+
// hash prefix is enough for janitor / orphan reconciliation;
|
|
403
|
+
// the BFF stamps the full run-scoped filename once it knows the
|
|
404
|
+
// run id.
|
|
405
|
+
const shortHash = bundle.contentHash.replace(/^sha256:/, "").slice(0, 12);
|
|
406
|
+
transientBundles.push({
|
|
407
|
+
slot,
|
|
408
|
+
bytes: bundle.bytes,
|
|
409
|
+
filename: `antpath-${slot}-${shortHash}.zip`
|
|
410
|
+
});
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
skillRefs.push(entry.ref);
|
|
293
414
|
}
|
|
294
|
-
return
|
|
415
|
+
return { skillRefs, transientBundles };
|
|
295
416
|
}
|
|
296
417
|
function mergeMcpServers(inputs, explicitSecrets) {
|
|
297
418
|
const submissionMcpServers = [];
|
|
@@ -319,4 +440,29 @@ function mergeMcpServers(inputs, explicitSecrets) {
|
|
|
319
440
|
mergedMcpSecrets: Array.from(secretByName.values())
|
|
320
441
|
};
|
|
321
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* Merge `ProxyEndpoint`-derived auth entries with any
|
|
445
|
+
* `secrets.proxyEndpointAuth` the caller passed explicitly. Per-instance
|
|
446
|
+
* auth values win on the same `name`; a type mismatch (e.g. instance
|
|
447
|
+
* declares `bearer` but secrets carry `header` for the same name) is a
|
|
448
|
+
* call-site error and we throw at the SDK boundary instead of letting
|
|
449
|
+
* the BFF reject the submission an HTTP request later.
|
|
450
|
+
*/
|
|
451
|
+
function mergeProxyEndpointAuth(fromInstances, fromExplicitSecrets) {
|
|
452
|
+
if (fromInstances.length === 0 && fromExplicitSecrets.length === 0)
|
|
453
|
+
return [];
|
|
454
|
+
const byName = new Map();
|
|
455
|
+
for (const entry of fromExplicitSecrets) {
|
|
456
|
+
byName.set(entry.name, entry);
|
|
457
|
+
}
|
|
458
|
+
for (const entry of fromInstances) {
|
|
459
|
+
const existing = byName.get(entry.name);
|
|
460
|
+
if (existing && existing.value.type !== entry.value.type) {
|
|
461
|
+
throw new Error(`AntpathClient.submitRun: proxyEndpoint "${entry.name}" auth type conflicts ` +
|
|
462
|
+
`with secrets.proxyEndpointAuth (instance=${entry.value.type}, secrets=${existing.value.type})`);
|
|
463
|
+
}
|
|
464
|
+
byName.set(entry.name, entry);
|
|
465
|
+
}
|
|
466
|
+
return Array.from(byName.values());
|
|
467
|
+
}
|
|
322
468
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,iBAAiB,EAclB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA0DnC;;;;GAIG;AACH,M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I,CAAC,CAAC;QACxC,IAAI,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CACb,2CAA2C,KAAK,CAAC,IAAI,wBAAwB;gBAC3E,4CAA4C,KAAK,CAAC,KAAK,CAAC,IAAI,aAAa,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,CAClG,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,22 +3,24 @@
|
|
|
3
3
|
*
|
|
4
4
|
* ONE class (`AntpathClient`) talks to the dashboard BFF. The CLI exposes
|
|
5
5
|
* the SAME operations via subcommands. Composition primitives are
|
|
6
|
-
* `Skill`, `McpServer`, and `defineRun` — there is no
|
|
7
|
-
* wrapper. Everything else is types, errors, and event type
|
|
8
|
-
* re-exported from `@antpath/shared`.
|
|
6
|
+
* `Skill`, `McpServer`, `ProxyEndpoint`, and `defineRun` — there is no
|
|
7
|
+
* `Template` wrapper. Everything else is types, errors, and event type
|
|
8
|
+
* guards re-exported from `@antpath/shared`.
|
|
9
9
|
*/
|
|
10
10
|
export { AntpathClient, RunRef, SkillsClient } from "./client.js";
|
|
11
11
|
export type { AntpathClientOptions, StreamEventsOptions, SubmitRunOptions, WaitForRunOptions } from "./client.js";
|
|
12
12
|
export { Skill } from "./skill.js";
|
|
13
13
|
export { McpServer } from "./mcp-server.js";
|
|
14
|
+
export { ProxyEndpoint } from "./proxy-endpoint.js";
|
|
15
|
+
export type { BearerProxyEndpointOptions, BasicProxyEndpointOptions, HeaderProxyEndpointOptions, ProxyEndpointCommonOptions, QueryProxyEndpointOptions } from "./proxy-endpoint.js";
|
|
14
16
|
export { defineRun } from "./blueprint.js";
|
|
15
17
|
export type { Blueprint } from "./blueprint.js";
|
|
16
|
-
export { bundleSkillFiles } from "./bundle.js";
|
|
18
|
+
export { bundleSkillFiles, hashSkillBundle } from "./bundle.js";
|
|
17
19
|
export type { BundledSkill, SkillFiles } from "./bundle.js";
|
|
18
20
|
export { AntpathApiError, AntpathError, CleanupError, CredentialValidationError, ProviderError, RunStateError } from "./_shared/index.js";
|
|
19
21
|
export { MCP_SERVER_NAME_PATTERN, SKILL_BUNDLE_LIMITS, SkillBundleValidationError, buildPlatformAllowedHosts, normaliseSkillBundlePath, validateSkillBundleEntry, validateSkillBundleManifest, validateProxyAuth } from "./_shared/index.js";
|
|
20
|
-
export type { McpServerRef, ProviderSkillRef, SkillBundleEntry, SkillBundleManifest, SkillRef, WorkspaceSkillRef } from "./_shared/index.js";
|
|
22
|
+
export type { McpServerRef, ProviderSkillRef, SkillBundleEntry, SkillBundleManifest, SkillRef, TransientSkillRef, WorkspaceSkillRef } from "./_shared/index.js";
|
|
21
23
|
export type { Output, ProviderEvent, Run, RunEvent, SignedOutputLink, Skill as SkillRecord, UsageSummary, WhoAmI } from "./_shared/index.js";
|
|
22
|
-
export type { PlatformAnthropicSecrets as AnthropicSecrets, PlatformCleanupPolicy as CleanupPolicy, PlatformInlineSecrets as InlineSecrets, PlatformMcpServerSecret as McpServerSecret, PlatformProxyEndpoint
|
|
24
|
+
export type { PlatformAnthropicSecrets as AnthropicSecrets, PlatformCleanupPolicy as CleanupPolicy, PlatformInlineSecrets as InlineSecrets, PlatformMcpServerSecret as McpServerSecret, PlatformProxyEndpoint, PlatformProxyEndpointAuth, PlatformProxyAuthValue as ProxyAuthValue, PlatformTemplateEnvironment as RunEnvironment, ProxyAuthShape, ProxyMethod, ProxyResponseMode } from "./_shared/index.js";
|
|
23
25
|
export { isAgentCustomToolUse, isAgentEvent, isAgentMcpToolResult, isAgentMcpToolUse, isAgentMessage, isAgentThinking, isAgentToolResult, isAgentToolUse, isSessionError, isSessionEvent, isSessionStatusIdle, isSessionStatusRescheduled, isSessionStatusRunning, isSessionStatusTerminated, isSpanEvent, isUserEvent, isUserMessage } from "./_shared/index.js";
|
|
24
26
|
export { SecretString, redactSecrets } from "./_shared/index.js";
|
package/dist/index.js
CHANGED
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* ONE class (`AntpathClient`) talks to the dashboard BFF. The CLI exposes
|
|
5
5
|
* the SAME operations via subcommands. Composition primitives are
|
|
6
|
-
* `Skill`, `McpServer`, and `defineRun` — there is no
|
|
7
|
-
* wrapper. Everything else is types, errors, and event type
|
|
8
|
-
* re-exported from `@antpath/shared`.
|
|
6
|
+
* `Skill`, `McpServer`, `ProxyEndpoint`, and `defineRun` — there is no
|
|
7
|
+
* `Template` wrapper. Everything else is types, errors, and event type
|
|
8
|
+
* guards re-exported from `@antpath/shared`.
|
|
9
9
|
*/
|
|
10
10
|
export { AntpathClient, RunRef, SkillsClient } from "./client.js";
|
|
11
11
|
// Composition primitives
|
|
12
12
|
export { Skill } from "./skill.js";
|
|
13
13
|
export { McpServer } from "./mcp-server.js";
|
|
14
|
+
export { ProxyEndpoint } from "./proxy-endpoint.js";
|
|
14
15
|
export { defineRun } from "./blueprint.js";
|
|
15
|
-
export { bundleSkillFiles } from "./bundle.js";
|
|
16
|
+
export { bundleSkillFiles, hashSkillBundle } from "./bundle.js";
|
|
16
17
|
// Errors
|
|
17
18
|
export { AntpathApiError, AntpathError, CleanupError, CredentialValidationError, ProviderError, RunStateError } from "./_shared/index.js";
|
|
18
19
|
// Skill / MCP wire types
|