@aexhq/sdk 0.46.4-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
package/dist/instructions.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** Draft instruction context published through `aex.workspace.instructions`. */
|
|
2
|
-
export declare class Instructions {
|
|
3
|
-
#private;
|
|
4
|
-
private constructor();
|
|
5
|
-
get name(): string;
|
|
6
|
-
/** Build a draft whose canonical archive contains one root `AGENTS.md`. */
|
|
7
|
-
static fromContent(content: string, args: {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
}): Promise<Instructions>;
|
|
10
|
-
static fromPath(path: string, args: {
|
|
11
|
-
readonly name: string;
|
|
12
|
-
}): Promise<Instructions>;
|
|
13
|
-
/** @internal */
|
|
14
|
-
_takeDraftBundle(): {
|
|
15
|
-
readonly name: string;
|
|
16
|
-
readonly contentHash: string;
|
|
17
|
-
readonly bytes: Uint8Array;
|
|
18
|
-
};
|
|
19
|
-
toJSON(): never;
|
|
20
|
-
}
|
package/dist/instructions.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { strToU8 } from "fflate";
|
|
3
|
-
import { assertWorkspaceInstructionResourceName } from "./_contracts/index.js";
|
|
4
|
-
import { bundleSingleFile, hashSkillBundle } from "./_contracts/internal.js";
|
|
5
|
-
/** Draft instruction context published through `aex.workspace.instructions`. */
|
|
6
|
-
export class Instructions {
|
|
7
|
-
#name;
|
|
8
|
-
#contentHash;
|
|
9
|
-
#zipBytes;
|
|
10
|
-
constructor(name, contentHash, zipBytes) {
|
|
11
|
-
this.#name = name;
|
|
12
|
-
this.#contentHash = contentHash;
|
|
13
|
-
this.#zipBytes = zipBytes;
|
|
14
|
-
}
|
|
15
|
-
get name() {
|
|
16
|
-
return this.#name;
|
|
17
|
-
}
|
|
18
|
-
/** Build a draft whose canonical archive contains one root `AGENTS.md`. */
|
|
19
|
-
static async fromContent(content, args) {
|
|
20
|
-
if (typeof content !== "string" || content.length === 0) {
|
|
21
|
-
throw new Error("Instructions.fromContent: content must be a non-empty string");
|
|
22
|
-
}
|
|
23
|
-
const name = args?.name;
|
|
24
|
-
assertWorkspaceInstructionResourceName(name, "Instructions.fromContent: name");
|
|
25
|
-
const bytes = strToU8(content);
|
|
26
|
-
const zip = bundleSingleFile("AGENTS.md", bytes, "Instructions.fromContent");
|
|
27
|
-
return new Instructions(name, await hashSkillBundle(zip), zip);
|
|
28
|
-
}
|
|
29
|
-
static async fromPath(path, args) {
|
|
30
|
-
return Instructions.fromContent(await readFile(path, "utf8"), args);
|
|
31
|
-
}
|
|
32
|
-
/** @internal */
|
|
33
|
-
_takeDraftBundle() {
|
|
34
|
-
return { name: this.#name, contentHash: this.#contentHash, bytes: this.#zipBytes };
|
|
35
|
-
}
|
|
36
|
-
toJSON() {
|
|
37
|
-
throw new Error("Instructions drafts cannot be submitted directly; publish with aex.workspace.instructions.publish(...)");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=instructions.js.map
|
package/dist/instructions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,sCAAsC,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE9E,gFAAgF;AAChF,MAAM,OAAO,YAAY;IACd,KAAK,CAAS;IACd,YAAY,CAAS;IACrB,SAAS,CAAa;IAE/B,YAAoB,IAAY,EAAE,WAAmB,EAAE,QAAoB;QACzE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,2EAA2E;IAC3E,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,IAA+B;QACvE,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;QACxB,sCAAsC,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;QAC/E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,MAAM,GAAG,GAAG,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,0BAA0B,CAAC,CAAC;QAC7E,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,eAAe,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,IAA+B;QACjE,OAAO,YAAY,CAAC,WAAW,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;IAED,gBAAgB;IAChB,gBAAgB;QACd,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IACrF,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,KAAK,CACb,wGAAwG,CACzG,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DebugSink, ProviderFault, Session } from "./_contracts/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Temporary field-absent compatibility bridge for pre-ProviderFault sessions.
|
|
4
|
-
* It recognizes only the historical failure class/templates and never carries
|
|
5
|
-
* the free-text message into the returned public fault.
|
|
6
|
-
*/
|
|
7
|
-
export declare function legacySessionProviderFault(session: Session, debug?: DebugSink): ProviderFault | undefined;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const LEGACY_HTTP_FAILURE = /^llm provider unavailable \(HTTP (\d{3})\) — throttled or overloaded; request was not replayed automatically(?:: .+)?$/;
|
|
2
|
-
const LEGACY_STREAM_FAILURE = /^llm provider stream error \((rate_limit_error|overloaded_error|api_error|timeout_error)\) — throttled or overloaded mid-stream; retry later$/;
|
|
3
|
-
/**
|
|
4
|
-
* Temporary field-absent compatibility bridge for pre-ProviderFault sessions.
|
|
5
|
-
* It recognizes only the historical failure class/templates and never carries
|
|
6
|
-
* the free-text message into the returned public fault.
|
|
7
|
-
*/
|
|
8
|
-
export function legacySessionProviderFault(session, debug) {
|
|
9
|
-
// A present canonical field always wins, including a present non-throttle.
|
|
10
|
-
if (Object.hasOwn(session, "providerFault"))
|
|
11
|
-
return undefined;
|
|
12
|
-
const message = typeof session.errorMessage === "string" ? session.errorMessage : undefined;
|
|
13
|
-
const httpMatch = message?.match(LEGACY_HTTP_FAILURE);
|
|
14
|
-
const streamMatch = message?.match(LEGACY_STREAM_FAILURE);
|
|
15
|
-
let fault;
|
|
16
|
-
if (httpMatch) {
|
|
17
|
-
const status = Number(httpMatch[1]);
|
|
18
|
-
const kind = status === 429 ? "rate_limit" : status === 529 ? "overloaded" : "unavailable";
|
|
19
|
-
fault = { kind, status };
|
|
20
|
-
}
|
|
21
|
-
else if (streamMatch) {
|
|
22
|
-
const errorType = streamMatch[1];
|
|
23
|
-
const kind = errorType === "rate_limit_error"
|
|
24
|
-
? "rate_limit"
|
|
25
|
-
: errorType === "overloaded_error"
|
|
26
|
-
? "overloaded"
|
|
27
|
-
: "unavailable";
|
|
28
|
-
fault = { kind };
|
|
29
|
-
}
|
|
30
|
-
else if (session.failureClass === "transient-provider") {
|
|
31
|
-
fault = { kind: "unavailable" };
|
|
32
|
-
}
|
|
33
|
-
if (fault !== undefined) {
|
|
34
|
-
debug?.(`[aex] legacy_provider_fault_fallback kind=${fault.kind} source=session`);
|
|
35
|
-
}
|
|
36
|
-
return fault;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=legacy-session-provider-fault.js.map
|
|
@@ -1 +0,0 @@
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EAAE,IAAI,EAAE,CAAC;IACnB,CAAC;SAAM,IAAI,OAAO,CAAC,YAAY,KAAK,oBAAoB,EAAE,CAAC;QACzD,KAAK,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,KAAK,EAAE,CAAC,6CAA6C,KAAK,CAAC,IAAI,iBAAiB,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/mcp-server.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { type McpServerRef, type PlatformMcpServerSecret, type RemoteMcpTransport } from "./_contracts/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Wire shape for a workspace MCP server ref in `submission.mcpServers[]`.
|
|
4
|
-
* The BFF resolves this to an inline `{name, url}` before the shared
|
|
5
|
-
* parser sessions. Auth still arrives inline in
|
|
6
|
-
* `secrets.mcpServers[<resolved-name>].headers` — workspace refs do
|
|
7
|
-
* not carry auth, by design.
|
|
8
|
-
*/
|
|
9
|
-
export interface WorkspaceMcpServerSubmissionEntry {
|
|
10
|
-
readonly kind: "workspace";
|
|
11
|
-
readonly id: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Inline MCP server reference OR a workspace-persistent ref via
|
|
15
|
-
* `McpServer.fromId("mcp_...")`.
|
|
16
|
-
*
|
|
17
|
-
* For inline refs, headers (typically `Authorization`) are vaulted
|
|
18
|
-
* server-side under `secrets.mcpServers` and excluded from the
|
|
19
|
-
* idempotency hash; the non-secret `{name, url}` part is hashed.
|
|
20
|
-
*
|
|
21
|
-
* The SDK splits the header bag from the public ref BEFORE the wire
|
|
22
|
-
* payload is built, so a single inline `McpServer` instance becomes:
|
|
23
|
-
*
|
|
24
|
-
* - a `submission.mcpServers` entry of `{ name, url }`, and
|
|
25
|
-
* - (when `headers` is present) a `secrets.mcpServers` entry of
|
|
26
|
-
* `{ name, headers }`.
|
|
27
|
-
*
|
|
28
|
-
* For workspace refs (`McpServer.fromId(id)`), the submission entry
|
|
29
|
-
* is `{kind:"workspace", id}`; the BFF resolves it to inline when
|
|
30
|
-
* the session is created. The user still supplies auth separately via
|
|
31
|
-
* `secrets.mcpServers[<workspace-name>]` keyed by the workspace
|
|
32
|
-
* MCP's persisted `name`.
|
|
33
|
-
*/
|
|
34
|
-
export declare class McpServer {
|
|
35
|
-
readonly kind: "inline" | "workspace";
|
|
36
|
-
readonly name: string;
|
|
37
|
-
readonly url: string;
|
|
38
|
-
readonly transport: RemoteMcpTransport | undefined;
|
|
39
|
-
readonly id: string | undefined;
|
|
40
|
-
readonly headers: Readonly<Record<string, string>> | undefined;
|
|
41
|
-
/** Internal constructor. Use `McpServer.remote(...)` or `McpServer.fromId(...)`. */
|
|
42
|
-
constructor(args: {
|
|
43
|
-
readonly kind?: "inline" | "workspace";
|
|
44
|
-
readonly id?: string;
|
|
45
|
-
readonly name?: string;
|
|
46
|
-
readonly url?: string;
|
|
47
|
-
readonly transport?: RemoteMcpTransport;
|
|
48
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
49
|
-
});
|
|
50
|
-
/**
|
|
51
|
-
* Inline remote MCP server reachable over HTTP(S) by URL. `transport`
|
|
52
|
-
* defaults to the runtime's choice when omitted; pass it explicitly
|
|
53
|
-
* to pin `"http"` (streamable) or `"sse"` (event-stream). Stdio is
|
|
54
|
-
* not supported — see {@link rejectStdioMcpShape}.
|
|
55
|
-
*/
|
|
56
|
-
static remote(args: {
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly url: string;
|
|
59
|
-
readonly transport?: RemoteMcpTransport;
|
|
60
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
61
|
-
}): McpServer;
|
|
62
|
-
/**
|
|
63
|
-
* Reference a workspace-persistent MCP server by id. The BFF
|
|
64
|
-
* resolves the ref to inline `{name, url}` when the session is created using
|
|
65
|
-
* the row from `workspace_mcp_servers`. Auth still arrives inline at
|
|
66
|
-
* the call site — pass it in `secrets.mcpServers[<workspace-name>]`.
|
|
67
|
-
*/
|
|
68
|
-
static fromId(id: string): McpServer;
|
|
69
|
-
/** Wire shape for the non-secret `submission.mcpServers` entry. */
|
|
70
|
-
toSubmissionEntry(): McpServerRef | WorkspaceMcpServerSubmissionEntry;
|
|
71
|
-
/**
|
|
72
|
-
* Wire shape for the `secrets.mcpServers` entry, or `undefined`
|
|
73
|
-
* when no headers were provided. Returned headers are a defensive
|
|
74
|
-
* copy.
|
|
75
|
-
*
|
|
76
|
-
* Workspace refs never emit a secret entry from the SDK — the
|
|
77
|
-
* caller knows the resolved `name` (from the dashboard or from a
|
|
78
|
-
* prior list call) and supplies the headers under that name
|
|
79
|
-
* directly on the `secrets.mcpServers[]` array. Mixing SDK-side
|
|
80
|
-
* auth into a workspace ref's `name` would create a name/auth
|
|
81
|
-
* mismatch the BFF can't validate.
|
|
82
|
-
*/
|
|
83
|
-
toSecretEntry(): PlatformMcpServerSecret | undefined;
|
|
84
|
-
}
|
package/dist/mcp-server.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { idPatternSource, isId, rejectStdioMcpShape } from "./_contracts/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Inline MCP server reference OR a workspace-persistent ref via
|
|
4
|
-
* `McpServer.fromId("mcp_...")`.
|
|
5
|
-
*
|
|
6
|
-
* For inline refs, headers (typically `Authorization`) are vaulted
|
|
7
|
-
* server-side under `secrets.mcpServers` and excluded from the
|
|
8
|
-
* idempotency hash; the non-secret `{name, url}` part is hashed.
|
|
9
|
-
*
|
|
10
|
-
* The SDK splits the header bag from the public ref BEFORE the wire
|
|
11
|
-
* payload is built, so a single inline `McpServer` instance becomes:
|
|
12
|
-
*
|
|
13
|
-
* - a `submission.mcpServers` entry of `{ name, url }`, and
|
|
14
|
-
* - (when `headers` is present) a `secrets.mcpServers` entry of
|
|
15
|
-
* `{ name, headers }`.
|
|
16
|
-
*
|
|
17
|
-
* For workspace refs (`McpServer.fromId(id)`), the submission entry
|
|
18
|
-
* is `{kind:"workspace", id}`; the BFF resolves it to inline when
|
|
19
|
-
* the session is created. The user still supplies auth separately via
|
|
20
|
-
* `secrets.mcpServers[<workspace-name>]` keyed by the workspace
|
|
21
|
-
* MCP's persisted `name`.
|
|
22
|
-
*/
|
|
23
|
-
export class McpServer {
|
|
24
|
-
kind;
|
|
25
|
-
name;
|
|
26
|
-
url;
|
|
27
|
-
transport;
|
|
28
|
-
id;
|
|
29
|
-
headers;
|
|
30
|
-
/** Internal constructor. Use `McpServer.remote(...)` or `McpServer.fromId(...)`. */
|
|
31
|
-
constructor(args) {
|
|
32
|
-
if (!args || typeof args !== "object") {
|
|
33
|
-
throw new Error("McpServer: args is required");
|
|
34
|
-
}
|
|
35
|
-
// Defence in depth: any stdio-shaped input that slips past the
|
|
36
|
-
// builder type (callers will reach in with `as never` to feed stdio
|
|
37
|
-
// shapes) is rejected with the canonical error.
|
|
38
|
-
rejectStdioMcpShape(args);
|
|
39
|
-
if (args.kind === "workspace") {
|
|
40
|
-
// The shape comes from the id owner (`@aexhq/contracts/ids`), never from
|
|
41
|
-
// a local copy: the hand-written pattern this replaced admitted
|
|
42
|
-
// `mcp_<8..128 of [A-Za-z0-9_-]>`, which is wider than anything the
|
|
43
|
-
// platform can mint, so a typo'd id reached the BFF instead of the user.
|
|
44
|
-
if (!isId("mcp", args.id)) {
|
|
45
|
-
throw new Error(`McpServer.fromId: id must match ${idPatternSource("mcp")}`);
|
|
46
|
-
}
|
|
47
|
-
this.kind = "workspace";
|
|
48
|
-
this.id = args.id;
|
|
49
|
-
// `name` and `url` are resolved server-side; populate placeholders so
|
|
50
|
-
// type-level access never returns undefined, but mark the workspace
|
|
51
|
-
// ref so callers can branch.
|
|
52
|
-
this.name = "";
|
|
53
|
-
this.url = "";
|
|
54
|
-
this.transport = undefined;
|
|
55
|
-
this.headers = undefined;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (typeof args.name !== "string" || !args.name) {
|
|
59
|
-
throw new Error("McpServer: name is required");
|
|
60
|
-
}
|
|
61
|
-
if (typeof args.url !== "string" || !args.url) {
|
|
62
|
-
throw new Error("McpServer: url is required");
|
|
63
|
-
}
|
|
64
|
-
this.kind = "inline";
|
|
65
|
-
this.id = undefined;
|
|
66
|
-
this.name = args.name;
|
|
67
|
-
this.url = args.url;
|
|
68
|
-
this.transport = args.transport;
|
|
69
|
-
this.headers = args.headers && Object.keys(args.headers).length > 0 ? { ...args.headers } : undefined;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Inline remote MCP server reachable over HTTP(S) by URL. `transport`
|
|
73
|
-
* defaults to the runtime's choice when omitted; pass it explicitly
|
|
74
|
-
* to pin `"http"` (streamable) or `"sse"` (event-stream). Stdio is
|
|
75
|
-
* not supported — see {@link rejectStdioMcpShape}.
|
|
76
|
-
*/
|
|
77
|
-
static remote(args) {
|
|
78
|
-
return new McpServer({ kind: "inline", ...args });
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Reference a workspace-persistent MCP server by id. The BFF
|
|
82
|
-
* resolves the ref to inline `{name, url}` when the session is created using
|
|
83
|
-
* the row from `workspace_mcp_servers`. Auth still arrives inline at
|
|
84
|
-
* the call site — pass it in `secrets.mcpServers[<workspace-name>]`.
|
|
85
|
-
*/
|
|
86
|
-
static fromId(id) {
|
|
87
|
-
return new McpServer({ kind: "workspace", id });
|
|
88
|
-
}
|
|
89
|
-
/** Wire shape for the non-secret `submission.mcpServers` entry. */
|
|
90
|
-
toSubmissionEntry() {
|
|
91
|
-
if (this.kind === "workspace") {
|
|
92
|
-
return { kind: "workspace", id: this.id };
|
|
93
|
-
}
|
|
94
|
-
return this.transport
|
|
95
|
-
? { name: this.name, transport: this.transport, url: this.url }
|
|
96
|
-
: { name: this.name, url: this.url };
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Wire shape for the `secrets.mcpServers` entry, or `undefined`
|
|
100
|
-
* when no headers were provided. Returned headers are a defensive
|
|
101
|
-
* copy.
|
|
102
|
-
*
|
|
103
|
-
* Workspace refs never emit a secret entry from the SDK — the
|
|
104
|
-
* caller knows the resolved `name` (from the dashboard or from a
|
|
105
|
-
* prior list call) and supplies the headers under that name
|
|
106
|
-
* directly on the `secrets.mcpServers[]` array. Mixing SDK-side
|
|
107
|
-
* auth into a workspace ref's `name` would create a name/auth
|
|
108
|
-
* mismatch the BFF can't validate.
|
|
109
|
-
*/
|
|
110
|
-
toSecretEntry() {
|
|
111
|
-
if (this.kind === "workspace" || !this.headers) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
return { name: this.name, url: this.url, headers: { ...this.headers } };
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=mcp-server.js.map
|
package/dist/mcp-server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,mBAAmB,EAIpB,MAAM,kBAAkB,CAAC;AAc1B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,SAAS;IACX,IAAI,CAAyB;IAC7B,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,SAAS,CAAiC;IAC1C,EAAE,CAAqB;IACvB,OAAO,CAA+C;IAE/D,oFAAoF;IACpF,YAAY,IAOX;QACC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QACD,+DAA+D;QAC/D,oEAAoE;QACpE,gDAAgD;QAChD,mBAAmB,CAAC,IAA0C,CAAC,CAAC;QAChE,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YAC9B,yEAAyE;YACzE,gEAAgE;YAChE,oEAAoE;YACpE,yE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import { type IgnoreOptions } from "./node-walk.js";
|
|
3
|
-
/**
|
|
4
|
-
* Fidelity-aware read of a local skill/tool directory into an in-memory files map
|
|
5
|
-
* plus its bundle metadata. Delegates to the shared {@link walkDirectory} (the
|
|
6
|
-
* SAME fidelity walk `File.fromPath` uses), so skills/tools now honor `.aexignore`
|
|
7
|
-
* + the always-on defaults (`.git/`, `node_modules/`, …), capture executable bits
|
|
8
|
-
* + symlinks into `meta` (destined for the `.aexmeta.json` sidecar), and never
|
|
9
|
-
* silently vanish a non-regular file (surfaced in `dropped`).
|
|
10
|
-
*
|
|
11
|
-
* INVARIANT: for a directory with NO exec bits, NO symlinks, and NO ignored paths,
|
|
12
|
-
* `meta` is empty → the downstream bundler emits NO sidecar, so the bundle bytes
|
|
13
|
-
* are byte-identical to the pre-fidelity `readDirectoryAsFiles` output (dedup
|
|
14
|
-
* continuity). Only metadata (or an `.aexignore`/ignored path) changes the bytes.
|
|
15
|
-
*
|
|
16
|
-
* Bun/Node filesystem runtimes only. Browser callers pass a pre-built files map to
|
|
17
|
-
* `bundleSkillFiles` / `bundleToolFiles` directly and never reach this module.
|
|
18
|
-
*/
|
|
19
|
-
export interface DirectoryBundle {
|
|
20
|
-
/** Regular-file bytes, keyed by forward-slash bundle-relative path. */
|
|
21
|
-
readonly files: Record<string, Uint8Array>;
|
|
22
|
-
/** Exec bits + symlinks → the `.aexmeta.json` sidecar (empty ⇒ no sidecar emitted). */
|
|
23
|
-
readonly meta: BundleMeta;
|
|
24
|
-
/** Non-regular files skipped (FIFO/socket/device) — never silently vanished. Sorted. */
|
|
25
|
-
readonly dropped: readonly string[];
|
|
26
|
-
/** Count of paths pruned by the ignore layers (`.aexignore` + defaults). */
|
|
27
|
-
readonly ignoredCount: number;
|
|
28
|
-
}
|
|
29
|
-
export declare function readDirectoryWithFidelity(rootDir: string, ignore?: IgnoreOptions): Promise<DirectoryBundle>;
|
package/dist/node-fs.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { walkDirectory } from "./node-walk.js";
|
|
3
|
-
export async function readDirectoryWithFidelity(rootDir, ignore) {
|
|
4
|
-
if (typeof rootDir !== "string" || !rootDir) {
|
|
5
|
-
throw new Error("readDirectoryWithFidelity: rootDir is required");
|
|
6
|
-
}
|
|
7
|
-
const walk = await walkDirectory(rootDir, ignore);
|
|
8
|
-
const files = {};
|
|
9
|
-
for (const entry of walk.entries) {
|
|
10
|
-
files[entry.rel] = new Uint8Array(await readFile(entry.absPath));
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
files,
|
|
14
|
-
meta: { exec: walk.exec, symlinks: walk.symlinks },
|
|
15
|
-
dropped: walk.dropped,
|
|
16
|
-
ignoredCount: walk.ignoredCount
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=node-fs.js.map
|
package/dist/node-fs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-fs.js","sourceRoot":"","sources":["../src/node-fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AA6BnE,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,OAAe,EAAE,MAAsB;IACrF,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,MAAM,KAAK,GAA+B,EAAE,CAAC;IAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO;QACL,KAAK;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;QAClD,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,YAAY,EAAE,IAAI,CAAC,YAAY;KAChC,CAAC;AACJ,CAAC"}
|
package/dist/node-walk.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node/Bun-only directory walk with fidelity capture + `.aexignore` filtering.
|
|
3
|
-
*
|
|
4
|
-
* Shared by `File.fromPath` (customer files) and `readDirectoryWithFidelity`
|
|
5
|
-
* (skills/tools). Captures, in ONE deterministic walk:
|
|
6
|
-
* - regular files (bytes),
|
|
7
|
-
* - executable bits (`mode & 0o111` → normalised 0o755 bucket, listed in `exec`),
|
|
8
|
-
* - symlinks (raw `readlink` target, verbatim — the SDK captures faithfully; the
|
|
9
|
-
* container restore decides whether a target may be recreated),
|
|
10
|
-
* - dropped non-regular files (FIFO / socket / char / block device) — never
|
|
11
|
-
* silently vanished, surfaced in `dropped`.
|
|
12
|
-
*
|
|
13
|
-
* Ignore semantics are gitignore-compatible via the `ignore` package: always-on
|
|
14
|
-
* built-in {@link DEFAULT_IGNORES} (`.git/`, `node_modules/`, …), `.gitignore`
|
|
15
|
-
* honored only when opted in, root `.aexignore` on by default and highest
|
|
16
|
-
* precedence, plus programmatic `extraPatterns`. The ignored SET is a pure
|
|
17
|
-
* function of the layered patterns + the sorted path list, so the resulting
|
|
18
|
-
* bundle is deterministic. An ignored directory is pruned wholesale (never
|
|
19
|
-
* descended) — `node_modules` is never walked.
|
|
20
|
-
*
|
|
21
|
-
* Node-only: imports `node:fs` + `ignore`. Browser callers pass pre-built maps to
|
|
22
|
-
* the bundlers and never reach this module.
|
|
23
|
-
*/
|
|
24
|
-
import { type BundleSymlink } from "./_contracts/index.js";
|
|
25
|
-
/** Caller-facing ignore controls, threaded from `File.fromPath` / `Tool.fromPath` / skill factories. */
|
|
26
|
-
export interface IgnoreOptions {
|
|
27
|
-
/** Apply the always-on built-in {@link DEFAULT_IGNORES}. Default true. */
|
|
28
|
-
readonly useDefaults?: boolean;
|
|
29
|
-
/** Also honor the root `.gitignore`. Default false (least-surprise: no silent data loss). */
|
|
30
|
-
readonly useGitignore?: boolean;
|
|
31
|
-
/** Honor the root `.aexignore`. Default true. */
|
|
32
|
-
readonly useAexignore?: boolean;
|
|
33
|
-
/** Extra patterns appended LAST (highest precedence). */
|
|
34
|
-
readonly extraPatterns?: readonly string[];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Always-on ignore defaults (unless `useDefaults:false`): VCS metadata, dependency
|
|
38
|
-
* caches, editor/OS cruft, plus the two aex control files (`.aexignore` and the
|
|
39
|
-
* reserved sidecar). `.gitignore` itself is real repo content and is NOT excluded.
|
|
40
|
-
*/
|
|
41
|
-
export declare const DEFAULT_IGNORES: readonly string[];
|
|
42
|
-
export interface WalkedEntry {
|
|
43
|
-
/** Forward-slash bundle-relative path. */
|
|
44
|
-
readonly rel: string;
|
|
45
|
-
/** Absolute on-disk path (for lazy reads on the streaming path). */
|
|
46
|
-
readonly absPath: string;
|
|
47
|
-
/** Raw byte size from `stat` (drives the small-vs-streaming path decision). */
|
|
48
|
-
readonly size: number;
|
|
49
|
-
}
|
|
50
|
-
export interface WalkResult {
|
|
51
|
-
/** Regular-file descriptors (bytes NOT yet read), globally sorted by `rel`. */
|
|
52
|
-
readonly entries: WalkedEntry[];
|
|
53
|
-
/** Bundle-relative paths that restore executable (0o755). Sorted. */
|
|
54
|
-
readonly exec: string[];
|
|
55
|
-
/** Captured symlinks (raw target). Sorted by path. */
|
|
56
|
-
readonly symlinks: BundleSymlink[];
|
|
57
|
-
/** Non-regular files skipped (FIFO/socket/device), for a non-silent summary. Sorted. */
|
|
58
|
-
readonly dropped: string[];
|
|
59
|
-
/** Count of files/dirs excluded by the ignore layers (surfaced, not silent). */
|
|
60
|
-
readonly ignoredCount: number;
|
|
61
|
-
/** Sum of `entries[i].size` — the total raw input size. */
|
|
62
|
-
readonly totalSize: number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Walk `rootDir`, capturing files + fidelity metadata + applying the ignore
|
|
66
|
-
* layers. Deterministic: each directory level is read then processed in sorted
|
|
67
|
-
* order, and the returned metadata arrays are sorted.
|
|
68
|
-
*/
|
|
69
|
-
export declare function walkDirectory(rootDir: string, options?: IgnoreOptions): Promise<WalkResult>;
|
package/dist/node-walk.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node/Bun-only directory walk with fidelity capture + `.aexignore` filtering.
|
|
3
|
-
*
|
|
4
|
-
* Shared by `File.fromPath` (customer files) and `readDirectoryWithFidelity`
|
|
5
|
-
* (skills/tools). Captures, in ONE deterministic walk:
|
|
6
|
-
* - regular files (bytes),
|
|
7
|
-
* - executable bits (`mode & 0o111` → normalised 0o755 bucket, listed in `exec`),
|
|
8
|
-
* - symlinks (raw `readlink` target, verbatim — the SDK captures faithfully; the
|
|
9
|
-
* container restore decides whether a target may be recreated),
|
|
10
|
-
* - dropped non-regular files (FIFO / socket / char / block device) — never
|
|
11
|
-
* silently vanished, surfaced in `dropped`.
|
|
12
|
-
*
|
|
13
|
-
* Ignore semantics are gitignore-compatible via the `ignore` package: always-on
|
|
14
|
-
* built-in {@link DEFAULT_IGNORES} (`.git/`, `node_modules/`, …), `.gitignore`
|
|
15
|
-
* honored only when opted in, root `.aexignore` on by default and highest
|
|
16
|
-
* precedence, plus programmatic `extraPatterns`. The ignored SET is a pure
|
|
17
|
-
* function of the layered patterns + the sorted path list, so the resulting
|
|
18
|
-
* bundle is deterministic. An ignored directory is pruned wholesale (never
|
|
19
|
-
* descended) — `node_modules` is never walked.
|
|
20
|
-
*
|
|
21
|
-
* Node-only: imports `node:fs` + `ignore`. Browser callers pass pre-built maps to
|
|
22
|
-
* the bundlers and never reach this module.
|
|
23
|
-
*/
|
|
24
|
-
import { readFile, readdir, readlink, stat } from "node:fs/promises";
|
|
25
|
-
import { join, posix, relative, sep } from "node:path";
|
|
26
|
-
import ignore from "ignore";
|
|
27
|
-
import { MAX_SYMLINK_TARGET_LENGTH, RESERVED_META_ENTRY } from "./_contracts/index.js";
|
|
28
|
-
/**
|
|
29
|
-
* Always-on ignore defaults (unless `useDefaults:false`): VCS metadata, dependency
|
|
30
|
-
* caches, editor/OS cruft, plus the two aex control files (`.aexignore` and the
|
|
31
|
-
* reserved sidecar). `.gitignore` itself is real repo content and is NOT excluded.
|
|
32
|
-
*/
|
|
33
|
-
export const DEFAULT_IGNORES = [
|
|
34
|
-
".git/",
|
|
35
|
-
".hg/",
|
|
36
|
-
".svn/",
|
|
37
|
-
"node_modules/",
|
|
38
|
-
"__pycache__/",
|
|
39
|
-
"*.pyc",
|
|
40
|
-
"*.pyo",
|
|
41
|
-
".DS_Store",
|
|
42
|
-
"Thumbs.db"
|
|
43
|
-
];
|
|
44
|
-
/** aex control files always excluded from bundle content (regardless of `useDefaults`). */
|
|
45
|
-
const CONTROL_IGNORES = [".aexignore", RESERVED_META_ENTRY];
|
|
46
|
-
/** Read a root-level ignore control file's patterns (CRLF-normalised), or [] when absent. */
|
|
47
|
-
async function readIgnoreFile(rootDir, name) {
|
|
48
|
-
try {
|
|
49
|
-
const raw = await readFile(join(rootDir, name), "utf8");
|
|
50
|
-
return raw.replace(/\r\n/g, "\n").split("\n");
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
if (isErrno(error, "ENOENT"))
|
|
54
|
-
return [];
|
|
55
|
-
throw error;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function isErrno(error, code) {
|
|
59
|
-
return error !== null && typeof error === "object" && "code" in error && error.code === code;
|
|
60
|
-
}
|
|
61
|
-
/** Build the layered ignore matcher (last layer wins, git semantics). */
|
|
62
|
-
async function buildIgnore(rootDir, options) {
|
|
63
|
-
const ig = ignore();
|
|
64
|
-
if (options?.useDefaults !== false)
|
|
65
|
-
ig.add([...DEFAULT_IGNORES]);
|
|
66
|
-
ig.add([...CONTROL_IGNORES]);
|
|
67
|
-
if (options?.useGitignore === true)
|
|
68
|
-
ig.add(await readIgnoreFile(rootDir, ".gitignore"));
|
|
69
|
-
if (options?.useAexignore !== false)
|
|
70
|
-
ig.add(await readIgnoreFile(rootDir, ".aexignore"));
|
|
71
|
-
if (options?.extraPatterns && options.extraPatterns.length > 0)
|
|
72
|
-
ig.add([...options.extraPatterns]);
|
|
73
|
-
return ig;
|
|
74
|
-
}
|
|
75
|
-
function toPosixRel(rootDir, full) {
|
|
76
|
-
const rel = relative(rootDir, full);
|
|
77
|
-
return sep === "/" ? rel : rel.split(sep).join(posix.sep);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Walk `rootDir`, capturing files + fidelity metadata + applying the ignore
|
|
81
|
-
* layers. Deterministic: each directory level is read then processed in sorted
|
|
82
|
-
* order, and the returned metadata arrays are sorted.
|
|
83
|
-
*/
|
|
84
|
-
export async function walkDirectory(rootDir, options) {
|
|
85
|
-
const ig = await buildIgnore(rootDir, options);
|
|
86
|
-
const entries = [];
|
|
87
|
-
const exec = [];
|
|
88
|
-
const symlinks = [];
|
|
89
|
-
const dropped = [];
|
|
90
|
-
let ignoredCount = 0;
|
|
91
|
-
let totalSize = 0;
|
|
92
|
-
const visit = async (currentDir) => {
|
|
93
|
-
const dirents = await readdir(currentDir, { withFileTypes: true });
|
|
94
|
-
// Sort each level for a deterministic ignored-set + walk order.
|
|
95
|
-
dirents.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
|
96
|
-
for (const dirent of dirents) {
|
|
97
|
-
const full = join(currentDir, dirent.name);
|
|
98
|
-
const rel = toPosixRel(rootDir, full);
|
|
99
|
-
if (dirent.isSymbolicLink()) {
|
|
100
|
-
if (ig.ignores(rel)) {
|
|
101
|
-
ignoredCount += 1;
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
const target = await readlink(full);
|
|
105
|
-
if (target.includes("\0")) {
|
|
106
|
-
throw new Error(`File.fromPath: symlink ${JSON.stringify(rel)} target contains a NUL byte`);
|
|
107
|
-
}
|
|
108
|
-
if (target.length > MAX_SYMLINK_TARGET_LENGTH) {
|
|
109
|
-
throw new Error(`File.fromPath: symlink ${JSON.stringify(rel)} target exceeds ${MAX_SYMLINK_TARGET_LENGTH} bytes`);
|
|
110
|
-
}
|
|
111
|
-
symlinks.push({ path: rel, target });
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
if (dirent.isDirectory()) {
|
|
115
|
-
// Directory pruning (git-correct + fast): an ignored dir is never descended.
|
|
116
|
-
if (ig.ignores(`${rel}/`)) {
|
|
117
|
-
ignoredCount += 1;
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
await visit(full);
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
if (!dirent.isFile()) {
|
|
124
|
-
// FIFO / socket / char / block device — skipped, never silently vanished.
|
|
125
|
-
dropped.push(rel);
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
if (ig.ignores(rel)) {
|
|
129
|
-
ignoredCount += 1;
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
const st = await stat(full);
|
|
133
|
-
entries.push({ rel, absPath: full, size: st.size });
|
|
134
|
-
totalSize += st.size;
|
|
135
|
-
if ((st.mode & 0o111) !== 0)
|
|
136
|
-
exec.push(rel);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
await visit(rootDir);
|
|
140
|
-
// Global lexicographic order (per-level sort is NOT globally sorted across the
|
|
141
|
-
// tree, e.g. `a.txt` vs `a/b.txt`), matching the canonical zip entry order.
|
|
142
|
-
entries.sort((a, b) => byString(a.rel, b.rel));
|
|
143
|
-
exec.sort(byString);
|
|
144
|
-
symlinks.sort((a, b) => byString(a.path, b.path));
|
|
145
|
-
dropped.sort(byString);
|
|
146
|
-
return { entries, exec, symlinks, dropped, ignoredCount, totalSize };
|
|
147
|
-
}
|
|
148
|
-
function byString(a, b) {
|
|
149
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=node-walk.js.map
|
package/dist/node-walk.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-walk.js","sourceRoot":"","sources":["../src/node-walk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAsB,MAAM,kBAAkB,CAAC;AAgBtG;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,OAAO;IACP,MAAM;IACN,OAAO;IACP,eAAe;IACf,cAAc;IACd,OAAO;IACP,OAAO;IACP,WAAW;IACX,WAAW;CACZ,CAAC;AAEF,2FAA2F;AAC3F,MAAM,eAAe,GAAsB,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;AA0B/E,6FAA6F;AAC7F,KAAK,UAAU,cAAc,CAAC,OAAe,EAAE,IAAY;IACzD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACxD,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,OAAO,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ACpD,SAAS,IAAI,EAAE,CAAC,IAAI,CAAC;YACrB,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAErB,+EAA+E;IAC/E,4EAA4E;IAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS,EAAE,CAAS;IACpC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/path-basename.d.ts
DELETED
package/dist/path-basename.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the last non-trailing segment of either a POSIX- or Windows-shaped
|
|
3
|
-
* path without applying host-specific path semantics.
|
|
4
|
-
*/
|
|
5
|
-
export function crossPlatformBasename(path) {
|
|
6
|
-
const normalised = path.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
7
|
-
return normalised.split("/").at(-1) ?? "";
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=path-basename.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-basename.js","sourceRoot":"","sources":["../src/path-basename.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChE,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5C,CAAC"}
|