@aexhq/sdk 0.46.5-canary → 0.50.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/NOTICE +38 -0
- package/README.md +23 -31
- package/dist/client/aex.d.ts +33 -0
- package/dist/client/aex.js +98 -0
- package/dist/client/aex.js.map +1 -0
- package/dist/client/credentials.d.ts +25 -0
- package/dist/client/credentials.js +97 -0
- package/dist/client/credentials.js.map +1 -0
- package/dist/client/routing.d.ts +7 -0
- package/dist/client/routing.js +29 -0
- package/dist/client/routing.js.map +1 -0
- package/dist/downloads/download.d.ts +25 -0
- package/dist/downloads/download.js +53 -0
- package/dist/downloads/download.js.map +1 -0
- package/dist/generated/errors.d.ts +12 -0
- package/dist/generated/errors.js +81 -0
- package/dist/generated/errors.js.map +1 -0
- package/dist/generated/resources.d.ts +730 -0
- package/dist/generated/resources.js +606 -0
- package/dist/generated/resources.js.map +1 -0
- package/dist/generated/routes.d.ts +42 -0
- package/dist/generated/routes.js +2101 -0
- package/dist/generated/routes.js.map +1 -0
- package/dist/index.d.ts +20 -50
- package/dist/index.js +11 -62
- package/dist/index.js.map +1 -1
- package/dist/observations/stream.d.ts +1 -0
- package/dist/observations/stream.js +18 -0
- package/dist/observations/stream.js.map +1 -0
- package/dist/transport/errors.d.ts +60 -0
- package/dist/transport/errors.js +107 -0
- package/dist/transport/errors.js.map +1 -0
- package/dist/transport/pagination.d.ts +8 -0
- package/dist/transport/pagination.js +34 -0
- package/dist/transport/pagination.js.map +1 -0
- package/dist/transport/retry.d.ts +21 -0
- package/dist/transport/retry.js +37 -0
- package/dist/transport/retry.js.map +1 -0
- package/dist/transport/transport.d.ts +25 -0
- package/dist/transport/transport.js +28 -0
- package/dist/transport/transport.js.map +1 -0
- package/package.json +63 -30
- package/dist/_contracts/account-operations.d.ts +0 -101
- package/dist/_contracts/account-operations.js +0 -242
- package/dist/_contracts/account-types.d.ts +0 -461
- package/dist/_contracts/account-types.js +0 -1
- package/dist/_contracts/api-key.d.ts +0 -61
- package/dist/_contracts/api-key.js +0 -101
- package/dist/_contracts/api-routes.d.ts +0 -20
- package/dist/_contracts/api-routes.js +0 -109
- package/dist/_contracts/archive-limits.d.ts +0 -3
- package/dist/_contracts/archive-limits.js +0 -23
- package/dist/_contracts/asset-authoring.d.ts +0 -22
- package/dist/_contracts/asset-authoring.js +0 -106
- package/dist/_contracts/asset-bundle.d.ts +0 -64
- package/dist/_contracts/asset-bundle.js +0 -263
- package/dist/_contracts/asset-upload-helper.d.ts +0 -31
- package/dist/_contracts/asset-upload-helper.js +0 -84
- package/dist/_contracts/billing-admission.d.ts +0 -29
- package/dist/_contracts/billing-admission.js +0 -28
- package/dist/_contracts/bundle-manifest.d.ts +0 -89
- package/dist/_contracts/bundle-manifest.js +0 -158
- package/dist/_contracts/canonical-sha256.d.ts +0 -8
- package/dist/_contracts/canonical-sha256.js +0 -8
- package/dist/_contracts/connection-ticket.d.ts +0 -22
- package/dist/_contracts/connection-ticket.js +0 -54
- package/dist/_contracts/continuation-event.d.ts +0 -31
- package/dist/_contracts/continuation-event.js +0 -6
- package/dist/_contracts/contract-parse-error.d.ts +0 -12
- package/dist/_contracts/contract-parse-error.js +0 -51
- package/dist/_contracts/error-codes.d.ts +0 -26
- package/dist/_contracts/error-codes.js +0 -116
- package/dist/_contracts/error-factory.d.ts +0 -32
- package/dist/_contracts/error-factory.js +0 -174
- package/dist/_contracts/event-envelope.d.ts +0 -471
- package/dist/_contracts/event-envelope.js +0 -501
- package/dist/_contracts/event-stream-client.d.ts +0 -122
- package/dist/_contracts/event-stream-client.js +0 -445
- package/dist/_contracts/event-view.d.ts +0 -44
- package/dist/_contracts/event-view.js +0 -69
- package/dist/_contracts/failure-class.d.ts +0 -29
- package/dist/_contracts/failure-class.js +0 -73
- package/dist/_contracts/http.d.ts +0 -135
- package/dist/_contracts/http.js +0 -434
- package/dist/_contracts/ids.d.ts +0 -66
- package/dist/_contracts/ids.js +0 -119
- package/dist/_contracts/index.d.ts +0 -42
- package/dist/_contracts/index.js +0 -52
- package/dist/_contracts/internal.d.ts +0 -55
- package/dist/_contracts/internal.js +0 -113
- package/dist/_contracts/models.d.ts +0 -30
- package/dist/_contracts/models.js +0 -28
- package/dist/_contracts/operation-core.d.ts +0 -36
- package/dist/_contracts/operation-core.js +0 -70
- package/dist/_contracts/operations.d.ts +0 -218
- package/dist/_contracts/operations.js +0 -1496
- package/dist/_contracts/otlp-projection.d.ts +0 -78
- package/dist/_contracts/otlp-projection.js +0 -171
- package/dist/_contracts/post-hook.d.ts +0 -31
- package/dist/_contracts/post-hook.js +0 -61
- package/dist/_contracts/provider-fault.d.ts +0 -34
- package/dist/_contracts/provider-fault.js +0 -68
- package/dist/_contracts/retry-core.d.ts +0 -29
- package/dist/_contracts/retry-core.js +0 -79
- package/dist/_contracts/runner-event.d.ts +0 -117
- package/dist/_contracts/runner-event.js +0 -172
- package/dist/_contracts/runtime-kind.d.ts +0 -60
- package/dist/_contracts/runtime-kind.js +0 -70
- package/dist/_contracts/runtime-manifest.d.ts +0 -121
- package/dist/_contracts/runtime-manifest.js +0 -83
- package/dist/_contracts/runtime-security-profile.d.ts +0 -26
- package/dist/_contracts/runtime-security-profile.js +0 -73
- package/dist/_contracts/runtime-sizes.d.ts +0 -104
- package/dist/_contracts/runtime-sizes.js +0 -111
- package/dist/_contracts/runtime-types.d.ts +0 -618
- package/dist/_contracts/runtime-types.js +0 -58
- package/dist/_contracts/schemas/asset-bundle.d.ts +0 -70
- package/dist/_contracts/schemas/asset-bundle.js +0 -107
- package/dist/_contracts/schemas/asset-ref.d.ts +0 -61
- package/dist/_contracts/schemas/asset-ref.js +0 -118
- package/dist/_contracts/schemas/bundle-manifest.d.ts +0 -66
- package/dist/_contracts/schemas/bundle-manifest.js +0 -77
- package/dist/_contracts/schemas/index.d.ts +0 -32
- package/dist/_contracts/schemas/index.js +0 -30
- package/dist/_contracts/schemas/mcp-server.d.ts +0 -99
- package/dist/_contracts/schemas/mcp-server.js +0 -209
- package/dist/_contracts/schemas/models.d.ts +0 -29
- package/dist/_contracts/schemas/models.js +0 -51
- package/dist/_contracts/schemas/numeric.d.ts +0 -18
- package/dist/_contracts/schemas/numeric.js +0 -28
- package/dist/_contracts/schemas/post-hook.d.ts +0 -45
- package/dist/_contracts/schemas/post-hook.js +0 -68
- package/dist/_contracts/schemas/response-assets.d.ts +0 -75
- package/dist/_contracts/schemas/response-assets.js +0 -81
- package/dist/_contracts/schemas/response-billing.d.ts +0 -208
- package/dist/_contracts/schemas/response-billing.js +0 -139
- package/dist/_contracts/schemas/response-common.d.ts +0 -132
- package/dist/_contracts/schemas/response-common.js +0 -162
- package/dist/_contracts/schemas/response-identity.d.ts +0 -648
- package/dist/_contracts/schemas/response-identity.js +0 -131
- package/dist/_contracts/schemas/response-mcp-servers.d.ts +0 -51
- package/dist/_contracts/schemas/response-mcp-servers.js +0 -32
- package/dist/_contracts/schemas/response-secrets.d.ts +0 -50
- package/dist/_contracts/schemas/response-secrets.js +0 -32
- package/dist/_contracts/schemas/response-sessions-internal.d.ts +0 -200
- package/dist/_contracts/schemas/response-sessions-internal.js +0 -142
- package/dist/_contracts/schemas/response-sessions.d.ts +0 -1598
- package/dist/_contracts/schemas/response-sessions.js +0 -377
- package/dist/_contracts/schemas/response-webhooks.d.ts +0 -76
- package/dist/_contracts/schemas/response-webhooks.js +0 -42
- package/dist/_contracts/schemas/response-workspace.d.ts +0 -225
- package/dist/_contracts/schemas/response-workspace.js +0 -99
- package/dist/_contracts/schemas/runtime-kind.d.ts +0 -31
- package/dist/_contracts/schemas/runtime-kind.js +0 -29
- package/dist/_contracts/schemas/runtime-security-profile.d.ts +0 -28
- package/dist/_contracts/schemas/runtime-security-profile.js +0 -26
- package/dist/_contracts/schemas/runtime-sizes.d.ts +0 -70
- package/dist/_contracts/schemas/runtime-sizes.js +0 -127
- package/dist/_contracts/schemas/session-limits.d.ts +0 -34
- package/dist/_contracts/schemas/session-limits.js +0 -39
- package/dist/_contracts/schemas/session-machine.d.ts +0 -23
- package/dist/_contracts/schemas/session-machine.js +0 -24
- package/dist/_contracts/schemas/session-request-config.d.ts +0 -58
- package/dist/_contracts/schemas/session-request-config.js +0 -134
- package/dist/_contracts/schemas/session-webhook.d.ts +0 -11
- package/dist/_contracts/schemas/session-webhook.js +0 -38
- package/dist/_contracts/schemas/side-effect-audit.d.ts +0 -98
- package/dist/_contracts/schemas/side-effect-audit.js +0 -102
- package/dist/_contracts/schemas/submission-assets.d.ts +0 -117
- package/dist/_contracts/schemas/submission-assets.js +0 -147
- package/dist/_contracts/schemas/submission-body.d.ts +0 -251
- package/dist/_contracts/schemas/submission-body.js +0 -378
- package/dist/_contracts/schemas/submission-environment.d.ts +0 -79
- package/dist/_contracts/schemas/submission-environment.js +0 -179
- package/dist/_contracts/schemas/submission-request.d.ts +0 -158
- package/dist/_contracts/schemas/submission-request.js +0 -49
- package/dist/_contracts/schemas/submission-secrets.d.ts +0 -47
- package/dist/_contracts/schemas/submission-secrets.js +0 -108
- package/dist/_contracts/schemas/wire.d.ts +0 -118
- package/dist/_contracts/schemas/wire.js +0 -171
- package/dist/_contracts/schemas/workspace-resources.d.ts +0 -50
- package/dist/_contracts/schemas/workspace-resources.js +0 -87
- package/dist/_contracts/sdk-errors.d.ts +0 -212
- package/dist/_contracts/sdk-errors.js +0 -313
- package/dist/_contracts/sdk-secrets.d.ts +0 -67
- package/dist/_contracts/sdk-secrets.js +0 -427
- package/dist/_contracts/session-archive.d.ts +0 -16
- package/dist/_contracts/session-archive.js +0 -92
- package/dist/_contracts/session-artifacts.d.ts +0 -189
- package/dist/_contracts/session-artifacts.js +0 -264
- package/dist/_contracts/session-config.d.ts +0 -373
- package/dist/_contracts/session-config.js +0 -562
- package/dist/_contracts/session-cost-types.d.ts +0 -211
- package/dist/_contracts/session-cost-types.js +0 -69
- package/dist/_contracts/session-cost.d.ts +0 -8
- package/dist/_contracts/session-cost.js +0 -582
- package/dist/_contracts/session-custody.d.ts +0 -165
- package/dist/_contracts/session-custody.js +0 -345
- package/dist/_contracts/session-file-query.d.ts +0 -14
- package/dist/_contracts/session-file-query.js +0 -178
- package/dist/_contracts/session-record.d.ts +0 -112
- package/dist/_contracts/session-record.js +0 -165
- package/dist/_contracts/session-retention.d.ts +0 -201
- package/dist/_contracts/session-retention.js +0 -450
- package/dist/_contracts/side-effect-audit.d.ts +0 -126
- package/dist/_contracts/side-effect-audit.js +0 -520
- package/dist/_contracts/sse.d.ts +0 -74
- package/dist/_contracts/sse.js +0 -227
- package/dist/_contracts/stable.d.ts +0 -45
- package/dist/_contracts/stable.js +0 -62
- package/dist/_contracts/status.d.ts +0 -25
- package/dist/_contracts/status.js +0 -57
- package/dist/_contracts/submission-limits.d.ts +0 -61
- package/dist/_contracts/submission-limits.js +0 -60
- package/dist/_contracts/submission.d.ts +0 -547
- package/dist/_contracts/submission.js +0 -812
- package/dist/_contracts/suggest.d.ts +0 -15
- package/dist/_contracts/suggest.js +0 -53
- package/dist/_contracts/testing/response-bindings.d.ts +0 -45
- package/dist/_contracts/testing/response-bindings.js +0 -256
- package/dist/_contracts/testing/wire-conformance-entry.d.ts +0 -10
- package/dist/_contracts/testing/wire-conformance-entry.js +0 -8
- package/dist/_contracts/testing/wire-conformance.d.ts +0 -169
- package/dist/_contracts/testing/wire-conformance.js +0 -276
- package/dist/_contracts/turn-trace.d.ts +0 -28
- package/dist/_contracts/turn-trace.js +0 -1
- package/dist/_contracts/unknown-field-error.d.ts +0 -13
- package/dist/_contracts/unknown-field-error.js +0 -21
- package/dist/_contracts/value-guards.d.ts +0 -20
- package/dist/_contracts/value-guards.js +0 -34
- package/dist/_contracts/webhook-verify.d.ts +0 -34
- package/dist/_contracts/webhook-verify.js +0 -93
- package/dist/_contracts/wire-observer.d.ts +0 -49
- package/dist/_contracts/wire-observer.js +0 -34
- package/dist/_contracts/workflow-status.d.ts +0 -7
- package/dist/_contracts/workflow-status.js +0 -43
- package/dist/_contracts/workspace-resources.d.ts +0 -98
- package/dist/_contracts/workspace-resources.js +0 -39
- package/dist/archive-limits.d.ts +0 -1
- package/dist/archive-limits.js +0 -2
- package/dist/archive-limits.js.map +0 -1
- package/dist/asset-upload.d.ts +0 -47
- package/dist/asset-upload.js +0 -269
- package/dist/asset-upload.js.map +0 -1
- package/dist/bundle.d.ts +0 -9
- package/dist/bundle.js +0 -20
- package/dist/bundle.js.map +0 -1
- package/dist/canonical-zip.d.ts +0 -68
- package/dist/canonical-zip.js +0 -355
- package/dist/canonical-zip.js.map +0 -1
- package/dist/cli.mjs +0 -12048
- package/dist/cli.mjs.sha256 +0 -1
- package/dist/client-types.d.ts +0 -192
- package/dist/client-types.js +0 -2
- package/dist/client-types.js.map +0 -1
- package/dist/client.d.ts +0 -464
- package/dist/client.js +0 -1207
- package/dist/client.js.map +0 -1
- package/dist/event-projection.d.ts +0 -22
- package/dist/event-projection.js +0 -380
- package/dist/event-projection.js.map +0 -1
- package/dist/fetch-archive.d.ts +0 -16
- package/dist/fetch-archive.js +0 -252
- package/dist/fetch-archive.js.map +0 -1
- package/dist/file.d.ts +0 -96
- package/dist/file.js +0 -272
- package/dist/file.js.map +0 -1
- package/dist/instructions.d.ts +0 -20
- package/dist/instructions.js +0 -40
- package/dist/instructions.js.map +0 -1
- package/dist/legacy-session-provider-fault.d.ts +0 -7
- package/dist/legacy-session-provider-fault.js +0 -38
- package/dist/legacy-session-provider-fault.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -84
- package/dist/mcp-server.js +0 -117
- package/dist/mcp-server.js.map +0 -1
- package/dist/node-fs.d.ts +0 -29
- package/dist/node-fs.js +0 -19
- package/dist/node-fs.js.map +0 -1
- package/dist/node-walk.d.ts +0 -69
- package/dist/node-walk.js +0 -151
- package/dist/node-walk.js.map +0 -1
- package/dist/path-basename.d.ts +0 -5
- package/dist/path-basename.js +0 -9
- package/dist/path-basename.js.map +0 -1
- package/dist/retry.d.ts +0 -70
- package/dist/retry.js +0 -155
- package/dist/retry.js.map +0 -1
- package/dist/secret.d.ts +0 -65
- package/dist/secret.js +0 -110
- package/dist/secret.js.map +0 -1
- package/dist/session-validate.d.ts +0 -100
- package/dist/session-validate.js +0 -303
- package/dist/session-validate.js.map +0 -1
- package/dist/skill.d.ts +0 -99
- package/dist/skill.js +0 -169
- package/dist/skill.js.map +0 -1
- package/dist/submission-wire.d.ts +0 -13
- package/dist/submission-wire.js +0 -69
- package/dist/submission-wire.js.map +0 -1
- package/dist/tool.d.ts +0 -41
- package/dist/tool.js +0 -76
- package/dist/tool.js.map +0 -1
- package/dist/version.d.ts +0 -9
- package/dist/version.js +0 -10
- package/dist/version.js.map +0 -1
- package/docs/authentication.md +0 -125
- package/docs/billing.md +0 -164
- package/docs/cleanup.md +0 -27
- package/docs/concepts/agent-tools.md +0 -47
- package/docs/concepts/composition.md +0 -60
- package/docs/concepts/providers-and-runtimes.md +0 -121
- package/docs/concepts/sessions.md +0 -51
- package/docs/concepts/subagents.md +0 -35
- package/docs/credentials.md +0 -116
- package/docs/defaults.md +0 -51
- package/docs/errors.md +0 -258
- package/docs/events.md +0 -143
- package/docs/files.md +0 -130
- package/docs/limits-and-quotas.md +0 -114
- package/docs/limits.md +0 -51
- package/docs/mcp.md +0 -47
- package/docs/networking.md +0 -114
- package/docs/provider-runtime-capabilities.md +0 -32
- package/docs/public-surface.json +0 -73
- package/docs/quickstart.md +0 -135
- package/docs/release.md +0 -44
- package/docs/retries.md +0 -108
- package/docs/secrets.md +0 -141
- package/docs/session-config.md +0 -51
- package/docs/session-record.md +0 -58
- package/docs/skills.md +0 -65
- package/docs/telemetry.md +0 -66
- package/docs/testing.md +0 -35
- package/docs/vision-skills.md +0 -94
- package/docs/webhooks.md +0 -143
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session-request config and composition refs for the public SDK/CLI surface.
|
|
3
|
-
*
|
|
4
|
-
* Public composition concepts:
|
|
5
|
-
*
|
|
6
|
-
* - `SkillRef` is the PUBLIC wire-level reference to a workspace skill: just
|
|
7
|
-
* `{ kind:"skill", name }`. The binding is BY NAME and mutable — the session
|
|
8
|
-
* resolves the name to the workspace skill's current bytes at submit time.
|
|
9
|
-
* It travels in `submission.skills` (NOT `submission.tools`).
|
|
10
|
-
*
|
|
11
|
-
* - `McpServerRef` is the non-secret part of an MCP server declaration:
|
|
12
|
-
* `name` and `url`. Bearer / cookie / per-request headers travel in
|
|
13
|
-
* the session's vaulted `secrets.mcpServers` block keyed by the same
|
|
14
|
-
* `name`, and never enter the hashed submission payload or the
|
|
15
|
-
* session snapshot.
|
|
16
|
-
*
|
|
17
|
-
* - `SessionRequestConfig` is the credential-free set of session parameters that
|
|
18
|
-
* can be persisted to disk (e.g. `aex start --config session.json`) or
|
|
19
|
-
* returned from ordinary application helper functions. It excludes
|
|
20
|
-
* `secrets`/`idempotencyKey`/`signal`; strings are already resolved at
|
|
21
|
-
* the call site before submission.
|
|
22
|
-
*
|
|
23
|
-
* - Skill bundle validation lives here so the SDK (zipping locally),
|
|
24
|
-
* hosted API (server-side unzip + manifest extraction) and runtime
|
|
25
|
-
* mount layer share a single source of truth for
|
|
26
|
-
* the limits, the path normaliser, and the manifest invariants. The
|
|
27
|
-
* DB CHECK constraints on `skill_bundles.manifest` mirror these.
|
|
28
|
-
*
|
|
29
|
-
* Keep this as the public source of truth for the SDK/CLI composition
|
|
30
|
-
* boundary.
|
|
31
|
-
*/
|
|
32
|
-
import { type JsonValue, type PlatformEnvironment } from "./submission.js";
|
|
33
|
-
import { type ModelName } from "./models.js";
|
|
34
|
-
import type { RuntimeSize } from "./runtime-sizes.js";
|
|
35
|
-
import { ASSET_ID_PATTERN, MOUNT_PATH_MAX_LENGTH, MOUNT_PATH_PATTERN, assertValidMountPath } from "./schemas/asset-ref.js";
|
|
36
|
-
import { MCP_SERVER_NAME_PATTERN, REMOTE_MCP_STDIO_REJECTED_MESSAGE, rejectStdioMcpShape } from "./schemas/mcp-server.js";
|
|
37
|
-
/**
|
|
38
|
-
* Mirrors the server-side CHECK constraint
|
|
39
|
-
* `skill_bundles_id_format_chk = check (id ~ '^skl_[A-Za-z0-9_-]{8,128}$')`
|
|
40
|
-
* on persisted skill bundles. Keep the two in lockstep.
|
|
41
|
-
*/
|
|
42
|
-
export declare const SKILL_ID_PATTERN: RegExp;
|
|
43
|
-
/**
|
|
44
|
-
* Human-readable, workspace-scoped name. Lowercase, kebab-friendly,
|
|
45
|
-
* 1..128 chars. The DB enforces the length bound via
|
|
46
|
-
* `skill_bundles_name_len_chk`; this regex tightens the SDK/CLI input
|
|
47
|
-
* surface so callers fail at the boundary rather than in the BFF.
|
|
48
|
-
*/
|
|
49
|
-
export declare const SKILL_NAME_PATTERN: RegExp;
|
|
50
|
-
/**
|
|
51
|
-
* Provider-safe submitted tool name. Tool names share the same lowercase
|
|
52
|
-
* kebab/underscore envelope as skills. Submission parsing rejects `__`
|
|
53
|
-
* because SessionDO reserves that separator for MCP namespace routing.
|
|
54
|
-
*/
|
|
55
|
-
export declare const TOOL_NAME_PATTERN: RegExp;
|
|
56
|
-
/**
|
|
57
|
-
* Names reserved by the skills subsystem and therefore usable as neither a
|
|
58
|
-
* skill name nor a custom tool name. `skills` is the injected meta-tool (see
|
|
59
|
-
* {@link SKILLS_TOOL_NAME} in `submission.ts`); `skill` is its singular. Both
|
|
60
|
-
* the SDK factories and the BFF `parseSkills` / `parseTools` reject these.
|
|
61
|
-
*/
|
|
62
|
-
export declare const SKILL_RESERVED_NAMES: ReadonlySet<string>;
|
|
63
|
-
/**
|
|
64
|
-
* One honest envelope for every file, skill, tool, or instruction archive that
|
|
65
|
-
* the managed runtime mounts. Raw asset storage is a broader concept and may
|
|
66
|
-
* have a different quota; these limits describe usable runtime inputs.
|
|
67
|
-
*/
|
|
68
|
-
export declare const ASSET_ARCHIVE_LIMITS: {
|
|
69
|
-
/**
|
|
70
|
-
* 16 MiB. Sized to the SHARED api Lambda (512 MB) that `GetObject`s and
|
|
71
|
-
* DEFLATE-decompresses every pinned archive on every submit, NOT to the
|
|
72
|
-
* single-tenant sandbox. Raisable once that preflight moves off shared infra.
|
|
73
|
-
*/
|
|
74
|
-
readonly maxCompressedBytes: number;
|
|
75
|
-
readonly maxDecompressedBytes: number;
|
|
76
|
-
readonly maxEntries: 1000;
|
|
77
|
-
readonly maxMetadataBytes: number;
|
|
78
|
-
};
|
|
79
|
-
/** Skill-specific authoring constraints layered on the shared asset envelope. */
|
|
80
|
-
export declare const SKILL_BUNDLE_LIMITS: {
|
|
81
|
-
/** Compressed (.zip) ceiling. */
|
|
82
|
-
readonly maxCompressedBytes: number;
|
|
83
|
-
/** Sum of uncompressed file sizes. */
|
|
84
|
-
readonly maxDecompressedBytes: number;
|
|
85
|
-
/** Number of regular file entries (directories don't count). */
|
|
86
|
-
readonly maxFiles: 1000;
|
|
87
|
-
/** Single-entry path length cap: `PATH_MAX`, the only real ceiling. */
|
|
88
|
-
readonly maxPathLength: 4096;
|
|
89
|
-
/** Stored file mode for ordinary files. */
|
|
90
|
-
readonly defaultFileMode: 420;
|
|
91
|
-
/** Stored directory mode. */
|
|
92
|
-
readonly defaultDirMode: 493;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* The PUBLIC wire reference to a workspace skill — by NAME, no bytes, no hash.
|
|
96
|
-
* This is what the SDK sends in `submission.skills` and what the idempotency
|
|
97
|
-
* hash covers. The session resolves the name to the workspace skill's CURRENT bytes
|
|
98
|
-
* at submit time (a re-upload under the same name changes what later sessions see).
|
|
99
|
-
*/
|
|
100
|
-
export interface SkillRef {
|
|
101
|
-
readonly kind: "skill";
|
|
102
|
-
readonly name: string;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Storage-neutral uploaded asset reference. Runtime materialization resolves
|
|
106
|
-
* `assetId` privately; public callers never name object-store paths.
|
|
107
|
-
*/
|
|
108
|
-
export interface AssetRef {
|
|
109
|
-
readonly kind: "asset";
|
|
110
|
-
readonly assetId: string;
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly mountPath?: string;
|
|
113
|
-
}
|
|
114
|
-
type ToolJsonPrimitive = string | number | boolean | null;
|
|
115
|
-
type ToolJsonValue = ToolJsonPrimitive | ToolJsonValue[] | {
|
|
116
|
-
readonly [key: string]: ToolJsonValue;
|
|
117
|
-
};
|
|
118
|
-
export type ToolInputSchema = {
|
|
119
|
-
readonly [key: string]: ToolJsonValue;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* User-supplied executable tool bundle. The bytes are addressed by the same
|
|
123
|
-
* content-addressed asset ref used by Skills/Files, while the provider-visible
|
|
124
|
-
* manifest rides as value-free metadata on the submission.
|
|
125
|
-
*/
|
|
126
|
-
export interface ToolRef extends AssetRef {
|
|
127
|
-
readonly description: string;
|
|
128
|
-
readonly input_schema: ToolInputSchema;
|
|
129
|
-
readonly entry: string;
|
|
130
|
-
}
|
|
131
|
-
/** Content-hash format: `sha256:<64 lowercase hex>`. */
|
|
132
|
-
export { CANONICAL_SHA256_DIGEST_PATTERN as INLINE_CONTENT_HASH_PATTERN } from "./canonical-sha256.js";
|
|
133
|
-
/**
|
|
134
|
-
* Checks the `AssetRef` discriminator on an already typed file reference.
|
|
135
|
-
*
|
|
136
|
-
* This compatibility predicate is not full validation for an untrusted value;
|
|
137
|
-
* use the owning parser when the complete asset-ref shape must be validated.
|
|
138
|
-
*/
|
|
139
|
-
export declare function isAssetRef(ref: FileRef): ref is AssetRef;
|
|
140
|
-
/**
|
|
141
|
-
* Asset ids are storage-neutral product ids. Current uploads derive the id from
|
|
142
|
-
* the content digest (`asset_<sha256hex>`), but callers must treat it as opaque.
|
|
143
|
-
*
|
|
144
|
-
* Declared in `schemas/asset-ref.ts` next to the schema that enforces it — this
|
|
145
|
-
* module imports that one, so it cannot live here without a cycle.
|
|
146
|
-
*/
|
|
147
|
-
export { ASSET_ID_PATTERN };
|
|
148
|
-
export type FileRef = AssetRef;
|
|
149
|
-
/** @deprecated Use `isAssetRef`. This direct alias remains for public compatibility. */
|
|
150
|
-
export declare const isFileAssetRef: typeof isAssetRef;
|
|
151
|
-
/**
|
|
152
|
-
* The default mount DIRECTORY a `File` unzips into when the caller does not set
|
|
153
|
-
* `mountPath`. `/workspace` is also the agent's default working directory, so a
|
|
154
|
-
* file handed with no `mountPath` lands directly in the agent's cwd (e.g.
|
|
155
|
-
* `/workspace/source-video-subtitles.srt`).
|
|
156
|
-
*/
|
|
157
|
-
export declare const DEFAULT_FILE_MOUNT_PATH = "/workspace";
|
|
158
|
-
/**
|
|
159
|
-
* A `mountPath` is an ABSOLUTE container directory under the workspace, and
|
|
160
|
-
* {@link assertValidMountPath} is the assert the SDK `File` builders and the BFF
|
|
161
|
-
* asset-ref parser share so both reject the same malformed input.
|
|
162
|
-
*
|
|
163
|
-
* All three are declared in `schemas/asset-ref.ts`, next to the schema that
|
|
164
|
-
* enforces them — this module imports that one, so they cannot live here without
|
|
165
|
-
* a cycle.
|
|
166
|
-
*/
|
|
167
|
-
export { MOUNT_PATH_PATTERN, MOUNT_PATH_MAX_LENGTH, assertValidMountPath };
|
|
168
|
-
/**
|
|
169
|
-
* Common parser for any `kind: "asset"` ref (file / tool bundle).
|
|
170
|
-
*/
|
|
171
|
-
export declare function parseAssetRefFields(record: Record<string, unknown>, path: string): AssetRef;
|
|
172
|
-
/**
|
|
173
|
-
* Manifest entry persisted in `skill_bundles.manifest` and in session-owned
|
|
174
|
-
* snapshots. `path` is forward-slash, relative, normalised. `mode` is the
|
|
175
|
-
* stored POSIX mode (sanitised, NOT the user's filesystem mode) — see
|
|
176
|
-
* `SKILL_BUNDLE_LIMITS.defaultFileMode`.
|
|
177
|
-
*/
|
|
178
|
-
export interface SkillBundleEntry {
|
|
179
|
-
readonly path: string;
|
|
180
|
-
readonly size: number;
|
|
181
|
-
readonly mode: number;
|
|
182
|
-
}
|
|
183
|
-
export interface SkillBundleManifest {
|
|
184
|
-
readonly entries: readonly SkillBundleEntry[];
|
|
185
|
-
/** Total uncompressed bytes (sum of `entries[i].size`). */
|
|
186
|
-
readonly totalSize: number;
|
|
187
|
-
/** Number of file entries. Equals `entries.length` by construction. */
|
|
188
|
-
readonly fileCount: number;
|
|
189
|
-
}
|
|
190
|
-
export declare class SkillBundleValidationError extends Error {
|
|
191
|
-
constructor(message: string);
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Reject input paths that try to escape the bundle root or smuggle
|
|
195
|
-
* platform-specific syntax. Returns the canonical forward-slash
|
|
196
|
-
* relative path; never returns paths starting or ending with `/`.
|
|
197
|
-
*
|
|
198
|
-
* Rejects:
|
|
199
|
-
* - empty strings and pure whitespace
|
|
200
|
-
* - absolute paths (`/foo`, `C:\foo`, `\\server\share`)
|
|
201
|
-
* - backslash separators (Windows)
|
|
202
|
-
* - `..` segments anywhere in the path
|
|
203
|
-
* - `.` segments anywhere except a leading bare `.`
|
|
204
|
-
* - paths whose length exceeds `SKILL_BUNDLE_LIMITS.maxPathLength` (PATH_MAX, 4096)
|
|
205
|
-
* - NUL bytes
|
|
206
|
-
*
|
|
207
|
-
* There is deliberately NO nesting-depth cap (review-2026-07-25 plan 04): traversal is
|
|
208
|
-
* already dead structurally via the segment rules above, so a depth limit refused
|
|
209
|
-
* legitimate layouts while protecting nothing.
|
|
210
|
-
*/
|
|
211
|
-
export declare function normaliseSkillBundlePath(input: string): string;
|
|
212
|
-
/**
|
|
213
|
-
* Validate one manifest entry: normalises the path, bounds the size,
|
|
214
|
-
* and sanitises the mode to one of {defaultFileMode, defaultDirMode}.
|
|
215
|
-
* The bundle is files-only, so any non-regular-file entry is rejected
|
|
216
|
-
* upstream by the caller (zip parser must skip symlinks, device files,
|
|
217
|
-
* etc. before reaching this function).
|
|
218
|
-
*/
|
|
219
|
-
export declare function parseSkillBundleEntry(input: {
|
|
220
|
-
readonly path: string;
|
|
221
|
-
readonly size: number;
|
|
222
|
-
readonly mode?: number;
|
|
223
|
-
}): SkillBundleEntry;
|
|
224
|
-
/** @deprecated Use {@link parseSkillBundleEntry}; this compatibility wrapper is identical. */
|
|
225
|
-
export declare function validateSkillBundleEntry(input: {
|
|
226
|
-
readonly path: string;
|
|
227
|
-
readonly size: number;
|
|
228
|
-
readonly mode?: number;
|
|
229
|
-
}): SkillBundleEntry;
|
|
230
|
-
/**
|
|
231
|
-
* Validate a full **skill bundle** manifest. Enforces:
|
|
232
|
-
* - entries is a non-empty array
|
|
233
|
-
* - `SKILL.md` exists at the bundle root (this is what makes a
|
|
234
|
-
* bundle a skill rather than a plain workspace file)
|
|
235
|
-
* - file count <= maxFiles
|
|
236
|
-
* - total uncompressed size <= maxDecompressedBytes
|
|
237
|
-
* - per-entry validation (see `validateSkillBundleEntry`)
|
|
238
|
-
* - no duplicate paths
|
|
239
|
-
*
|
|
240
|
-
* In this public surface, **skill** means "Claude Skill" — bundles without
|
|
241
|
-
* `SKILL.md` are not skills and must go
|
|
242
|
-
* through workspace instructions or file uploads instead.
|
|
243
|
-
*
|
|
244
|
-
* Returns a canonical manifest with totals computed.
|
|
245
|
-
*/
|
|
246
|
-
export declare function parseSkillBundleManifest(input: ReadonlyArray<{
|
|
247
|
-
readonly path: string;
|
|
248
|
-
readonly size: number;
|
|
249
|
-
readonly mode?: number;
|
|
250
|
-
}>): SkillBundleManifest;
|
|
251
|
-
/** @deprecated Use {@link parseSkillBundleManifest}; this compatibility wrapper is identical. */
|
|
252
|
-
export declare function validateSkillBundleManifest(input: ReadonlyArray<{
|
|
253
|
-
readonly path: string;
|
|
254
|
-
readonly size: number;
|
|
255
|
-
readonly mode?: number;
|
|
256
|
-
}>): SkillBundleManifest;
|
|
257
|
-
/**
|
|
258
|
-
* Returns true when the manifest carries a `SKILL.md` entry at the
|
|
259
|
-
* bundle root. The presence of this file is Anthropic's
|
|
260
|
-
* skill-auto-discovery signal — bundles that have it are treated as
|
|
261
|
-
* Claude skills and mounted accordingly; bundles that don't are still
|
|
262
|
-
* usable agent context (AGENTS.md, settings files, folders of helper
|
|
263
|
-
* data) but the agent won't pick them up via the skills mechanism.
|
|
264
|
-
*
|
|
265
|
-
* The check is intentionally a separate, callable predicate (rather
|
|
266
|
-
* than baked into `validateSkillBundleManifest`) so the storage and
|
|
267
|
-
* the attach layers can remain independent.
|
|
268
|
-
*/
|
|
269
|
-
export declare function hasSkillMdAtRoot(manifest: SkillBundleManifest): boolean;
|
|
270
|
-
/**
|
|
271
|
-
* Remote MCP transports Aex accepts. Both are over HTTP — `http`
|
|
272
|
-
* is the streamable-HTTP transport, `sse` is the event-stream
|
|
273
|
-
* transport. `stdio` is explicitly NOT a value here: local-process
|
|
274
|
-
* MCP is not implemented.
|
|
275
|
-
*/
|
|
276
|
-
export declare const REMOTE_MCP_TRANSPORTS: readonly ["http", "sse"];
|
|
277
|
-
export type RemoteMcpTransport = (typeof REMOTE_MCP_TRANSPORTS)[number];
|
|
278
|
-
/**
|
|
279
|
-
* Canonical error string for any attempt to declare a stdio-shaped MCP
|
|
280
|
-
* server (`transport: "stdio"`, or a stdio-only field like `command` /
|
|
281
|
-
* `args` / `env`). Pinned in source so every surface — shared parser,
|
|
282
|
-
* SDK builder, CLI flag parser, dashboard form — surfaces the same
|
|
283
|
-
* message and a user can find it via grep.
|
|
284
|
-
*
|
|
285
|
-
* Declared in `schemas/mcp-server.ts` alongside the shape gate that raises it.
|
|
286
|
-
*/
|
|
287
|
-
export { REMOTE_MCP_STDIO_REJECTED_MESSAGE };
|
|
288
|
-
/**
|
|
289
|
-
* The non-secret half of an MCP server declaration. This is what enters
|
|
290
|
-
* the hashed submission, the session snapshot, and any audit log. `name`
|
|
291
|
-
* keys into `secrets.mcpServers` for the per-request headers.
|
|
292
|
-
*
|
|
293
|
-
* `transport` is optional on the wire — when omitted, the runtime is
|
|
294
|
-
* free to pick the default remote transport (`http`). When present, it
|
|
295
|
-
* MUST be one of {@link REMOTE_MCP_TRANSPORTS}; stdio is rejected at
|
|
296
|
-
* parse time.
|
|
297
|
-
*/
|
|
298
|
-
export interface McpServerRef {
|
|
299
|
-
readonly name: string;
|
|
300
|
-
readonly url: string;
|
|
301
|
-
readonly transport?: RemoteMcpTransport;
|
|
302
|
-
}
|
|
303
|
-
/** Declared in `schemas/mcp-server.ts`, next to the schema that enforces it. */
|
|
304
|
-
export { MCP_SERVER_NAME_PATTERN };
|
|
305
|
-
/**
|
|
306
|
-
* A session-config MCP entry. The user is free to supply headers inline; the SDK
|
|
307
|
-
* splits the call site cleanly at submission time so the Authorization (or
|
|
308
|
-
* other auth-bearing) header never enters the non-secret wire payload.
|
|
309
|
-
*/
|
|
310
|
-
export interface SessionConfigMcpServer extends McpServerRef {
|
|
311
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Parse the non-secret half of an MCP server declaration mounted at `path`.
|
|
315
|
-
*
|
|
316
|
-
* SSRF guard at the parser boundary (C4) — the platform MCP proxy relies on
|
|
317
|
-
* this validation; each branch of {@link denyReasonForMcpHost} maps to an SSRF
|
|
318
|
-
* regression test case.
|
|
319
|
-
*/
|
|
320
|
-
export declare function parseMcpServerRef(input: unknown, path: string): McpServerRef;
|
|
321
|
-
export { rejectStdioMcpShape };
|
|
322
|
-
/**
|
|
323
|
-
* Plain JSON accepted by `aex start --config <path>`. This is not a
|
|
324
|
-
* platform object; it is only the non-secret session parameters that the CLI folds
|
|
325
|
-
* into the normal `submit` request.
|
|
326
|
-
*/
|
|
327
|
-
export interface SessionRequestConfig {
|
|
328
|
-
readonly model: ModelName;
|
|
329
|
-
readonly system?: string;
|
|
330
|
-
readonly prompt: string | readonly string[];
|
|
331
|
-
readonly mcpServers?: readonly SessionConfigMcpServer[];
|
|
332
|
-
readonly environment?: PlatformEnvironment;
|
|
333
|
-
/** Managed runtime size preset (see {@link RuntimeSize}). */
|
|
334
|
-
readonly runtimeSize?: RuntimeSize;
|
|
335
|
-
/** Session deadline as a duration string (`"1h"`, `"30m"`); bounded [1m, 8h] server-side. */
|
|
336
|
-
readonly timeout?: string;
|
|
337
|
-
readonly metadata?: Readonly<Record<string, JsonValue>>;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Parse a session request config from JSON. Defensive — used by the host CLI to
|
|
341
|
-
* load `--config session.json`. Throws with the JSON path that failed so
|
|
342
|
-
* a user can fix their file. Headers are preserved here and split out
|
|
343
|
-
* later by the SDK normalisation step.
|
|
344
|
-
*/
|
|
345
|
-
export declare function parseSessionRequestConfig(input: unknown): SessionRequestConfig;
|
|
346
|
-
/**
|
|
347
|
-
* Result of splitting a session config into the non-secret submission and the
|
|
348
|
-
* secret MCP-headers bundle. The SDK calls this just before posting to
|
|
349
|
-
* /api/sessions: the `submission` half is what the BFF hashes for idempotency, the
|
|
350
|
-
* `mcpServerSecrets` half is what enters session-scoped custody.
|
|
351
|
-
*
|
|
352
|
-
* `prompt` is normalised to `readonly string[]` (single-string callers
|
|
353
|
-
* get wrapped in a length-1 array) so the wire payload, the hosted API,
|
|
354
|
-
* and the audit log don't have to re-handle two shapes.
|
|
355
|
-
*/
|
|
356
|
-
export interface NormalisedSessionRequestConfig {
|
|
357
|
-
readonly model: ModelName;
|
|
358
|
-
readonly system?: string;
|
|
359
|
-
readonly prompt: readonly string[];
|
|
360
|
-
readonly mcpServers: readonly McpServerRef[];
|
|
361
|
-
readonly environment?: PlatformEnvironment;
|
|
362
|
-
readonly metadata?: Readonly<Record<string, JsonValue>>;
|
|
363
|
-
/**
|
|
364
|
-
* MCP servers whose session-config entry carried `headers`. Keyed by the `name`
|
|
365
|
-
* that appears in `mcpServers` so the BFF can pair them up.
|
|
366
|
-
*/
|
|
367
|
-
readonly mcpServerSecrets: ReadonlyArray<{
|
|
368
|
-
readonly name: string;
|
|
369
|
-
readonly url: string;
|
|
370
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
371
|
-
}>;
|
|
372
|
-
}
|
|
373
|
-
export declare function normaliseSessionRequestConfig(config: SessionRequestConfig): NormalisedSessionRequestConfig;
|