antpath 0.10.14 → 0.11.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/LICENSE +201 -0
- package/README.md +16 -8
- package/dist/_shared/blueprint.d.ts +93 -108
- package/dist/_shared/blueprint.js +144 -78
- package/dist/_shared/cleanup-policy.d.ts +2 -2
- package/dist/_shared/cleanup-policy.js +2 -5
- package/dist/_shared/http.d.ts +2 -2
- package/dist/_shared/index.d.ts +7 -1
- package/dist/_shared/index.js +6 -1
- package/dist/_shared/mcp-proxy-url.d.ts +55 -0
- package/dist/_shared/mcp-proxy-url.js +65 -0
- package/dist/_shared/operations.d.ts +55 -8
- package/dist/_shared/operations.js +163 -20
- package/dist/_shared/provider-proxy-url.d.ts +64 -0
- package/dist/_shared/provider-proxy-url.js +73 -0
- package/dist/_shared/proxy-validation.d.ts +1 -1
- package/dist/_shared/proxy-validation.js +2 -2
- package/dist/_shared/run-unit.d.ts +23 -36
- package/dist/_shared/run-unit.js +30 -46
- package/dist/_shared/runner-event.d.ts +120 -0
- package/dist/_shared/runner-event.js +193 -0
- package/dist/_shared/runner-job.d.ts +159 -0
- package/dist/_shared/runner-job.js +54 -0
- package/dist/_shared/runtime-manifest.d.ts +191 -0
- package/dist/_shared/runtime-manifest.js +221 -0
- package/dist/_shared/runtime-types.d.ts +7 -16
- package/dist/_shared/sse.d.ts +74 -0
- package/dist/_shared/sse.js +0 -0
- package/dist/_shared/stable.d.ts +15 -10
- package/dist/_shared/stable.js +15 -10
- package/dist/_shared/submission.d.ts +199 -73
- package/dist/_shared/submission.js +409 -210
- package/dist/_shared/telemetry.d.ts +2 -2
- package/dist/_shared/telemetry.js +2 -2
- package/dist/_shared/template/index.d.ts +0 -1
- package/dist/_shared/template/index.js +0 -1
- package/dist/agents-md.d.ts +25 -67
- package/dist/agents-md.js +35 -121
- package/dist/agents-md.js.map +1 -1
- package/dist/asset-upload.d.ts +34 -0
- package/dist/asset-upload.js +34 -0
- package/dist/asset-upload.js.map +1 -1
- package/dist/blueprint.d.ts +3 -3
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +1 -1
- package/dist/cli.mjs +559 -105
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +53 -22
- package/dist/client.js +196 -130
- package/dist/client.js.map +1 -1
- package/dist/file.d.ts +28 -94
- package/dist/file.js +35 -175
- package/dist/file.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts +10 -2
- package/dist/mcp-server.js +17 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/skill.d.ts +44 -214
- package/dist/skill.js +50 -284
- package/dist/skill.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/cleanup.md +1 -1
- package/docs/credentials.md +2 -2
- package/docs/events.md +8 -8
- package/docs/outputs.md +2 -0
- package/docs/quickstart.md +18 -2
- package/docs/skills.md +1 -3
- package/docs/templates.md +6 -5
- package/package.json +2 -1
- package/dist/_shared/secrets.d.ts +0 -7
- package/dist/_shared/secrets.js +0 -20
- package/dist/_shared/template/mapper.d.ts +0 -11
- package/dist/_shared/template/mapper.js +0 -70
|
@@ -5,58 +5,124 @@ export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
|
5
5
|
readonly [key: string]: JsonValue;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* Networking + runtime-package snapshot carried
|
|
9
|
-
* so the worker can deep-clone and mutate it per run (e.g. injecting
|
|
10
|
-
*
|
|
8
|
+
* Networking + runtime-package snapshot carried inside a flat submission
|
|
9
|
+
* so the worker can deep-clone and mutate it per run (e.g. injecting the
|
|
10
|
+
* proxy hostname into `allowed_hosts` or the `node` runtime into
|
|
11
11
|
* `packages`) without sharing state across concurrent runs.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `
|
|
13
|
+
* `envVars` is the customer-controlled key/value bag delivered into the
|
|
14
|
+
* container via the mounted `RUNTIME.env` / `RUNTIME.json` files (the
|
|
15
|
+
* Anthropic session API does NOT expose a process env-vars knob today
|
|
16
|
+
* — verified by reading the `/v1/environments` config shape). The same
|
|
17
|
+
* keys become `__KEY__` substitution targets in agent-facing markdown
|
|
18
|
+
* inside skill / agentsmd / file bundles. Antpath-set runtime keys use
|
|
19
|
+
* the reserved `ANTPATH_*` prefix; customer keys MUST NOT collide with
|
|
20
|
+
* that prefix.
|
|
17
21
|
*/
|
|
18
|
-
export interface
|
|
19
|
-
readonly networking?:
|
|
20
|
-
readonly packages?: readonly
|
|
22
|
+
export interface PlatformEnvironment {
|
|
23
|
+
readonly networking?: PlatformNetworking;
|
|
24
|
+
readonly packages?: readonly PlatformPackage[];
|
|
25
|
+
readonly envVars?: Readonly<Record<string, string>>;
|
|
21
26
|
}
|
|
22
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Reserved prefix for antpath-set runtime env vars (`ANTPATH_OUTPUTS`,
|
|
29
|
+
* `ANTPATH_CLI`, …). Customer `environment.envVars` keys carrying this
|
|
30
|
+
* prefix are rejected at submission parse time so platform-set values
|
|
31
|
+
* cannot be silently overwritten.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ANTPATH_RESERVED_ENV_PREFIX = "ANTPATH_";
|
|
34
|
+
/**
|
|
35
|
+
* Maximum number of `environment.envVars` entries accepted per
|
|
36
|
+
* submission. Picked to be generous for real customer config bags
|
|
37
|
+
* (the broll case ships a handful — `BROLL_STORE`, `BROLL_OUTPUTS`,
|
|
38
|
+
* `BROLL_MODE`, …) while still bounding the size of every RUNTIME
|
|
39
|
+
* file we mount into the container.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ENV_VARS_MAX_ENTRIES = 64;
|
|
42
|
+
/** Maximum byte length of a single `environment.envVars` value. */
|
|
43
|
+
export declare const ENV_VARS_MAX_VALUE_BYTES = 4096;
|
|
44
|
+
/** Maximum total byte length of all `environment.envVars` keys+values combined. */
|
|
45
|
+
export declare const ENV_VARS_MAX_TOTAL_BYTES = 65536;
|
|
46
|
+
export interface PlatformNetworking {
|
|
23
47
|
readonly mode: "limited" | "open";
|
|
24
48
|
/** Lowercase host names. The worker always appends the proxy host. */
|
|
25
49
|
readonly allowedHosts?: readonly string[];
|
|
26
50
|
}
|
|
27
|
-
export interface
|
|
51
|
+
export interface PlatformPackage {
|
|
28
52
|
readonly name: string;
|
|
29
53
|
readonly version?: string;
|
|
30
54
|
}
|
|
31
|
-
export interface PlatformTemplateSubmission {
|
|
32
|
-
readonly name: string;
|
|
33
|
-
readonly model: string;
|
|
34
|
-
readonly templateHash: string;
|
|
35
|
-
readonly system?: string;
|
|
36
|
-
readonly messages: readonly string[];
|
|
37
|
-
readonly metadata?: Record<string, JsonValue>;
|
|
38
|
-
readonly environment?: PlatformTemplateEnvironment;
|
|
39
|
-
}
|
|
40
|
-
export type PlatformClaudeSessionCleanup = "retain" | "delete";
|
|
41
55
|
export type PlatformSessionCleanup = "retain" | "delete";
|
|
42
56
|
export interface PlatformCleanupPolicy {
|
|
43
57
|
readonly session?: PlatformSessionCleanup;
|
|
44
|
-
/** @deprecated use `session` instead. Accepted for one release for back-compat. */
|
|
45
|
-
readonly claudeSession?: PlatformClaudeSessionCleanup;
|
|
46
58
|
}
|
|
47
59
|
export interface PlatformAnthropicSecrets {
|
|
48
60
|
readonly apiKey: string;
|
|
49
61
|
readonly baseUrl?: string;
|
|
50
62
|
}
|
|
63
|
+
export interface PlatformDeepseekSecrets {
|
|
64
|
+
readonly apiKey: string;
|
|
65
|
+
readonly baseUrl?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface PlatformOpenAISecrets {
|
|
68
|
+
readonly apiKey: string;
|
|
69
|
+
readonly baseUrl?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface PlatformGeminiSecrets {
|
|
72
|
+
readonly apiKey: string;
|
|
73
|
+
readonly baseUrl?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface PlatformMistralSecrets {
|
|
76
|
+
readonly apiKey: string;
|
|
77
|
+
readonly baseUrl?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Run-time provider selector. Antpath exposes one customer interface
|
|
81
|
+
* for every provider; the runtime that backs each provider is decided
|
|
82
|
+
* by {@link selectRuntime}.
|
|
83
|
+
*
|
|
84
|
+
* - `anthropic` — defaults to the Anthropic Native runtime (Anthropic
|
|
85
|
+
* Managed Agents API). Customers can opt into the
|
|
86
|
+
* Goose Managed runtime via `runtime: "managed"`.
|
|
87
|
+
* - `deepseek` | `openai` | `gemini` | `mistral` — only the Goose
|
|
88
|
+
* Managed runtime is supported (LiteLLM-gateway'd
|
|
89
|
+
* call into the upstream).
|
|
90
|
+
*
|
|
91
|
+
* See `references/platform-rebuild-2026.md`.
|
|
92
|
+
*/
|
|
93
|
+
export declare const RUN_PROVIDERS: readonly ["anthropic", "deepseek", "openai", "gemini", "mistral"];
|
|
94
|
+
export type RunProvider = (typeof RUN_PROVIDERS)[number];
|
|
95
|
+
export declare const DEFAULT_RUN_PROVIDER: RunProvider;
|
|
96
|
+
/**
|
|
97
|
+
* Customer-facing runtime selector. Optional on the wire — absent means
|
|
98
|
+
* "let the dispatcher route based on provider" ({@link selectRuntime}).
|
|
99
|
+
*
|
|
100
|
+
* - `native` — Anthropic Native runtime. Only valid for
|
|
101
|
+
* `provider: "anthropic"`. Routes through Anthropic's
|
|
102
|
+
* Managed Agents API.
|
|
103
|
+
* - `managed` — Goose Managed runtime. The only option for
|
|
104
|
+
* non-Anthropic providers; also available as an opt-out
|
|
105
|
+
* for `provider: "anthropic"` when the customer wants
|
|
106
|
+
* cross-provider parity.
|
|
107
|
+
*
|
|
108
|
+
* Stored verbatim in `runs.runtime`. See
|
|
109
|
+
* `references/platform-rebuild-2026.md` (Runtime dispatcher logic).
|
|
110
|
+
*/
|
|
111
|
+
export declare const RUNTIME_KINDS: readonly ["native", "managed"];
|
|
112
|
+
export type RuntimeKind = (typeof RUNTIME_KINDS)[number];
|
|
113
|
+
/**
|
|
114
|
+
* Providers whose runtime is implemented by Anthropic Native. Every
|
|
115
|
+
* other provider in {@link RUN_PROVIDERS} routes through Goose Managed.
|
|
116
|
+
* Kept as a constant so the dispatcher logic and the validation tests
|
|
117
|
+
* share one source of truth.
|
|
118
|
+
*/
|
|
119
|
+
export declare const NATIVE_RUNTIME_PROVIDERS: readonly ["anthropic"];
|
|
120
|
+
export type NativeRuntimeProvider = (typeof NATIVE_RUNTIME_PROVIDERS)[number];
|
|
51
121
|
export interface PlatformMcpServerSecret {
|
|
52
122
|
readonly name: string;
|
|
53
123
|
readonly url: string;
|
|
54
124
|
readonly headers?: Record<string, string>;
|
|
55
125
|
}
|
|
56
|
-
export interface PlatformSkillReference {
|
|
57
|
-
readonly skillId: string;
|
|
58
|
-
readonly version?: string;
|
|
59
|
-
}
|
|
60
126
|
/**
|
|
61
127
|
* Per-run auth value for a declared proxy endpoint. The `name` must
|
|
62
128
|
* match a `proxyEndpoints[i].name` in the same submission, and `value`'s
|
|
@@ -81,10 +147,23 @@ export type PlatformProxyAuthValue = {
|
|
|
81
147
|
readonly type: "query";
|
|
82
148
|
readonly value: string;
|
|
83
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Per-run inline secrets bundle. Exactly one of `anthropic` | `deepseek`
|
|
152
|
+
* | `openai` | `gemini` | `mistral` is required, matching the run's
|
|
153
|
+
* `provider`; the cross-provider coupling is enforced in
|
|
154
|
+
* `parseRunSubmissionRequest` so the wire shape stays simple and
|
|
155
|
+
* individual provider keys remain optional in the type system.
|
|
156
|
+
* `mcpServers` and `proxyEndpointAuth` are cross-provider (an MCP
|
|
157
|
+
* credential is the same secret whether Anthropic or another model is
|
|
158
|
+
* driving the MCP client).
|
|
159
|
+
*/
|
|
84
160
|
export interface PlatformInlineSecrets {
|
|
85
|
-
readonly anthropic
|
|
161
|
+
readonly anthropic?: PlatformAnthropicSecrets;
|
|
162
|
+
readonly deepseek?: PlatformDeepseekSecrets;
|
|
163
|
+
readonly openai?: PlatformOpenAISecrets;
|
|
164
|
+
readonly gemini?: PlatformGeminiSecrets;
|
|
165
|
+
readonly mistral?: PlatformMistralSecrets;
|
|
86
166
|
readonly mcpServers?: readonly PlatformMcpServerSecret[];
|
|
87
|
-
readonly skills?: readonly PlatformSkillReference[];
|
|
88
167
|
readonly proxyEndpointAuth?: readonly PlatformProxyEndpointAuth[];
|
|
89
168
|
}
|
|
90
169
|
/**
|
|
@@ -111,37 +190,6 @@ export interface PlatformProxyEndpoint {
|
|
|
111
190
|
readonly perCallBudget?: number;
|
|
112
191
|
readonly responseByteBudget?: number;
|
|
113
192
|
}
|
|
114
|
-
export interface PlatformRunSubmissionRequest {
|
|
115
|
-
readonly workspaceId: string;
|
|
116
|
-
readonly idempotencyKey: string;
|
|
117
|
-
readonly template: PlatformTemplateSubmission;
|
|
118
|
-
readonly variables?: Record<string, JsonValue>;
|
|
119
|
-
readonly cleanup?: PlatformCleanupPolicy;
|
|
120
|
-
readonly secrets: PlatformInlineSecrets;
|
|
121
|
-
/**
|
|
122
|
-
* Declared HTTP endpoints reachable via the antpath managed proxy
|
|
123
|
-
* during this run. Empty array (or omitted) → no proxy surface is
|
|
124
|
-
* provisioned; the per-run manifest the CLI reads
|
|
125
|
-
* (`/mnt/session/uploads/antpath/index.json` in-container) shows
|
|
126
|
-
* `endpoints: []` and the `run-token` mount is omitted.
|
|
127
|
-
*/
|
|
128
|
-
readonly proxyEndpoints?: readonly PlatformProxyEndpoint[];
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Wire shape posted by the SDK and CLI. `workspaceId` is **omitted by
|
|
132
|
-
* design** — token-authenticated clients never name the workspace
|
|
133
|
-
* because it is derived from their API token on the server. The BFF
|
|
134
|
-
* route resolves the workspace from the token and injects it before
|
|
135
|
-
* calling `parseRunSubmissionRequest`. The dashboard UI (Auth.js user
|
|
136
|
-
* principal, multi-workspace) is the only caller that supplies
|
|
137
|
-
* `workspaceId` itself.
|
|
138
|
-
*
|
|
139
|
-
* See `references/development-principles.md` (Agent-first surface
|
|
140
|
-
* design, Concrete rule 3).
|
|
141
|
-
*/
|
|
142
|
-
export type PlatformRunSubmissionInput = Omit<PlatformRunSubmissionRequest, "workspaceId"> & {
|
|
143
|
-
readonly workspaceId?: string;
|
|
144
|
-
};
|
|
145
193
|
/**
|
|
146
194
|
* Default caps for a proxy endpoint when the submission doesn't specify
|
|
147
195
|
* one. Conservative on purpose. Operators can override the platform-
|
|
@@ -156,7 +204,6 @@ export declare const PROXY_ENDPOINT_DEFAULTS: {
|
|
|
156
204
|
readonly perCallBudget: 60;
|
|
157
205
|
readonly responseByteBudget: number;
|
|
158
206
|
};
|
|
159
|
-
export declare function parseRunSubmissionRequest(input: unknown): PlatformRunSubmissionRequest;
|
|
160
207
|
/**
|
|
161
208
|
* Wire-level submission posted to /api/runs in the flat surface. The
|
|
162
209
|
* `prompt` is always an array internally so the worker, the audit log,
|
|
@@ -168,7 +215,7 @@ export declare function parseRunSubmissionRequest(input: unknown): PlatformRunSu
|
|
|
168
215
|
* `skill_bundles.id` (validated by the BFF before acceptance and pinned
|
|
169
216
|
* into `run_skill_snapshots`), provider refs pass through unchanged.
|
|
170
217
|
*/
|
|
171
|
-
export interface
|
|
218
|
+
export interface PlatformSubmission {
|
|
172
219
|
readonly model: string;
|
|
173
220
|
readonly system?: string;
|
|
174
221
|
readonly prompt: readonly string[];
|
|
@@ -176,7 +223,7 @@ export interface PlatformFlatSubmission {
|
|
|
176
223
|
readonly agentsMd: readonly AgentsMdRef[];
|
|
177
224
|
readonly files: readonly FileRef[];
|
|
178
225
|
readonly mcpServers: readonly McpServerRef[];
|
|
179
|
-
readonly environment?:
|
|
226
|
+
readonly environment?: PlatformEnvironment;
|
|
180
227
|
readonly metadata?: Record<string, JsonValue>;
|
|
181
228
|
/**
|
|
182
229
|
* Opt-in container paths to capture as `output_objects` at session
|
|
@@ -200,22 +247,101 @@ export interface PlatformFlatSubmission {
|
|
|
200
247
|
*/
|
|
201
248
|
readonly outputDirs?: readonly string[];
|
|
202
249
|
}
|
|
203
|
-
export interface
|
|
250
|
+
export interface PlatformRunSubmissionRequest {
|
|
204
251
|
readonly workspaceId: string;
|
|
205
252
|
readonly idempotencyKey: string;
|
|
206
|
-
|
|
253
|
+
/**
|
|
254
|
+
* Provider selector. Always populated after parsing — absent on the
|
|
255
|
+
* wire means {@link DEFAULT_RUN_PROVIDER}. The runtime selector
|
|
256
|
+
* ({@link selectRuntime}) decides which Workflow class the run is
|
|
257
|
+
* dispatched to. See `references/platform-rebuild-2026.md`.
|
|
258
|
+
*/
|
|
259
|
+
readonly provider: RunProvider;
|
|
260
|
+
/**
|
|
261
|
+
* Customer's explicit runtime choice. `undefined` (the default) lets
|
|
262
|
+
* {@link selectRuntime} auto-route based on `provider`. When set,
|
|
263
|
+
* `parseRunSubmissionRequest` already verified that the choice is
|
|
264
|
+
* compatible with `provider`; the dispatcher still re-validates
|
|
265
|
+
* feature compatibility before enqueueing.
|
|
266
|
+
*/
|
|
267
|
+
readonly runtime?: RuntimeKind;
|
|
268
|
+
readonly submission: PlatformSubmission;
|
|
207
269
|
readonly cleanup?: PlatformCleanupPolicy;
|
|
208
270
|
readonly secrets: PlatformInlineSecrets;
|
|
209
271
|
readonly proxyEndpoints?: readonly PlatformProxyEndpoint[];
|
|
210
272
|
}
|
|
211
273
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
274
|
+
* Wire shape posted by the SDK and CLI. `workspaceId` is **omitted by
|
|
275
|
+
* design** — token-authenticated clients never name the workspace
|
|
276
|
+
* because it is derived from their API token on the server. The BFF
|
|
277
|
+
* route resolves the workspace from the token and injects it before
|
|
278
|
+
* calling the parser. The dashboard UI (Auth.js user principal,
|
|
279
|
+
* multi-workspace) is the only caller that supplies `workspaceId`
|
|
280
|
+
* itself.
|
|
281
|
+
*
|
|
282
|
+
* `provider` is also optional on the wire — absent means
|
|
283
|
+
* {@link DEFAULT_RUN_PROVIDER} (`anthropic`). The parser fills it in
|
|
284
|
+
* before the value enters the run snapshot. See
|
|
285
|
+
* `references/development-principles.md` (Agent-first surface design,
|
|
286
|
+
* Concrete rule 3) and `references/deepseek-runtime-mcp-plan.md`.
|
|
217
287
|
*/
|
|
218
|
-
export type
|
|
288
|
+
export type PlatformRunSubmissionInput = Omit<PlatformRunSubmissionRequest, "workspaceId" | "provider" | "runtime"> & {
|
|
219
289
|
readonly workspaceId?: string;
|
|
290
|
+
readonly provider?: RunProvider;
|
|
291
|
+
/**
|
|
292
|
+
* Optional runtime opt-out. Set `"managed"` to force the Goose
|
|
293
|
+
* Managed runtime (rejects features that only work natively).
|
|
294
|
+
* `"native"` is only valid when `provider === "anthropic"`.
|
|
295
|
+
* Absent = auto-route. See {@link selectRuntime}.
|
|
296
|
+
*/
|
|
297
|
+
readonly runtime?: RuntimeKind;
|
|
220
298
|
};
|
|
221
|
-
export declare function
|
|
299
|
+
export declare function parseRunSubmissionRequest(input: unknown): PlatformRunSubmissionRequest;
|
|
300
|
+
/**
|
|
301
|
+
* Codes the dispatcher emits when a submission can't be served by the
|
|
302
|
+
* selected runtime. Surfaced both at parse time (cross-field shape
|
|
303
|
+
* mismatch) and at dispatch time (feature mismatch). Code values are
|
|
304
|
+
* stable so dashboard / SDK error rendering can branch on them.
|
|
305
|
+
*/
|
|
306
|
+
export declare const RUNTIME_VALIDATION_CODES: readonly ["runtime_native_unsupported", "feature_runtime_mismatch"];
|
|
307
|
+
export type RuntimeValidationCode = (typeof RUNTIME_VALIDATION_CODES)[number];
|
|
308
|
+
/**
|
|
309
|
+
* Thrown by `parseRunSubmissionRequest` (wire-shape mismatch) and by
|
|
310
|
+
* `selectRuntime` (feature mismatch) when the submitted run cannot be
|
|
311
|
+
* served by the chosen runtime. The `code` field is part of the public
|
|
312
|
+
* contract — keep it stable when phrasings change.
|
|
313
|
+
*/
|
|
314
|
+
export declare class RuntimeValidationError extends Error {
|
|
315
|
+
readonly code: RuntimeValidationCode;
|
|
316
|
+
constructor(code: RuntimeValidationCode, message: string);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Walk the parsed submission and collect every feature that **only**
|
|
320
|
+
* works on the Anthropic Native runtime. Today the only such feature
|
|
321
|
+
* is a provider built-in skill ref (`Skill.provider(...)` — the
|
|
322
|
+
* Anthropic Skills API is the resolver). Adding a new native-only
|
|
323
|
+
* feature means extending this function AND the matching error string
|
|
324
|
+
* in {@link selectRuntime}.
|
|
325
|
+
*
|
|
326
|
+
* Exported because Phase 5's runtime dispatcher route handler reuses
|
|
327
|
+
* it to format the API error body and the dashboard reuses it to point
|
|
328
|
+
* the user at the offending submission field.
|
|
329
|
+
*/
|
|
330
|
+
export declare function collectNativeOnlyFeatures(req: PlatformRunSubmissionRequest): string[];
|
|
331
|
+
/**
|
|
332
|
+
* The runtime dispatcher. Pure function with no I/O — call it after
|
|
333
|
+
* `parseRunSubmissionRequest` to decide which Workflow class consumes
|
|
334
|
+
* the run.
|
|
335
|
+
*
|
|
336
|
+
* 1. If the customer set `runtime` explicitly, validate that choice
|
|
337
|
+
* against the submission's provider and feature set. Reject with
|
|
338
|
+
* a typed error on mismatch — no silent re-routing.
|
|
339
|
+
* 2. Otherwise auto-route: `provider: "anthropic"` → `"native"` (the
|
|
340
|
+
* cheapest + fastest path for Anthropic runs); everything else →
|
|
341
|
+
* `"managed"`.
|
|
342
|
+
*
|
|
343
|
+
* Returns the resolved {@link RuntimeKind}; the Workflow dispatcher
|
|
344
|
+
* (Phase 5) maps that 1:1 to the matching `WorkflowEntrypoint` class.
|
|
345
|
+
* See `references/platform-rebuild-2026.md` (Runtime dispatcher logic).
|
|
346
|
+
*/
|
|
347
|
+
export declare function selectRuntime(req: PlatformRunSubmissionRequest): RuntimeKind;
|