antpath 0.9.1 → 0.10.4

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
@@ -29,7 +29,7 @@ antpath whoami --api-token …
29
29
 
30
30
  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 at `/antpath/antpath` inside every run so skills can call `antpath proxy …` against the per-run manifest. See [Agent-first surface design](../../references/development-principles.md#agent-first-surface-design).
31
31
 
32
- The dashboard URL defaults to `https://antpath.ai`. Self-hosted deployments override with `--dashboard-url` on the CLI or `baseUrl` on `AntpathClient`. The workspace is derived server-side from your API token (1:1 binding), so there is no `--workspace` flag and no `workspaceId` option.
32
+ The dashboard URL defaults to `https://www.antpath.ai`. Self-hosted deployments override with `--dashboard-url` on the CLI or `baseUrl` on `AntpathClient`. The workspace is derived server-side from your API token (1:1 binding), so there is no `--workspace` flag and no `workspaceId` option.
33
33
 
34
34
  ## MVP boundaries
35
35
 
@@ -46,7 +46,7 @@ import { AntpathClient, defineTemplate, string } from "antpath";
46
46
 
47
47
  const client = new AntpathClient({
48
48
  apiToken: process.env.ANTPATH_API_TOKEN!
49
- // baseUrl defaults to https://antpath.ai — set it for self-hosted deployments.
49
+ // baseUrl defaults to https://www.antpath.ai — set it for self-hosted deployments.
50
50
  });
51
51
 
52
52
  const template = defineTemplate({
@@ -135,6 +135,55 @@ export declare const TRANSIENT_CONTENT_HASH_PATTERN: RegExp;
135
135
  export declare function isWorkspaceSkillRef(ref: SkillRef): ref is WorkspaceSkillRef;
136
136
  export declare function isProviderSkillRef(ref: SkillRef): ref is ProviderSkillRef;
137
137
  export declare function isTransientSkillRef(ref: SkillRef): ref is TransientSkillRef;
138
+ export type AgentsMdRef = WorkspaceAgentsMdRef | TransientAgentsMdRef;
139
+ export interface WorkspaceAgentsMdRef {
140
+ readonly kind: "workspace_agentsmd";
141
+ readonly id: string;
142
+ }
143
+ /**
144
+ * Inline-supplied AgentsMd content that arrives as the
145
+ * `agentsmd:<slot>` part of a multipart `submitRun` body. The BFF
146
+ * ingests the bytes into `workspace_files` (kind='agentsmd') at
147
+ * submission time and rewrites the ref to `WorkspaceAgentsMdRef`
148
+ * before the rest of the run-submission pipeline runs.
149
+ *
150
+ * `name` becomes the prefix of the auto-suffixed workspace name,
151
+ * mirroring the `Skill` per-run-artifact model. `contentHash` is
152
+ * the SDK's advisory `sha256:<hex>` for tamper detection.
153
+ */
154
+ export interface TransientAgentsMdRef {
155
+ readonly kind: "transient_agentsmd";
156
+ readonly slot: string;
157
+ readonly name: string;
158
+ readonly contentHash: string;
159
+ }
160
+ export declare function isWorkspaceAgentsMdRef(ref: AgentsMdRef): ref is WorkspaceAgentsMdRef;
161
+ export declare function isTransientAgentsMdRef(ref: AgentsMdRef): ref is TransientAgentsMdRef;
162
+ export type FileRef = WorkspaceFileRef | TransientFileRef;
163
+ export interface WorkspaceFileRef {
164
+ readonly kind: "workspace_file";
165
+ readonly id: string;
166
+ }
167
+ /**
168
+ * Inline-supplied File content that arrives as the `file:<slot>`
169
+ * part of a multipart `submitRun` body. Single file or a zipped
170
+ * folder. The BFF ingests and rewrites the ref to
171
+ * `WorkspaceFileRef` before run submission proceeds.
172
+ *
173
+ * `name` is the workspace-visible name prefix. `contentHash` is the
174
+ * SDK's advisory `sha256:<hex>`. `mountPath` is optional — when
175
+ * present it overrides the default `/antpath/files/<id>/<rel>` mount
176
+ * layout (e.g. user-chosen `/workspace/data`).
177
+ */
178
+ export interface TransientFileRef {
179
+ readonly kind: "transient_file";
180
+ readonly slot: string;
181
+ readonly name: string;
182
+ readonly contentHash: string;
183
+ readonly mountPath?: string;
184
+ }
185
+ export declare function isWorkspaceFileRef(ref: FileRef): ref is WorkspaceFileRef;
186
+ export declare function isTransientFileRef(ref: FileRef): ref is TransientFileRef;
138
187
  /**
139
188
  * Options accepted by `parseSkillRef`. The default (`allowTransient: true`)
140
189
  * is the BFF submission parser path. The Blueprint parser passes
@@ -201,14 +250,20 @@ export declare function validateSkillBundleEntry(input: {
201
250
  readonly mode?: number;
202
251
  }): SkillBundleEntry;
203
252
  /**
204
- * Validate a full manifest. Enforces:
253
+ * Validate a full **skill bundle** manifest. Enforces:
205
254
  * - entries is a non-empty array
206
- * - `SKILL.md` exists at the bundle root (Claude's auto-discovery key)
255
+ * - `SKILL.md` exists at the bundle root (this is what makes a
256
+ * bundle a skill rather than a plain workspace file)
207
257
  * - file count <= maxFiles
208
258
  * - total uncompressed size <= maxDecompressedBytes
209
259
  * - per-entry validation (see `validateSkillBundleEntry`)
210
260
  * - no duplicate paths
211
261
  *
262
+ * Per the May-2026 decision log in
263
+ * `references/agent-context-uploads.md`, **skill** means "Claude
264
+ * Skill" — bundles without `SKILL.md` are not skills and must go
265
+ * through the `AgentsMd` or `File` upload concepts instead.
266
+ *
212
267
  * Returns a canonical manifest with totals computed.
213
268
  */
214
269
  export declare function validateSkillBundleManifest(input: ReadonlyArray<{
@@ -216,6 +271,19 @@ export declare function validateSkillBundleManifest(input: ReadonlyArray<{
216
271
  readonly size: number;
217
272
  readonly mode?: number;
218
273
  }>): SkillBundleManifest;
274
+ /**
275
+ * Returns true when the manifest carries a `SKILL.md` entry at the
276
+ * bundle root. The presence of this file is Anthropic's
277
+ * skill-auto-discovery signal — bundles that have it are treated as
278
+ * Claude skills and mounted accordingly; bundles that don't are still
279
+ * usable agent context (AGENTS.md, settings files, folders of helper
280
+ * data) but the agent won't pick them up via the skills mechanism.
281
+ *
282
+ * The check is intentionally a separate, callable predicate (rather
283
+ * than baked into `validateSkillBundleManifest`) so the storage and
284
+ * the attach layers can remain independent.
285
+ */
286
+ export declare function hasSkillMdAtRoot(manifest: SkillBundleManifest): boolean;
219
287
  /**
220
288
  * The non-secret half of an MCP server declaration. This is what enters
221
289
  * the hashed submission, the run snapshot, and any audit log. `name`
@@ -105,6 +105,18 @@ export function isProviderSkillRef(ref) {
105
105
  export function isTransientSkillRef(ref) {
106
106
  return ref.kind === "transient";
107
107
  }
108
+ export function isWorkspaceAgentsMdRef(ref) {
109
+ return ref.kind === "workspace_agentsmd";
110
+ }
111
+ export function isTransientAgentsMdRef(ref) {
112
+ return ref.kind === "transient_agentsmd";
113
+ }
114
+ export function isWorkspaceFileRef(ref) {
115
+ return ref.kind === "workspace_file";
116
+ }
117
+ export function isTransientFileRef(ref) {
118
+ return ref.kind === "transient_file";
119
+ }
108
120
  /**
109
121
  * Parse a `SkillRef` from untrusted input. Used by the BFF run parser
110
122
  * and by the operations module when deserialising API responses. Throws
@@ -265,14 +277,20 @@ export function validateSkillBundleEntry(input) {
265
277
  return { path, size: input.size, mode };
266
278
  }
267
279
  /**
268
- * Validate a full manifest. Enforces:
280
+ * Validate a full **skill bundle** manifest. Enforces:
269
281
  * - entries is a non-empty array
270
- * - `SKILL.md` exists at the bundle root (Claude's auto-discovery key)
282
+ * - `SKILL.md` exists at the bundle root (this is what makes a
283
+ * bundle a skill rather than a plain workspace file)
271
284
  * - file count <= maxFiles
272
285
  * - total uncompressed size <= maxDecompressedBytes
273
286
  * - per-entry validation (see `validateSkillBundleEntry`)
274
287
  * - no duplicate paths
275
288
  *
289
+ * Per the May-2026 decision log in
290
+ * `references/agent-context-uploads.md`, **skill** means "Claude
291
+ * Skill" — bundles without `SKILL.md` are not skills and must go
292
+ * through the `AgentsMd` or `File` upload concepts instead.
293
+ *
276
294
  * Returns a canonical manifest with totals computed.
277
295
  */
278
296
  export function validateSkillBundleManifest(input) {
@@ -302,10 +320,27 @@ export function validateSkillBundleManifest(input) {
302
320
  entries.push(entry);
303
321
  }
304
322
  if (!hasSkillMd) {
305
- throw new SkillBundleValidationError("bundle manifest must contain a 'SKILL.md' entry at the bundle root");
323
+ throw new SkillBundleValidationError("skill bundle manifest must contain a 'SKILL.md' entry at the bundle root. " +
324
+ "If you want to upload an instructions file or generic agent context, use " +
325
+ "AgentsMd or File instead — see references/agent-context-uploads.md");
306
326
  }
307
327
  return { entries, totalSize, fileCount: entries.length };
308
328
  }
329
+ /**
330
+ * Returns true when the manifest carries a `SKILL.md` entry at the
331
+ * bundle root. The presence of this file is Anthropic's
332
+ * skill-auto-discovery signal — bundles that have it are treated as
333
+ * Claude skills and mounted accordingly; bundles that don't are still
334
+ * usable agent context (AGENTS.md, settings files, folders of helper
335
+ * data) but the agent won't pick them up via the skills mechanism.
336
+ *
337
+ * The check is intentionally a separate, callable predicate (rather
338
+ * than baked into `validateSkillBundleManifest`) so the storage and
339
+ * the attach layers can remain independent.
340
+ */
341
+ export function hasSkillMdAtRoot(manifest) {
342
+ return manifest.entries.some((entry) => entry.path === "SKILL.md");
343
+ }
309
344
  export const MCP_SERVER_NAME_PATTERN = /^[a-z][a-z0-9_-]{0,62}$/;
310
345
  export function parseMcpServerRef(input, path) {
311
346
  if (input === null || typeof input !== "object" || Array.isArray(input)) {
@@ -57,6 +57,8 @@ function parseFlatProjection(value) {
57
57
  ...(typeof submissionRaw.system === "string" ? { system: submissionRaw.system } : {}),
58
58
  prompt: toStringArray(submissionRaw.prompt),
59
59
  skills: toSkillRefArray(submissionRaw.skills),
60
+ agentsMd: [],
61
+ files: [],
60
62
  mcpServers: toMcpServerRefArray(submissionRaw.mcpServers),
61
63
  ...(parseEnvironment(submissionRaw.environment)
62
64
  ? { environment: parseEnvironment(submissionRaw.environment) }
@@ -101,6 +103,8 @@ function fallbackFlat() {
101
103
  model: "",
102
104
  prompt: [],
103
105
  skills: [],
106
+ agentsMd: [],
107
+ files: [],
104
108
  mcpServers: []
105
109
  }
106
110
  };
@@ -1,5 +1,5 @@
1
1
  import { type ProxyAuthShape, type ProxyMethod, type ProxyResponseMode } from "./proxy-protocol.js";
2
- import type { McpServerRef, SkillRef } from "./blueprint.js";
2
+ import type { AgentsMdRef, FileRef, McpServerRef, SkillRef } from "./blueprint.js";
3
3
  export type JsonPrimitive = string | number | boolean | null;
4
4
  export type JsonValue = JsonPrimitive | JsonValue[] | {
5
5
  readonly [key: string]: JsonValue;
@@ -172,6 +172,8 @@ export interface PlatformFlatSubmission {
172
172
  readonly system?: string;
173
173
  readonly prompt: readonly string[];
174
174
  readonly skills: readonly SkillRef[];
175
+ readonly agentsMd: readonly AgentsMdRef[];
176
+ readonly files: readonly FileRef[];
175
177
  readonly mcpServers: readonly McpServerRef[];
176
178
  readonly environment?: PlatformTemplateEnvironment;
177
179
  readonly metadata?: Record<string, JsonValue>;
@@ -1,5 +1,6 @@
1
1
  import { authShapeHeaderName, PROXY_ALLOWED_METHODS, PROXY_RESPONSE_MODES } from "./proxy-protocol.js";
2
2
  import { parseMcpServerRef, parseSkillRef } from "./blueprint.js";
3
+ import { TRANSIENT_CONTENT_HASH_PATTERN, TRANSIENT_SLOT_PATTERN } from "./blueprint.js";
3
4
  const SECRETS_KEY = "secrets";
4
5
  /**
5
6
  * Default caps for a proxy endpoint when the submission doesn't specify
@@ -753,6 +754,8 @@ function parseFlatSubmission(input) {
753
754
  "system",
754
755
  "prompt",
755
756
  "skills",
757
+ "agentsMd",
758
+ "files",
756
759
  "mcpServers",
757
760
  "environment",
758
761
  "metadata",
@@ -767,6 +770,8 @@ function parseFlatSubmission(input) {
767
770
  const system = optionalString(value.system, "submission.system");
768
771
  const prompt = parseFlatPrompt(value.prompt);
769
772
  const skills = parseFlatSkills(value.skills);
773
+ const agentsMd = parseFlatAgentsMd(value.agentsMd);
774
+ const files = parseFlatFiles(value.files);
770
775
  const mcpServers = parseFlatMcpServers(value.mcpServers);
771
776
  const environment = parseTemplateEnvironment(value.environment);
772
777
  const metadata = optionalJsonRecord(value.metadata, "submission.metadata");
@@ -776,6 +781,8 @@ function parseFlatSubmission(input) {
776
781
  ...(system ? { system } : {}),
777
782
  prompt,
778
783
  skills,
784
+ agentsMd,
785
+ files,
779
786
  mcpServers,
780
787
  ...(environment ? { environment } : {}),
781
788
  ...(metadata ? { metadata } : {}),
@@ -911,6 +918,102 @@ function parseFlatSkills(input) {
911
918
  return ref;
912
919
  });
913
920
  }
921
+ // Validation shared between AgentsMd and File refs since the wire
922
+ // shape of an inline-supplied ref is identical (slot, name,
923
+ // contentHash). The discriminator (`kind`) differs by call site.
924
+ const WORKSPACE_NAME_PATTERN = /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/;
925
+ function parseTransientWireFields(raw, path) {
926
+ const slot = raw.slot;
927
+ if (typeof slot !== "string" || !TRANSIENT_SLOT_PATTERN.test(slot)) {
928
+ throw new Error(`${path}.slot must match ${TRANSIENT_SLOT_PATTERN.source}`);
929
+ }
930
+ const name = raw.name;
931
+ if (typeof name !== "string" || !WORKSPACE_NAME_PATTERN.test(name)) {
932
+ throw new Error(`${path}.name must match ${WORKSPACE_NAME_PATTERN.source}`);
933
+ }
934
+ const contentHash = raw.contentHash;
935
+ if (typeof contentHash !== "string" || !TRANSIENT_CONTENT_HASH_PATTERN.test(contentHash)) {
936
+ throw new Error(`${path}.contentHash must match ${TRANSIENT_CONTENT_HASH_PATTERN.source}`);
937
+ }
938
+ return { slot, name, contentHash };
939
+ }
940
+ function parseFlatAgentsMd(input) {
941
+ if (input === undefined)
942
+ return [];
943
+ if (!Array.isArray(input)) {
944
+ throw new Error("submission.agentsMd must be an array of AgentsMdRef objects");
945
+ }
946
+ const seenWorkspace = new Set();
947
+ const seenTransientSlot = new Set();
948
+ return input.map((item, index) => {
949
+ const path = `submission.agentsMd[${index}]`;
950
+ if (!item || typeof item !== "object" || Array.isArray(item)) {
951
+ throw new Error(`${path} must be an AgentsMdRef object`);
952
+ }
953
+ const raw = item;
954
+ if (raw.kind === "workspace_agentsmd") {
955
+ if (typeof raw.id !== "string" || raw.id.length === 0) {
956
+ throw new Error(`${path}.id must be a non-empty string`);
957
+ }
958
+ if (seenWorkspace.has(raw.id)) {
959
+ throw new Error(`submission.agentsMd duplicate workspace id: ${raw.id}`);
960
+ }
961
+ seenWorkspace.add(raw.id);
962
+ return { kind: "workspace_agentsmd", id: raw.id };
963
+ }
964
+ if (raw.kind === "transient_agentsmd") {
965
+ const fields = parseTransientWireFields(raw, path);
966
+ if (seenTransientSlot.has(fields.slot)) {
967
+ throw new Error(`submission.agentsMd duplicate transient slot: ${fields.slot}`);
968
+ }
969
+ seenTransientSlot.add(fields.slot);
970
+ return { kind: "transient_agentsmd", ...fields };
971
+ }
972
+ throw new Error(`${path}.kind must be 'workspace_agentsmd' or 'transient_agentsmd' (got ${JSON.stringify(raw.kind)})`);
973
+ });
974
+ }
975
+ function parseFlatFiles(input) {
976
+ if (input === undefined)
977
+ return [];
978
+ if (!Array.isArray(input)) {
979
+ throw new Error("submission.files must be an array of FileRef objects");
980
+ }
981
+ const seenWorkspace = new Set();
982
+ const seenTransientSlot = new Set();
983
+ return input.map((item, index) => {
984
+ const path = `submission.files[${index}]`;
985
+ if (!item || typeof item !== "object" || Array.isArray(item)) {
986
+ throw new Error(`${path} must be a FileRef object`);
987
+ }
988
+ const raw = item;
989
+ if (raw.kind === "workspace_file") {
990
+ if (typeof raw.id !== "string" || raw.id.length === 0) {
991
+ throw new Error(`${path}.id must be a non-empty string`);
992
+ }
993
+ if (seenWorkspace.has(raw.id)) {
994
+ throw new Error(`submission.files duplicate workspace id: ${raw.id}`);
995
+ }
996
+ seenWorkspace.add(raw.id);
997
+ return { kind: "workspace_file", id: raw.id };
998
+ }
999
+ if (raw.kind === "transient_file") {
1000
+ const fields = parseTransientWireFields(raw, path);
1001
+ if (seenTransientSlot.has(fields.slot)) {
1002
+ throw new Error(`submission.files duplicate transient slot: ${fields.slot}`);
1003
+ }
1004
+ seenTransientSlot.add(fields.slot);
1005
+ const mountPath = raw.mountPath;
1006
+ if (mountPath !== undefined) {
1007
+ if (typeof mountPath !== "string" || !mountPath.startsWith("/") || mountPath.length === 0) {
1008
+ throw new Error(`${path}.mountPath must be a non-empty absolute path starting with '/'`);
1009
+ }
1010
+ return { kind: "transient_file", ...fields, mountPath };
1011
+ }
1012
+ return { kind: "transient_file", ...fields };
1013
+ }
1014
+ throw new Error(`${path}.kind must be 'workspace_file' or 'transient_file' (got ${JSON.stringify(raw.kind)})`);
1015
+ });
1016
+ }
914
1017
  function parseFlatMcpServers(input) {
915
1018
  if (input === undefined) {
916
1019
  return [];
@@ -0,0 +1,90 @@
1
+ import type { AgentsMdRef } from "./_shared/index.js";
2
+ /**
3
+ * The second of the three agent-context concepts (see
4
+ * `references/agent-context-uploads.md`). An `AgentsMd` instance
5
+ * carries the bytes of a single markdown file that antpath will
6
+ * deliver to the agent as the **first user turn** of the session —
7
+ * matching Claude Code's CLAUDE.md behaviour.
8
+ *
9
+ * Three usage modes mirror `Skill`:
10
+ *
11
+ * - **Workspace** — `AgentsMd.fromId("amd_…")`. Persistent, reused
12
+ * across runs.
13
+ * - **Workspace via explicit upload** —
14
+ * `await AgentsMd.fromContent("…", { name }).upload(client)`.
15
+ * Returns a workspace-backed instance; the original is consumed.
16
+ * - **Inline per-run** — `await AgentsMd.fromContent("…", { name })`
17
+ * passed directly to `submitRun({ agentsMd: [...] })`. The BFF
18
+ * ingests it as a per-run-artifact workspace file with an
19
+ * auto-suffixed name (mirrors `Skill`'s inline behaviour).
20
+ *
21
+ * The single canonical filename inside the zip is always `AGENTS.md`
22
+ * so the canonical hash is a pure function of the markdown content —
23
+ * dedup via `uploadIfChanged` works on bytes alone.
24
+ */
25
+ export declare class AgentsMd {
26
+ #private;
27
+ constructor(ref: AgentsMdRef, content?: string, contentHash?: string);
28
+ get ref(): AgentsMdRef;
29
+ /** True for `AgentsMd.fromId(...)` and instances returned by `.upload(...)`. */
30
+ get isWorkspace(): boolean;
31
+ /** True only while the inline AgentsMd still carries bytes and has not been consumed. */
32
+ get isUnstaged(): boolean;
33
+ get isConsumed(): boolean;
34
+ /**
35
+ * Reference an existing workspace `amd_*` row. Does NOT validate
36
+ * existence — that check happens on the next `submitRun`, where the
37
+ * BFF rejects unknown / soft-deleted ids before inserting the run.
38
+ */
39
+ static fromId(id: string): AgentsMd;
40
+ /**
41
+ * Build an inline AgentsMd from a markdown string. `name` becomes
42
+ * the workspace name (per-run-artifact auto-suffixes it at ingest).
43
+ */
44
+ static fromContent(content: string, args: {
45
+ readonly name: string;
46
+ }): Promise<AgentsMd>;
47
+ /**
48
+ * Read a local markdown file and build an inline AgentsMd. Path
49
+ * may point at AGENTS.md, CLAUDE.md, or any markdown file — the
50
+ * filename inside the zip is always normalised to AGENTS.md so
51
+ * the canonical hash is pure.
52
+ */
53
+ static fromPath(path: string, args?: {
54
+ readonly name?: string;
55
+ }): Promise<AgentsMd>;
56
+ /**
57
+ * Persist this inline AgentsMd as a workspace row and return a new
58
+ * workspace-backed instance. The original is marked consumed.
59
+ */
60
+ upload(client: AgentsMdUploader): Promise<AgentsMd>;
61
+ /**
62
+ * Internal: yield the inline content + hash so client.submitRun
63
+ * can build the `agentsmd:<slot>` multipart part. Not part of the
64
+ * public API.
65
+ */
66
+ _takeUnstagedContent(): {
67
+ name: string;
68
+ content: string;
69
+ contentHash: string;
70
+ } | undefined;
71
+ toJSON(): AgentsMdRef;
72
+ }
73
+ export interface AgentsMdRecord {
74
+ readonly id: string;
75
+ readonly name: string;
76
+ readonly hash: string | null;
77
+ readonly sizeBytes: number | null;
78
+ }
79
+ export interface AgentsMdUploader {
80
+ readonly _uploadAgentsMd?: (args: {
81
+ readonly name: string;
82
+ readonly content: string;
83
+ }) => Promise<AgentsMdRecord>;
84
+ readonly agentsMd?: {
85
+ readonly _uploadAgentsMd?: (args: {
86
+ readonly name: string;
87
+ readonly content: string;
88
+ }) => Promise<AgentsMdRecord>;
89
+ };
90
+ }
@@ -0,0 +1,171 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { hashSkillBundle } from "./bundle.js";
3
+ import { strToU8, zipSync } from "fflate";
4
+ /**
5
+ * The second of the three agent-context concepts (see
6
+ * `references/agent-context-uploads.md`). An `AgentsMd` instance
7
+ * carries the bytes of a single markdown file that antpath will
8
+ * deliver to the agent as the **first user turn** of the session —
9
+ * matching Claude Code's CLAUDE.md behaviour.
10
+ *
11
+ * Three usage modes mirror `Skill`:
12
+ *
13
+ * - **Workspace** — `AgentsMd.fromId("amd_…")`. Persistent, reused
14
+ * across runs.
15
+ * - **Workspace via explicit upload** —
16
+ * `await AgentsMd.fromContent("…", { name }).upload(client)`.
17
+ * Returns a workspace-backed instance; the original is consumed.
18
+ * - **Inline per-run** — `await AgentsMd.fromContent("…", { name })`
19
+ * passed directly to `submitRun({ agentsMd: [...] })`. The BFF
20
+ * ingests it as a per-run-artifact workspace file with an
21
+ * auto-suffixed name (mirrors `Skill`'s inline behaviour).
22
+ *
23
+ * The single canonical filename inside the zip is always `AGENTS.md`
24
+ * so the canonical hash is a pure function of the markdown content —
25
+ * dedup via `uploadIfChanged` works on bytes alone.
26
+ */
27
+ export class AgentsMd {
28
+ #ref;
29
+ #content;
30
+ #contentHash;
31
+ #consumed = false;
32
+ constructor(ref, content, contentHash) {
33
+ this.#ref = ref;
34
+ this.#content = content;
35
+ this.#contentHash = contentHash;
36
+ }
37
+ get ref() {
38
+ return this.#ref;
39
+ }
40
+ /** True for `AgentsMd.fromId(...)` and instances returned by `.upload(...)`. */
41
+ get isWorkspace() {
42
+ return this.#ref.kind === "workspace_agentsmd";
43
+ }
44
+ /** True only while the inline AgentsMd still carries bytes and has not been consumed. */
45
+ get isUnstaged() {
46
+ return (this.#ref.kind === "transient_agentsmd" &&
47
+ this.#ref.slot === UNSTAGED_SLOT &&
48
+ !this.#consumed &&
49
+ this.#content !== undefined);
50
+ }
51
+ get isConsumed() {
52
+ return this.#consumed;
53
+ }
54
+ /**
55
+ * Reference an existing workspace `amd_*` row. Does NOT validate
56
+ * existence — that check happens on the next `submitRun`, where the
57
+ * BFF rejects unknown / soft-deleted ids before inserting the run.
58
+ */
59
+ static fromId(id) {
60
+ if (typeof id !== "string" || id.length === 0) {
61
+ throw new Error("AgentsMd.fromId: id is required");
62
+ }
63
+ return new AgentsMd({ kind: "workspace_agentsmd", id });
64
+ }
65
+ /**
66
+ * Build an inline AgentsMd from a markdown string. `name` becomes
67
+ * the workspace name (per-run-artifact auto-suffixes it at ingest).
68
+ */
69
+ static async fromContent(content, args) {
70
+ if (typeof content !== "string" || content.length === 0) {
71
+ throw new Error("AgentsMd.fromContent: content must be a non-empty string");
72
+ }
73
+ if (!args || typeof args.name !== "string" || !WORKSPACE_NAME_RE.test(args.name)) {
74
+ throw new Error(`AgentsMd.fromContent: name must match ${WORKSPACE_NAME_RE.source}`);
75
+ }
76
+ const zip = zipSync({ "AGENTS.md": [strToU8(content), { mtime: ZIP_EPOCH }] }, { level: 6 });
77
+ const contentHash = await hashSkillBundle(zip);
78
+ const ref = {
79
+ kind: "transient_agentsmd",
80
+ slot: UNSTAGED_SLOT,
81
+ name: args.name,
82
+ contentHash
83
+ };
84
+ return new AgentsMd(ref, content, contentHash);
85
+ }
86
+ /**
87
+ * Read a local markdown file and build an inline AgentsMd. Path
88
+ * may point at AGENTS.md, CLAUDE.md, or any markdown file — the
89
+ * filename inside the zip is always normalised to AGENTS.md so
90
+ * the canonical hash is pure.
91
+ */
92
+ static async fromPath(path, args) {
93
+ const buffer = await readFile(path, "utf8");
94
+ const inferredName = args?.name ?? inferNameFromPath(path);
95
+ return AgentsMd.fromContent(buffer, { name: inferredName });
96
+ }
97
+ /**
98
+ * Persist this inline AgentsMd as a workspace row and return a new
99
+ * workspace-backed instance. The original is marked consumed.
100
+ */
101
+ async upload(client) {
102
+ if (this.#consumed) {
103
+ throw new Error(consumedMessage());
104
+ }
105
+ if (this.#ref.kind !== "transient_agentsmd" || this.#content === undefined) {
106
+ throw new Error("AgentsMd.upload: only inline (unstaged) instances can be uploaded");
107
+ }
108
+ const uploader = resolveUploader(client);
109
+ const record = await uploader({ name: this.#ref.name, content: this.#content });
110
+ this.#consumed = true;
111
+ return new AgentsMd({ kind: "workspace_agentsmd", id: record.id });
112
+ }
113
+ /**
114
+ * Internal: yield the inline content + hash so client.submitRun
115
+ * can build the `agentsmd:<slot>` multipart part. Not part of the
116
+ * public API.
117
+ */
118
+ _takeUnstagedContent() {
119
+ if (this.#consumed) {
120
+ throw new Error(consumedMessage());
121
+ }
122
+ if (!this.isUnstaged)
123
+ return undefined;
124
+ if (this.#ref.kind !== "transient_agentsmd" || this.#content === undefined || this.#contentHash === undefined) {
125
+ return undefined;
126
+ }
127
+ return {
128
+ name: this.#ref.name,
129
+ content: this.#content,
130
+ contentHash: this.#contentHash
131
+ };
132
+ }
133
+ toJSON() {
134
+ if (this.#consumed)
135
+ throw new Error(consumedMessage());
136
+ if (this.isUnstaged) {
137
+ throw new Error("Cannot JSON-serialise an inline AgentsMd — the content is not in the JSON. " +
138
+ "Persist via agentsMd.upload(client) and serialise the returned workspace instance, " +
139
+ "or pass the inline AgentsMd directly to submitRun without serialising.");
140
+ }
141
+ return this.#ref;
142
+ }
143
+ }
144
+ const UNSTAGED_SLOT = "(unstaged)";
145
+ const ZIP_EPOCH = new Date(Date.UTC(1980, 0, 1));
146
+ const WORKSPACE_NAME_RE = /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/;
147
+ function resolveUploader(client) {
148
+ const direct = client._uploadAgentsMd;
149
+ if (typeof direct === "function")
150
+ return direct.bind(client);
151
+ const nested = client.agentsMd?._uploadAgentsMd;
152
+ if (typeof nested === "function")
153
+ return nested.bind(client.agentsMd);
154
+ throw new Error("AgentsMd.upload: client argument does not expose an upload entry point — " +
155
+ "pass the AntpathClient instance or its `client.agentsMd`");
156
+ }
157
+ function consumedMessage() {
158
+ return ("this AgentsMd was already uploaded via agentsMd.upload(client); use the returned instance " +
159
+ "or AgentsMd.fromId(record.id) for subsequent runs");
160
+ }
161
+ function inferNameFromPath(path) {
162
+ // Use the basename minus extension, lowercased and normalised to
163
+ // match the workspace-name regex. Falls back to a timestamp slug.
164
+ const base = path.replace(/\\/g, "/").split("/").at(-1) ?? "";
165
+ const stem = base.replace(/\.[^.]+$/, "").toLowerCase();
166
+ const slug = stem.replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
167
+ if (slug && WORKSPACE_NAME_RE.test(slug))
168
+ return slug;
169
+ return `agentsmd-${Date.now().toString(36)}`;
170
+ }
171
+ //# sourceMappingURL=agents-md.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../src/agents-md.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,QAAQ;IACV,IAAI,CAAc;IAClB,QAAQ,CAAqB;IAC7B,YAAY,CAAqB;IAC1C,SAAS,GAAG,KAAK,CAAC;IAElB,YAAY,GAAgB,EAAE,OAAgB,EAAE,WAAoB;QAClE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,gFAAgF;IAChF,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,oBAAoB,CAAC;IACjD,CAAC;IAED,yFAAyF;IACzF,IAAI,UAAU;QACZ,OAAO,CACL,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,oBAAoB;YACvC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa;YAChC,CAAC,IAAI,CAAC,SAAS;YACf,IAAI,CAAC,QAAQ,KAAK,SAAS,CAC5B,CAAC;IACJ,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,EAAU;QACtB,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,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AkE;IAClE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACtE,IAAI,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,YAAY,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/C,CAAC"}
package/dist/bundle.js CHANGED
@@ -34,7 +34,9 @@ export function bundleSkillFiles(files) {
34
34
  collected.set(entry.path, bytes);
35
35
  }
36
36
  if (!hasSkillMd) {
37
- throw new Error('Skill bundle must contain a "SKILL.md" file at the root');
37
+ throw new Error('Skill bundle must contain a "SKILL.md" file at the root. ' +
38
+ "If you want to upload an instructions file or generic agent context, " +
39
+ "use AgentsMd.fromPath / File.fromPath instead.");
38
40
  }
39
41
  // Sort entries and pin every mtime to the epoch so the byte output is
40
42
  // identical across machines and re-runs (the BFF re-canonicalises and
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAwBhF,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAK/B,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,IAAI,CAAC,KAAK,IAAI,OAA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AI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,WAAW,CAAC,MAAmB;IACtC,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAW,CAAC;QAC/B,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/cli.mjs CHANGED
@@ -1424,6 +1424,8 @@ async function runRunCmd(io2, argv) {
1424
1424
  ...blueprint.system ? { system: blueprint.system } : {},
1425
1425
  prompt: promptArray,
1426
1426
  skills,
1427
+ agentsMd: [],
1428
+ files: [],
1427
1429
  mcpServers: mcpServersForSubmission,
1428
1430
  ...blueprint.environment ? { environment: blueprint.environment } : {},
1429
1431
  ...blueprint.metadata ? { metadata: blueprint.metadata } : {}
@@ -2524,7 +2526,7 @@ async function zipDirectory(rootDir) {
2524
2526
  throw new Error(`${rootDir} contains no regular files`);
2525
2527
  }
2526
2528
  if (!hasSkillMd) {
2527
- throw new Error('skill bundle must contain a "SKILL.md" file at the root');
2529
+ throw new Error('skill bundle must contain a "SKILL.md" file at the root. For AGENTS.md / generic files use the corresponding `antpath agentsmd` / `antpath files` commands instead.');
2528
2530
  }
2529
2531
  const sorted = [...collected.entries()].sort((a, b) => a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0);
2530
2532
  const zippable = {};
@@ -1 +1 @@
1
- f176fe0055e6734c13959869bba99513459b1caf7f982a7088e638a69bbdd528 cli.mjs
1
+ 65ebd2213bcfe9badebabb30a961c3c36f8871883208e891f6b6d62a84dd51dc cli.mjs
package/dist/client.d.ts CHANGED
@@ -211,13 +211,15 @@ export declare class AntpathClient {
211
211
  * before sending so credentials never enter the hashed submission or
212
212
  * the run snapshot.
213
213
  *
214
- * If any of the `skills` are unstaged transient instances
215
- * (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
216
- * the SDK assigns each one a positional slot id (`transient-0`,
217
- * `transient-1`, …) and switches to a multipart request body so the
218
- * bytes ride alongside the JSON submission. The bytes never persist
219
- * on antpath storage; the BFF uploads them to Anthropic Files for
220
- * the lifetime of this one run.
214
+ * Unstaged transient skills (`Skill.fromFiles` / `Skill.fromPath`
215
+ * without a prior `.upload`) are accepted: the SDK switches to a
216
+ * multipart body that carries the canonical zip bytes alongside the
217
+ * JSON submission. The dashboard BFF ingests each one through the
218
+ * standard workspace-skill upload pipeline (dedup by content hash;
219
+ * upload via the existing two-phase pending ready flow) and
220
+ * rewrites the run's `skills[]` to reference the resulting `skl_*`
221
+ * ids. The bytes persist on antpath; the user can browse and
222
+ * download the resulting workspace skill from the dashboard.
221
223
  */
222
224
  submitRun(options: SubmitRunOptions): Promise<RunRef>;
223
225
  getRun(runId: string): Promise<Run>;
package/dist/client.js CHANGED
@@ -184,13 +184,15 @@ export class AntpathClient {
184
184
  * before sending so credentials never enter the hashed submission or
185
185
  * the run snapshot.
186
186
  *
187
- * If any of the `skills` are unstaged transient instances
188
- * (`Skill.fromFiles` / `Skill.fromPath` without a prior `.upload`),
189
- * the SDK assigns each one a positional slot id (`transient-0`,
190
- * `transient-1`, …) and switches to a multipart request body so the
191
- * bytes ride alongside the JSON submission. The bytes never persist
192
- * on antpath storage; the BFF uploads them to Anthropic Files for
193
- * the lifetime of this one run.
187
+ * Unstaged transient skills (`Skill.fromFiles` / `Skill.fromPath`
188
+ * without a prior `.upload`) are accepted: the SDK switches to a
189
+ * multipart body that carries the canonical zip bytes alongside the
190
+ * JSON submission. The dashboard BFF ingests each one through the
191
+ * standard workspace-skill upload pipeline (dedup by content hash;
192
+ * upload via the existing two-phase pending ready flow) and
193
+ * rewrites the run's `skills[]` to reference the resulting `skl_*`
194
+ * ids. The bytes persist on antpath; the user can browse and
195
+ * download the resulting workspace skill from the dashboard.
194
196
  */
195
197
  async submitRun(options) {
196
198
  if (!options || typeof options !== "object") {
@@ -212,6 +214,12 @@ export class AntpathClient {
212
214
  ...(options.system ? { system: options.system } : {}),
213
215
  prompt,
214
216
  skills: skillRefs,
217
+ // Phase G stub: AgentsMd / File arrays land in the submission
218
+ // wire shape but the SDK client.submitRun() does not yet
219
+ // surface a higher-level API for them — that ships in the
220
+ // dedicated AgentsMd / File commits.
221
+ agentsMd: [],
222
+ files: [],
215
223
  mcpServers: submissionMcpServers,
216
224
  ...(options.environment ? { environment: options.environment } : {}),
217
225
  ...(options.metadata ? { metadata: options.metadata } : {}),
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EAiBX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAkFnC;;;;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,K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;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
@@ -10,6 +10,8 @@
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
+ export { AgentsMd } from "./agents-md.js";
14
+ export type { AgentsMdRecord, AgentsMdUploader } from "./agents-md.js";
13
15
  export { McpServer } from "./mcp-server.js";
14
16
  export { ProxyEndpoint } from "./proxy-endpoint.js";
15
17
  export type { BearerProxyEndpointOptions, BasicProxyEndpointOptions, HeaderProxyEndpointOptions, ProxyEndpointCommonOptions, QueryProxyEndpointOptions } from "./proxy-endpoint.js";
@@ -19,7 +21,7 @@ export { bundleSkillFiles, hashSkillBundle } from "./bundle.js";
19
21
  export type { BundledSkill, SkillFiles } from "./bundle.js";
20
22
  export { AntpathApiError, AntpathError, CleanupError, CredentialValidationError, ProviderError, RunStateError } from "./_shared/index.js";
21
23
  export { MCP_SERVER_NAME_PATTERN, SKILL_BUNDLE_LIMITS, SkillBundleValidationError, buildPlatformAllowedHosts, normaliseSkillBundlePath, validateSkillBundleEntry, validateSkillBundleManifest, validateProxyAuth } from "./_shared/index.js";
22
- export type { McpServerRef, ProviderSkillRef, SkillBundleEntry, SkillBundleManifest, SkillRef, TransientSkillRef, WorkspaceSkillRef } from "./_shared/index.js";
24
+ export type { AgentsMdRef, FileRef, McpServerRef, ProviderSkillRef, SkillBundleEntry, SkillBundleManifest, SkillRef, TransientAgentsMdRef, TransientFileRef, TransientSkillRef, WorkspaceAgentsMdRef, WorkspaceFileRef, WorkspaceSkillRef } from "./_shared/index.js";
23
25
  export type { Output, ProviderEvent, Run, RunEvent, SignedOutputLink, Skill as SkillRecord, UsageSummary, WhoAmI } from "./_shared/index.js";
24
26
  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";
25
27
  export { isAgentCustomToolUse, isAgentEvent, isAgentMcpToolResult, isAgentMcpToolUse, isAgentMessage, isAgentThinking, isAgentToolResult, isAgentToolUse, isSessionError, isSessionEvent, isSessionStatusIdle, isSessionStatusRescheduled, isSessionStatusRunning, isSessionStatusTerminated, isSpanEvent, isUserEvent, isUserMessage } from "./_shared/index.js";
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@
10
10
  export { AntpathClient, RunRef, SkillsClient } from "./client.js";
11
11
  // Composition primitives
12
12
  export { Skill } from "./skill.js";
13
+ export { AgentsMd } from "./agents-md.js";
13
14
  export { McpServer } from "./mcp-server.js";
14
15
  export { ProxyEndpoint } from "./proxy-endpoint.js";
15
16
  export { defineRun } from "./blueprint.js";
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,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC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AAM,iBAAiB,CAAC;AAEzB,yBAAyB;AACzB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAiDzB,oBAAoB;AACpB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,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"}
@@ -14,7 +14,7 @@ import { AntpathClient, defineTemplate, string } from "antpath";
14
14
 
15
15
  const client = new AntpathClient({
16
16
  apiToken: process.env.ANTPATH_API_TOKEN!
17
- // baseUrl defaults to https://antpath.ai — set it for self-hosted deployments.
17
+ // baseUrl defaults to https://www.antpath.ai — set it for self-hosted deployments.
18
18
  });
19
19
 
20
20
  const template = defineTemplate({
package/docs/skills.md CHANGED
@@ -4,16 +4,26 @@ title: Skills
4
4
 
5
5
  # Skills
6
6
 
7
- MVP skill inputs:
7
+ Skill inputs accepted by the platform:
8
8
 
9
- - provider-managed Anthropic skills;
9
+ - provider-managed Anthropic skills (e.g. `xlsx`, `web-search`);
10
10
  - existing custom provider skill IDs;
11
- - local files/directories uploaded as session resources;
12
- - inline skill content uploaded as session resources.
13
-
14
- Local directories are packaged as zip files and mounted under `/antpath/skills/` unless overridden.
15
-
16
- Inline skills are uploaded as markdown files and mounted under `/antpath/skills/` unless overridden.
11
+ - workspace skill bundles (persistent, referenced by `skl_*` id);
12
+ - inline-supplied bundles passed directly at `submitRun` — these
13
+ persist on antpath as workspace skills with auto-suffixed names,
14
+ one row per submission (see "Inline supply" below);
15
+ - inline skill content (markdown strings or local files) mounted as
16
+ session resources for legacy `local` / `inline` skill defs.
17
+
18
+ **Routing at session create:** bundles that contain `SKILL.md` at the
19
+ bundle root are registered with Anthropic's Skills API
20
+ (`POST /v1/skills`) and surface to the agent as auto-discoverable
21
+ skills. Bundles without `SKILL.md` mount under
22
+ `/antpath/assets/<skl_id>/<rel-path>` in the agent container — the
23
+ agent reads them by explicit path reference in the prompt.
24
+
25
+ The platform also mounts the `antpath` CLI at `/antpath/antpath` and a
26
+ per-run manifest at `/antpath/index.json` on **every** run.
17
27
 
18
28
  The platform also mounts the `antpath` CLI at `/antpath/antpath` and a per-run manifest at `/antpath/index.json` on **every** run. Skills can invoke the managed HTTP proxy via `/antpath/antpath proxy …` — see `credentials.md` for the policy/auth model.
19
29
 
@@ -65,3 +75,69 @@ Both return `null` when no live, undeleted skill matches. `findByHash` is an ind
65
75
 
66
76
  Soft-deleted skills are never returned by either method. Runs that pinned a soft-deleted skill at submission time keep working via their snapshot — see `references/architecture-decisions.md` for the full snapshot model.
67
77
 
78
+ ## Inline supply at `submitRun`
79
+
80
+ `Skill.fromFiles({name, files})` and `Skill.fromPath(rootDir, {name})`
81
+ build an **unstaged** `Skill`. The instance carries the canonicalised
82
+ zip bytes and the `sha256:<hex>` content hash, and supports two
83
+ flows:
84
+
85
+ 1. **Persist as a workspace skill first.**
86
+
87
+ ```ts
88
+ const persisted = await Skill.fromFiles({ name, files }).then((d) => d.upload(client));
89
+ await client.submitRun({ model, prompt, skills: [persisted], secrets: { anthropic: { apiKey } } });
90
+ ```
91
+
92
+ Use this when multiple runs share the same logical skill — one
93
+ `skl_*` row, dedup via `uploadIfChanged`. The returned `Skill` is
94
+ workspace-backed and the original instance is marked **consumed**;
95
+ any further use throws.
96
+
97
+ 2. **Inline supply at submitRun.**
98
+
99
+ ```ts
100
+ await client.submitRun({
101
+ model, prompt,
102
+ skills: [await Skill.fromFiles({ name: "rules", files })],
103
+ secrets: { anthropic: { apiKey } }
104
+ });
105
+ ```
106
+
107
+ The SDK sends a multipart body alongside the JSON submission. The
108
+ BFF re-canonicalises the bundle, verifies the advisory hash, and
109
+ persists it as a regular workspace skill — but with an
110
+ **auto-suffixed name** (`rules-x8q7lk2`) so repeated inline
111
+ supplies of the same logical skill across many runs produce
112
+ distinct `skl_*` rows. This is by design: an inline-supplied
113
+ skill is a **per-run artifact** by default. If you want a single
114
+ shared row, use flow 1.
115
+
116
+ ### What auto-suffix looks like
117
+
118
+ Submit `Skill.fromFiles({ name: "rules", files })` three times across
119
+ three runs and the dashboard shows three distinct skills:
120
+
121
+ ```
122
+ rules-x8q7lk2
123
+ rules-mp2vqa1
124
+ rules-az3lkmt
125
+ ```
126
+
127
+ Same prefix, different suffix. Each is a real workspace skill — you
128
+ can list, get, download, and delete it through the regular
129
+ `client.skills.*` verbs.
130
+
131
+ ### Deletion semantics
132
+
133
+ Soft-deleting a skill (`client.skills.delete(skl_id)` or the
134
+ dashboard's Delete button) marks the row tombstoned. Existing runs
135
+ that pinned a snapshot of the skill keep working — they read from
136
+ `run_skill_snapshots` which preserves the name, hash, size, and
137
+ manifest. The run detail view shows a "deleted" badge for those
138
+ orphan references; the download endpoint returns
139
+ **HTTP 410 Gone** with `{ error: { code: "skill_deleted", … } }`
140
+ when the caller tries to fetch the bytes of a deleted skill.
141
+
142
+ New `submitRun` calls referencing a soft-deleted `skl_*` id are
143
+ rejected before insertion.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antpath",
3
- "version": "0.9.1",
3
+ "version": "0.10.4",
4
4
  "description": "TypeScript SDK for running autonomous Claude Managed Agents sessions.",
5
5
  "repository": {
6
6
  "type": "git",