@code-yeongyu/senpi 2026.8.25 → 2026.8.26
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/CHANGELOG.md +17 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +29 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts +5 -9
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js +5 -11
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts +2 -3
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.js +53 -14
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +28 -5
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +558 -0
- package/node_modules/@anthropic-ai/sdk/README.md +16 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +14 -2
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +14 -2
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +481 -0
- package/node_modules/@anthropic-ai/sdk/client.d.mts +165 -11
- package/node_modules/@anthropic-ai/sdk/client.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/client.d.ts +165 -11
- package/node_modules/@anthropic-ai/sdk/client.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/client.js +415 -38
- package/node_modules/@anthropic-ai/sdk/client.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/client.mjs +414 -37
- package/node_modules/@anthropic-ai/sdk/client.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.js +7 -2
- package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +8 -3
- package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/api.d.mts +11 -0
- package/node_modules/@anthropic-ai/sdk/core/api.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/api.d.ts +11 -0
- package/node_modules/@anthropic-ai/sdk/core/api.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/api.js +3 -0
- package/node_modules/@anthropic-ai/sdk/core/api.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/api.mjs +2 -0
- package/node_modules/@anthropic-ai/sdk/core/api.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts +131 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts +131 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.js +317 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.mjs +277 -0
- package/node_modules/@anthropic-ai/sdk/core/credentials.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/error.d.mts +12 -0
- package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/error.d.ts +12 -0
- package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/error.js +18 -1
- package/node_modules/@anthropic-ai/sdk/core/error.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/error.mjs +16 -0
- package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts +154 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts +154 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.js +174 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.mjs +168 -0
- package/node_modules/@anthropic-ai/sdk/core/middleware.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +20 -0
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +20 -0
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.js +26 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +24 -0
- package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +9 -0
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +9 -0
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.js +34 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +34 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/error.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/error.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/error.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/error.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/error.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/error.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts +23 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts +23 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js +31 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs +23 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts +6 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts +6 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts +11 -5
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts +11 -5
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js +2 -2
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs +2 -2
- package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/json-schema.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts +2 -2
- package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts +2 -2
- package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/zod.js +1 -2
- package/node_modules/@anthropic-ai/sdk/helpers/zod.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs +1 -2
- package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/index.d.mts +4 -2
- package/node_modules/@anthropic-ai/sdk/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/index.d.ts +4 -2
- package/node_modules/@anthropic-ai/sdk/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/index.js +5 -1
- package/node_modules/@anthropic-ai/sdk/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/index.mjs +3 -2
- package/node_modules/@anthropic-ai/sdk/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts +136 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts +136 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.js +531 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs +523 -0
- package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +7 -0
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +7 -0
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.js +45 -4
- package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +43 -3
- package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js +34 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs +30 -0
- package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +2 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +2 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.js +16 -10
- package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +15 -9
- package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts +7 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts +7 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js +13 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs +9 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.js +14 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js +277 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs +274 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts +57 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts +57 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.js +3 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs +2 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts +15 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts +15 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js +230 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs +217 -0
- package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +52 -2
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +52 -2
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.js +12 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +10 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts +4 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.js +50 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs +45 -0
- package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +6 -0
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +6 -0
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts +60 -0
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts +60 -0
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.js +27 -6
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.mjs +25 -5
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +12 -6
- package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +12 -6
- package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts +13 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts +13 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js +26 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs +23 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts +31 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts +31 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js +75 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs +71 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts +23 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts +23 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js +44 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs +36 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +11 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +11 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +37 -11
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +35 -10
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts +11 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts +11 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js +18 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs +15 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.js +3 -16
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs +2 -16
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +9 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +9 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +23 -2
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +23 -2
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.js +8 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs +5 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +2 -0
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +66 -31
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +66 -31
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +2 -0
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +37 -26
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +34 -23
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/beta-parser.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts +39 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts +39 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js +245 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs +208 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts +11 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts +11 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js +72 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs +35 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts +40 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts +40 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js +82 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs +79 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts +54 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts +54 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js +112 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs +108 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts +96 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts +96 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js +266 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs +224 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts +21 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts +21 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js +130 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs +94 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts +4 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.js +8 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs +3 -0
- package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts +4 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.js +18 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs +4 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts +95 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts +95 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js +226 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs +217 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts +227 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts +227 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js +569 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs +564 -0
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts +31 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts +31 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.js +58 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs +55 -0
- package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts +98 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts +98 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.js +754 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs +749 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/parser.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/parser.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/parser.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts +22 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts +22 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js +88 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs +85 -0
- package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts +38 -5
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts +38 -5
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js +28 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs +25 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js +107 -29
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs +105 -27
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts +179 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts +179 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js +728 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs +724 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/lib/transform-json-schema.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/package.json +32 -15
- package/node_modules/@anthropic-ai/sdk/pagination.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/pagination.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/pagination.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resource.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resource.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resource.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/resource.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts +608 -68
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts +608 -68
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +2 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +2 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +51 -13
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +51 -13
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +22 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +22 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts +306 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts +306 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +55 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +51 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts +698 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts +698 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +196 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +192 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts +309 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts +309 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +116 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +112 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts +426 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts +426 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +150 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +145 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js +9 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs +4 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts +501 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts +501 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +257 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +251 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts +1 -388
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts +1 -388
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js +2 -138
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs +1 -136
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +22 -22
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +22 -22
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +5 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +5 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +11 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +11 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +23 -13
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +6 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts +136 -24
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts +136 -24
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +10 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +10 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts +60 -16
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts +60 -16
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +12 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +12 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts +105 -7
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts +105 -7
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +6 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +6 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +81 -30
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +81 -30
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +12 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +12 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +2453 -380
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +2453 -380
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +16 -22
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +16 -22
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +6 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +6 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts +643 -19
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts +643 -19
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +29 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +27 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts +3 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts +3 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js +3 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts +455 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts +455 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +5 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +6 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts +78 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts +78 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +61 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +57 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js +9 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs +4 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts +195 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts +195 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +88 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +83 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js +6 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts +13 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts +13 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +5 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +5 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts +31 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts +31 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +32 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +32 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts +163 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts +163 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +129 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +125 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js +9 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs +4 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts +212 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts +212 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +181 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +176 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js +6 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts +62 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts +62 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.js +5 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs +5 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts +256 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts +256 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +22 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +22 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts +2 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts +2 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts +466 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts +466 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js +20 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs +16 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +18 -11
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +18 -11
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/files.d.mts +105 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.d.ts +105 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.js +52 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.mjs +48 -0
- package/node_modules/@anthropic-ai/sdk/resources/files.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +4 -2
- package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +4 -2
- package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.js +5 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.mjs +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +20 -11
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +20 -11
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +17 -9
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +17 -9
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +1782 -162
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +1782 -162
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +23 -28
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +23 -28
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.js +9 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs +4 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts +129 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts +129 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +44 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +39 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts +104 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts +104 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +41 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +37 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.js +6 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.mjs +3 -0
- package/node_modules/@anthropic-ai/sdk/resources/skills.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/resources.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +18 -2
- package/node_modules/@anthropic-ai/sdk/src/client.ts +749 -42
- package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +14 -4
- package/node_modules/@anthropic-ai/sdk/src/core/api.ts +11 -0
- package/node_modules/@anthropic-ai/sdk/src/core/credentials.ts +379 -0
- package/node_modules/@anthropic-ai/sdk/src/core/error.ts +17 -0
- package/node_modules/@anthropic-ai/sdk/src/core/middleware.ts +339 -0
- package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +60 -0
- package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +38 -1
- package/node_modules/@anthropic-ai/sdk/src/helpers/beta/environments.ts +34 -0
- package/node_modules/@anthropic-ai/sdk/src/helpers/beta/json-schema.ts +7 -0
- package/node_modules/@anthropic-ai/sdk/src/helpers/beta/mcp.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/src/helpers/beta/zod.ts +14 -10
- package/node_modules/@anthropic-ai/sdk/src/helpers/zod.ts +3 -6
- package/node_modules/@anthropic-ai/sdk/src/index.ts +16 -1
- package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -5
- package/node_modules/@anthropic-ai/sdk/src/internal/file-store.ts +550 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +47 -4
- package/node_modules/@anthropic-ai/sdk/src/internal/message-stream-utils.ts +30 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +16 -11
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/LICENSE.md +13 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/README.md +3 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/formats.ts +10 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/index.ts +13 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/stringify.ts +385 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/types.ts +71 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/qs/utils.ts +265 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +55 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/request-signal.ts +68 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/stainless-helper-header.ts +122 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/abort.ts +21 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/async-queue.ts +66 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/backoff.ts +41 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +41 -10
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/promise.ts +18 -0
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/query.ts +2 -18
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +25 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/time.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +72 -33
- package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +36 -24
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/credential-chain.ts +292 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/identity-token.ts +37 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/oidc-federation.ts +140 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/token-cache.ts +130 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/types.ts +295 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials/user-oauth.ts +144 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/credentials.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/environments/index.ts +23 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/environments/poller.ts +299 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/environments/worker.ts +779 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/helper-client.ts +86 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/middleware.ts +994 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/sessions/accumulate.ts +130 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaRunnableTool.ts +71 -7
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaToolRunner.ts +135 -35
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/SessionToolRunner.ts +885 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +806 -69
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/index.ts +34 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +690 -28
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +441 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +996 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +453 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +626 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/index.ts +42 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +705 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments.ts +1 -540
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +28 -28
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +312 -5
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/index.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +141 -31
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +66 -20
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +112 -9
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +90 -33
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +90 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +2755 -211
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +7 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +888 -18
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/index.ts +60 -1
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +669 -14
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +123 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/index.ts +15 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +330 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/index.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +15 -14
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +49 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +252 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/index.ts +23 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +347 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/user-profiles.ts +76 -5
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +347 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/index.ts +17 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +34 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/webhooks.ts +762 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +18 -11
- package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +163 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +89 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +30 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +70 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +2202 -226
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +21 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +194 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +160 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/skills.ts +3 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/fs-util.ts +190 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/memories.ts +1017 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.browser.ts +172 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.ts +914 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/skills.ts +372 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/sync-interval.ts +30 -0
- package/node_modules/@anthropic-ai/sdk/src/tools/memory/node.browser.ts +64 -0
- package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/streaming.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/streaming.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/streaming.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts +75 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts +75 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +196 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +185 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts +173 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts +173 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js +902 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs +895 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts +82 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts +82 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js +151 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs +131 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts +190 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts +190 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js +819 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs +797 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts +82 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts +82 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js +352 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs +344 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts +19 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts +19 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js +29 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs +25 -0
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts +27 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts +27 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js +49 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs +44 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs.map +1 -0
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/uploads.d.mts +1 -0
- package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/uploads.d.ts +1 -0
- package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/uploads.mjs +1 -0
- package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +1 -1
- package/node_modules/@anthropic-ai/sdk/version.d.mts +1 -1
- package/node_modules/@anthropic-ai/sdk/version.d.mts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/version.d.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/version.d.ts.map +1 -1
- package/node_modules/@anthropic-ai/sdk/version.js +1 -1
- package/node_modules/@anthropic-ai/sdk/version.js.map +1 -1
- package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
- package/node_modules/@anthropic-ai/sdk/version.mjs.map +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@stablelib/base64/LICENSE +21 -0
- package/node_modules/@stablelib/base64/base64.bench.ts +25 -0
- package/node_modules/@stablelib/base64/base64.test.ts +85 -0
- package/node_modules/@stablelib/base64/base64.ts +283 -0
- package/node_modules/@stablelib/base64/lib/base64.bench.d.ts +1 -0
- package/node_modules/@stablelib/base64/lib/base64.bench.js +23 -0
- package/node_modules/@stablelib/base64/lib/base64.bench.js.map +1 -0
- package/node_modules/@stablelib/base64/lib/base64.d.ts +34 -0
- package/node_modules/@stablelib/base64/lib/base64.js +282 -0
- package/node_modules/@stablelib/base64/lib/base64.js.map +1 -0
- package/node_modules/@stablelib/base64/lib/base64.test.d.ts +1 -0
- package/node_modules/@stablelib/base64/lib/base64.test.js +82 -0
- package/node_modules/@stablelib/base64/lib/base64.test.js.map +1 -0
- package/node_modules/@stablelib/base64/package.json +25 -0
- package/node_modules/@stablelib/base64/tsconfig.json +27 -0
- package/node_modules/fast-sha256/LICENSE +24 -0
- package/node_modules/fast-sha256/README.md +127 -0
- package/node_modules/fast-sha256/package.json +42 -0
- package/node_modules/fast-sha256/sha256.d.ts +39 -0
- package/node_modules/fast-sha256/sha256.js +427 -0
- package/node_modules/fast-sha256/sha256.min.js +1 -0
- package/node_modules/standardwebhooks/README.md +41 -0
- package/node_modules/standardwebhooks/dist/index.d.ts +24 -0
- package/node_modules/standardwebhooks/dist/index.js +106 -0
- package/node_modules/standardwebhooks/dist/index.js.map +1 -0
- package/node_modules/standardwebhooks/dist/timing_safe_equal.d.ts +1 -0
- package/node_modules/standardwebhooks/dist/timing_safe_equal.js +30 -0
- package/node_modules/standardwebhooks/dist/timing_safe_equal.js.map +1 -0
- package/node_modules/standardwebhooks/package.json +45 -0
- package/package.json +17 -8
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts +0 -34
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts +0 -34
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts +0 -132
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts +0 -132
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js +0 -294
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs +0 -290
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/src/lib/stainless-helper-header.ts +0 -80
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/ToolRunner.ts +0 -381
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Session-level memory-store download and sync.
|
|
4
|
+
*
|
|
5
|
+
* A session may have several memory stores attached. This module resolves
|
|
6
|
+
* where each store's folder goes on disk, opens a {@link LocalFileStore}
|
|
7
|
+
* there, and reconciles each folder with its remote store — the merge rules
|
|
8
|
+
* live on {@link SessionMemoryStores}.
|
|
9
|
+
*
|
|
10
|
+
* Node-only (it sits on the filesystem-backed FileStore); like `skills.ts`,
|
|
11
|
+
* it is reachable through the shimmed `node.ts` entry point.
|
|
12
|
+
*/
|
|
13
|
+
var _SessionMemoryStores_instances, _SessionMemoryStores_client, _SessionMemoryStores_workdir, _SessionMemoryStores_syncIntervalMs, _SessionMemoryStores_syncDeletions, _SessionMemoryStores_log, _SessionMemoryStores_lastSyncAt, _SessionMemoryStores_finished, _SessionMemoryStores_stores, _SessionMemoryStores_storeRoot, _SessionMemoryStores_scanMarker, _SessionMemoryStores_syncStore, _SessionMemoryStores_flushStore, _SessionMemoryStores_recover, _SessionMemoryStores_stampAndPull, _SessionMemoryStores_syncPath, _SessionMemoryStores_removeLocal, _SessionMemoryStores_write, _SessionMemoryStores_pullAll, _SessionMemoryStores_uploadAll, _SessionMemoryStores_listMemories, _SessionMemoryStores_upload, _SessionMemoryStores_corroboratedDelete, _SessionMemoryStores_deleteRemote;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SessionMemoryStores = exports.SessionMemoryError = exports.UPLOAD_CONCURRENCY = exports.DELETE_CORROBORATION_MS = exports.MARKER_PATH = exports.MEMORY_FLUSH_TIMEOUT_MS = exports.MIN_MEMORY_SYNC_INTERVAL_MS = exports.DEFAULT_MEMORY_SYNC_INTERVAL_MS = void 0;
|
|
16
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
17
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
18
|
+
const node_crypto_1 = require("node:crypto");
|
|
19
|
+
const error_1 = require("../../core/error.js");
|
|
20
|
+
const log_1 = require("../../internal/utils/log.js");
|
|
21
|
+
const bytes_1 = require("../../internal/utils/bytes.js");
|
|
22
|
+
const backoff_1 = require("../../internal/utils/backoff.js");
|
|
23
|
+
const file_store_1 = require("../../internal/file-store.js");
|
|
24
|
+
const sync_interval_1 = require("./sync-interval.js");
|
|
25
|
+
var sync_interval_2 = require("./sync-interval.js");
|
|
26
|
+
Object.defineProperty(exports, "DEFAULT_MEMORY_SYNC_INTERVAL_MS", { enumerable: true, get: function () { return sync_interval_2.DEFAULT_MEMORY_SYNC_INTERVAL_MS; } });
|
|
27
|
+
Object.defineProperty(exports, "MIN_MEMORY_SYNC_INTERVAL_MS", { enumerable: true, get: function () { return sync_interval_2.MIN_MEMORY_SYNC_INTERVAL_MS; } });
|
|
28
|
+
/**
|
|
29
|
+
* Time bound the worker puts on each teardown pass — the final
|
|
30
|
+
* {@link SessionMemoryStores.finish}, then {@link SessionMemoryStores.flushWrites} —
|
|
31
|
+
* so a slow server cannot stall teardown.
|
|
32
|
+
*/
|
|
33
|
+
exports.MEMORY_FLUSH_TIMEOUT_MS = 30000;
|
|
34
|
+
/**
|
|
35
|
+
* Marker file stamped into every store folder; a sync trusts the folder only
|
|
36
|
+
* when it matches. Never itself syncs.
|
|
37
|
+
*/
|
|
38
|
+
exports.MARKER_PATH = '.anthropic-memory-store';
|
|
39
|
+
const MARKER_VERSION = 1;
|
|
40
|
+
function markerSha(memoryStoreId) {
|
|
41
|
+
return (0, node_crypto_1.createHash)('sha256').update(`version ${MARKER_VERSION}\n${memoryStoreId}`, 'utf-8').digest('hex');
|
|
42
|
+
}
|
|
43
|
+
/** How long a file must stay missing locally before its server delete goes out. */
|
|
44
|
+
exports.DELETE_CORROBORATION_MS = 30000;
|
|
45
|
+
/**
|
|
46
|
+
* Page sizes for memory listings — the API's maximum per view: `basic` pages
|
|
47
|
+
* carry up to 100 items, `full` pages are capped by the server.
|
|
48
|
+
*/
|
|
49
|
+
const LIST_PAGE_SIZE = 100;
|
|
50
|
+
const FULL_LIST_PAGE_SIZE = 20;
|
|
51
|
+
/**
|
|
52
|
+
* How many single-memory content fetches may be in flight at once during one
|
|
53
|
+
* store's pull pass. A sync rarely pulls more than a handful of memories, so
|
|
54
|
+
* a higher cap buys nothing in the common case.
|
|
55
|
+
*/
|
|
56
|
+
const FETCH_CONCURRENCY = 16;
|
|
57
|
+
/**
|
|
58
|
+
* How many uploads one store's flush keeps in flight. At ~0.3s per upload,
|
|
59
|
+
* 32 clears the server's 2000-memories-per-store cap inside
|
|
60
|
+
* {@link MEMORY_FLUSH_TIMEOUT_MS}.
|
|
61
|
+
*/
|
|
62
|
+
exports.UPLOAD_CONCURRENCY = 32;
|
|
63
|
+
/**
|
|
64
|
+
* Per-sync remote-delete cap bounds. The floor lets a small store's
|
|
65
|
+
* deletes clear in one pass; the ceiling caps damage on large ones.
|
|
66
|
+
*/
|
|
67
|
+
const DELETE_CAP_FLOOR = 8;
|
|
68
|
+
const DELETE_CAP_CEILING = 50;
|
|
69
|
+
/**
|
|
70
|
+
* A session's memory stores could not be mounted.
|
|
71
|
+
*
|
|
72
|
+
* Thrown by {@link SessionMemoryStores.download} when a store cannot be
|
|
73
|
+
* materialised on disk, and by the environment worker when a work item for a
|
|
74
|
+
* session that has memory stores carried no sessions token to reach them with.
|
|
75
|
+
*/
|
|
76
|
+
class SessionMemoryError extends error_1.AnthropicError {
|
|
77
|
+
constructor(message, cause) {
|
|
78
|
+
super(message);
|
|
79
|
+
this.name = 'SessionMemoryError';
|
|
80
|
+
// in some environments the 'cause' property is already declared
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
if (cause !== undefined)
|
|
83
|
+
this.cause = cause;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.SessionMemoryError = SessionMemoryError;
|
|
87
|
+
/** One sync's remote-delete gate and counters. */
|
|
88
|
+
class DeletePass {
|
|
89
|
+
constructor(mode, cap,
|
|
90
|
+
/** Skip the delete wait — set on the session's last sync. */
|
|
91
|
+
waiveWindow) {
|
|
92
|
+
this.mode = mode;
|
|
93
|
+
this.cap = cap;
|
|
94
|
+
this.waiveWindow = waiveWindow;
|
|
95
|
+
this.attempted = 0;
|
|
96
|
+
this.capped = 0;
|
|
97
|
+
this.suppressed = 0;
|
|
98
|
+
}
|
|
99
|
+
takeSlot() {
|
|
100
|
+
if (this.attempted >= this.cap) {
|
|
101
|
+
this.capped++;
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
this.attempted++;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The memory stores attached to one session, materialised on disk.
|
|
110
|
+
*
|
|
111
|
+
* {@link SessionMemoryStores.download} opens a {@link LocalFileStore} at each
|
|
112
|
+
* attached store's directory (its `mount_path`, or a workdir fallback — see
|
|
113
|
+
* {@link SessionMemoryStores.download}), pulls its memories, and records each
|
|
114
|
+
* one's `content_sha256` as the sync baseline. Each sync
|
|
115
|
+
* ({@link SessionMemoryStores.syncIfDue} on the worker's cadence,
|
|
116
|
+
* {@link SessionMemoryStores.finish} once at the end) reconciles disk against
|
|
117
|
+
* server, per store and per path:
|
|
118
|
+
*
|
|
119
|
+
* - a memory changed only remotely is written to disk;
|
|
120
|
+
* - a file changed only locally is uploaded — an update with a
|
|
121
|
+
* `content_sha256` precondition, or a create for a new file;
|
|
122
|
+
* - a file changed on both sides logs a warning and takes the server version;
|
|
123
|
+
* - a file the server refuses (too large, invalid content) is skipped —
|
|
124
|
+
* warned once and retried only after the file changes; other files keep
|
|
125
|
+
* syncing;
|
|
126
|
+
* - a file deleted locally is deleted on the server after a delay and a
|
|
127
|
+
* re-check — never on the first sync that notices, and only up to a
|
|
128
|
+
* per-sync cap. `syncDeletions` gates it;
|
|
129
|
+
* - a memory deleted on the server is deleted on disk — unless the local
|
|
130
|
+
* file holds un-pushed edits: a writable store re-creates the memory
|
|
131
|
+
* from the file, a read-only one keeps the file unsynced;
|
|
132
|
+
* - a store attached read-only pulls but never pushes.
|
|
133
|
+
*
|
|
134
|
+
* A download pulls the whole store, so it lists with content included. The
|
|
135
|
+
* recurring syncs instead run two phases: a content-free listing (paths and
|
|
136
|
+
* shas) drives the merge decisions, then only the memories actually being
|
|
137
|
+
* written to disk are fetched, a bounded number at a time. A sync that finds
|
|
138
|
+
* nothing changed moves no content at all.
|
|
139
|
+
*
|
|
140
|
+
* A file whose write to disk failed is never in the baseline, so its absence
|
|
141
|
+
* reads as a failed download — it is pulled again, never deleted. A write
|
|
142
|
+
* never re-creates a store folder that vanished mid-sync: it fails, and the
|
|
143
|
+
* next sync's scan finds whatever is at the path by then — nothing
|
|
144
|
+
* (re-downloaded) or someone else's files (left alone) — under the rules
|
|
145
|
+
* below.
|
|
146
|
+
*
|
|
147
|
+
* A store folder that loses its {@link MARKER_PATH} marker, is emptied,
|
|
148
|
+
* or vanishes is re-downloaded rather than treated as a mass local
|
|
149
|
+
* delete; a folder whose marker names another store is left as found —
|
|
150
|
+
* nothing pushed, nothing deleted.
|
|
151
|
+
*
|
|
152
|
+
* Two things about the store's directory make
|
|
153
|
+
* {@link SessionMemoryStores.download} refuse the session outright, with
|
|
154
|
+
* {@link SessionMemoryError}: a `mount_path` that is not a clean absolute
|
|
155
|
+
* path, and a directory already sitting at that path.
|
|
156
|
+
*
|
|
157
|
+
* {@link SessionMemoryStores.download} throws on the first store it cannot
|
|
158
|
+
* materialise. The syncs never throw: mid-session, one bad store or one bad
|
|
159
|
+
* file is logged and the rest continue. Instances are not safe for concurrent
|
|
160
|
+
* use. The worker builds one on its token-scoped sub-client (the memory
|
|
161
|
+
* endpoints reject the environment key): `syncIfDue` after each tool call,
|
|
162
|
+
* `finish` once at a clean end, a bounded {@link SessionMemoryStores.flushWrites}
|
|
163
|
+
* in every teardown, `dispose` last.
|
|
164
|
+
*/
|
|
165
|
+
class SessionMemoryStores {
|
|
166
|
+
constructor(client, opts) {
|
|
167
|
+
_SessionMemoryStores_instances.add(this);
|
|
168
|
+
_SessionMemoryStores_client.set(this, void 0);
|
|
169
|
+
_SessionMemoryStores_workdir.set(this, void 0);
|
|
170
|
+
_SessionMemoryStores_syncIntervalMs.set(this, void 0);
|
|
171
|
+
_SessionMemoryStores_syncDeletions.set(this, void 0);
|
|
172
|
+
_SessionMemoryStores_log.set(this, void 0);
|
|
173
|
+
_SessionMemoryStores_lastSyncAt.set(this, void 0);
|
|
174
|
+
_SessionMemoryStores_finished.set(this, false);
|
|
175
|
+
_SessionMemoryStores_stores.set(this, []);
|
|
176
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_client, client, "f");
|
|
177
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_workdir, opts.workdir, "f");
|
|
178
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_syncIntervalMs, opts.syncIntervalMs ?? sync_interval_1.DEFAULT_MEMORY_SYNC_INTERVAL_MS, "f");
|
|
179
|
+
(0, sync_interval_1.checkMemorySyncInterval)(tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_syncIntervalMs, "f"), 'syncIntervalMs');
|
|
180
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_syncDeletions, opts.syncDeletions ?? 'enabled', "f");
|
|
181
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_log, (0, log_1.loggerFor)(client), "f");
|
|
182
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_lastSyncAt, Date.now(), "f");
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Every attached store's root directory.
|
|
186
|
+
*
|
|
187
|
+
* The worker lists these as the file tools' allowed roots so a store
|
|
188
|
+
* mounted outside the workdir stays reachable.
|
|
189
|
+
*/
|
|
190
|
+
get roots() {
|
|
191
|
+
return tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f").map((s) => s.files.root().path);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Root directories of stores attached read-only.
|
|
195
|
+
*
|
|
196
|
+
* The file tools consult this to refuse writes into read-only stores.
|
|
197
|
+
*/
|
|
198
|
+
get readOnlyRoots() {
|
|
199
|
+
return tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f").filter((s) => s.readOnly).map((s) => s.files.root().path);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Download every attached store's memories to disk.
|
|
203
|
+
*
|
|
204
|
+
* `session` arrives already fetched — one snapshot shared with the skills
|
|
205
|
+
* download, so the two cannot disagree about the resources.
|
|
206
|
+
*/
|
|
207
|
+
async download(session) {
|
|
208
|
+
for (const resource of session.resources) {
|
|
209
|
+
if (resource.type !== 'memory_store')
|
|
210
|
+
continue;
|
|
211
|
+
const root = tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_storeRoot).call(this, resource);
|
|
212
|
+
let store;
|
|
213
|
+
try {
|
|
214
|
+
store = {
|
|
215
|
+
memoryStoreId: resource.memory_store_id,
|
|
216
|
+
// utf8: a binary file is refused at put/get, not mid-sync.
|
|
217
|
+
files: await file_store_1.LocalFileStore.open(root, { utf8: true }),
|
|
218
|
+
readOnly: resource.access === 'read_only',
|
|
219
|
+
baseline: new Map(),
|
|
220
|
+
refusedShas: new Map(),
|
|
221
|
+
pendingDeletes: new Map(),
|
|
222
|
+
};
|
|
223
|
+
// A root `open` did not create is a dead run's leftovers; the first
|
|
224
|
+
// sync would upload them into the customer's store.
|
|
225
|
+
if (!store.files.root().removedOnDispose) {
|
|
226
|
+
// The configured path, not root().path — that one is resolved and
|
|
227
|
+
// would name a symlinked mount's target.
|
|
228
|
+
throw new SessionMemoryError(`something already exists at the memory store's path: ${root} ` +
|
|
229
|
+
`(memory_store_id=${resource.memory_store_id}); ` +
|
|
230
|
+
'it must not exist when the session starts');
|
|
231
|
+
}
|
|
232
|
+
try {
|
|
233
|
+
await store.files.createRoot();
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
if (!isErrno(e))
|
|
237
|
+
throw e;
|
|
238
|
+
// An unmountable root fails the item, not just one file.
|
|
239
|
+
throw new SessionMemoryError(`cannot create the memory store's folder: ${root} ` +
|
|
240
|
+
`(memory_store_id=${resource.memory_store_id}): ${e}; ` +
|
|
241
|
+
'the worker host must make this mount path writable', e);
|
|
242
|
+
}
|
|
243
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_stampAndPull).call(this, store);
|
|
244
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").info('downloaded memories', {
|
|
245
|
+
count: store.baseline.size,
|
|
246
|
+
memory_store_id: store.memoryStoreId,
|
|
247
|
+
dest: store.files.root().path,
|
|
248
|
+
});
|
|
249
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f").push(store);
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
// A half-downloaded folder self-destructs; `dispose` leaves a refused
|
|
253
|
+
// pre-existing directory exactly as found.
|
|
254
|
+
if (store)
|
|
255
|
+
await store.files.dispose().catch(() => { });
|
|
256
|
+
// Every store must land: a session missing a folder its system prompt
|
|
257
|
+
// names runs with amnesia and syncs nothing back.
|
|
258
|
+
if (e instanceof SessionMemoryError)
|
|
259
|
+
throw e;
|
|
260
|
+
throw new SessionMemoryError(`failed to download memory store memory_store_id=${resource.memory_store_id}: ${e}`, e);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_lastSyncAt, Date.now(), "f");
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The session's last sync — skips the delete wait, so calling it twice
|
|
267
|
+
* would undo the protection; it throws instead.
|
|
268
|
+
*/
|
|
269
|
+
async finish() {
|
|
270
|
+
if (tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_finished, "f")) {
|
|
271
|
+
throw new error_1.AnthropicError("finish() was already called: it is the session's last sync and runs once");
|
|
272
|
+
}
|
|
273
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_finished, true, "f");
|
|
274
|
+
await this.syncAll(true);
|
|
275
|
+
}
|
|
276
|
+
/** @internal — reconcile every store once; the tests' deterministic driver */
|
|
277
|
+
async syncAll(final) {
|
|
278
|
+
await Promise.all(tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f").map((store) => tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_syncStore).call(this, store, final)));
|
|
279
|
+
tslib_1.__classPrivateFieldSet(this, _SessionMemoryStores_lastSyncAt, Date.now(), "f");
|
|
280
|
+
}
|
|
281
|
+
/** Sync when `syncIntervalMs` has elapsed since the last one. Never throws. */
|
|
282
|
+
async syncIfDue() {
|
|
283
|
+
if (Date.now() - tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_lastSyncAt, "f") < tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_syncIntervalMs, "f"))
|
|
284
|
+
return;
|
|
285
|
+
await this.syncAll(false);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Upload new and changed files; send no deletes and pull nothing.
|
|
289
|
+
*
|
|
290
|
+
* The push-only rescue pass for a session ending on an error or
|
|
291
|
+
* cancel — best-effort, bounded by the caller: once `signal` aborts no
|
|
292
|
+
* further upload starts, each store cut off part-way logs how many
|
|
293
|
+
* changed files it had not finished uploading, and this resolves without
|
|
294
|
+
* waiting for requests already in flight. Each store uploads up to
|
|
295
|
+
* {@link UPLOAD_CONCURRENCY} files at a time. Skips read-only stores,
|
|
296
|
+
* refused files, files the server already holds, and folders that fail
|
|
297
|
+
* the marker check. Never throws.
|
|
298
|
+
*/
|
|
299
|
+
async flushWrites(signal) {
|
|
300
|
+
await Promise.all(tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f").map((store) => tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_flushStore).call(this, store, signal)));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Remove every store directory that {@link SessionMemoryStores.download}
|
|
304
|
+
* created. Pre-existing directories are left alone — that is
|
|
305
|
+
* {@link FileStore.dispose}'s own rule. A folder that fails the marker
|
|
306
|
+
* check is kept too — sync left it as found, so must dispose.
|
|
307
|
+
*/
|
|
308
|
+
async dispose() {
|
|
309
|
+
for (const store of tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_stores, "f")) {
|
|
310
|
+
const root = store.files.root();
|
|
311
|
+
try {
|
|
312
|
+
const scan = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_scanMarker).call(this, store);
|
|
313
|
+
if (!scan.markerOk && Object.keys(scan.files).length > 0) {
|
|
314
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`${scan.distrustReason}; leaving the memory store folder on disk`, {
|
|
315
|
+
root: root.path,
|
|
316
|
+
memory_store_id: store.memoryStoreId,
|
|
317
|
+
});
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
await store.files.dispose();
|
|
321
|
+
}
|
|
322
|
+
catch (e) {
|
|
323
|
+
if (!(e instanceof file_store_1.FileStoreError) && !isErrno(e))
|
|
324
|
+
throw e;
|
|
325
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to remove the memory store folder', {
|
|
326
|
+
root: store.files.root().path,
|
|
327
|
+
memory_store_id: store.memoryStoreId,
|
|
328
|
+
error: String(e),
|
|
329
|
+
});
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
if (root.removedOnDispose) {
|
|
333
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").info('removed memory store dir', {
|
|
334
|
+
dest: root.path,
|
|
335
|
+
memory_store_id: store.memoryStoreId,
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
exports.SessionMemoryStores = SessionMemoryStores;
|
|
342
|
+
_SessionMemoryStores_client = new WeakMap(), _SessionMemoryStores_workdir = new WeakMap(), _SessionMemoryStores_syncIntervalMs = new WeakMap(), _SessionMemoryStores_syncDeletions = new WeakMap(), _SessionMemoryStores_log = new WeakMap(), _SessionMemoryStores_lastSyncAt = new WeakMap(), _SessionMemoryStores_finished = new WeakMap(), _SessionMemoryStores_stores = new WeakMap(), _SessionMemoryStores_instances = new WeakSet(), _SessionMemoryStores_storeRoot = function _SessionMemoryStores_storeRoot(resource) {
|
|
343
|
+
if (resource.mount_path) {
|
|
344
|
+
if (!(0, file_store_1.isPathLegal)(resource.mount_path)) {
|
|
345
|
+
throw new SessionMemoryError(`memory store mount_path is not a clean absolute path: ${JSON.stringify(resource.mount_path)} ` +
|
|
346
|
+
`(memory_store_id=${resource.memory_store_id})`);
|
|
347
|
+
}
|
|
348
|
+
return resource.mount_path;
|
|
349
|
+
}
|
|
350
|
+
// No mount_path at all: nothing points the agent anywhere, so the workdir
|
|
351
|
+
// is as good a home as any.
|
|
352
|
+
return path.join(tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_workdir, "f"), 'memory', resource.name || resource.memory_store_id);
|
|
353
|
+
}, _SessionMemoryStores_scanMarker = async function _SessionMemoryStores_scanMarker(store) {
|
|
354
|
+
const local = await store.files.hashtree();
|
|
355
|
+
const marker = local[exports.MARKER_PATH];
|
|
356
|
+
delete local[exports.MARKER_PATH];
|
|
357
|
+
if (marker === markerSha(store.memoryStoreId)) {
|
|
358
|
+
return { files: local, markerOk: true, distrustReason: null };
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
files: local,
|
|
362
|
+
markerOk: false,
|
|
363
|
+
distrustReason: marker !== undefined ? 'the marker file does not match this store' : 'the marker file is gone',
|
|
364
|
+
};
|
|
365
|
+
}, _SessionMemoryStores_syncStore = async function _SessionMemoryStores_syncStore(store, final) {
|
|
366
|
+
try {
|
|
367
|
+
const scan = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_scanMarker).call(this, store);
|
|
368
|
+
const local = scan.files;
|
|
369
|
+
if (!scan.markerOk) {
|
|
370
|
+
if (Object.keys(local).length > 0) {
|
|
371
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`${scan.distrustReason}; leaving the memory store folder as found and not syncing`, {
|
|
372
|
+
root: store.files.root().path,
|
|
373
|
+
memory_store_id: store.memoryStoreId,
|
|
374
|
+
});
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_recover).call(this, store, 'the folder or its marker is gone');
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
// A lone file vanishing is an ordinary deletion; two or more at
|
|
381
|
+
// once with nothing left is a wiped folder.
|
|
382
|
+
if (Object.keys(local).length === 0 && store.baseline.size > 1) {
|
|
383
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_recover).call(this, store, 'every memory file is gone at once');
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
const remote = new Map();
|
|
387
|
+
for await (const [rel, item] of tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_listMemories).call(this, store.memoryStoreId)) {
|
|
388
|
+
remote.set(rel, item);
|
|
389
|
+
}
|
|
390
|
+
const deletes = new DeletePass(tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_syncDeletions, "f"), Math.max(DELETE_CAP_FLOOR, Math.min(DELETE_CAP_CEILING, Math.floor(store.baseline.size / 4))), final);
|
|
391
|
+
const pulls = [];
|
|
392
|
+
const baseline = new Map();
|
|
393
|
+
const paths = [...new Set([...remote.keys(), ...Object.keys(local), ...store.baseline.keys()])].sort();
|
|
394
|
+
for (const rel of paths) {
|
|
395
|
+
const remoteItem = remote.get(rel);
|
|
396
|
+
const localSha = local[rel];
|
|
397
|
+
const baseSha = store.baseline.get(rel);
|
|
398
|
+
let sha;
|
|
399
|
+
if (localSha === undefined &&
|
|
400
|
+
baseSha !== undefined &&
|
|
401
|
+
remoteItem !== undefined &&
|
|
402
|
+
remoteItem.content_sha256 === baseSha &&
|
|
403
|
+
!store.readOnly) {
|
|
404
|
+
sha = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_corroboratedDelete).call(this, store, rel, remoteItem, baseSha, deletes);
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
sha = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_syncPath).call(this, store, rel, remoteItem, localSha, pulls);
|
|
408
|
+
}
|
|
409
|
+
if (sha !== undefined)
|
|
410
|
+
baseline.set(rel, sha);
|
|
411
|
+
}
|
|
412
|
+
store.baseline = baseline;
|
|
413
|
+
// The content pass: everything above moved only shas.
|
|
414
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_pullAll).call(this, store, pulls);
|
|
415
|
+
if (deletes.suppressed > 0) {
|
|
416
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").debug('remote deletes are disabled; locally deleted memories stay on the server', {
|
|
417
|
+
count: deletes.suppressed,
|
|
418
|
+
memory_store_id: store.memoryStoreId,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
if (deletes.capped > 0) {
|
|
422
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`delete cap reached: ${deletes.mode === 'log_only' ? 'would send' : 'sent'} ` +
|
|
423
|
+
`${deletes.attempted} deletes, held ${deletes.capped} for later syncs`, { memory_store_id: store.memoryStoreId });
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
catch (e) {
|
|
427
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory sync failed', { memory_store_id: store.memoryStoreId, error: String(e) });
|
|
428
|
+
}
|
|
429
|
+
}, _SessionMemoryStores_flushStore = async function _SessionMemoryStores_flushStore(store, signal) {
|
|
430
|
+
const dirty = new Map();
|
|
431
|
+
const unsent = new Set();
|
|
432
|
+
const push = async () => {
|
|
433
|
+
if (store.readOnly)
|
|
434
|
+
return;
|
|
435
|
+
const scan = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_scanMarker).call(this, store);
|
|
436
|
+
if (!scan.markerOk) {
|
|
437
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`${scan.distrustReason}; not uploading anything from the memory store folder`, {
|
|
438
|
+
root: store.files.root().path,
|
|
439
|
+
memory_store_id: store.memoryStoreId,
|
|
440
|
+
});
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
for (const [rel, sha] of Object.entries(scan.files)) {
|
|
444
|
+
if (sha !== store.baseline.get(rel) && store.refusedShas.get(rel) !== sha) {
|
|
445
|
+
dirty.set(rel, sha);
|
|
446
|
+
unsent.add(rel);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (dirty.size === 0 || signal?.aborted)
|
|
450
|
+
return;
|
|
451
|
+
const remote = new Map();
|
|
452
|
+
for await (const [rel, item] of tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_listMemories).call(this, store.memoryStoreId)) {
|
|
453
|
+
if (signal?.aborted)
|
|
454
|
+
return;
|
|
455
|
+
remote.set(rel, item);
|
|
456
|
+
}
|
|
457
|
+
const uploads = [];
|
|
458
|
+
for (const rel of [...dirty.keys()].sort()) {
|
|
459
|
+
const localSha = dirty.get(rel);
|
|
460
|
+
const baseSha = store.baseline.get(rel);
|
|
461
|
+
const existing = remote.get(rel);
|
|
462
|
+
if (existing !== undefined && existing.content_sha256 === localSha) {
|
|
463
|
+
store.baseline.set(rel, existing.content_sha256);
|
|
464
|
+
unsent.delete(rel);
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
if (existing !== undefined && existing.content_sha256 !== baseSha) {
|
|
468
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory changed both locally and remotely; the flush leaves the remote version', {
|
|
469
|
+
path: rel,
|
|
470
|
+
memory_store_id: store.memoryStoreId,
|
|
471
|
+
});
|
|
472
|
+
unsent.delete(rel);
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
uploads.push([rel, localSha, existing]);
|
|
476
|
+
}
|
|
477
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_uploadAll).call(this, store, uploads, unsent, signal);
|
|
478
|
+
};
|
|
479
|
+
try {
|
|
480
|
+
await settledOrAborted(push(), signal);
|
|
481
|
+
if (signal?.aborted && unsent.size > 0) {
|
|
482
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`memory flush cut off part-way; ${unsent.size} of ${dirty.size} changed files had not finished uploading`, { memory_store_id: store.memoryStoreId });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
catch (e) {
|
|
486
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory flush failed', { memory_store_id: store.memoryStoreId, error: String(e) });
|
|
487
|
+
}
|
|
488
|
+
}, _SessionMemoryStores_recover =
|
|
489
|
+
/** Rebuild a destroyed folder from the server; sends no deletes, no uploads. */
|
|
490
|
+
async function _SessionMemoryStores_recover(store, reason) {
|
|
491
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn(`${reason}; re-downloading the memory store folder instead of syncing`, {
|
|
492
|
+
root: store.files.root().path,
|
|
493
|
+
memory_store_id: store.memoryStoreId,
|
|
494
|
+
});
|
|
495
|
+
await store.files.createRoot();
|
|
496
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_stampAndPull).call(this, store);
|
|
497
|
+
}, _SessionMemoryStores_stampAndPull =
|
|
498
|
+
/**
|
|
499
|
+
* Write the marker, then pull every remote memory. Baseline is cleared
|
|
500
|
+
* first so a failed write never leaves an entry whose file is not on disk.
|
|
501
|
+
* Every memory is needed here, so the listing carries the content — pages
|
|
502
|
+
* cost far fewer round-trips than a request per memory.
|
|
503
|
+
*/
|
|
504
|
+
async function _SessionMemoryStores_stampAndPull(store) {
|
|
505
|
+
store.baseline = new Map();
|
|
506
|
+
store.pendingDeletes.clear();
|
|
507
|
+
await store.files.put(exports.MARKER_PATH, `version ${MARKER_VERSION}\n${store.memoryStoreId}`);
|
|
508
|
+
for await (const [rel, item] of tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_listMemories).call(this, store.memoryStoreId, 'full')) {
|
|
509
|
+
if (await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_write).call(this, store, rel, item.content ?? '')) {
|
|
510
|
+
store.baseline.set(rel, item.content_sha256);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}, _SessionMemoryStores_syncPath =
|
|
514
|
+
/**
|
|
515
|
+
* Reconcile one path. Returns the sha to record in the baseline, or
|
|
516
|
+
* `undefined` to drop the path from it.
|
|
517
|
+
*
|
|
518
|
+
* `pulls` is an output: when the remote version should be written to disk,
|
|
519
|
+
* this appends `[rel, remote]` to it instead of writing — `rel` is the
|
|
520
|
+
* file to write, `remote` the listed memory whose content `#pullAll` will
|
|
521
|
+
* fetch and write there.
|
|
522
|
+
*/
|
|
523
|
+
async function _SessionMemoryStores_syncPath(store, rel, remote, localSha, pulls) {
|
|
524
|
+
const baseSha = store.baseline.get(rel);
|
|
525
|
+
if (localSha !== undefined) {
|
|
526
|
+
store.pendingDeletes.delete(rel);
|
|
527
|
+
}
|
|
528
|
+
if (!remote) {
|
|
529
|
+
if (localSha === undefined) {
|
|
530
|
+
store.pendingDeletes.delete(rel);
|
|
531
|
+
return undefined;
|
|
532
|
+
}
|
|
533
|
+
if (baseSha !== undefined) {
|
|
534
|
+
if (localSha === baseSha) {
|
|
535
|
+
const fresh = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_removeLocal).call(this, store, rel, baseSha);
|
|
536
|
+
if (fresh === undefined)
|
|
537
|
+
return undefined;
|
|
538
|
+
if (fresh === baseSha)
|
|
539
|
+
return baseSha;
|
|
540
|
+
localSha = fresh;
|
|
541
|
+
}
|
|
542
|
+
// The file holds an un-pushed edit — the only copy; falling
|
|
543
|
+
// through re-creates or keeps it.
|
|
544
|
+
if (store.readOnly) {
|
|
545
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory deleted remotely but edited locally; keeping the file, ' +
|
|
546
|
+
'which a read-only store cannot push', { path: rel, memory_store_id: store.memoryStoreId });
|
|
547
|
+
}
|
|
548
|
+
else if (store.refusedShas.get(rel) !== localSha) {
|
|
549
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").info('memory deleted remotely but edited locally; re-creating it from the file', {
|
|
550
|
+
path: rel,
|
|
551
|
+
memory_store_id: store.memoryStoreId,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (store.readOnly)
|
|
556
|
+
return undefined;
|
|
557
|
+
if (store.refusedShas.get(rel) === localSha)
|
|
558
|
+
return undefined;
|
|
559
|
+
return await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_upload).call(this, store, rel, localSha, undefined);
|
|
560
|
+
}
|
|
561
|
+
const remoteSha = remote.content_sha256;
|
|
562
|
+
const remoteChanged = remoteSha !== baseSha;
|
|
563
|
+
const locallyEdited = localSha !== undefined && localSha !== baseSha && localSha !== remoteSha;
|
|
564
|
+
// Read-only stores never push, so their local edits don't count.
|
|
565
|
+
const localChanged = !store.readOnly && locallyEdited;
|
|
566
|
+
if (localSha === undefined && baseSha !== undefined) {
|
|
567
|
+
// Only successful writes enter the baseline, so this file was verifiably
|
|
568
|
+
// on disk and is now gone: a real local deletion. The unchanged-remote
|
|
569
|
+
// case went to #corroboratedDelete.
|
|
570
|
+
if (remoteChanged) {
|
|
571
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory deleted locally but changed remotely; restoring the remote version', {
|
|
572
|
+
path: rel,
|
|
573
|
+
memory_store_id: store.memoryStoreId,
|
|
574
|
+
});
|
|
575
|
+
store.pendingDeletes.delete(rel);
|
|
576
|
+
pulls.push([rel, remote]);
|
|
577
|
+
}
|
|
578
|
+
return baseSha;
|
|
579
|
+
}
|
|
580
|
+
if (remoteChanged) {
|
|
581
|
+
// The file already holds the remote bytes — adopt without a fetch.
|
|
582
|
+
if (localSha === remoteSha)
|
|
583
|
+
return remoteSha;
|
|
584
|
+
// locallyEdited, not localChanged: warn on read-only overwrites too.
|
|
585
|
+
if (locallyEdited) {
|
|
586
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory changed both locally and remotely; keeping the remote version', {
|
|
587
|
+
path: rel,
|
|
588
|
+
memory_store_id: store.memoryStoreId,
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
pulls.push([rel, remote]);
|
|
592
|
+
return baseSha;
|
|
593
|
+
}
|
|
594
|
+
if (localChanged) {
|
|
595
|
+
if (store.refusedShas.get(rel) === localSha)
|
|
596
|
+
return remoteSha;
|
|
597
|
+
return (await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_upload).call(this, store, rel, localSha, remote)) ?? remoteSha;
|
|
598
|
+
}
|
|
599
|
+
return remoteSha;
|
|
600
|
+
}, _SessionMemoryStores_removeLocal =
|
|
601
|
+
/**
|
|
602
|
+
* Remove the file for a memory the server no longer has, if it still holds
|
|
603
|
+
* `expectSha`. Returns `undefined` when the file is gone from disk,
|
|
604
|
+
* `expectSha` when it must stay in the baseline (I/O error), or the file's
|
|
605
|
+
* fresh sha when it was edited since the scan.
|
|
606
|
+
*/
|
|
607
|
+
async function _SessionMemoryStores_removeLocal(store, rel, expectSha) {
|
|
608
|
+
// Re-read: an edit since the scan makes this file the only copy.
|
|
609
|
+
let freshSha;
|
|
610
|
+
try {
|
|
611
|
+
freshSha = await store.files.hashFile(rel);
|
|
612
|
+
}
|
|
613
|
+
catch (e) {
|
|
614
|
+
if (!(e instanceof file_store_1.FileStoreError) && !isErrno(e))
|
|
615
|
+
throw e;
|
|
616
|
+
return expectSha;
|
|
617
|
+
}
|
|
618
|
+
if (freshSha === null)
|
|
619
|
+
return undefined;
|
|
620
|
+
if (freshSha !== expectSha)
|
|
621
|
+
return freshSha;
|
|
622
|
+
try {
|
|
623
|
+
await store.files.remove(rel);
|
|
624
|
+
}
|
|
625
|
+
catch (e) {
|
|
626
|
+
if (!(e instanceof file_store_1.FileStoreError) && !isErrno(e))
|
|
627
|
+
throw e;
|
|
628
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to remove memory deleted remotely', {
|
|
629
|
+
path: rel,
|
|
630
|
+
memory_store_id: store.memoryStoreId,
|
|
631
|
+
error: String(e),
|
|
632
|
+
});
|
|
633
|
+
return expectSha;
|
|
634
|
+
}
|
|
635
|
+
return undefined;
|
|
636
|
+
}, _SessionMemoryStores_write =
|
|
637
|
+
/**
|
|
638
|
+
* Write a memory's content to disk; `false` (and a warning) on failure.
|
|
639
|
+
*
|
|
640
|
+
* A `..` component in the wire path reaches here as {@link FileStoreError} —
|
|
641
|
+
* that is the escape guard.
|
|
642
|
+
*/
|
|
643
|
+
async function _SessionMemoryStores_write(store, rel, content) {
|
|
644
|
+
try {
|
|
645
|
+
await store.files.put(rel, content);
|
|
646
|
+
}
|
|
647
|
+
catch (e) {
|
|
648
|
+
if (!(e instanceof file_store_1.FileStoreError) && !isErrno(e))
|
|
649
|
+
throw e;
|
|
650
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to write memory', {
|
|
651
|
+
path: rel,
|
|
652
|
+
memory_store_id: store.memoryStoreId,
|
|
653
|
+
error: String(e),
|
|
654
|
+
});
|
|
655
|
+
return false;
|
|
656
|
+
}
|
|
657
|
+
return true;
|
|
658
|
+
}, _SessionMemoryStores_pullAll =
|
|
659
|
+
/**
|
|
660
|
+
* Fetch and write the given memories, {@link FETCH_CONCURRENCY} at a time.
|
|
661
|
+
*
|
|
662
|
+
* The sync's content pass: the listing carried no content, so each memory
|
|
663
|
+
* is fetched individually and written as it arrives. On success the path's
|
|
664
|
+
* baseline advances; on a failed fetch or write the old entry stays and the
|
|
665
|
+
* next sync retries. A 404 means the memory was deleted after the listing —
|
|
666
|
+
* the next sync reconciles it.
|
|
667
|
+
*/
|
|
668
|
+
async function _SessionMemoryStores_pullAll(store, pulls) {
|
|
669
|
+
if (pulls.length === 0)
|
|
670
|
+
return;
|
|
671
|
+
const pullOne = async (rel, listed) => {
|
|
672
|
+
let item;
|
|
673
|
+
try {
|
|
674
|
+
item = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_client, "f").beta.memoryStores.memories.retrieve(listed.id, {
|
|
675
|
+
memory_store_id: store.memoryStoreId,
|
|
676
|
+
view: 'full',
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
catch (e) {
|
|
680
|
+
if ((0, backoff_1.isStatus)(e, 404))
|
|
681
|
+
return;
|
|
682
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to fetch memory content', {
|
|
683
|
+
path: rel,
|
|
684
|
+
memory_store_id: store.memoryStoreId,
|
|
685
|
+
error: String(e),
|
|
686
|
+
});
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
if (await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_write).call(this, store, rel, item.content ?? '')) {
|
|
690
|
+
store.baseline.set(rel, item.content_sha256);
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
// A fixed pool of workers drains the queue; the write stays inside the
|
|
694
|
+
// worker so a slow disk cannot let fetched bodies pile up beyond the bound.
|
|
695
|
+
const queue = pulls[Symbol.iterator]();
|
|
696
|
+
const worker = async () => {
|
|
697
|
+
for (const [rel, listed] of queue)
|
|
698
|
+
await pullOne(rel, listed);
|
|
699
|
+
};
|
|
700
|
+
await Promise.all(Array.from({ length: Math.min(FETCH_CONCURRENCY, pulls.length) }, worker));
|
|
701
|
+
}, _SessionMemoryStores_uploadAll =
|
|
702
|
+
/**
|
|
703
|
+
* Upload the given files, {@link UPLOAD_CONCURRENCY} at a time, taking each
|
|
704
|
+
* path off `unsent` as its upload returns. No upload starts once `signal`
|
|
705
|
+
* aborts; the ones already in flight run to completion.
|
|
706
|
+
*/
|
|
707
|
+
async function _SessionMemoryStores_uploadAll(store, uploads, unsent, signal) {
|
|
708
|
+
const queue = uploads[Symbol.iterator]();
|
|
709
|
+
const worker = async () => {
|
|
710
|
+
for (const [rel, localSha, existing] of queue) {
|
|
711
|
+
if (signal?.aborted)
|
|
712
|
+
return;
|
|
713
|
+
const sha = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_upload).call(this, store, rel, localSha, existing);
|
|
714
|
+
unsent.delete(rel);
|
|
715
|
+
if (sha !== undefined)
|
|
716
|
+
store.baseline.set(rel, sha);
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
await Promise.all(Array.from({ length: Math.min(exports.UPLOAD_CONCURRENCY, uploads.length) }, worker));
|
|
720
|
+
}, _SessionMemoryStores_listMemories =
|
|
721
|
+
/**
|
|
722
|
+
* The store's memories keyed by relative path (the wire path's leading `/`
|
|
723
|
+
* stripped — `#upload` re-prefixes it) — `basic` view (shas, no content) at
|
|
724
|
+
* {@link LIST_PAGE_SIZE} per page unless the caller needs `full` pages.
|
|
725
|
+
* `memory_prefix` rollups and the reserved marker path are skipped.
|
|
726
|
+
*/
|
|
727
|
+
async function* _SessionMemoryStores_listMemories(memoryStoreId, view = 'basic') {
|
|
728
|
+
const limit = view === 'basic' ? LIST_PAGE_SIZE : FULL_LIST_PAGE_SIZE;
|
|
729
|
+
for await (const item of tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_client, "f").beta.memoryStores.memories.list(memoryStoreId, { view, limit })) {
|
|
730
|
+
if (item.type !== 'memory')
|
|
731
|
+
continue;
|
|
732
|
+
const rel = item.path.replace(/^\/+/, '');
|
|
733
|
+
if (rel === exports.MARKER_PATH) {
|
|
734
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('the server listed the reserved marker path; skipping', {
|
|
735
|
+
path: item.path,
|
|
736
|
+
memory_store_id: memoryStoreId,
|
|
737
|
+
});
|
|
738
|
+
continue;
|
|
739
|
+
}
|
|
740
|
+
yield [rel, item];
|
|
741
|
+
}
|
|
742
|
+
}, _SessionMemoryStores_upload =
|
|
743
|
+
/**
|
|
744
|
+
* Push one local file; `undefined` keeps the old baseline so the next pass retries.
|
|
745
|
+
*
|
|
746
|
+
* A refusal the server would repeat (400/413, the utf-8 gate) enters
|
|
747
|
+
* `refusedShas`: warned once, retried only after the file changes.
|
|
748
|
+
*/
|
|
749
|
+
async function _SessionMemoryStores_upload(store, rel, localSha, existing) {
|
|
750
|
+
try {
|
|
751
|
+
const data = await store.files.get(rel);
|
|
752
|
+
if (data === null)
|
|
753
|
+
return undefined;
|
|
754
|
+
const content = (0, bytes_1.decodeUTF8)(data);
|
|
755
|
+
const item = existing ?
|
|
756
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_client, "f").beta.memoryStores.memories.update(existing.id, {
|
|
757
|
+
memory_store_id: store.memoryStoreId,
|
|
758
|
+
content,
|
|
759
|
+
precondition: { type: 'content_sha256', content_sha256: existing.content_sha256 },
|
|
760
|
+
})
|
|
761
|
+
: await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_client, "f").beta.memoryStores.memories.create(store.memoryStoreId, {
|
|
762
|
+
path: '/' + rel,
|
|
763
|
+
content,
|
|
764
|
+
});
|
|
765
|
+
store.refusedShas.delete(rel);
|
|
766
|
+
return item.content_sha256;
|
|
767
|
+
}
|
|
768
|
+
catch (e) {
|
|
769
|
+
if (existing && (0, backoff_1.isStatus)(e, 404)) {
|
|
770
|
+
// Deleted remotely since the listing, so this file is now the only copy.
|
|
771
|
+
return await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_upload).call(this, store, rel, localSha, undefined);
|
|
772
|
+
}
|
|
773
|
+
const permanent = e instanceof file_store_1.FileStoreError || (0, backoff_1.isStatus)(e, 400) || (0, backoff_1.isStatus)(e, 413);
|
|
774
|
+
if (existing && (0, backoff_1.isStatus)(e, 409)) {
|
|
775
|
+
// The precondition lost a race: the remote moved under us, so the push
|
|
776
|
+
// is dropped. The local file is now stale — the next sync sees
|
|
777
|
+
// remoteChanged and pulls the winner over it.
|
|
778
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory changed both locally and remotely; the upload was refused and the local edit loses', {
|
|
779
|
+
path: rel,
|
|
780
|
+
memory_store_id: store.memoryStoreId,
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
else if (permanent && localSha !== undefined) {
|
|
784
|
+
store.refusedShas.set(rel, localSha);
|
|
785
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('the server rejected this memory file, so it stays un-synced until its content changes', { path: rel, memory_store_id: store.memoryStoreId, rejection: String(e) });
|
|
786
|
+
}
|
|
787
|
+
else {
|
|
788
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to upload memory', {
|
|
789
|
+
path: rel,
|
|
790
|
+
memory_store_id: store.memoryStoreId,
|
|
791
|
+
error: String(e),
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
return undefined;
|
|
795
|
+
}
|
|
796
|
+
}, _SessionMemoryStores_corroboratedDelete =
|
|
797
|
+
/** Send the server delete only after the wait, the cap, and a fresh re-check all clear. */
|
|
798
|
+
async function _SessionMemoryStores_corroboratedDelete(store, rel, remote, baseSha, deletes) {
|
|
799
|
+
if (deletes.mode === 'disabled') {
|
|
800
|
+
deletes.suppressed++;
|
|
801
|
+
return baseSha;
|
|
802
|
+
}
|
|
803
|
+
let firstAbsent = store.pendingDeletes.get(rel);
|
|
804
|
+
if (firstAbsent === undefined) {
|
|
805
|
+
firstAbsent = Date.now();
|
|
806
|
+
store.pendingDeletes.set(rel, firstAbsent);
|
|
807
|
+
}
|
|
808
|
+
if (!deletes.waiveWindow && Date.now() - firstAbsent < exports.DELETE_CORROBORATION_MS) {
|
|
809
|
+
return baseSha;
|
|
810
|
+
}
|
|
811
|
+
let markerOk;
|
|
812
|
+
let stillAbsent;
|
|
813
|
+
try {
|
|
814
|
+
// Re-check: the folder may have been wiped mid-sync.
|
|
815
|
+
markerOk = (await store.files.hashFile(exports.MARKER_PATH)) === markerSha(store.memoryStoreId);
|
|
816
|
+
stillAbsent = (await store.files.hashFile(rel)) === null;
|
|
817
|
+
}
|
|
818
|
+
catch (e) {
|
|
819
|
+
if (!(e instanceof file_store_1.FileStoreError) && !isErrno(e))
|
|
820
|
+
throw e;
|
|
821
|
+
markerOk = stillAbsent = false;
|
|
822
|
+
}
|
|
823
|
+
if (!markerOk)
|
|
824
|
+
return baseSha;
|
|
825
|
+
if (!stillAbsent) {
|
|
826
|
+
store.pendingDeletes.delete(rel);
|
|
827
|
+
return baseSha;
|
|
828
|
+
}
|
|
829
|
+
if (!deletes.takeSlot())
|
|
830
|
+
return baseSha;
|
|
831
|
+
if (deletes.mode === 'log_only') {
|
|
832
|
+
// Repeats each sync — the log is the dry run.
|
|
833
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").info('log-only: sync would delete this memory on the server', {
|
|
834
|
+
path: rel,
|
|
835
|
+
memory_store_id: store.memoryStoreId,
|
|
836
|
+
});
|
|
837
|
+
return baseSha;
|
|
838
|
+
}
|
|
839
|
+
const sha = await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_instances, "m", _SessionMemoryStores_deleteRemote).call(this, store, rel, remote, baseSha);
|
|
840
|
+
if (sha === undefined) {
|
|
841
|
+
store.pendingDeletes.delete(rel);
|
|
842
|
+
}
|
|
843
|
+
return sha;
|
|
844
|
+
}, _SessionMemoryStores_deleteRemote = async function _SessionMemoryStores_deleteRemote(store, rel, remote, baseSha) {
|
|
845
|
+
try {
|
|
846
|
+
await tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_client, "f").beta.memoryStores.memories.delete(remote.id, {
|
|
847
|
+
memory_store_id: store.memoryStoreId,
|
|
848
|
+
expected_content_sha256: baseSha,
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
catch (e) {
|
|
852
|
+
if ((0, backoff_1.isStatus)(e, 404))
|
|
853
|
+
return undefined; // already gone remotely too
|
|
854
|
+
if ((0, backoff_1.isStatus)(e, 409) || (0, backoff_1.isStatus)(e, 412)) {
|
|
855
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('memory deleted locally but changed remotely; keeping the remote version', {
|
|
856
|
+
path: rel,
|
|
857
|
+
memory_store_id: store.memoryStoreId,
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").warn('failed to delete memory', {
|
|
862
|
+
path: rel,
|
|
863
|
+
memory_store_id: store.memoryStoreId,
|
|
864
|
+
error: String(e),
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
return baseSha;
|
|
868
|
+
}
|
|
869
|
+
tslib_1.__classPrivateFieldGet(this, _SessionMemoryStores_log, "f").info('propagated local deletion', { path: rel, memory_store_id: store.memoryStoreId });
|
|
870
|
+
return undefined;
|
|
871
|
+
};
|
|
872
|
+
/**
|
|
873
|
+
* True for a thrown value shaped like a Node filesystem error. Shape-checked,
|
|
874
|
+
* not `instanceof Error` — fs errors can come from another realm.
|
|
875
|
+
*/
|
|
876
|
+
function isErrno(e) {
|
|
877
|
+
return typeof e === 'object' && e !== null && typeof e.code === 'string';
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Resolve when `p` settles, or as soon as `signal` aborts. A rejection from
|
|
881
|
+
* `p` before the abort propagates; one after it is dropped.
|
|
882
|
+
*/
|
|
883
|
+
async function settledOrAborted(p, signal) {
|
|
884
|
+
if (!signal) {
|
|
885
|
+
await p;
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
let onAbort;
|
|
889
|
+
const aborted = new Promise((resolve) => {
|
|
890
|
+
onAbort = resolve;
|
|
891
|
+
if (signal.aborted)
|
|
892
|
+
resolve();
|
|
893
|
+
});
|
|
894
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
895
|
+
try {
|
|
896
|
+
await Promise.race([p, aborted]);
|
|
897
|
+
}
|
|
898
|
+
finally {
|
|
899
|
+
signal.removeEventListener('abort', onAbort);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
//# sourceMappingURL=memories.js.map
|