antpath 0.6.2 → 0.7.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/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 { type SkillFiles } from "./bundle.js";
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 (workspace or provider).
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,7 @@ export interface SubmitRunOptions {
40
50
  readonly environment?: PlatformFlatSubmission["environment"];
41
51
  readonly metadata?: PlatformFlatSubmission["metadata"];
42
52
  readonly cleanup?: PlatformFlatRunSubmissionInput["cleanup"];
43
- readonly proxyEndpoints?: PlatformFlatRunSubmissionInput["proxyEndpoints"];
53
+ readonly proxyEndpoints?: readonly ProxyEndpoint[];
44
54
  readonly secrets: PlatformInlineSecrets;
45
55
  readonly idempotencyKey?: string;
46
56
  readonly signal?: AbortSignal;
@@ -72,33 +82,31 @@ export declare class RunRef {
72
82
  delete(): Promise<void>;
73
83
  }
74
84
  /**
75
- * Workspace skill operations exposed under `client.skills`. These
76
- * delegate to the same shared `operations.*` functions the CLI uses
77
- * so SDK and CLI never drift.
85
+ * Workspace skill admin operations exposed under `client.skills`.
86
+ *
87
+ * Persisting a new skill goes through `Skill.fromFiles(...).upload(client)`
88
+ * or `Skill.fromPath(...).upload(client)` — there is no `client.skills.upload`
89
+ * or `client.skills.fromPath` verb. The class is the single creation
90
+ * surface; the client is the single transport.
91
+ *
92
+ * The internal `_uploadSkillBundle(args)` entry point is consumed by
93
+ * `Skill.upload(client)` and is not part of the public API — the
94
+ * leading underscore is a "do not call from user code" marker.
78
95
  */
79
96
  export declare class SkillsClient {
80
97
  #private;
81
98
  constructor(http: HttpClient);
82
- /**
83
- * Upload an inline files map as a workspace skill. The SDK validates
84
- * basic safety (no path traversal, size caps, has `SKILL.md`) and
85
- * deterministically zips the bundle before posting; the BFF
86
- * re-canonicalises and recomputes the hash on receipt.
87
- */
88
- upload(args: {
89
- readonly name: string;
90
- readonly files: SkillFiles;
91
- }): Promise<Skill>;
92
- /**
93
- * Read a local directory and upload it as a workspace skill. Symlinks
94
- * and non-regular files are skipped. Node-only.
95
- */
96
- fromPath(rootDir: string, args: {
97
- readonly name: string;
98
- }): Promise<Skill>;
99
99
  list(): Promise<readonly SkillRecord[]>;
100
100
  get(skillId: string): Promise<SkillRecord>;
101
101
  delete(skillId: string): Promise<void>;
102
+ /**
103
+ * Internal: post a pre-bundled skill zip to the BFF. Only
104
+ * `Skill.upload` calls this. NOT part of the public API.
105
+ */
106
+ _uploadSkillBundle(args: {
107
+ readonly name: string;
108
+ readonly body: Uint8Array;
109
+ }): Promise<SkillRecord>;
102
110
  }
103
111
  /**
104
112
  * Unified user-facing client for the antpath platform. The same class
@@ -115,6 +123,15 @@ export declare class AntpathClient {
115
123
  #private;
116
124
  readonly skills: SkillsClient;
117
125
  constructor(options: AntpathClientOptions);
126
+ /**
127
+ * Internal: a `Skill.upload(this)` shortcut that bypasses
128
+ * `client.skills` indirection. Forwarded to
129
+ * `SkillsClient._uploadSkillBundle`. NOT part of the public API.
130
+ */
131
+ _uploadSkillBundle(args: {
132
+ readonly name: string;
133
+ readonly body: Uint8Array;
134
+ }): Promise<SkillRecord>;
118
135
  /**
119
136
  * Submit a run and wait for it to reach a terminal state. Returns the
120
137
  * final `Run` record. For long-running flows, prefer `submitRun` +
@@ -126,9 +143,17 @@ export declare class AntpathClient {
126
143
  * stream events, fetch outputs, cancel, or delete the run.
127
144
  *
128
145
  * The SDK splits `mcpServers[i].headers` into `secrets.mcpServers`
146
+ * and `proxyEndpoints[i]` auth values into `secrets.proxyEndpointAuth`
129
147
  * before sending so credentials never enter the hashed submission or
130
- * the run snapshot, even when the caller forgets to pass
131
- * `secrets.mcpServers` explicitly.
148
+ * the run snapshot.
149
+ *
150
+ * If any of the `skills` are unstaged transient instances
151
+ * (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
152
+ * the SDK assigns each one a positional slot id (`transient-0`,
153
+ * `transient-1`, …) and switches to a multipart request body so the
154
+ * bytes ride alongside the JSON submission. The bytes never persist
155
+ * on antpath storage; the BFF uploads them to Anthropic Files for
156
+ * the lifetime of this one run.
132
157
  */
133
158
  submitRun(options: SubmitRunOptions): Promise<RunRef>;
134
159
  getRun(runId: string): Promise<Run>;
@@ -150,3 +175,4 @@ export declare class AntpathClient {
150
175
  deleteRun(runId: string): Promise<void>;
151
176
  whoami(): Promise<WhoAmI>;
152
177
  }
178
+ export type { Blueprint, PlatformProxyEndpoint, PlatformProxyEndpointAuth };
package/dist/client.js CHANGED
@@ -1,7 +1,6 @@
1
- import { HttpClient, operations, validateProxyAuth } from "./_shared/index.js";
2
- import { bundleSkillFiles } from "./bundle.js";
1
+ import { HttpClient, operations } from "./_shared/index.js";
3
2
  import { McpServer } from "./mcp-server.js";
4
- import { readDirectoryAsFiles } from "./node-fs.js";
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
@@ -38,45 +37,22 @@ export class RunRef {
38
37
  }
39
38
  }
40
39
  /**
41
- * Workspace skill operations exposed under `client.skills`. These
42
- * delegate to the same shared `operations.*` functions the CLI uses
43
- * so SDK and CLI never drift.
40
+ * Workspace skill admin operations exposed under `client.skills`.
41
+ *
42
+ * Persisting a new skill goes through `Skill.fromFiles(...).upload(client)`
43
+ * or `Skill.fromPath(...).upload(client)` — there is no `client.skills.upload`
44
+ * or `client.skills.fromPath` verb. The class is the single creation
45
+ * surface; the client is the single transport.
46
+ *
47
+ * The internal `_uploadSkillBundle(args)` entry point is consumed by
48
+ * `Skill.upload(client)` and is not part of the public API — the
49
+ * leading underscore is a "do not call from user code" marker.
44
50
  */
45
51
  export class SkillsClient {
46
52
  #http;
47
53
  constructor(http) {
48
54
  this.#http = http;
49
55
  }
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
56
  list() {
81
57
  return operations.listSkills(this.#http);
82
58
  }
@@ -86,6 +62,18 @@ export class SkillsClient {
86
62
  delete(skillId) {
87
63
  return operations.deleteSkill(this.#http, skillId);
88
64
  }
65
+ /**
66
+ * Internal: post a pre-bundled skill zip to the BFF. Only
67
+ * `Skill.upload` calls this. NOT part of the public API.
68
+ */
69
+ async _uploadSkillBundle(args) {
70
+ return operations.createSkillBundle(this.#http, {
71
+ name: args.name,
72
+ body: args.body,
73
+ contentType: "application/zip",
74
+ filename: `${args.name}.zip`
75
+ });
76
+ }
89
77
  }
90
78
  /**
91
79
  * Unified user-facing client for the antpath platform. The same class
@@ -112,6 +100,14 @@ export class AntpathClient {
112
100
  });
113
101
  this.skills = new SkillsClient(this.#http);
114
102
  }
103
+ /**
104
+ * Internal: a `Skill.upload(this)` shortcut that bypasses
105
+ * `client.skills` indirection. Forwarded to
106
+ * `SkillsClient._uploadSkillBundle`. NOT part of the public API.
107
+ */
108
+ async _uploadSkillBundle(args) {
109
+ return this.skills._uploadSkillBundle(args);
110
+ }
115
111
  /**
116
112
  * Submit a run and wait for it to reach a terminal state. Returns the
117
113
  * final `Run` record. For long-running flows, prefer `submitRun` +
@@ -126,9 +122,17 @@ export class AntpathClient {
126
122
  * stream events, fetch outputs, cancel, or delete the run.
127
123
  *
128
124
  * The SDK splits `mcpServers[i].headers` into `secrets.mcpServers`
125
+ * and `proxyEndpoints[i]` auth values into `secrets.proxyEndpointAuth`
129
126
  * before sending so credentials never enter the hashed submission or
130
- * the run snapshot, even when the caller forgets to pass
131
- * `secrets.mcpServers` explicitly.
127
+ * the run snapshot.
128
+ *
129
+ * If any of the `skills` are unstaged transient instances
130
+ * (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
131
+ * the SDK assigns each one a positional slot id (`transient-0`,
132
+ * `transient-1`, …) and switches to a multipart request body so the
133
+ * bytes ride alongside the JSON submission. The bytes never persist
134
+ * on antpath storage; the BFF uploads them to Anthropic Files for
135
+ * the lifetime of this one run.
132
136
  */
133
137
  async submitRun(options) {
134
138
  if (!options || typeof options !== "object") {
@@ -141,34 +145,36 @@ export class AntpathClient {
141
145
  throw new Error("AntpathClient.submitRun: model is required");
142
146
  }
143
147
  const prompt = normalisePrompt(options.prompt);
144
- if (options.proxyEndpoints && options.proxyEndpoints.length > 0) {
145
- validateProxyAuth(options.proxyEndpoints, options.secrets.proxyEndpointAuth);
146
- }
147
- const skills = (options.skills ?? []).map(toSkillRef);
148
+ const { endpoints: proxyEndpointDeclarations, auth: proxyEndpointAuthFromInstances } = splitProxyEndpoints(options.proxyEndpoints ?? []);
149
+ const mergedProxyAuth = mergeProxyEndpointAuth(proxyEndpointAuthFromInstances, options.secrets.proxyEndpointAuth ?? []);
150
+ const { skillRefs, transientBundles } = prepareSkills(options.skills ?? []);
148
151
  const { submissionMcpServers, mergedMcpSecrets } = mergeMcpServers(options.mcpServers ?? [], options.secrets.mcpServers ?? []);
149
152
  const submission = {
150
153
  model: options.model,
151
154
  ...(options.system ? { system: options.system } : {}),
152
155
  prompt,
153
- skills,
156
+ skills: skillRefs,
154
157
  mcpServers: submissionMcpServers,
155
158
  ...(options.environment ? { environment: options.environment } : {}),
156
159
  ...(options.metadata ? { metadata: options.metadata } : {})
157
160
  };
158
161
  const secrets = {
159
162
  ...options.secrets,
160
- ...(mergedMcpSecrets.length > 0 ? { mcpServers: mergedMcpSecrets } : {})
163
+ ...(mergedMcpSecrets.length > 0 ? { mcpServers: mergedMcpSecrets } : {}),
164
+ ...(mergedProxyAuth.length > 0 ? { proxyEndpointAuth: mergedProxyAuth } : {})
161
165
  };
162
166
  const request = {
163
167
  idempotencyKey: options.idempotencyKey ?? generateIdempotencyKey(),
164
168
  submission,
165
169
  ...(options.cleanup ? { cleanup: options.cleanup } : {}),
166
170
  secrets,
167
- ...(options.proxyEndpoints && options.proxyEndpoints.length > 0
168
- ? { proxyEndpoints: options.proxyEndpoints }
171
+ ...(proxyEndpointDeclarations.length > 0
172
+ ? { proxyEndpoints: proxyEndpointDeclarations }
169
173
  : {})
170
174
  };
171
- const run = await operations.submitRunFlat(this.#http, request);
175
+ const run = transientBundles.length > 0
176
+ ? await operations.submitRunFlatMultipart(this.#http, request, transientBundles)
177
+ : await operations.submitRunFlat(this.#http, request);
172
178
  return new RunRef(this, run.id);
173
179
  }
174
180
  getRun(runId) {
@@ -287,11 +293,60 @@ function normalisePrompt(input) {
287
293
  }
288
294
  return [...input];
289
295
  }
290
- function toSkillRef(skill, index) {
291
- if (!(skill instanceof Skill)) {
292
- throw new Error(`AntpathClient.submitRun: skills[${index}] must be a Skill instance`);
296
+ /**
297
+ * Walk the user-provided `Skill[]`, validating each instance and
298
+ * producing:
299
+ * - `skillRefs[]` — the wire entries for `submission.skills[]`, with
300
+ * transient refs assigned positional slot ids (`transient-0`, …).
301
+ * - `transientBundles[]` — the bytes for each transient skill,
302
+ * parallel-indexed by slot.
303
+ *
304
+ * Throws on consumed Skills (the user kept a stale reference past an
305
+ * `.upload(client)` call) with the same error message documented in
306
+ * `Skill.upload` — that mistake is loud, not silent.
307
+ */
308
+ function prepareSkills(skills) {
309
+ const skillRefs = [];
310
+ const transientBundles = [];
311
+ let transientIndex = 0;
312
+ for (let i = 0; i < skills.length; i++) {
313
+ const entry = skills[i];
314
+ if (!(entry instanceof Skill)) {
315
+ throw new Error(`AntpathClient.submitRun: skills[${i}] must be a Skill instance`);
316
+ }
317
+ if (entry.isConsumed) {
318
+ throw new Error(`AntpathClient.submitRun: skills[${i}] was already uploaded via skill.upload(client); ` +
319
+ `use the returned Skill or Skill.fromId(record.id) for subsequent runs`);
320
+ }
321
+ if (entry.isUnstaged) {
322
+ const bundle = entry._takeUnstagedBundle();
323
+ if (!bundle) {
324
+ // Defence-in-depth: `isUnstaged` guarantees bytes exist.
325
+ throw new Error(`AntpathClient.submitRun: skills[${i}] is unstaged but has no bytes (internal invariant violated)`);
326
+ }
327
+ const slot = `transient-${transientIndex++}`;
328
+ skillRefs.push({
329
+ kind: "transient",
330
+ slot,
331
+ name: bundle.name,
332
+ contentHash: bundle.contentHash
333
+ });
334
+ // Anthropic filenames forbid `<>:"|?*\/` and control chars 0-31,
335
+ // so the multipart filename uses hyphen separators. The 12-char
336
+ // hash prefix is enough for janitor / orphan reconciliation;
337
+ // the BFF stamps the full run-scoped filename once it knows the
338
+ // run id.
339
+ const shortHash = bundle.contentHash.replace(/^sha256:/, "").slice(0, 12);
340
+ transientBundles.push({
341
+ slot,
342
+ bytes: bundle.bytes,
343
+ filename: `antpath-${slot}-${shortHash}.zip`
344
+ });
345
+ continue;
346
+ }
347
+ skillRefs.push(entry.ref);
293
348
  }
294
- return skill.ref;
349
+ return { skillRefs, transientBundles };
295
350
  }
296
351
  function mergeMcpServers(inputs, explicitSecrets) {
297
352
  const submissionMcpServers = [];
@@ -319,4 +374,29 @@ function mergeMcpServers(inputs, explicitSecrets) {
319
374
  mergedMcpSecrets: Array.from(secretByName.values())
320
375
  };
321
376
  }
377
+ /**
378
+ * Merge `ProxyEndpoint`-derived auth entries with any
379
+ * `secrets.proxyEndpointAuth` the caller passed explicitly. Per-instance
380
+ * auth values win on the same `name`; a type mismatch (e.g. instance
381
+ * declares `bearer` but secrets carry `header` for the same name) is a
382
+ * call-site error and we throw at the SDK boundary instead of letting
383
+ * the BFF reject the submission an HTTP request later.
384
+ */
385
+ function mergeProxyEndpointAuth(fromInstances, fromExplicitSecrets) {
386
+ if (fromInstances.length === 0 && fromExplicitSecrets.length === 0)
387
+ return [];
388
+ const byName = new Map();
389
+ for (const entry of fromExplicitSecrets) {
390
+ byName.set(entry.name, entry);
391
+ }
392
+ for (const entry of fromInstances) {
393
+ const existing = byName.get(entry.name);
394
+ if (existing && existing.value.type !== entry.value.type) {
395
+ throw new Error(`AntpathClient.submitRun: proxyEndpoint "${entry.name}" auth type conflicts ` +
396
+ `with secrets.proxyEndpointAuth (instance=${entry.value.type}, secrets=${existing.value.type})`);
397
+ }
398
+ byName.set(entry.name, entry);
399
+ }
400
+ return Array.from(byName.values());
401
+ }
322
402
  //# sourceMappingURL=client.js.map
@@ -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,MAAM,OAAO,MAAM;IACR,KAAK,CAAS;IACd,OAAO,CAAgB;IAEhC,YAAY,MAAqB,EAAE,KAAa;QAC9C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,GAAG;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,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wB;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 `Template`
7
- * wrapper. Everything else is types, errors, and event type guards
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 as ProxyEndpoint, PlatformProxyEndpointAuth as ProxyEndpointAuth, PlatformProxyAuthValue as ProxyAuthValue, PlatformTemplateEnvironment as RunEnvironment, ProxyAuthShape, ProxyMethod, ProxyResponseMode } from "./_shared/index.js";
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 `Template`
7
- * wrapper. Everything else is types, errors, and event type guards
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
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQlE,yBAAyB;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,SAAS;AACT,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,yBAAyB;AACzB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,wBA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iB,EACjB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,112 @@
1
+ import { type PlatformProxyAuthValue, type PlatformProxyEndpoint, type PlatformProxyEndpointAuth, type ProxyMethod, type ProxyResponseMode } from "./_shared/index.js";
2
+ /**
3
+ * Constructor-only surface for declaring a per-run HTTP proxy endpoint.
4
+ *
5
+ * Why a class rather than a raw object literal: the raw
6
+ * `PlatformProxyEndpoint` + `PlatformProxyEndpointAuth` shape lets the
7
+ * caller assemble two halves of one logical thing (the auth shape and
8
+ * the auth value), and they often drift — agents writing freeform
9
+ * objects regularly hit runtime rejections with `responseMode: "json"`
10
+ * (real values are `status_only | headers_only | full`) or
11
+ * `authShape: { type: "header", header: "X-Api-Key" }` (real field is
12
+ * `name`). The constructor signatures here put the auth secret on the
13
+ * same call as the shape, so any drift becomes a TypeScript error at
14
+ * the call site, not an HTTP 400 a round-trip later.
15
+ *
16
+ * Wire-format unchanged: the SDK splits each `ProxyEndpoint` instance
17
+ * into a `PlatformProxyEndpoint` (the non-secret declaration) plus a
18
+ * `PlatformProxyEndpointAuth` entry (the per-request secret) at
19
+ * `submitRun` time, exactly the way `McpServer` already splits
20
+ * `headers` into `secrets.mcpServers`.
21
+ *
22
+ * Four named constructors:
23
+ *
24
+ * - `ProxyEndpoint.bearer({ name, baseUrl, token, ... })`
25
+ * - `ProxyEndpoint.header({ name, baseUrl, header, value, ... })`
26
+ * - `ProxyEndpoint.basic ({ name, baseUrl, username, password, ... })`
27
+ * - `ProxyEndpoint.query ({ name, baseUrl, query, value, ... })`
28
+ *
29
+ * All four share the same allow-list / response-mode / cap parameters.
30
+ * The auth secret is required at construction and the SDK's `submitRun`
31
+ * splits it into `secrets.proxyEndpointAuth[].value`; the public
32
+ * submission only ever carries the `authShape`.
33
+ */
34
+ export interface ProxyEndpointCommonOptions {
35
+ /**
36
+ * Endpoint name. Lowercase letters, digits, `_`, `-`, up to 63
37
+ * chars. Matches the BFF's `PROXY_ENDPOINT_NAME_PATTERN`. Used as
38
+ * the path segment in `/api/runs/:runId/proxy/:name` and as the
39
+ * cross-reference key in `secrets.proxyEndpointAuth`.
40
+ */
41
+ readonly name: string;
42
+ /** Upstream base URL. Must be an absolute `https://` URL. */
43
+ readonly baseUrl: string;
44
+ /** HTTP methods the in-container caller is allowed to use. */
45
+ readonly allowMethods: readonly ProxyMethod[];
46
+ /** Path prefixes the in-container caller is allowed to hit. */
47
+ readonly allowPathPrefixes: readonly string[];
48
+ /**
49
+ * Caller-supplied headers permitted to pass through the proxy. The
50
+ * auth header (Bearer/Basic/custom-name) is enforced by the proxy
51
+ * itself and MUST NOT appear here.
52
+ */
53
+ readonly allowHeaders?: readonly string[];
54
+ /** Default narrowest response disclosure mode. */
55
+ readonly responseMode?: ProxyResponseMode;
56
+ readonly maxRequestBytes?: number;
57
+ readonly maxResponseBytes?: number;
58
+ readonly timeoutMs?: number;
59
+ readonly perCallBudget?: number;
60
+ readonly responseByteBudget?: number;
61
+ }
62
+ export interface BearerProxyEndpointOptions extends ProxyEndpointCommonOptions {
63
+ /** Bearer token sent as `Authorization: Bearer <token>`. */
64
+ readonly token: string;
65
+ }
66
+ export interface BasicProxyEndpointOptions extends ProxyEndpointCommonOptions {
67
+ readonly username: string;
68
+ readonly password: string;
69
+ }
70
+ export interface HeaderProxyEndpointOptions extends ProxyEndpointCommonOptions {
71
+ /** Header name the upstream expects the auth value in. */
72
+ readonly header: string;
73
+ /** Header value (the actual secret). */
74
+ readonly value: string;
75
+ }
76
+ export interface QueryProxyEndpointOptions extends ProxyEndpointCommonOptions {
77
+ /** Query parameter name the upstream expects the auth value in. */
78
+ readonly query: string;
79
+ /** Query parameter value (the actual secret). */
80
+ readonly value: string;
81
+ }
82
+ export declare class ProxyEndpoint {
83
+ /** Non-secret half of the wire shape — declaration only. */
84
+ readonly declaration: PlatformProxyEndpoint;
85
+ /** Per-request secret half — auth value keyed by the same `name`. */
86
+ readonly auth: PlatformProxyEndpointAuth;
87
+ private constructor();
88
+ /** Bearer-token endpoint. */
89
+ static bearer(options: BearerProxyEndpointOptions): ProxyEndpoint;
90
+ /** Basic-auth endpoint. */
91
+ static basic(options: BasicProxyEndpointOptions): ProxyEndpoint;
92
+ /** Custom-header endpoint. */
93
+ static header(options: HeaderProxyEndpointOptions): ProxyEndpoint;
94
+ /** Query-string-auth endpoint. */
95
+ static query(options: QueryProxyEndpointOptions): ProxyEndpoint;
96
+ }
97
+ /**
98
+ * Split a list of `ProxyEndpoint` instances into the public declarations
99
+ * (`proxyEndpoints[]`) and the per-request auth bundle
100
+ * (`secrets.proxyEndpointAuth[]`). Mirrors the way `submitRun` already
101
+ * splits `McpServer.headers` into `secrets.mcpServers[]`.
102
+ *
103
+ * Throws on duplicate endpoint names — names are the cross-reference
104
+ * key between the two halves and the BFF rejects collisions; failing
105
+ * here gives the caller a precise message at the call site instead of
106
+ * an opaque HTTP error.
107
+ */
108
+ export declare function splitProxyEndpoints(inputs: readonly ProxyEndpoint[]): {
109
+ endpoints: readonly PlatformProxyEndpoint[];
110
+ auth: readonly PlatformProxyEndpointAuth[];
111
+ };
112
+ export type { PlatformProxyAuthValue as ProxyAuthValue };