eve 0.5.4 → 0.6.0-beta.3
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 +15 -0
- package/LICENSE +2 -2
- package/NOTICE +5 -0
- package/README.md +120 -108
- package/bin/eve.d.ts +66 -0
- package/bin/eve.js +285 -0
- package/dist/docs/public/README.md +89 -0
- package/dist/docs/public/advanced/auth-and-route-protection.md +270 -0
- package/dist/docs/public/advanced/context-control.md +109 -0
- package/dist/docs/public/advanced/default-harness.md +94 -0
- package/dist/docs/public/advanced/deployment.md +113 -0
- package/dist/docs/public/advanced/dev-tui.md +37 -0
- package/dist/docs/public/advanced/dynamic-capabilities.md +129 -0
- package/dist/docs/public/advanced/dynamic-workflows.md +55 -0
- package/dist/docs/public/advanced/evals.md +121 -0
- package/dist/docs/public/advanced/execution-model-and-durability.md +48 -0
- package/dist/docs/public/advanced/hooks.md +154 -0
- package/dist/docs/public/advanced/instrumentation.md +165 -0
- package/dist/docs/public/advanced/meta.json +21 -0
- package/dist/docs/public/advanced/remote-agents.md +60 -0
- package/dist/docs/public/advanced/security-model.md +79 -0
- package/dist/docs/public/advanced/session-context.md +149 -0
- package/dist/docs/public/advanced/sessions-runs-and-streaming.md +127 -0
- package/dist/docs/public/advanced/state.md +62 -0
- package/dist/docs/public/agent-config.md +80 -0
- package/dist/docs/public/channels/custom.mdx +275 -0
- package/dist/docs/public/channels/discord.mdx +74 -0
- package/dist/docs/public/channels/eve.mdx +82 -0
- package/dist/docs/public/channels/github.mdx +56 -0
- package/dist/docs/public/channels/linear.mdx +168 -0
- package/dist/docs/public/channels/meta.json +15 -0
- package/dist/docs/public/channels/overview.mdx +53 -0
- package/dist/docs/public/channels/slack.mdx +92 -0
- package/dist/docs/public/channels/teams.mdx +55 -0
- package/dist/docs/public/channels/telegram.mdx +56 -0
- package/dist/docs/public/channels/twilio.mdx +62 -0
- package/dist/docs/public/client/continuations.mdx +126 -0
- package/dist/docs/public/client/messages.mdx +152 -0
- package/dist/docs/public/client/meta.json +4 -0
- package/dist/docs/public/client/output-schema.mdx +135 -0
- package/dist/docs/public/client/overview.mdx +116 -0
- package/dist/docs/public/client/streaming.mdx +143 -0
- package/dist/docs/public/connections.mdx +196 -0
- package/dist/docs/public/frontend/meta.json +4 -0
- package/dist/docs/public/frontend/nextjs.mdx +79 -0
- package/dist/docs/public/frontend/nuxt.mdx +82 -0
- package/dist/docs/public/frontend/overview.mdx +234 -0
- package/dist/docs/public/frontend/sveltekit.mdx +94 -0
- package/dist/docs/public/frontend/use-eve-agent-svelte.mdx +111 -0
- package/dist/docs/public/frontend/use-eve-agent-vue.mdx +123 -0
- package/dist/docs/public/getting-started.mdx +176 -0
- package/dist/docs/public/instructions.mdx +58 -0
- package/dist/docs/public/introduction.md +102 -0
- package/dist/docs/public/meta.json +22 -0
- package/dist/docs/public/reference/cli.md +123 -0
- package/dist/docs/public/reference/faqs.md +48 -0
- package/dist/docs/public/reference/meta.json +4 -0
- package/dist/docs/public/reference/project-layout.md +111 -0
- package/dist/docs/public/reference/typescript-api.md +97 -0
- package/dist/docs/public/sandbox.mdx +198 -0
- package/dist/docs/public/schedules.mdx +104 -0
- package/dist/docs/public/skills.mdx +79 -0
- package/dist/docs/public/subagents.mdx +76 -0
- package/dist/docs/public/tools.mdx +111 -0
- package/dist/docs/public/tutorial/connect-a-warehouse.mdx +47 -0
- package/dist/docs/public/tutorial/first-agent.mdx +61 -0
- package/dist/docs/public/tutorial/guard-the-spend.mdx +59 -0
- package/dist/docs/public/tutorial/how-it-runs.mdx +24 -0
- package/dist/docs/public/tutorial/meta.json +14 -0
- package/dist/docs/public/tutorial/query-sample-data.mdx +81 -0
- package/dist/docs/public/tutorial/remember-definitions.mdx +72 -0
- package/dist/docs/public/tutorial/run-analysis.mdx +86 -0
- package/dist/docs/public/tutorial/ship-it.mdx +100 -0
- package/dist/docs/public/tutorial/team-playbooks.mdx +63 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -0
- package/dist/src/channel/adapter-context.d.ts +11 -0
- package/dist/src/channel/adapter-context.js +1 -0
- package/dist/src/channel/adapter.d.ts +160 -0
- package/dist/src/channel/adapter.js +1 -0
- package/dist/src/channel/compiled-channel.d.ts +21 -0
- package/dist/src/channel/compiled-channel.js +1 -0
- package/dist/src/channel/cross-channel-receive.d.ts +70 -0
- package/dist/src/channel/cross-channel-receive.js +2 -0
- package/dist/src/channel/http.d.ts +29 -0
- package/dist/src/channel/http.js +1 -0
- package/dist/src/channel/instrumentation.d.ts +10 -0
- package/dist/src/channel/instrumentation.js +1 -0
- package/dist/src/channel/receive-target.d.ts +17 -0
- package/dist/src/channel/receive-target.js +1 -0
- package/dist/src/channel/resolve-text.d.ts +19 -0
- package/dist/src/channel/resolve-text.js +1 -0
- package/dist/src/channel/routes.d.ts +217 -0
- package/dist/src/channel/routes.js +1 -0
- package/dist/src/channel/schedule.d.ts +66 -0
- package/dist/src/channel/schedule.js +1 -0
- package/dist/src/channel/send.d.ts +4 -0
- package/dist/src/channel/send.js +1 -0
- package/dist/src/channel/session-callback.d.ts +10 -0
- package/dist/src/channel/session-callback.js +1 -0
- package/dist/src/channel/session.d.ts +46 -0
- package/dist/src/channel/session.js +1 -0
- package/dist/src/channel/types.d.ts +303 -0
- package/dist/src/channel/types.js +1 -0
- package/dist/src/channel/websocket-upgrade-server.d.ts +26 -0
- package/dist/src/channel/websocket-upgrade-server.js +1 -0
- package/dist/src/chunks/use-eve-agent-9vL56Fjy.js +1195 -0
- package/dist/src/chunks/use-eve-agent-DTWI5Lji.js +1225 -0
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +21 -0
- package/dist/src/cli/commands/channel-add-conflicts.js +1 -0
- package/dist/src/cli/commands/channels.d.ts +26 -0
- package/dist/src/cli/commands/channels.js +1 -0
- package/dist/src/cli/commands/info.d.ts +53 -0
- package/dist/src/cli/commands/info.js +2 -0
- package/dist/src/cli/dev/environment.d.ts +20 -0
- package/dist/src/cli/dev/environment.js +1 -0
- package/dist/src/cli/dev/repl/input-requests.d.ts +38 -0
- package/dist/src/cli/dev/repl/input-requests.js +1 -0
- package/dist/src/cli/dev/repl/input.d.ts +19 -0
- package/dist/src/cli/dev/repl/input.js +1 -0
- package/dist/src/cli/dev/repl/repl.d.ts +62 -0
- package/dist/src/cli/dev/repl/repl.js +2 -0
- package/dist/src/cli/dev/repl/terminal.d.ts +21 -0
- package/dist/src/cli/dev/repl/terminal.js +5 -0
- package/dist/src/cli/dev/tui/layout.d.ts +24 -0
- package/dist/src/cli/dev/tui/layout.js +3 -0
- package/dist/src/cli/dev/tui/markdown.d.ts +14 -0
- package/dist/src/cli/dev/tui/markdown.js +3 -0
- package/dist/src/cli/dev/tui/runner.d.ts +211 -0
- package/dist/src/cli/dev/tui/runner.js +1 -0
- package/dist/src/cli/dev/tui/terminal-frame-buffer.d.ts +21 -0
- package/dist/src/cli/dev/tui/terminal-frame-buffer.js +2 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +111 -0
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -0
- package/dist/src/cli/dev/tui/terminal-text.d.ts +6 -0
- package/dist/src/cli/dev/tui/terminal-text.js +1 -0
- package/dist/src/cli/dev/tui/test/index.d.ts +11 -0
- package/dist/src/cli/dev/tui/test/index.js +1 -0
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +28 -0
- package/dist/src/cli/dev/tui/test/mock-terminal.js +3 -0
- package/dist/src/cli/dev/tui/tui.d.ts +32 -0
- package/dist/src/cli/dev/tui/tui.js +1 -0
- package/dist/src/cli/dev/tui/types.d.ts +68 -0
- package/dist/src/cli/dev/tui/types.js +1 -0
- package/dist/src/cli/dev/url.d.ts +4 -0
- package/dist/src/cli/dev/url.js +1 -0
- package/dist/src/cli/run.d.ts +112 -0
- package/dist/src/cli/run.js +3 -0
- package/dist/src/cli/ui/output.d.ts +62 -0
- package/dist/src/cli/ui/output.js +8 -0
- package/dist/src/client/client-error.d.ts +14 -0
- package/dist/src/client/client-error.js +1 -0
- package/dist/src/client/client.d.ts +28 -0
- package/dist/src/client/client.js +1 -0
- package/dist/src/client/eve-agent-store.d.ts +89 -0
- package/dist/src/client/eve-agent-store.js +2 -0
- package/dist/src/client/index.d.ts +15 -0
- package/dist/src/client/index.js +1 -0
- package/dist/src/client/message-reducer-types.d.ts +174 -0
- package/dist/src/client/message-reducer-types.js +1 -0
- package/dist/src/client/message-reducer.d.ts +14 -0
- package/dist/src/client/message-reducer.js +1 -0
- package/dist/src/client/message-response.d.ts +42 -0
- package/dist/src/client/message-response.js +1 -0
- package/dist/src/client/ndjson.d.ts +16 -0
- package/dist/src/client/ndjson.js +3 -0
- package/dist/src/client/open-stream.d.ts +18 -0
- package/dist/src/client/open-stream.js +1 -0
- package/dist/src/client/output-schema.d.ts +12 -0
- package/dist/src/client/output-schema.js +1 -0
- package/dist/src/client/reducer.d.ts +63 -0
- package/dist/src/client/reducer.js +1 -0
- package/dist/src/client/session-utils.d.ts +29 -0
- package/dist/src/client/session-utils.js +1 -0
- package/dist/src/client/session.d.ts +49 -0
- package/dist/src/client/session.js +1 -0
- package/dist/src/client/types.d.ts +165 -0
- package/dist/src/client/types.js +1 -0
- package/dist/src/client/url.d.ts +8 -0
- package/dist/src/client/url.js +1 -0
- package/dist/src/compiled/.vendor-stamp.json +32 -0
- package/dist/src/compiled/@ai-sdk/anthropic/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/anthropic/_provider-utils.d.ts +15 -0
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +1262 -0
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -0
- package/dist/src/compiled/@ai-sdk/google/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/google/_provider-utils.d.ts +11 -0
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +627 -0
- package/dist/src/compiled/@ai-sdk/google/index.js +11 -0
- package/dist/src/compiled/@ai-sdk/mcp/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +37 -0
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -0
- package/dist/src/compiled/@ai-sdk/openai/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/openai/_provider-utils.d.ts +15 -0
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +1296 -0
- package/dist/src/compiled/@ai-sdk/openai/index.js +11 -0
- package/dist/src/compiled/@ai-sdk/otel/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/otel/index.d.ts +32 -0
- package/dist/src/compiled/@ai-sdk/otel/index.js +3 -0
- package/dist/src/compiled/@ai-sdk/provider/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/provider/_json-schema.d.ts +5 -0
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +7138 -0
- package/dist/src/compiled/@ai-sdk/provider/index.js +3 -0
- package/dist/src/compiled/@chat-adapter/slack/LICENSE +9 -0
- package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +9 -0
- package/dist/src/compiled/@chat-adapter/slack/_slack-web-api.d.ts +7 -0
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +950 -0
- package/dist/src/compiled/@chat-adapter/slack/index.js +48 -0
- package/dist/src/compiled/@chat-adapter/state-memory/LICENSE +9 -0
- package/dist/src/compiled/@chat-adapter/state-memory/index.d.ts +50 -0
- package/dist/src/compiled/@chat-adapter/state-memory/index.js +1 -0
- package/dist/src/compiled/@opentelemetry/api/LICENSE +201 -0
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +47 -0
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -0
- package/dist/src/compiled/@standard-schema/spec/LICENSE +21 -0
- package/dist/src/compiled/@standard-schema/spec/index.d.ts +119 -0
- package/dist/src/compiled/@standard-schema/spec/index.js +1 -0
- package/dist/src/compiled/@vercel/oidc/LICENSE +202 -0
- package/dist/src/compiled/@vercel/oidc/index.d.ts +21 -0
- package/dist/src/compiled/@vercel/oidc/index.js +2 -0
- package/dist/src/compiled/@vercel/sandbox/LICENSE +201 -0
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +128 -0
- package/dist/src/compiled/@vercel/sandbox/index.js +108 -0
- package/dist/src/compiled/@vercel/sandbox/network-policy.d.ts +161 -0
- package/dist/src/compiled/@workflow/core/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/core/_ms.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/_workflow-serde.d.ts +5 -0
- package/dist/src/compiled/@workflow/core/_workflow-utils.d.ts +8 -0
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +7 -0
- package/dist/src/compiled/@workflow/core/capabilities.d.ts +45 -0
- package/dist/src/compiled/@workflow/core/capture-stack.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +31 -0
- package/dist/src/compiled/@workflow/core/classify-error.d.ts +20 -0
- package/dist/src/compiled/@workflow/core/context-errors.d.ts +27 -0
- package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +97 -0
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +179 -0
- package/dist/src/compiled/@workflow/core/define-hook.d.ts +68 -0
- package/dist/src/compiled/@workflow/core/describe-error.d.ts +70 -0
- package/dist/src/compiled/@workflow/core/encryption.d.ts +66 -0
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +72 -0
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +82 -0
- package/dist/src/compiled/@workflow/core/global.d.ts +48 -0
- package/dist/src/compiled/@workflow/core/index.d.ts +20 -0
- package/dist/src/compiled/@workflow/core/index.js +2 -0
- package/dist/src/compiled/@workflow/core/log-format.d.ts +25 -0
- package/dist/src/compiled/@workflow/core/logger.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/private.d.ts +135 -0
- package/dist/src/compiled/@workflow/core/private.js +1 -0
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +52 -0
- package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +10 -0
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +105 -0
- package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +98 -0
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +77 -0
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +134 -0
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +50 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -0
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +42 -0
- package/dist/src/compiled/@workflow/core/runtime/step-handler.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +42 -0
- package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +75 -0
- package/dist/src/compiled/@workflow/core/runtime/world.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/runtime.d.ts +22 -0
- package/dist/src/compiled/@workflow/core/runtime.js +141 -0
- package/dist/src/compiled/@workflow/core/schemas.d.ts +15 -0
- package/dist/src/compiled/@workflow/core/serialization/client.d.ts +17 -0
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +14 -0
- package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +90 -0
- package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +33 -0
- package/dist/src/compiled/@workflow/core/serialization/errors.d.ts +34 -0
- package/dist/src/compiled/@workflow/core/serialization/format.d.ts +60 -0
- package/dist/src/compiled/@workflow/core/serialization/index.d.ts +18 -0
- package/dist/src/compiled/@workflow/core/serialization/reducers/class.d.ts +11 -0
- package/dist/src/compiled/@workflow/core/serialization/reducers/common.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function.d.ts +35 -0
- package/dist/src/compiled/@workflow/core/serialization/step.d.ts +17 -0
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +228 -0
- package/dist/src/compiled/@workflow/core/serialization/workflow.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/serialization-format.d.ts +171 -0
- package/dist/src/compiled/@workflow/core/serialization.d.ts +344 -0
- package/dist/src/compiled/@workflow/core/set-attributes.d.ts +13 -0
- package/dist/src/compiled/@workflow/core/sleep.d.ts +33 -0
- package/dist/src/compiled/@workflow/core/source-map.d.ts +10 -0
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/step/get-closure-vars.d.ts +9 -0
- package/dist/src/compiled/@workflow/core/step/get-step-metadata.d.ts +42 -0
- package/dist/src/compiled/@workflow/core/step/get-workflow-metadata.d.ts +7 -0
- package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +22 -0
- package/dist/src/compiled/@workflow/core/step.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/symbols.d.ts +42 -0
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +283 -0
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +53 -0
- package/dist/src/compiled/@workflow/core/types.d.ts +20 -0
- package/dist/src/compiled/@workflow/core/util.d.ts +40 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/vm/index.d.ts +17 -0
- package/dist/src/compiled/@workflow/core/vm/uint8array-base64.d.ts +21 -0
- package/dist/src/compiled/@workflow/core/vm/uuid.d.ts +10 -0
- package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +65 -0
- package/dist/src/compiled/@workflow/core/workflow/create-hook.d.ts +7 -0
- package/dist/src/compiled/@workflow/core/workflow/define-hook.d.ts +10 -0
- package/dist/src/compiled/@workflow/core/workflow/get-workflow-metadata.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/workflow/hook.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/workflow/index.d.ts +12 -0
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +74 -0
- package/dist/src/compiled/@workflow/core/workflow/sleep.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +15 -0
- package/dist/src/compiled/@workflow/core/workflow/writable-stream.d.ts +3 -0
- package/dist/src/compiled/@workflow/core/workflow.d.ts +1 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -0
- package/dist/src/compiled/@workflow/errors/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/errors/_ms.d.ts +4 -0
- package/dist/src/compiled/@workflow/errors/error-codes.d.ts +23 -0
- package/dist/src/compiled/@workflow/errors/index.d.ts +536 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -0
- package/dist/src/compiled/@workflow/world/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/world/attributes.d.ts +110 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +415 -0
- package/dist/src/compiled/@workflow/world/hooks.d.ts +72 -0
- package/dist/src/compiled/@workflow/world/index.d.ts +25 -0
- package/dist/src/compiled/@workflow/world/index.js +1 -0
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +264 -0
- package/dist/src/compiled/@workflow/world/queue.d.ts +128 -0
- package/dist/src/compiled/@workflow/world/recovery.d.ts +13 -0
- package/dist/src/compiled/@workflow/world/runs.d.ts +144 -0
- package/dist/src/compiled/@workflow/world/serialization.d.ts +25 -0
- package/dist/src/compiled/@workflow/world/shared.d.ts +83 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +46 -0
- package/dist/src/compiled/@workflow/world/steps.d.ts +70 -0
- package/dist/src/compiled/@workflow/world/ulid.d.ts +35 -0
- package/dist/src/compiled/@workflow/world/waits.d.ts +21 -0
- package/dist/src/compiled/_chunks/node/auth-BsyzphzW.js +2 -0
- package/dist/src/compiled/_chunks/node/dist-BQYUcBqu.js +90 -0
- package/dist/src/compiled/_chunks/node/dist-BdTs18CF.js +1 -0
- package/dist/src/compiled/_chunks/node/retry-DkR2H1Y0.js +1 -0
- package/dist/src/compiled/_chunks/node/token-ORseRyWn.js +1 -0
- package/dist/src/compiled/_chunks/node/version-BGue04qw.js +1 -0
- package/dist/src/compiled/_chunks/workflow/chunk-DSjMdhoD.js +1 -0
- package/dist/src/compiled/_chunks/workflow/coerce-BTuSKQr5.js +1 -0
- package/dist/src/compiled/_chunks/workflow/compat-CG1hDp-3.js +1 -0
- package/dist/src/compiled/_chunks/workflow/core-5Woff_dW.js +65 -0
- package/dist/src/compiled/_chunks/workflow/dist-6a3viBXZ.js +3 -0
- package/dist/src/compiled/_chunks/workflow/dist-D0jyrm7a.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-gEXVSMPU.js +14 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-0Zk0zSvq.js +12 -0
- package/dist/src/compiled/_chunks/workflow/schemas-DWOIBELG.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-DXZr2BgM.js +1 -0
- package/dist/src/compiled/_chunks/workflow/src-B54rYDvB.js +1 -0
- package/dist/src/compiled/_chunks/workflow/symbols-BWCAoPHE.js +48 -0
- package/dist/src/compiled/_chunks/workflow/token-CcaAeZHd.js +1 -0
- package/dist/src/compiled/_chunks/workflow/token-nK4u-N7w.js +1 -0
- package/dist/src/compiled/chat/LICENSE +9 -0
- package/dist/src/compiled/chat/_mdast.d.ts +24 -0
- package/dist/src/compiled/chat/index.d.ts +714 -0
- package/dist/src/compiled/chat/index.js +1 -0
- package/dist/src/compiled/chat/jsx-runtime-CFq1K_Ve.d.ts +782 -0
- package/dist/src/compiled/chokidar/LICENSE +21 -0
- package/dist/src/compiled/chokidar/index.d.ts +33 -0
- package/dist/src/compiled/chokidar/index.js +1 -0
- package/dist/src/compiled/commander/LICENSE +22 -0
- package/dist/src/compiled/commander/index.d.ts +1113 -0
- package/dist/src/compiled/commander/index.js +19 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/LICENSE +21 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/approval-continuation.d.ts +71 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/approval.d.ts +32 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/code-mode-tool.d.ts +16 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/continuation-capability.d.ts +33 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/errors.d.ts +114 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/fetch-policy.d.ts +21 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/host-interrupt.d.ts +25 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/index.d.ts +11 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/index.js +419 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/interrupt-continuation.d.ts +32 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/options.d.ts +3 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/run-code-mode.d.ts +12 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/runtime/guest-sources.d.ts +3 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/runtime/manager.d.ts +22 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/runtime/max-workers.d.ts +20 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/runtime/protocol.d.ts +49 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/runtime/worker-source.d.ts +11 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/serialization.d.ts +5 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/source-cache.d.ts +11 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/telemetry.d.ts +20 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/tool-invocation.d.ts +24 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/tool-prompt.d.ts +3 -0
- package/dist/src/compiled/experimental-ai-sdk-code-mode/types.d.ts +802 -0
- package/dist/src/compiled/gray-matter/LICENSE +21 -0
- package/dist/src/compiled/gray-matter/index.d.ts +62 -0
- package/dist/src/compiled/gray-matter/index.js +48 -0
- package/dist/src/compiled/jose/LICENSE.md +21 -0
- package/dist/src/compiled/jose/index.d.ts +40 -0
- package/dist/src/compiled/jose/index.js +2 -0
- package/dist/src/compiled/jsonc-parser/LICENSE.md +21 -0
- package/dist/src/compiled/jsonc-parser/index.d.ts +13 -0
- package/dist/src/compiled/jsonc-parser/index.js +15 -0
- package/dist/src/compiled/just-bash/LICENSE +201 -0
- package/dist/src/compiled/just-bash/index.d.ts +116 -0
- package/dist/src/compiled/just-bash/index.js +2200 -0
- package/dist/src/compiled/just-bash/network/types.d.ts +155 -0
- package/dist/src/compiled/picocolors/LICENSE +15 -0
- package/dist/src/compiled/picocolors/index.d.ts +55 -0
- package/dist/src/compiled/picocolors/index.js +1 -0
- package/dist/src/compiled/turndown/LICENSE +21 -0
- package/dist/src/compiled/turndown/index.d.ts +13 -0
- package/dist/src/compiled/turndown/index.js +69 -0
- package/dist/src/compiled/zod/LICENSE +21 -0
- package/dist/src/compiled/zod/index.d.ts +5 -0
- package/dist/src/compiled/zod/index.js +1 -0
- package/dist/src/compiled/zod-validation-error/LICENSE +9 -0
- package/dist/src/compiled/zod-validation-error/index.d.ts +12 -0
- package/dist/src/compiled/zod-validation-error/index.js +1 -0
- package/dist/src/compiler/artifacts.d.ts +109 -0
- package/dist/src/compiler/artifacts.js +1 -0
- package/dist/src/compiler/channel-instrumentation-types.d.ts +8 -0
- package/dist/src/compiler/channel-instrumentation-types.js +2 -0
- package/dist/src/compiler/compile-agent.d.ts +41 -0
- package/dist/src/compiler/compile-agent.js +3 -0
- package/dist/src/compiler/compile-from-memory.d.ts +76 -0
- package/dist/src/compiler/compile-from-memory.js +1 -0
- package/dist/src/compiler/manifest.d.ts +504 -0
- package/dist/src/compiler/manifest.js +1 -0
- package/dist/src/compiler/model-catalog.d.ts +60 -0
- package/dist/src/compiler/model-catalog.js +1 -0
- package/dist/src/compiler/module-map.d.ts +48 -0
- package/dist/src/compiler/module-map.js +5 -0
- package/dist/src/compiler/normalize-agent-config.d.ts +18 -0
- package/dist/src/compiler/normalize-agent-config.js +1 -0
- package/dist/src/compiler/normalize-channel.d.ts +16 -0
- package/dist/src/compiler/normalize-channel.js +1 -0
- package/dist/src/compiler/normalize-connection.d.ts +21 -0
- package/dist/src/compiler/normalize-connection.js +1 -0
- package/dist/src/compiler/normalize-helpers.d.ts +28 -0
- package/dist/src/compiler/normalize-helpers.js +1 -0
- package/dist/src/compiler/normalize-hook.d.ts +12 -0
- package/dist/src/compiler/normalize-hook.js +1 -0
- package/dist/src/compiler/normalize-instructions.d.ts +35 -0
- package/dist/src/compiler/normalize-instructions.js +1 -0
- package/dist/src/compiler/normalize-manifest.d.ts +6 -0
- package/dist/src/compiler/normalize-manifest.js +3 -0
- package/dist/src/compiler/normalize-sandbox.d.ts +7 -0
- package/dist/src/compiler/normalize-sandbox.js +1 -0
- package/dist/src/compiler/normalize-schedule.d.ts +14 -0
- package/dist/src/compiler/normalize-schedule.js +1 -0
- package/dist/src/compiler/normalize-skill.d.ts +21 -0
- package/dist/src/compiler/normalize-skill.js +1 -0
- package/dist/src/compiler/normalize-subagent.d.ts +29 -0
- package/dist/src/compiler/normalize-subagent.js +1 -0
- package/dist/src/compiler/normalize-tool.d.ts +34 -0
- package/dist/src/compiler/normalize-tool.js +1 -0
- package/dist/src/compiler/remote-agent-node.d.ts +22 -0
- package/dist/src/compiler/remote-agent-node.js +1 -0
- package/dist/src/compiler/workspace-resources.d.ts +14 -0
- package/dist/src/compiler/workspace-resources.js +1 -0
- package/dist/src/context/accessors.d.ts +40 -0
- package/dist/src/context/accessors.js +1 -0
- package/dist/src/context/build-callback-context.d.ts +8 -0
- package/dist/src/context/build-callback-context.js +1 -0
- package/dist/src/context/build-dynamic-tools.d.ts +13 -0
- package/dist/src/context/build-dynamic-tools.js +1 -0
- package/dist/src/context/container.d.ts +60 -0
- package/dist/src/context/container.js +1 -0
- package/dist/src/context/dynamic-instruction-lifecycle.d.ts +26 -0
- package/dist/src/context/dynamic-instruction-lifecycle.js +1 -0
- package/dist/src/context/dynamic-resolve-context.d.ts +12 -0
- package/dist/src/context/dynamic-resolve-context.js +1 -0
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +24 -0
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -0
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +25 -0
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -0
- package/dist/src/context/hook-lifecycle.d.ts +14 -0
- package/dist/src/context/hook-lifecycle.js +1 -0
- package/dist/src/context/key.d.ts +47 -0
- package/dist/src/context/key.js +1 -0
- package/dist/src/context/keys.d.ts +105 -0
- package/dist/src/context/keys.js +1 -0
- package/dist/src/context/node.d.ts +7 -0
- package/dist/src/context/node.js +1 -0
- package/dist/src/context/provider.d.ts +27 -0
- package/dist/src/context/provider.js +1 -0
- package/dist/src/context/providers/connection.d.ts +12 -0
- package/dist/src/context/providers/connection.js +1 -0
- package/dist/src/context/providers/sandbox.d.ts +3 -0
- package/dist/src/context/providers/sandbox.js +1 -0
- package/dist/src/context/providers/session.d.ts +3 -0
- package/dist/src/context/providers/session.js +1 -0
- package/dist/src/context/run-step.d.ts +23 -0
- package/dist/src/context/run-step.js +1 -0
- package/dist/src/context/serialize.d.ts +15 -0
- package/dist/src/context/serialize.js +1 -0
- package/dist/src/discover/connections.d.ts +34 -0
- package/dist/src/discover/connections.js +1 -0
- package/dist/src/discover/diagnostics.d.ts +53 -0
- package/dist/src/discover/diagnostics.js +1 -0
- package/dist/src/discover/discover-agent.d.ts +30 -0
- package/dist/src/discover/discover-agent.js +1 -0
- package/dist/src/discover/discover-subagent.d.ts +36 -0
- package/dist/src/discover/discover-subagent.js +1 -0
- package/dist/src/discover/filesystem.d.ts +71 -0
- package/dist/src/discover/filesystem.js +1 -0
- package/dist/src/discover/grammar.d.ts +202 -0
- package/dist/src/discover/grammar.js +1 -0
- package/dist/src/discover/lib.d.ts +34 -0
- package/dist/src/discover/lib.js +1 -0
- package/dist/src/discover/manifest.d.ts +250 -0
- package/dist/src/discover/manifest.js +1 -0
- package/dist/src/discover/markdown.d.ts +19 -0
- package/dist/src/discover/markdown.js +1 -0
- package/dist/src/discover/named-source-directory.d.ts +97 -0
- package/dist/src/discover/named-source-directory.js +1 -0
- package/dist/src/discover/project-source.d.ts +107 -0
- package/dist/src/discover/project-source.js +1 -0
- package/dist/src/discover/project.d.ts +33 -0
- package/dist/src/discover/project.js +1 -0
- package/dist/src/discover/sandbox.d.ts +37 -0
- package/dist/src/discover/sandbox.js +1 -0
- package/dist/src/discover/schedules.d.ts +38 -0
- package/dist/src/discover/schedules.js +1 -0
- package/dist/src/discover/skills.d.ts +38 -0
- package/dist/src/discover/skills.js +1 -0
- package/dist/src/discover/slots.d.ts +30 -0
- package/dist/src/discover/slots.js +1 -0
- package/dist/src/evals/cli/eval.d.ts +18 -0
- package/dist/src/evals/cli/eval.js +1 -0
- package/dist/src/evals/define-eval-suite.d.ts +16 -0
- package/dist/src/evals/define-eval-suite.js +1 -0
- package/dist/src/evals/index.d.ts +3 -0
- package/dist/src/evals/index.js +1 -0
- package/dist/src/evals/loaders/index.d.ts +2 -0
- package/dist/src/evals/loaders/index.js +1 -0
- package/dist/src/evals/loaders/json.d.ts +12 -0
- package/dist/src/evals/loaders/json.js +1 -0
- package/dist/src/evals/loaders/yaml.d.ts +16 -0
- package/dist/src/evals/loaders/yaml.js +1 -0
- package/dist/src/evals/reporters/index.d.ts +2 -0
- package/dist/src/evals/reporters/index.js +1 -0
- package/dist/src/evals/runner/artifacts.d.ts +11 -0
- package/dist/src/evals/runner/artifacts.js +3 -0
- package/dist/src/evals/runner/derive-run-facts.d.ts +9 -0
- package/dist/src/evals/runner/derive-run-facts.js +1 -0
- package/dist/src/evals/runner/discover.d.ts +20 -0
- package/dist/src/evals/runner/discover.js +1 -0
- package/dist/src/evals/runner/execute-case.d.ts +23 -0
- package/dist/src/evals/runner/execute-case.js +1 -0
- package/dist/src/evals/runner/execute-suite.d.ts +24 -0
- package/dist/src/evals/runner/execute-suite.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.d.ts +27 -0
- package/dist/src/evals/runner/reporters/braintrust.js +2 -0
- package/dist/src/evals/runner/reporters/console.d.ts +15 -0
- package/dist/src/evals/runner/reporters/console.js +1 -0
- package/dist/src/evals/runner/reporters/types.d.ts +20 -0
- package/dist/src/evals/runner/reporters/types.js +1 -0
- package/dist/src/evals/runner/resolve-git-metadata.d.ts +16 -0
- package/dist/src/evals/runner/resolve-git-metadata.js +1 -0
- package/dist/src/evals/scorers/autoevals-client.d.ts +14 -0
- package/dist/src/evals/scorers/autoevals-client.js +2 -0
- package/dist/src/evals/scorers/autoevals.d.ts +58 -0
- package/dist/src/evals/scorers/autoevals.js +1 -0
- package/dist/src/evals/scorers/json.d.ts +10 -0
- package/dist/src/evals/scorers/json.js +1 -0
- package/dist/src/evals/scorers/run.d.ts +18 -0
- package/dist/src/evals/scorers/run.js +1 -0
- package/dist/src/evals/scorers/sql.d.ts +9 -0
- package/dist/src/evals/scorers/sql.js +1 -0
- package/dist/src/evals/scorers/text.d.ts +18 -0
- package/dist/src/evals/scorers/text.js +1 -0
- package/dist/src/evals/scores/index.d.ts +72 -0
- package/dist/src/evals/scores/index.js +1 -0
- package/dist/src/evals/types.d.ts +272 -0
- package/dist/src/evals/types.js +1 -0
- package/dist/src/execution/channel-context.d.ts +5 -0
- package/dist/src/execution/channel-context.js +1 -0
- package/dist/src/execution/connection-auth-tool-result.d.ts +2 -0
- package/dist/src/execution/connection-auth-tool-result.js +1 -0
- package/dist/src/execution/create-session-step.d.ts +43 -0
- package/dist/src/execution/create-session-step.js +1 -0
- package/dist/src/execution/delegated-parent-notification.d.ts +15 -0
- package/dist/src/execution/delegated-parent-notification.js +1 -0
- package/dist/src/execution/delegated-parent-result.d.ts +14 -0
- package/dist/src/execution/delegated-parent-result.js +1 -0
- package/dist/src/execution/dispatch-code-mode-runtime-actions-step.d.ts +21 -0
- package/dist/src/execution/dispatch-code-mode-runtime-actions-step.js +1 -0
- package/dist/src/execution/dispatch-runtime-actions-step.d.ts +19 -0
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -0
- package/dist/src/execution/durable-session-migrations/chain.d.ts +38 -0
- package/dist/src/execution/durable-session-migrations/chain.js +1 -0
- package/dist/src/execution/durable-session-migrations/snapshot.d.ts +22 -0
- package/dist/src/execution/durable-session-migrations/snapshot.js +1 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.d.ts +12 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.js +1 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +40 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -0
- package/dist/src/execution/durable-session-store.d.ts +113 -0
- package/dist/src/execution/durable-session-store.js +1 -0
- package/dist/src/execution/eve-workflow-attributes.d.ts +136 -0
- package/dist/src/execution/eve-workflow-attributes.js +1 -0
- package/dist/src/execution/next-driver-action.d.ts +37 -0
- package/dist/src/execution/next-driver-action.js +1 -0
- package/dist/src/execution/node-step.d.ts +52 -0
- package/dist/src/execution/node-step.js +1 -0
- package/dist/src/execution/remote-agent-dispatch.d.ts +15 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -0
- package/dist/src/execution/runtime-context.d.ts +10 -0
- package/dist/src/execution/runtime-context.js +1 -0
- package/dist/src/execution/runtime-errors.d.ts +13 -0
- package/dist/src/execution/runtime-errors.js +1 -0
- package/dist/src/execution/sandbox/bash-tool.d.ts +30 -0
- package/dist/src/execution/sandbox/bash-tool.js +1 -0
- package/dist/src/execution/sandbox/bindings/local.d.ts +22 -0
- package/dist/src/execution/sandbox/bindings/local.js +1 -0
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +28 -0
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -0
- package/dist/src/execution/sandbox/ensure.d.ts +27 -0
- package/dist/src/execution/sandbox/ensure.js +1 -0
- package/dist/src/execution/sandbox/glob-tool.d.ts +22 -0
- package/dist/src/execution/sandbox/glob-tool.js +3 -0
- package/dist/src/execution/sandbox/grep-tool.d.ts +26 -0
- package/dist/src/execution/sandbox/grep-tool.js +3 -0
- package/dist/src/execution/sandbox/lazy-backend.d.ts +15 -0
- package/dist/src/execution/sandbox/lazy-backend.js +1 -0
- package/dist/src/execution/sandbox/prewarm.d.ts +57 -0
- package/dist/src/execution/sandbox/prewarm.js +1 -0
- package/dist/src/execution/sandbox/read-file-tool.d.ts +28 -0
- package/dist/src/execution/sandbox/read-file-tool.js +3 -0
- package/dist/src/execution/sandbox/require-sandbox.d.ts +15 -0
- package/dist/src/execution/sandbox/require-sandbox.js +1 -0
- package/dist/src/execution/sandbox/ripgrep-probe.d.ts +9 -0
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -0
- package/dist/src/execution/sandbox/session.d.ts +17 -0
- package/dist/src/execution/sandbox/session.js +3 -0
- package/dist/src/execution/sandbox/shell-quote.d.ts +12 -0
- package/dist/src/execution/sandbox/shell-quote.js +1 -0
- package/dist/src/execution/sandbox/stream-utils.d.ts +9 -0
- package/dist/src/execution/sandbox/stream-utils.js +1 -0
- package/dist/src/execution/sandbox/truncate-output.d.ts +72 -0
- package/dist/src/execution/sandbox/truncate-output.js +3 -0
- package/dist/src/execution/sandbox/write-file-tool.d.ts +23 -0
- package/dist/src/execution/sandbox/write-file-tool.js +1 -0
- package/dist/src/execution/session-callback-step.d.ts +16 -0
- package/dist/src/execution/session-callback-step.js +1 -0
- package/dist/src/execution/session.d.ts +81 -0
- package/dist/src/execution/session.js +5 -0
- package/dist/src/execution/skills/instructions.d.ts +19 -0
- package/dist/src/execution/skills/instructions.js +2 -0
- package/dist/src/execution/skills/types.d.ts +22 -0
- package/dist/src/execution/skills/types.js +1 -0
- package/dist/src/execution/subagent-adapter.d.ts +43 -0
- package/dist/src/execution/subagent-adapter.js +1 -0
- package/dist/src/execution/subagent-hitl-proxy.d.ts +37 -0
- package/dist/src/execution/subagent-hitl-proxy.js +1 -0
- package/dist/src/execution/subagent-invocation.d.ts +16 -0
- package/dist/src/execution/subagent-invocation.js +2 -0
- package/dist/src/execution/subagent-tool.d.ts +39 -0
- package/dist/src/execution/subagent-tool.js +1 -0
- package/dist/src/execution/tool-auth.d.ts +42 -0
- package/dist/src/execution/tool-auth.js +1 -0
- package/dist/src/execution/tool-compaction.d.ts +9 -0
- package/dist/src/execution/tool-compaction.js +1 -0
- package/dist/src/execution/turn-workflow.d.ts +30 -0
- package/dist/src/execution/turn-workflow.js +1 -0
- package/dist/src/execution/web-fetch/html.d.ts +15 -0
- package/dist/src/execution/web-fetch/html.js +7 -0
- package/dist/src/execution/web-fetch/tool.d.ts +34 -0
- package/dist/src/execution/web-fetch/tool.js +1 -0
- package/dist/src/execution/workflow-callback-url.d.ts +12 -0
- package/dist/src/execution/workflow-callback-url.js +1 -0
- package/dist/src/execution/workflow-entry.d.ts +26 -0
- package/dist/src/execution/workflow-entry.js +1 -0
- package/dist/src/execution/workflow-errors.d.ts +14 -0
- package/dist/src/execution/workflow-errors.js +1 -0
- package/dist/src/execution/workflow-runtime.d.ts +48 -0
- package/dist/src/execution/workflow-runtime.js +3 -0
- package/dist/src/execution/workflow-steps.d.ts +103 -0
- package/dist/src/execution/workflow-steps.js +1 -0
- package/dist/src/harness/action-result-helpers.d.ts +40 -0
- package/dist/src/harness/action-result-helpers.js +1 -0
- package/dist/src/harness/attachment-staging.d.ts +30 -0
- package/dist/src/harness/attachment-staging.js +1 -0
- package/dist/src/harness/authorization.d.ts +116 -0
- package/dist/src/harness/authorization.js +1 -0
- package/dist/src/harness/code-mode-interrupt-state.d.ts +26 -0
- package/dist/src/harness/code-mode-interrupt-state.js +1 -0
- package/dist/src/harness/code-mode-lifecycle.d.ts +16 -0
- package/dist/src/harness/code-mode-lifecycle.js +1 -0
- package/dist/src/harness/code-mode-runtime-action-state.d.ts +6 -0
- package/dist/src/harness/code-mode-runtime-action-state.js +1 -0
- package/dist/src/harness/code-mode.d.ts +26 -0
- package/dist/src/harness/code-mode.js +1 -0
- package/dist/src/harness/compaction.d.ts +43 -0
- package/dist/src/harness/compaction.js +4 -0
- package/dist/src/harness/emission.d.ts +124 -0
- package/dist/src/harness/emission.js +1 -0
- package/dist/src/harness/execute-tool.d.ts +28 -0
- package/dist/src/harness/execute-tool.js +1 -0
- package/dist/src/harness/input-extraction.d.ts +17 -0
- package/dist/src/harness/input-extraction.js +1 -0
- package/dist/src/harness/input-requests.d.ts +75 -0
- package/dist/src/harness/input-requests.js +1 -0
- package/dist/src/harness/instrumentation-config.d.ts +18 -0
- package/dist/src/harness/instrumentation-config.js +1 -0
- package/dist/src/harness/instrumentation-runtime-context.d.ts +23 -0
- package/dist/src/harness/instrumentation-runtime-context.js +1 -0
- package/dist/src/harness/messages.d.ts +41 -0
- package/dist/src/harness/messages.js +1 -0
- package/dist/src/harness/model-call-error.d.ts +53 -0
- package/dist/src/harness/model-call-error.js +1 -0
- package/dist/src/harness/otel-integration.d.ts +9 -0
- package/dist/src/harness/otel-integration.js +1 -0
- package/dist/src/harness/prompt-cache.d.ts +83 -0
- package/dist/src/harness/prompt-cache.js +1 -0
- package/dist/src/harness/provider-tools.d.ts +62 -0
- package/dist/src/harness/provider-tools.js +1 -0
- package/dist/src/harness/proxy-input-requests.d.ts +32 -0
- package/dist/src/harness/proxy-input-requests.js +1 -0
- package/dist/src/harness/runtime-actions.d.ts +106 -0
- package/dist/src/harness/runtime-actions.js +1 -0
- package/dist/src/harness/sandbox-surface.d.ts +68 -0
- package/dist/src/harness/sandbox-surface.js +1 -0
- package/dist/src/harness/step-hooks.d.ts +109 -0
- package/dist/src/harness/step-hooks.js +1 -0
- package/dist/src/harness/tool-interrupts.d.ts +22 -0
- package/dist/src/harness/tool-interrupts.js +1 -0
- package/dist/src/harness/tool-loop.d.ts +2 -0
- package/dist/src/harness/tool-loop.js +1 -0
- package/dist/src/harness/tool-result-pruning.d.ts +8 -0
- package/dist/src/harness/tool-result-pruning.js +1 -0
- package/dist/src/harness/tools.d.ts +69 -0
- package/dist/src/harness/tools.js +1 -0
- package/dist/src/harness/turn-tag-state.d.ts +50 -0
- package/dist/src/harness/turn-tag-state.js +1 -0
- package/dist/src/harness/types.d.ts +229 -0
- package/dist/src/harness/types.js +1 -0
- package/dist/src/harness/workflow-stream-error.d.ts +29 -0
- package/dist/src/harness/workflow-stream-error.js +1 -0
- package/dist/src/harness/workflow-tool-description.d.ts +17 -0
- package/dist/src/harness/workflow-tool-description.js +23 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/internal/application/cache-metadata.d.ts +9 -0
- package/dist/src/internal/application/cache-metadata.js +1 -0
- package/dist/src/internal/application/compiled-artifacts.d.ts +33 -0
- package/dist/src/internal/application/compiled-artifacts.js +4 -0
- package/dist/src/internal/application/import-specifier.d.ts +17 -0
- package/dist/src/internal/application/import-specifier.js +1 -0
- package/dist/src/internal/application/package.d.ts +34 -0
- package/dist/src/internal/application/package.js +1 -0
- package/dist/src/internal/application/paths.d.ts +47 -0
- package/dist/src/internal/application/paths.js +1 -0
- package/dist/src/internal/application/runtime-compiled-artifacts-source.d.ts +6 -0
- package/dist/src/internal/application/runtime-compiled-artifacts-source.js +1 -0
- package/dist/src/internal/attachments/data.d.ts +18 -0
- package/dist/src/internal/attachments/data.js +1 -0
- package/dist/src/internal/attachments/errors.d.ts +38 -0
- package/dist/src/internal/attachments/errors.js +1 -0
- package/dist/src/internal/attachments/refs.d.ts +55 -0
- package/dist/src/internal/attachments/refs.js +1 -0
- package/dist/src/internal/attachments/sandbox-refs.d.ts +46 -0
- package/dist/src/internal/attachments/sandbox-refs.js +1 -0
- package/dist/src/internal/attachments/url-refs.d.ts +17 -0
- package/dist/src/internal/attachments/url-refs.js +1 -0
- package/dist/src/internal/authored-asset-import-plugin.d.ts +5 -0
- package/dist/src/internal/authored-asset-import-plugin.js +1 -0
- package/dist/src/internal/authored-definition/channel.d.ts +16 -0
- package/dist/src/internal/authored-definition/channel.js +1 -0
- package/dist/src/internal/authored-definition/connection.d.ts +18 -0
- package/dist/src/internal/authored-definition/connection.js +1 -0
- package/dist/src/internal/authored-definition/core.d.ts +46 -0
- package/dist/src/internal/authored-definition/core.js +1 -0
- package/dist/src/internal/authored-definition/sandbox.d.ts +17 -0
- package/dist/src/internal/authored-definition/sandbox.js +1 -0
- package/dist/src/internal/authored-definition/schema-backed.d.ts +36 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -0
- package/dist/src/internal/authored-module-bundle.d.ts +4 -0
- package/dist/src/internal/authored-module-bundle.js +2 -0
- package/dist/src/internal/authored-module-loader.d.ts +6 -0
- package/dist/src/internal/authored-module-loader.js +2 -0
- package/dist/src/internal/authored-module-map-loader.d.ts +10 -0
- package/dist/src/internal/authored-module-map-loader.js +1 -0
- package/dist/src/internal/authored-module.d.ts +42 -0
- package/dist/src/internal/authored-module.js +1 -0
- package/dist/src/internal/authored-package-tsconfig-paths.d.ts +9 -0
- package/dist/src/internal/authored-package-tsconfig-paths.js +1 -0
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +26 -0
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -0
- package/dist/src/internal/helpers/markdown.d.ts +45 -0
- package/dist/src/internal/helpers/markdown.js +3 -0
- package/dist/src/internal/instrumentation.d.ts +40 -0
- package/dist/src/internal/instrumentation.js +1 -0
- package/dist/src/internal/json-schema.d.ts +1 -0
- package/dist/src/internal/json-schema.js +1 -0
- package/dist/src/internal/logging.d.ts +100 -0
- package/dist/src/internal/logging.js +1 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +32 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -0
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +16 -0
- package/dist/src/internal/nitro/host/artifacts-config.js +1 -0
- package/dist/src/internal/nitro/host/build-application.d.ts +4 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -0
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.d.ts +40 -0
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -0
- package/dist/src/internal/nitro/host/channel-routes.d.ts +38 -0
- package/dist/src/internal/nitro/host/channel-routes.js +3 -0
- package/dist/src/internal/nitro/host/code-mode-runtime-dependency-plugin.d.ts +1 -0
- package/dist/src/internal/nitro/host/code-mode-runtime-dependency-plugin.js +1 -0
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +13 -0
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +2 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +9 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +4 -0
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +14 -0
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -0
- package/dist/src/internal/nitro/host/cron-handler-route.d.ts +41 -0
- package/dist/src/internal/nitro/host/cron-handler-route.js +1 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +29 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -0
- package/dist/src/internal/nitro/host/dispatch-schedule-in-dev.d.ts +41 -0
- package/dist/src/internal/nitro/host/dispatch-schedule-in-dev.js +1 -0
- package/dist/src/internal/nitro/host/nitro-bundler-config.d.ts +5 -0
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -0
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.d.ts +6 -0
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.js +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +8 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +60 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.js +2 -0
- package/dist/src/internal/nitro/host/server-external-packages.d.ts +5 -0
- package/dist/src/internal/nitro/host/server-external-packages.js +1 -0
- package/dist/src/internal/nitro/host/start-development-server.d.ts +20 -0
- package/dist/src/internal/nitro/host/start-development-server.js +1 -0
- package/dist/src/internal/nitro/host/start-production-server.d.ts +8 -0
- package/dist/src/internal/nitro/host/start-production-server.js +3 -0
- package/dist/src/internal/nitro/host/types.d.ts +31 -0
- package/dist/src/internal/nitro/host/types.js +1 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +8 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -0
- package/dist/src/internal/nitro/host/vercel-build-prewarm.d.ts +19 -0
- package/dist/src/internal/nitro/host/vercel-build-prewarm.js +1 -0
- package/dist/src/internal/nitro/host.d.ts +4 -0
- package/dist/src/internal/nitro/host.js +1 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +86 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +6 -0
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +26 -0
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -0
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts +22 -0
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -0
- package/dist/src/internal/nitro/routes/dev-runtime-artifacts.d.ts +10 -0
- package/dist/src/internal/nitro/routes/dev-runtime-artifacts.js +1 -0
- package/dist/src/internal/nitro/routes/dev-schedule-dispatch.d.ts +15 -0
- package/dist/src/internal/nitro/routes/dev-schedule-dispatch.js +1 -0
- package/dist/src/internal/nitro/routes/health.d.ts +14 -0
- package/dist/src/internal/nitro/routes/health.js +1 -0
- package/dist/src/internal/nitro/routes/index.d.ts +12 -0
- package/dist/src/internal/nitro/routes/index.js +151 -0
- package/dist/src/internal/nitro/routes/info.d.ts +16 -0
- package/dist/src/internal/nitro/routes/info.js +1 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +17 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -0
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +26 -0
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -0
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +12 -0
- package/dist/src/internal/nitro/routes/schedule-task.js +1 -0
- package/dist/src/internal/node-esm-compat-banner.d.ts +46 -0
- package/dist/src/internal/node-esm-compat-banner.js +4 -0
- package/dist/src/internal/package-name.d.ts +8 -0
- package/dist/src/internal/package-name.js +1 -0
- package/dist/src/internal/process/pnpm.d.ts +28 -0
- package/dist/src/internal/process/pnpm.js +1 -0
- package/dist/src/internal/runtime-model.d.ts +13 -0
- package/dist/src/internal/runtime-model.js +1 -0
- package/dist/src/internal/runtime-registry.d.ts +77 -0
- package/dist/src/internal/runtime-registry.js +1 -0
- package/dist/src/internal/vercel-agent-summary.d.ts +210 -0
- package/dist/src/internal/vercel-agent-summary.js +1 -0
- package/dist/src/internal/workflow/builtins.d.ts +41 -0
- package/dist/src/internal/workflow/builtins.js +1 -0
- package/dist/src/internal/workflow/index.d.ts +6 -0
- package/dist/src/internal/workflow/index.js +1 -0
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +71 -0
- package/dist/src/internal/workflow-bundle/builder-support.js +9 -0
- package/dist/src/internal/workflow-bundle/builder.d.ts +36 -0
- package/dist/src/internal/workflow-bundle/builder.js +5 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +39 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +4 -0
- package/dist/src/internal/workflow-bundle/eve-service-route-output.d.ts +4 -0
- package/dist/src/internal/workflow-bundle/eve-service-route-output.js +54 -0
- package/dist/src/internal/workflow-bundle/nitro-step-entry.d.ts +17 -0
- package/dist/src/internal/workflow-bundle/nitro-step-entry.js +2 -0
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +66 -0
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +3 -0
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +44 -0
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +82 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +25 -0
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +5 -0
- package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +10 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +2 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +4 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +4 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +1 -0
- package/dist/src/node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js +384 -0
- package/dist/src/node_modules/.pnpm/compute-cosine-similarity@1.1.0/node_modules/compute-cosine-similarity/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/compute-dot@1.1.0/node_modules/compute-dot/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/compute-l2norm@1.1.0/node_modules/compute-l2norm/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js +5 -0
- package/dist/src/node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js +1 -0
- package/dist/src/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.js +32 -0
- package/dist/src/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +1 -0
- package/dist/src/node_modules/.pnpm/mustache@4.2.0/node_modules/mustache/mustache.js +4 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/_vendor/partial-json-parser/parser.js +2 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/auth/workload-identity-auth.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/azure.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/client.js +11 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/api-promise.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/error.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/pagination.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/resource.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/streaming.js +3 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/core/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/error.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/decoders/line.js +3 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/detect-platform.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/headers.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/parse.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/formats.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/stringify.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/request-options.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/shims.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/to-file.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/tslib.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/base64.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/bytes.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/env.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/log.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/path.js +2 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/query.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/sleep.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/uuid.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/values.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/AbstractChatCompletionRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/AssistantStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionStreamingRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/EventStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ResponsesParser.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/RunnableFunction.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/Util.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/chatCompletionUtils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/parser.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/responses/ResponseStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/admin.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/admin-api-keys.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/audit-logs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/certificates.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/data-retention.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/groups.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/invites.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/organization.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/api-keys.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/certificates.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/data-retention.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/groups.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/model-permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/projects.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/rate-limits.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/usage.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/users/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/users/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/audio.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/speech.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/transcriptions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/translations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/batches.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/assistants.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/beta.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/chatkit.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/threads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/transcription-sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/messages.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/runs/runs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/runs/steps.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/threads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/chat.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/completions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/messages.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/completions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/containers.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/files/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/files/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/conversations/conversations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/conversations/items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/embeddings.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/evals.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/runs/output-items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/runs/runs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/alpha.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/graders.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/fine-tuning.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/jobs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/methods.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/graders/grader-models.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/graders/graders.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/images.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/models.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/moderations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/calls.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/client-secrets.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/input-items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/input-tokens.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/responses.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/shared.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/skills.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/versions/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/versions/versions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/uploads/parts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/uploads/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/file-batches.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/vector-stores.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/videos.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks/webhooks.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/streaming.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +1 -0
- package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +1 -0
- package/dist/src/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js +1 -0
- package/dist/src/node_modules/.pnpm/validate.io-array@1.0.6/node_modules/validate.io-array/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/validate.io-function@1.0.2/node_modules/validate.io-function/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +3 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +1 -0
- package/dist/src/packages/eve-catalog/src/index.js +1 -0
- package/dist/src/packages/eve-scaffold/src/channels-catalog.js +1 -0
- package/dist/src/packages/eve-scaffold/src/channels.js +7 -0
- package/dist/src/packages/eve-scaffold/src/cli/channel-add-prompter.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/channel-setup-prompter.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/command-output.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/connection-add-prompter.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/index.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/prompt-ui.js +5 -0
- package/dist/src/packages/eve-scaffold/src/cli/rail-log.js +2 -0
- package/dist/src/packages/eve-scaffold/src/cli/select-component.js +1 -0
- package/dist/src/packages/eve-scaffold/src/cli/select-state.js +1 -0
- package/dist/src/packages/eve-scaffold/src/connections/catalog.js +1 -0
- package/dist/src/packages/eve-scaffold/src/connections.js +21 -0
- package/dist/src/packages/eve-scaffold/src/files.js +1 -0
- package/dist/src/packages/eve-scaffold/src/human-action.js +1 -0
- package/dist/src/packages/eve-scaffold/src/index.js +1 -0
- package/dist/src/packages/eve-scaffold/src/module-files.js +1 -0
- package/dist/src/packages/eve-scaffold/src/package-json.js +1 -0
- package/dist/src/packages/eve-scaffold/src/pnpm-workspace.js +11 -0
- package/dist/src/packages/eve-scaffold/src/primitives/detect-deployment.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/index.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/pnpm-invocation.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/process-output.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/run-pnpm.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/run-vercel.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/update-connection-connector.js +1 -0
- package/dist/src/packages/eve-scaffold/src/primitives/update-slack-channel.js +1 -0
- package/dist/src/packages/eve-scaffold/src/project.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/deploy-to-vercel.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/index.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/project-resolution.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/run-add-connection.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/run-add-to-agent.js +2 -0
- package/dist/src/packages/eve-scaffold/src/steps/setup-connection.js +1 -0
- package/dist/src/packages/eve-scaffold/src/steps/setup-slackbot.js +1 -0
- package/dist/src/packages/eve-scaffold/src/web-template.js +4691 -0
- package/dist/src/protocol/message.d.ts +732 -0
- package/dist/src/protocol/message.js +2 -0
- package/dist/src/protocol/routes.d.ts +108 -0
- package/dist/src/protocol/routes.js +1 -0
- package/dist/src/public/agents/auth.d.ts +46 -0
- package/dist/src/public/agents/auth.js +1 -0
- package/dist/src/public/channels/auth.d.ts +416 -0
- package/dist/src/public/channels/auth.js +1 -0
- package/dist/src/public/channels/discord/api.d.ts +106 -0
- package/dist/src/public/channels/discord/api.js +2 -0
- package/dist/src/public/channels/discord/defaults.d.ts +15 -0
- package/dist/src/public/channels/discord/defaults.js +3 -0
- package/dist/src/public/channels/discord/discordChannel.d.ts +134 -0
- package/dist/src/public/channels/discord/discordChannel.js +1 -0
- package/dist/src/public/channels/discord/hitl.d.ts +47 -0
- package/dist/src/public/channels/discord/hitl.js +1 -0
- package/dist/src/public/channels/discord/inbound.d.ts +106 -0
- package/dist/src/public/channels/discord/inbound.js +2 -0
- package/dist/src/public/channels/discord/index.d.ts +23 -0
- package/dist/src/public/channels/discord/index.js +1 -0
- package/dist/src/public/channels/discord/responses.d.ts +11 -0
- package/dist/src/public/channels/discord/responses.js +1 -0
- package/dist/src/public/channels/discord/verify.d.ts +46 -0
- package/dist/src/public/channels/discord/verify.js +1 -0
- package/dist/src/public/channels/discord/verifyInbound.d.ts +6 -0
- package/dist/src/public/channels/discord/verifyInbound.js +1 -0
- package/dist/src/public/channels/eve.d.ts +81 -0
- package/dist/src/public/channels/eve.js +2 -0
- package/dist/src/public/channels/github/api.d.ts +177 -0
- package/dist/src/public/channels/github/api.js +1 -0
- package/dist/src/public/channels/github/auth.d.ts +82 -0
- package/dist/src/public/channels/github/auth.js +2 -0
- package/dist/src/public/channels/github/binding.d.ts +59 -0
- package/dist/src/public/channels/github/binding.js +1 -0
- package/dist/src/public/channels/github/checkout.d.ts +48 -0
- package/dist/src/public/channels/github/checkout.js +1 -0
- package/dist/src/public/channels/github/constants.d.ts +2 -0
- package/dist/src/public/channels/github/constants.js +1 -0
- package/dist/src/public/channels/github/defaults.d.ts +26 -0
- package/dist/src/public/channels/github/defaults.js +3 -0
- package/dist/src/public/channels/github/dispatch.d.ts +34 -0
- package/dist/src/public/channels/github/dispatch.js +1 -0
- package/dist/src/public/channels/github/githubChannel.d.ts +126 -0
- package/dist/src/public/channels/github/githubChannel.js +1 -0
- package/dist/src/public/channels/github/inbound.d.ts +183 -0
- package/dist/src/public/channels/github/inbound.js +2 -0
- package/dist/src/public/channels/github/index.d.ts +9 -0
- package/dist/src/public/channels/github/index.js +1 -0
- package/dist/src/public/channels/github/limits.d.ts +4 -0
- package/dist/src/public/channels/github/limits.js +2 -0
- package/dist/src/public/channels/github/pr-context.d.ts +46 -0
- package/dist/src/public/channels/github/pr-context.js +5 -0
- package/dist/src/public/channels/github/state.d.ts +60 -0
- package/dist/src/public/channels/github/state.js +1 -0
- package/dist/src/public/channels/github/verify.d.ts +35 -0
- package/dist/src/public/channels/github/verify.js +1 -0
- package/dist/src/public/channels/index.d.ts +89 -0
- package/dist/src/public/channels/index.js +1 -0
- package/dist/src/public/channels/linear/api.d.ts +122 -0
- package/dist/src/public/channels/linear/api.js +69 -0
- package/dist/src/public/channels/linear/auth.d.ts +22 -0
- package/dist/src/public/channels/linear/auth.js +1 -0
- package/dist/src/public/channels/linear/constants.d.ts +2 -0
- package/dist/src/public/channels/linear/constants.js +1 -0
- package/dist/src/public/channels/linear/defaults.d.ts +16 -0
- package/dist/src/public/channels/linear/defaults.js +3 -0
- package/dist/src/public/channels/linear/hitl.d.ts +14 -0
- package/dist/src/public/channels/linear/hitl.js +4 -0
- package/dist/src/public/channels/linear/inbound.d.ts +88 -0
- package/dist/src/public/channels/linear/inbound.js +2 -0
- package/dist/src/public/channels/linear/index.d.ts +8 -0
- package/dist/src/public/channels/linear/index.js +1 -0
- package/dist/src/public/channels/linear/linearChannel.d.ts +138 -0
- package/dist/src/public/channels/linear/linearChannel.js +1 -0
- package/dist/src/public/channels/linear/verify.d.ts +22 -0
- package/dist/src/public/channels/linear/verify.js +1 -0
- package/dist/src/public/channels/slack/api-encoding.d.ts +5 -0
- package/dist/src/public/channels/slack/api-encoding.js +1 -0
- package/dist/src/public/channels/slack/api.d.ts +258 -0
- package/dist/src/public/channels/slack/api.js +1 -0
- package/dist/src/public/channels/slack/attachments.d.ts +51 -0
- package/dist/src/public/channels/slack/attachments.js +1 -0
- package/dist/src/public/channels/slack/auth.d.ts +16 -0
- package/dist/src/public/channels/slack/auth.js +1 -0
- package/dist/src/public/channels/slack/blocks.d.ts +45 -0
- package/dist/src/public/channels/slack/blocks.js +3 -0
- package/dist/src/public/channels/slack/connections.d.ts +53 -0
- package/dist/src/public/channels/slack/connections.js +1 -0
- package/dist/src/public/channels/slack/constants.d.ts +7 -0
- package/dist/src/public/channels/slack/constants.js +1 -0
- package/dist/src/public/channels/slack/defaults.d.ts +36 -0
- package/dist/src/public/channels/slack/defaults.js +4 -0
- package/dist/src/public/channels/slack/hitl.d.ts +141 -0
- package/dist/src/public/channels/slack/hitl.js +1 -0
- package/dist/src/public/channels/slack/inbound.d.ts +122 -0
- package/dist/src/public/channels/slack/inbound.js +2 -0
- package/dist/src/public/channels/slack/index.d.ts +22 -0
- package/dist/src/public/channels/slack/index.js +1 -0
- package/dist/src/public/channels/slack/interactions.d.ts +64 -0
- package/dist/src/public/channels/slack/interactions.js +1 -0
- package/dist/src/public/channels/slack/limits.d.ts +62 -0
- package/dist/src/public/channels/slack/limits.js +1 -0
- package/dist/src/public/channels/slack/mrkdwn.d.ts +38 -0
- package/dist/src/public/channels/slack/mrkdwn.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +303 -0
- package/dist/src/public/channels/slack/slackChannel.js +1 -0
- package/dist/src/public/channels/slack/thread.d.ts +33 -0
- package/dist/src/public/channels/slack/thread.js +1 -0
- package/dist/src/public/channels/slack/utils.d.ts +1 -0
- package/dist/src/public/channels/slack/utils.js +1 -0
- package/dist/src/public/channels/slack/verify.d.ts +48 -0
- package/dist/src/public/channels/slack/verify.js +1 -0
- package/dist/src/public/channels/teams/api.d.ts +155 -0
- package/dist/src/public/channels/teams/api.js +4 -0
- package/dist/src/public/channels/teams/attachments.d.ts +35 -0
- package/dist/src/public/channels/teams/attachments.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +24 -0
- package/dist/src/public/channels/teams/defaults.js +3 -0
- package/dist/src/public/channels/teams/hitl.d.ts +49 -0
- package/dist/src/public/channels/teams/hitl.js +1 -0
- package/dist/src/public/channels/teams/inbound.d.ts +85 -0
- package/dist/src/public/channels/teams/inbound.js +3 -0
- package/dist/src/public/channels/teams/index.d.ts +19 -0
- package/dist/src/public/channels/teams/index.js +1 -0
- package/dist/src/public/channels/teams/limits.d.ts +8 -0
- package/dist/src/public/channels/teams/limits.js +1 -0
- package/dist/src/public/channels/teams/teamsChannel.d.ts +164 -0
- package/dist/src/public/channels/teams/teamsChannel.js +1 -0
- package/dist/src/public/channels/teams/verify.d.ts +50 -0
- package/dist/src/public/channels/teams/verify.js +1 -0
- package/dist/src/public/channels/telegram/api.d.ts +120 -0
- package/dist/src/public/channels/telegram/api.js +2 -0
- package/dist/src/public/channels/telegram/attachments.d.ts +31 -0
- package/dist/src/public/channels/telegram/attachments.js +1 -0
- package/dist/src/public/channels/telegram/defaults.d.ts +9 -0
- package/dist/src/public/channels/telegram/defaults.js +3 -0
- package/dist/src/public/channels/telegram/hitl.d.ts +59 -0
- package/dist/src/public/channels/telegram/hitl.js +1 -0
- package/dist/src/public/channels/telegram/inbound.d.ts +102 -0
- package/dist/src/public/channels/telegram/inbound.js +2 -0
- package/dist/src/public/channels/telegram/index.d.ts +19 -0
- package/dist/src/public/channels/telegram/index.js +1 -0
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +127 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -0
- package/dist/src/public/channels/telegram/verify.d.ts +35 -0
- package/dist/src/public/channels/telegram/verify.js +1 -0
- package/dist/src/public/channels/twilio/api.d.ts +74 -0
- package/dist/src/public/channels/twilio/api.js +1 -0
- package/dist/src/public/channels/twilio/defaults.d.ts +17 -0
- package/dist/src/public/channels/twilio/defaults.js +3 -0
- package/dist/src/public/channels/twilio/inbound.d.ts +60 -0
- package/dist/src/public/channels/twilio/inbound.js +2 -0
- package/dist/src/public/channels/twilio/index.d.ts +5 -0
- package/dist/src/public/channels/twilio/index.js +1 -0
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +195 -0
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -0
- package/dist/src/public/channels/twilio/twiml.d.ts +37 -0
- package/dist/src/public/channels/twilio/twiml.js +1 -0
- package/dist/src/public/channels/twilio/verify.d.ts +50 -0
- package/dist/src/public/channels/twilio/verify.js +1 -0
- package/dist/src/public/channels/upload-policy.d.ts +101 -0
- package/dist/src/public/channels/upload-policy.js +1 -0
- package/dist/src/public/connections/errors.d.ts +117 -0
- package/dist/src/public/connections/errors.js +1 -0
- package/dist/src/public/connections/index.d.ts +9 -0
- package/dist/src/public/connections/index.js +1 -0
- package/dist/src/public/context/index.d.ts +14 -0
- package/dist/src/public/context/index.js +1 -0
- package/dist/src/public/definitions/agent.d.ts +24 -0
- package/dist/src/public/definitions/agent.js +1 -0
- package/dist/src/public/definitions/callback-context.d.ts +33 -0
- package/dist/src/public/definitions/callback-context.js +1 -0
- package/dist/src/public/definitions/channel.d.ts +126 -0
- package/dist/src/public/definitions/channel.js +1 -0
- package/dist/src/public/definitions/connections/mcp.d.ts +82 -0
- package/dist/src/public/definitions/connections/mcp.js +1 -0
- package/dist/src/public/definitions/connections/openapi.d.ts +99 -0
- package/dist/src/public/definitions/connections/openapi.js +1 -0
- package/dist/src/public/definitions/connections/protocol.d.ts +12 -0
- package/dist/src/public/definitions/connections/protocol.js +1 -0
- package/dist/src/public/definitions/defineChannel.d.ts +145 -0
- package/dist/src/public/definitions/defineChannel.js +1 -0
- package/dist/src/public/definitions/exact.d.ts +7 -0
- package/dist/src/public/definitions/exact.js +1 -0
- package/dist/src/public/definitions/hook.d.ts +60 -0
- package/dist/src/public/definitions/hook.js +1 -0
- package/dist/src/public/definitions/instructions.d.ts +31 -0
- package/dist/src/public/definitions/instructions.js +1 -0
- package/dist/src/public/definitions/instrumentation.d.ts +1 -0
- package/dist/src/public/definitions/instrumentation.js +1 -0
- package/dist/src/public/definitions/remote-agent.d.ts +49 -0
- package/dist/src/public/definitions/remote-agent.js +1 -0
- package/dist/src/public/definitions/sandbox-backend.d.ts +17 -0
- package/dist/src/public/definitions/sandbox-backend.js +1 -0
- package/dist/src/public/definitions/sandbox.d.ts +24 -0
- package/dist/src/public/definitions/sandbox.js +1 -0
- package/dist/src/public/definitions/schedule.d.ts +96 -0
- package/dist/src/public/definitions/schedule.js +1 -0
- package/dist/src/public/definitions/skill.d.ts +21 -0
- package/dist/src/public/definitions/skill.js +1 -0
- package/dist/src/public/definitions/source.d.ts +8 -0
- package/dist/src/public/definitions/source.js +1 -0
- package/dist/src/public/definitions/state.d.ts +37 -0
- package/dist/src/public/definitions/state.js +1 -0
- package/dist/src/public/definitions/tool.d.ts +285 -0
- package/dist/src/public/definitions/tool.js +1 -0
- package/dist/src/public/hooks/index.d.ts +8 -0
- package/dist/src/public/hooks/index.js +1 -0
- package/dist/src/public/index.d.ts +5 -0
- package/dist/src/public/index.js +1 -0
- package/dist/src/public/instructions/index.d.ts +7 -0
- package/dist/src/public/instructions/index.js +1 -0
- package/dist/src/public/instrumentation/index.d.ts +144 -0
- package/dist/src/public/instrumentation/index.js +1 -0
- package/dist/src/public/next/index.d.ts +86 -0
- package/dist/src/public/next/index.js +1 -0
- package/dist/src/public/next/server.d.ts +6 -0
- package/dist/src/public/next/server.js +1 -0
- package/dist/src/public/next/vercel-output-config.d.ts +9 -0
- package/dist/src/public/next/vercel-output-config.js +1 -0
- package/dist/src/public/nuxt/dev-server.d.ts +24 -0
- package/dist/src/public/nuxt/dev-server.js +1 -0
- package/dist/src/public/nuxt/index.d.ts +1 -0
- package/dist/src/public/nuxt/index.js +1 -0
- package/dist/src/public/nuxt/module.d.ts +43 -0
- package/dist/src/public/nuxt/module.js +1 -0
- package/dist/src/public/nuxt/routing.d.ts +55 -0
- package/dist/src/public/nuxt/routing.js +1 -0
- package/dist/src/public/nuxt/vercel-json.d.ts +17 -0
- package/dist/src/public/nuxt/vercel-json.js +1 -0
- package/dist/src/public/sandbox/backends/default.d.ts +22 -0
- package/dist/src/public/sandbox/backends/default.js +1 -0
- package/dist/src/public/sandbox/backends/local.d.ts +17 -0
- package/dist/src/public/sandbox/backends/local.js +1 -0
- package/dist/src/public/sandbox/backends/vercel.d.ts +24 -0
- package/dist/src/public/sandbox/backends/vercel.js +1 -0
- package/dist/src/public/sandbox/index.d.ts +13 -0
- package/dist/src/public/sandbox/index.js +1 -0
- package/dist/src/public/sandbox/local-sandbox.d.ts +7 -0
- package/dist/src/public/sandbox/local-sandbox.js +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +42 -0
- package/dist/src/public/sandbox/vercel-sandbox.js +1 -0
- package/dist/src/public/schedules/index.d.ts +4 -0
- package/dist/src/public/schedules/index.js +1 -0
- package/dist/src/public/skills/index.d.ts +7 -0
- package/dist/src/public/skills/index.js +1 -0
- package/dist/src/public/sveltekit/dev-server.d.ts +24 -0
- package/dist/src/public/sveltekit/dev-server.js +1 -0
- package/dist/src/public/sveltekit/index.d.ts +44 -0
- package/dist/src/public/sveltekit/index.js +1 -0
- package/dist/src/public/sveltekit/routing.d.ts +32 -0
- package/dist/src/public/sveltekit/routing.js +1 -0
- package/dist/src/public/sveltekit/vercel-json.d.ts +17 -0
- package/dist/src/public/sveltekit/vercel-json.js +1 -0
- package/dist/src/public/tool-result-narrowing.d.ts +74 -0
- package/dist/src/public/tool-result-narrowing.js +1 -0
- package/dist/src/public/tools/approval/approval-helpers.d.ts +19 -0
- package/dist/src/public/tools/approval/approval-helpers.js +1 -0
- package/dist/src/public/tools/approval/index.d.ts +5 -0
- package/dist/src/public/tools/approval/index.js +1 -0
- package/dist/src/public/tools/defaults.d.ts +60 -0
- package/dist/src/public/tools/defaults.js +1 -0
- package/dist/src/public/tools/define-bash-tool.d.ts +21 -0
- package/dist/src/public/tools/define-bash-tool.js +1 -0
- package/dist/src/public/tools/define-glob-tool.d.ts +22 -0
- package/dist/src/public/tools/define-glob-tool.js +1 -0
- package/dist/src/public/tools/define-grep-tool.d.ts +22 -0
- package/dist/src/public/tools/define-grep-tool.js +1 -0
- package/dist/src/public/tools/define-read-file-tool.d.ts +27 -0
- package/dist/src/public/tools/define-read-file-tool.js +1 -0
- package/dist/src/public/tools/define-write-file-tool.d.ts +22 -0
- package/dist/src/public/tools/define-write-file-tool.js +1 -0
- package/dist/src/public/tools/index.d.ts +12 -0
- package/dist/src/public/tools/index.js +1 -0
- package/dist/src/public/tools/internal.d.ts +12 -0
- package/dist/src/public/tools/internal.js +1 -0
- package/dist/src/public/types/json.d.ts +28 -0
- package/dist/src/public/types/json.js +1 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/index.js +1 -0
- package/dist/src/react/use-eve-agent.d.ts +76 -0
- package/dist/src/react/use-eve-agent.js +1 -0
- package/dist/src/runtime/actions/keys.d.ts +11 -0
- package/dist/src/runtime/actions/keys.js +1 -0
- package/dist/src/runtime/actions/types.d.ts +150 -0
- package/dist/src/runtime/actions/types.js +1 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +37 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -0
- package/dist/src/runtime/agent/bootstrap-model.d.ts +7 -0
- package/dist/src/runtime/agent/bootstrap-model.js +1 -0
- package/dist/src/runtime/agent/bootstrap.d.ts +44 -0
- package/dist/src/runtime/agent/bootstrap.js +1 -0
- package/dist/src/runtime/agent/mock-model-adapter.d.ts +21 -0
- package/dist/src/runtime/agent/mock-model-adapter.js +5 -0
- package/dist/src/runtime/agent/mock-model-skill-selection.d.ts +9 -0
- package/dist/src/runtime/agent/mock-model-skill-selection.js +4 -0
- package/dist/src/runtime/agent/mock-structured-output.d.ts +5 -0
- package/dist/src/runtime/agent/mock-structured-output.js +1 -0
- package/dist/src/runtime/agent/resolve-model.d.ts +11 -0
- package/dist/src/runtime/agent/resolve-model.js +1 -0
- package/dist/src/runtime/attributes/emit.d.ts +73 -0
- package/dist/src/runtime/attributes/emit.js +1 -0
- package/dist/src/runtime/cache-key.d.ts +9 -0
- package/dist/src/runtime/cache-key.js +1 -0
- package/dist/src/runtime/channels/registry.d.ts +27 -0
- package/dist/src/runtime/channels/registry.js +1 -0
- package/dist/src/runtime/compiled-artifacts-source.d.ts +44 -0
- package/dist/src/runtime/compiled-artifacts-source.js +1 -0
- package/dist/src/runtime/connections/authorization-complete-page.d.ts +11 -0
- package/dist/src/runtime/connections/authorization-complete-page.js +53 -0
- package/dist/src/runtime/connections/authorization-tokens.d.ts +51 -0
- package/dist/src/runtime/connections/authorization-tokens.js +1 -0
- package/dist/src/runtime/connections/callback-route.d.ts +55 -0
- package/dist/src/runtime/connections/callback-route.js +1 -0
- package/dist/src/runtime/connections/mcp-client.d.ts +74 -0
- package/dist/src/runtime/connections/mcp-client.js +1 -0
- package/dist/src/runtime/connections/openapi-client.d.ts +43 -0
- package/dist/src/runtime/connections/openapi-client.js +1 -0
- package/dist/src/runtime/connections/openapi-operations.d.ts +30 -0
- package/dist/src/runtime/connections/openapi-operations.js +1 -0
- package/dist/src/runtime/connections/openapi-schema.d.ts +39 -0
- package/dist/src/runtime/connections/openapi-schema.js +1 -0
- package/dist/src/runtime/connections/openapi-security.d.ts +41 -0
- package/dist/src/runtime/connections/openapi-security.js +1 -0
- package/dist/src/runtime/connections/openapi-spec.d.ts +20 -0
- package/dist/src/runtime/connections/openapi-spec.js +1 -0
- package/dist/src/runtime/connections/principal.d.ts +66 -0
- package/dist/src/runtime/connections/principal.js +1 -0
- package/dist/src/runtime/connections/registry.d.ts +36 -0
- package/dist/src/runtime/connections/registry.js +1 -0
- package/dist/src/runtime/connections/scoped-authorization.d.ts +61 -0
- package/dist/src/runtime/connections/scoped-authorization.js +1 -0
- package/dist/src/runtime/connections/types.d.ts +349 -0
- package/dist/src/runtime/connections/types.js +1 -0
- package/dist/src/runtime/connections/validate-authorization.d.ts +21 -0
- package/dist/src/runtime/connections/validate-authorization.js +1 -0
- package/dist/src/runtime/framework-channels/index.d.ts +11 -0
- package/dist/src/runtime/framework-channels/index.js +1 -0
- package/dist/src/runtime/framework-tools/ask-question.d.ts +21 -0
- package/dist/src/runtime/framework-tools/ask-question.js +1 -0
- package/dist/src/runtime/framework-tools/bash.d.ts +17 -0
- package/dist/src/runtime/framework-tools/bash.js +1 -0
- package/dist/src/runtime/framework-tools/code-mode-connection-auth.d.ts +29 -0
- package/dist/src/runtime/framework-tools/code-mode-connection-auth.js +1 -0
- package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +35 -0
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -0
- package/dist/src/runtime/framework-tools/file-state.d.ts +62 -0
- package/dist/src/runtime/framework-tools/file-state.js +1 -0
- package/dist/src/runtime/framework-tools/final-output.d.ts +14 -0
- package/dist/src/runtime/framework-tools/final-output.js +1 -0
- package/dist/src/runtime/framework-tools/glob.d.ts +17 -0
- package/dist/src/runtime/framework-tools/glob.js +2 -0
- package/dist/src/runtime/framework-tools/grep.d.ts +17 -0
- package/dist/src/runtime/framework-tools/grep.js +2 -0
- package/dist/src/runtime/framework-tools/index.d.ts +26 -0
- package/dist/src/runtime/framework-tools/index.js +1 -0
- package/dist/src/runtime/framework-tools/read-file.d.ts +17 -0
- package/dist/src/runtime/framework-tools/read-file.js +2 -0
- package/dist/src/runtime/framework-tools/skill.d.ts +4 -0
- package/dist/src/runtime/framework-tools/skill.js +1 -0
- package/dist/src/runtime/framework-tools/todo.d.ts +39 -0
- package/dist/src/runtime/framework-tools/todo.js +3 -0
- package/dist/src/runtime/framework-tools/web-fetch.d.ts +5 -0
- package/dist/src/runtime/framework-tools/web-fetch.js +2 -0
- package/dist/src/runtime/framework-tools/web-search.d.ts +26 -0
- package/dist/src/runtime/framework-tools/web-search.js +1 -0
- package/dist/src/runtime/framework-tools/write-file.d.ts +17 -0
- package/dist/src/runtime/framework-tools/write-file.js +2 -0
- package/dist/src/runtime/governance/auth/http-basic.d.ts +8 -0
- package/dist/src/runtime/governance/auth/http-basic.js +1 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.d.ts +8 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +1 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.d.ts +8 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.js +1 -0
- package/dist/src/runtime/governance/auth/oidc.d.ts +8 -0
- package/dist/src/runtime/governance/auth/oidc.js +1 -0
- package/dist/src/runtime/governance/auth/token-claims.d.ts +17 -0
- package/dist/src/runtime/governance/auth/token-claims.js +1 -0
- package/dist/src/runtime/governance/auth/types.d.ts +104 -0
- package/dist/src/runtime/governance/auth/types.js +1 -0
- package/dist/src/runtime/governance/network/ip-allow-list.d.ts +17 -0
- package/dist/src/runtime/governance/network/ip-allow-list.js +1 -0
- package/dist/src/runtime/graph.d.ts +46 -0
- package/dist/src/runtime/graph.js +1 -0
- package/dist/src/runtime/hooks/registry.d.ts +40 -0
- package/dist/src/runtime/hooks/registry.js +1 -0
- package/dist/src/runtime/input/types.d.ts +78 -0
- package/dist/src/runtime/input/types.js +1 -0
- package/dist/src/runtime/loaders/artifact-paths.d.ts +18 -0
- package/dist/src/runtime/loaders/artifact-paths.js +1 -0
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +36 -0
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -0
- package/dist/src/runtime/loaders/compile-metadata.d.ts +14 -0
- package/dist/src/runtime/loaders/compile-metadata.js +1 -0
- package/dist/src/runtime/loaders/manifest.d.ts +21 -0
- package/dist/src/runtime/loaders/manifest.js +1 -0
- package/dist/src/runtime/loaders/module-map.d.ts +21 -0
- package/dist/src/runtime/loaders/module-map.js +1 -0
- package/dist/src/runtime/prompt/compose.d.ts +19 -0
- package/dist/src/runtime/prompt/compose.js +2 -0
- package/dist/src/runtime/prompt/connections.d.ts +9 -0
- package/dist/src/runtime/prompt/connections.js +2 -0
- package/dist/src/runtime/resolve-agent-graph.d.ts +17 -0
- package/dist/src/runtime/resolve-agent-graph.js +1 -0
- package/dist/src/runtime/resolve-agent.d.ts +16 -0
- package/dist/src/runtime/resolve-agent.js +1 -0
- package/dist/src/runtime/resolve-channel.d.ts +17 -0
- package/dist/src/runtime/resolve-channel.js +1 -0
- package/dist/src/runtime/resolve-connection.d.ts +15 -0
- package/dist/src/runtime/resolve-connection.js +1 -0
- package/dist/src/runtime/resolve-dynamic-instructions.d.ts +4 -0
- package/dist/src/runtime/resolve-dynamic-instructions.js +1 -0
- package/dist/src/runtime/resolve-dynamic-skill.d.ts +8 -0
- package/dist/src/runtime/resolve-dynamic-skill.js +1 -0
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +12 -0
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -0
- package/dist/src/runtime/resolve-helpers.d.ts +43 -0
- package/dist/src/runtime/resolve-helpers.js +1 -0
- package/dist/src/runtime/resolve-hook.d.ts +13 -0
- package/dist/src/runtime/resolve-hook.js +1 -0
- package/dist/src/runtime/resolve-sandbox.d.ts +13 -0
- package/dist/src/runtime/resolve-sandbox.js +1 -0
- package/dist/src/runtime/resolve-tool.d.ts +14 -0
- package/dist/src/runtime/resolve-tool.js +1 -0
- package/dist/src/runtime/sandbox/keys.d.ts +38 -0
- package/dist/src/runtime/sandbox/keys.js +1 -0
- package/dist/src/runtime/sandbox/registry.d.ts +61 -0
- package/dist/src/runtime/sandbox/registry.js +1 -0
- package/dist/src/runtime/sandbox/template-plan.d.ts +26 -0
- package/dist/src/runtime/sandbox/template-plan.js +1 -0
- package/dist/src/runtime/schedules/register.d.ts +35 -0
- package/dist/src/runtime/schedules/register.js +1 -0
- package/dist/src/runtime/schedules/resolve-schedule.d.ts +31 -0
- package/dist/src/runtime/schedules/resolve-schedule.js +1 -0
- package/dist/src/runtime/session-callback-route.d.ts +6 -0
- package/dist/src/runtime/session-callback-route.js +1 -0
- package/dist/src/runtime/sessions/auth.d.ts +39 -0
- package/dist/src/runtime/sessions/auth.js +1 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +47 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -0
- package/dist/src/runtime/sessions/runtime-context-keys.d.ts +11 -0
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -0
- package/dist/src/runtime/sessions/runtime-session.d.ts +52 -0
- package/dist/src/runtime/sessions/runtime-session.js +1 -0
- package/dist/src/runtime/sessions/turn.d.ts +33 -0
- package/dist/src/runtime/sessions/turn.js +1 -0
- package/dist/src/runtime/skills/fragment-context.d.ts +4 -0
- package/dist/src/runtime/skills/fragment-context.js +1 -0
- package/dist/src/runtime/skills/sandbox-access.d.ts +21 -0
- package/dist/src/runtime/skills/sandbox-access.js +1 -0
- package/dist/src/runtime/subagents/registry.d.ts +32 -0
- package/dist/src/runtime/subagents/registry.js +1 -0
- package/dist/src/runtime/tools/registry.d.ts +30 -0
- package/dist/src/runtime/tools/registry.js +1 -0
- package/dist/src/runtime/types.d.ts +368 -0
- package/dist/src/runtime/types.js +1 -0
- package/dist/src/runtime/validation.d.ts +5 -0
- package/dist/src/runtime/validation.js +1 -0
- package/dist/src/runtime/workspace/seed-files.d.ts +15 -0
- package/dist/src/runtime/workspace/seed-files.js +1 -0
- package/dist/src/runtime/workspace/spec.d.ts +6 -0
- package/dist/src/runtime/workspace/spec.js +2 -0
- package/dist/src/runtime/workspace/types.d.ts +18 -0
- package/dist/src/runtime/workspace/types.js +1 -0
- package/dist/src/sandbox/state.d.ts +33 -0
- package/dist/src/sandbox/state.js +1 -0
- package/dist/src/services/dev-client/request-headers.d.ts +74 -0
- package/dist/src/services/dev-client/request-headers.js +1 -0
- package/dist/src/services/dev-client/stream.d.ts +5 -0
- package/dist/src/services/dev-client/stream.js +1 -0
- package/dist/src/services/dev-client/url.d.ts +11 -0
- package/dist/src/services/dev-client/url.js +1 -0
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +42 -0
- package/dist/src/services/dev-client/vercel-auth-error.js +2 -0
- package/dist/src/services/dev-client.d.ts +75 -0
- package/dist/src/services/dev-client.js +1 -0
- package/dist/src/services/inspect-application.d.ts +23 -0
- package/dist/src/services/inspect-application.js +1 -0
- package/dist/src/shared/agent-definition.d.ts +154 -0
- package/dist/src/shared/agent-definition.js +1 -0
- package/dist/src/shared/code-mode.d.ts +29 -0
- package/dist/src/shared/code-mode.js +1 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +159 -0
- package/dist/src/shared/dynamic-tool-definition.js +1 -0
- package/dist/src/shared/errors.d.ts +17 -0
- package/dist/src/shared/errors.js +1 -0
- package/dist/src/shared/guards.d.ts +45 -0
- package/dist/src/shared/guards.js +1 -0
- package/dist/src/shared/json-schema.d.ts +9 -0
- package/dist/src/shared/json-schema.js +1 -0
- package/dist/src/shared/json-schemas.d.ts +10 -0
- package/dist/src/shared/json-schemas.js +1 -0
- package/dist/src/shared/json.d.ts +34 -0
- package/dist/src/shared/json.js +1 -0
- package/dist/src/shared/network-address.d.ts +11 -0
- package/dist/src/shared/network-address.js +1 -0
- package/dist/src/shared/node.d.ts +6 -0
- package/dist/src/shared/node.js +1 -0
- package/dist/src/shared/optional.d.ts +3 -0
- package/dist/src/shared/optional.js +1 -0
- package/dist/src/shared/run-mode.d.ts +7 -0
- package/dist/src/shared/run-mode.js +1 -0
- package/dist/src/shared/sandbox-backend.d.ts +149 -0
- package/dist/src/shared/sandbox-backend.js +1 -0
- package/dist/src/shared/sandbox-definition.d.ts +110 -0
- package/dist/src/shared/sandbox-definition.js +1 -0
- package/dist/src/shared/sandbox-network-policy.d.ts +23 -0
- package/dist/src/shared/sandbox-network-policy.js +1 -0
- package/dist/src/shared/sandbox-session.d.ts +144 -0
- package/dist/src/shared/sandbox-session.js +1 -0
- package/dist/src/shared/skill-definition.d.ts +24 -0
- package/dist/src/shared/skill-definition.js +1 -0
- package/dist/src/shared/skill-package.d.ts +50 -0
- package/dist/src/shared/skill-package.js +1 -0
- package/dist/src/shared/source-ref.d.ts +53 -0
- package/dist/src/shared/source-ref.js +1 -0
- package/dist/src/shared/tool-definition.d.ts +58 -0
- package/dist/src/shared/tool-definition.js +1 -0
- package/dist/src/shared/vercel-output-directory.d.ts +2 -0
- package/dist/src/shared/vercel-output-directory.js +1 -0
- package/dist/src/svelte/index.d.ts +3 -0
- package/dist/src/svelte/index.js +3 -0
- package/dist/src/svelte/use-eve-agent.d.ts +105 -0
- package/dist/src/svelte/use-eve-agent.js +3 -0
- package/dist/src/vue/index.d.ts +3 -0
- package/dist/src/vue/index.js +3 -0
- package/dist/src/vue/use-eve-agent.d.ts +103 -0
- package/dist/src/vue/use-eve-agent.js +3 -0
- package/package.json +336 -71
- package/.npmignore +0 -2
- package/component.json +0 -13
- package/dr.json +0 -10
- package/e.html +0 -66
- package/eve.js +0 -435
- package/template.dot +0 -13
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { KeyObject } from "node:crypto";
|
|
2
|
+
|
|
3
|
+
export interface JWTPayload {
|
|
4
|
+
aud?: string | readonly string[] | undefined;
|
|
5
|
+
exp?: number | undefined;
|
|
6
|
+
iat?: number | undefined;
|
|
7
|
+
iss?: string | undefined;
|
|
8
|
+
jti?: string | undefined;
|
|
9
|
+
nbf?: number | undefined;
|
|
10
|
+
sub?: string | undefined;
|
|
11
|
+
[claim: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface JWTVerifyOptions {
|
|
15
|
+
algorithms?: readonly string[] | undefined;
|
|
16
|
+
audience?: string | readonly string[] | undefined;
|
|
17
|
+
clockTolerance?: number | string | undefined;
|
|
18
|
+
issuer?: string | readonly string[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface JWTVerifyResult {
|
|
22
|
+
payload: JWTPayload;
|
|
23
|
+
protectedHeader: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type KeyLike = CryptoKey | KeyObject | Uint8Array;
|
|
27
|
+
export type GetKeyFunction = (
|
|
28
|
+
protectedHeader: Record<string, unknown>,
|
|
29
|
+
token?: unknown,
|
|
30
|
+
) => KeyLike | Promise<KeyLike>;
|
|
31
|
+
|
|
32
|
+
export declare function createRemoteJWKSet(url: URL): GetKeyFunction;
|
|
33
|
+
export declare function decodeJwt(jwt: string): JWTPayload;
|
|
34
|
+
export declare function importJWK(jwk: unknown, alg?: string): Promise<KeyLike>;
|
|
35
|
+
export declare function importSPKI(spki: string, alg: string): Promise<KeyLike>;
|
|
36
|
+
export declare function jwtVerify(
|
|
37
|
+
jwt: string,
|
|
38
|
+
key: KeyLike | GetKeyFunction,
|
|
39
|
+
options?: JWTVerifyOptions,
|
|
40
|
+
): Promise<JWTVerifyResult>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/workflow/chunk-DSjMdhoD.js";const t=new TextEncoder,n=new TextDecoder,r=2**32;function i(...e){let t=e.reduce((e,{length:t})=>e+t,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function a(e,t,n){if(t<0||t>=r)throw RangeError(`value must be >= 0 and <= ${r-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function o(e){let t=Math.floor(e/r),n=e%r,i=new Uint8Array(8);return a(i,t,0),a(i,n,4),i}function s(e){let t=new Uint8Array(4);return a(t,e),t}function c(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>127)throw TypeError(`non-ASCII string encountered in encode()`);t[n]=r}return t}function l(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,n=[];for(let r=0;r<e.length;r+=t)n.push(String.fromCharCode.apply(null,e.subarray(r,r+t)));return btoa(n.join(``))}function u(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var d=e({decode:()=>f,encode:()=>p});function f(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e==`string`?e:n.decode(e),{alphabet:`base64url`});let t=e;t instanceof Uint8Array&&(t=n.decode(t)),t=t.replace(/-/g,`+`).replace(/_/g,`/`);try{return u(t)}catch{throw TypeError(`The input to be decoded is not correctly encoded.`)}}function p(e){let n=e;return typeof n==`string`&&(n=t.encode(n)),Uint8Array.prototype.toBase64?n.toBase64({alphabet:`base64url`,omitPadding:!0}):l(n).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)}const m=(e,t=`algorithm.name`)=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`),h=(e,t)=>e.name===t;function g(e){return parseInt(e.name.slice(4),10)}function _(e,t){if(g(e.hash)!==t)throw m(`SHA-${t}`,`algorithm.hash`)}function v(e){switch(e){case`ES256`:return`P-256`;case`ES384`:return`P-384`;case`ES512`:return`P-521`;default:throw Error(`unreachable`)}}function y(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function ee(e,t,n){switch(t){case`HS256`:case`HS384`:case`HS512`:if(!h(e.algorithm,`HMAC`))throw m(`HMAC`);_(e.algorithm,parseInt(t.slice(2),10));break;case`RS256`:case`RS384`:case`RS512`:if(!h(e.algorithm,`RSASSA-PKCS1-v1_5`))throw m(`RSASSA-PKCS1-v1_5`);_(e.algorithm,parseInt(t.slice(2),10));break;case`PS256`:case`PS384`:case`PS512`:if(!h(e.algorithm,`RSA-PSS`))throw m(`RSA-PSS`);_(e.algorithm,parseInt(t.slice(2),10));break;case`Ed25519`:case`EdDSA`:if(!h(e.algorithm,`Ed25519`))throw m(`Ed25519`);break;case`ML-DSA-44`:case`ML-DSA-65`:case`ML-DSA-87`:if(!h(e.algorithm,t))throw m(t);break;case`ES256`:case`ES384`:case`ES512`:{if(!h(e.algorithm,`ECDSA`))throw m(`ECDSA`);let n=v(t);if(e.algorithm.namedCurve!==n)throw m(n,`algorithm.namedCurve`);break}default:throw TypeError(`CryptoKey does not support this operation`)}y(e,n)}function b(e,t,n){switch(t){case`A128GCM`:case`A192GCM`:case`A256GCM`:{if(!h(e.algorithm,`AES-GCM`))throw m(`AES-GCM`);let n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw m(n,`algorithm.length`);break}case`A128KW`:case`A192KW`:case`A256KW`:{if(!h(e.algorithm,`AES-KW`))throw m(`AES-KW`);let n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw m(n,`algorithm.length`);break}case`ECDH`:switch(e.algorithm.name){case`ECDH`:case`X25519`:break;default:throw m(`ECDH or X25519`)}break;case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:if(!h(e.algorithm,`PBKDF2`))throw m(`PBKDF2`);break;case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:if(!h(e.algorithm,`RSA-OAEP`))throw m(`RSA-OAEP`);_(e.algorithm,parseInt(t.slice(9),10)||1);break;default:throw TypeError(`CryptoKey does not support this operation`)}y(e,n)}function x(e,t,...n){if(n=n.filter(Boolean),n.length>2){let t=n.pop();e+=`one of type ${n.join(`, `)}, or ${t}.`}else n.length===2?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return t==null?e+=` Received ${t}`:typeof t==`function`&&t.name?e+=` Received function ${t.name}`:typeof t==`object`&&t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const S=(e,...t)=>x(`Key must be `,e,...t),te=(e,t,...n)=>x(`Key for the ${e} algorithm must be `,t,...n);var ne=e({JOSEAlgNotAllowed:()=>ie,JOSEError:()=>C,JOSENotSupported:()=>T,JWEDecryptionFailed:()=>E,JWEInvalid:()=>D,JWKInvalid:()=>ae,JWKSInvalid:()=>oe,JWKSMultipleMatchingKeys:()=>ce,JWKSNoMatchingKey:()=>se,JWKSTimeout:()=>le,JWSInvalid:()=>O,JWSSignatureVerificationFailed:()=>ue,JWTClaimValidationFailed:()=>w,JWTExpired:()=>re,JWTInvalid:()=>k}),C=class extends Error{static code=`ERR_JOSE_GENERIC`;code=`ERR_JOSE_GENERIC`;constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},w=class extends C{static code=`ERR_JWT_CLAIM_VALIDATION_FAILED`;code=`ERR_JWT_CLAIM_VALIDATION_FAILED`;claim;reason;payload;constructor(e,t,n=`unspecified`,r=`unspecified`){super(e,{cause:{claim:n,reason:r,payload:t}}),this.claim=n,this.reason=r,this.payload=t}},re=class extends C{static code=`ERR_JWT_EXPIRED`;code=`ERR_JWT_EXPIRED`;claim;reason;payload;constructor(e,t,n=`unspecified`,r=`unspecified`){super(e,{cause:{claim:n,reason:r,payload:t}}),this.claim=n,this.reason=r,this.payload=t}},ie=class extends C{static code=`ERR_JOSE_ALG_NOT_ALLOWED`;code=`ERR_JOSE_ALG_NOT_ALLOWED`},T=class extends C{static code=`ERR_JOSE_NOT_SUPPORTED`;code=`ERR_JOSE_NOT_SUPPORTED`},E=class extends C{static code=`ERR_JWE_DECRYPTION_FAILED`;code=`ERR_JWE_DECRYPTION_FAILED`;constructor(e=`decryption operation failed`,t){super(e,t)}},D=class extends C{static code=`ERR_JWE_INVALID`;code=`ERR_JWE_INVALID`},O=class extends C{static code=`ERR_JWS_INVALID`;code=`ERR_JWS_INVALID`},k=class extends C{static code=`ERR_JWT_INVALID`;code=`ERR_JWT_INVALID`},ae=class extends C{static code=`ERR_JWK_INVALID`;code=`ERR_JWK_INVALID`},oe=class extends C{static code=`ERR_JWKS_INVALID`;code=`ERR_JWKS_INVALID`},se=class extends C{static code=`ERR_JWKS_NO_MATCHING_KEY`;code=`ERR_JWKS_NO_MATCHING_KEY`;constructor(e=`no applicable key found in the JSON Web Key Set`,t){super(e,t)}},ce=class extends C{[Symbol.asyncIterator];static code=`ERR_JWKS_MULTIPLE_MATCHING_KEYS`;code=`ERR_JWKS_MULTIPLE_MATCHING_KEYS`;constructor(e=`multiple matching keys found in the JSON Web Key Set`,t){super(e,t)}},le=class extends C{static code=`ERR_JWKS_TIMEOUT`;code=`ERR_JWKS_TIMEOUT`;constructor(e=`request timed out`,t){super(e,t)}},ue=class extends C{static code=`ERR_JWS_SIGNATURE_VERIFICATION_FAILED`;code=`ERR_JWS_SIGNATURE_VERIFICATION_FAILED`;constructor(e=`signature verification failed`,t){super(e,t)}};function A(e){if(!j(e))throw Error(`CryptoKey instance expected`)}const j=e=>{if(e?.[Symbol.toStringTag]===`CryptoKey`)return!0;try{return e instanceof CryptoKey}catch{return!1}},de=e=>e?.[Symbol.toStringTag]===`KeyObject`,fe=e=>j(e)||de(e);function pe(e){switch(e){case`A128GCM`:return 128;case`A192GCM`:return 192;case`A256GCM`:case`A128CBC-HS256`:return 256;case`A192CBC-HS384`:return 384;case`A256CBC-HS512`:return 512;default:throw new T(`Unsupported JWE Algorithm: ${e}`)}}const M=e=>crypto.getRandomValues(new Uint8Array(pe(e)>>3));function me(e,t){let n=e.byteLength<<3;if(n!==t)throw new D(`Invalid Content Encryption Key length. Expected ${t} bits, got ${n} bits`)}function he(e){switch(e){case`A128GCM`:case`A128GCMKW`:case`A192GCM`:case`A192GCMKW`:case`A256GCM`:case`A256GCMKW`:return 96;case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return 128;default:throw new T(`Unsupported JWE Algorithm: ${e}`)}}const ge=e=>crypto.getRandomValues(new Uint8Array(he(e)>>3));function _e(e,t){if(t.length<<3!==he(e))throw new D(`Invalid Initialization Vector length`)}async function ve(e,t,n){if(!(t instanceof Uint8Array))throw TypeError(S(t,`Uint8Array`));let r=parseInt(e.slice(1,4),10);return{encKey:await crypto.subtle.importKey(`raw`,t.subarray(r>>3),`AES-CBC`,!1,[n]),macKey:await crypto.subtle.importKey(`raw`,t.subarray(0,r>>3),{hash:`SHA-${r<<1}`,name:`HMAC`},!1,[`sign`]),keySize:r}}async function ye(e,t,n){return new Uint8Array((await crypto.subtle.sign(`HMAC`,e,t)).slice(0,n>>3))}async function be(e,t,n,r,a){let{encKey:s,macKey:c,keySize:l}=await ve(e,n,`encrypt`),u=new Uint8Array(await crypto.subtle.encrypt({iv:r,name:`AES-CBC`},s,t));return{ciphertext:u,tag:await ye(c,i(a,r,u,o(a.length<<3)),l),iv:r}}async function xe(e,t){if(!(e instanceof Uint8Array))throw TypeError(`First argument must be a buffer`);if(!(t instanceof Uint8Array))throw TypeError(`Second argument must be a buffer`);let n={name:`HMAC`,hash:`SHA-256`},r=await crypto.subtle.generateKey(n,!1,[`sign`]),i=new Uint8Array(await crypto.subtle.sign(n,r,e)),a=new Uint8Array(await crypto.subtle.sign(n,r,t)),o=0,s=-1;for(;++s<32;)o|=i[s]^a[s];return o===0}async function Se(e,t,n,r,a,s){let{encKey:c,macKey:l,keySize:u}=await ve(e,t,`decrypt`),d=await ye(l,i(s,r,n,o(s.length<<3)),u),f;try{f=await xe(a,d)}catch{}if(!f)throw new E;let p;try{p=new Uint8Array(await crypto.subtle.decrypt({iv:r,name:`AES-CBC`},c,n))}catch{}if(!p)throw new E;return p}async function Ce(e,t,n,r,i){let a;n instanceof Uint8Array?a=await crypto.subtle.importKey(`raw`,n,`AES-GCM`,!1,[`encrypt`]):(b(n,e,`encrypt`),a=n);let o=new Uint8Array(await crypto.subtle.encrypt({additionalData:i,iv:r,name:`AES-GCM`,tagLength:128},a,t)),s=o.slice(-16);return{ciphertext:o.slice(0,-16),tag:s,iv:r}}async function we(e,t,n,r,a,o){let s;t instanceof Uint8Array?s=await crypto.subtle.importKey(`raw`,t,`AES-GCM`,!1,[`decrypt`]):(b(t,e,`decrypt`),s=t);try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:o,iv:r,name:`AES-GCM`,tagLength:128},s,i(n,a)))}catch{throw new E}}const Te=`Unsupported JWE Content Encryption Algorithm`;async function Ee(e,t,n,r,i){if(!j(n)&&!(n instanceof Uint8Array))throw TypeError(S(n,`CryptoKey`,`KeyObject`,`Uint8Array`,`JSON Web Key`));switch(r?_e(e,r):r=ge(e),e){case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return n instanceof Uint8Array&&me(n,parseInt(e.slice(-3),10)),be(e,t,n,r,i);case`A128GCM`:case`A192GCM`:case`A256GCM`:return n instanceof Uint8Array&&me(n,parseInt(e.slice(1,4),10)),Ce(e,t,n,r,i);default:throw new T(Te)}}async function De(e,t,n,r,i,a){if(!j(t)&&!(t instanceof Uint8Array))throw TypeError(S(t,`CryptoKey`,`KeyObject`,`Uint8Array`,`JSON Web Key`));if(!r)throw new D(`JWE Initialization Vector missing`);if(!i)throw new D(`JWE Authentication Tag missing`);switch(_e(e,r),e){case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return t instanceof Uint8Array&&me(t,parseInt(e.slice(-3),10)),Se(e,t,n,r,i,a);case`A128GCM`:case`A192GCM`:case`A256GCM`:return t instanceof Uint8Array&&me(t,parseInt(e.slice(1,4),10)),we(e,t,n,r,i,a);default:throw new T(Te)}}const Oe=Symbol();function N(e,t){if(e)throw TypeError(`${t} can only be called once`)}function P(e,t,n){try{return f(e)}catch{throw new n(`Failed to base64url decode the ${t}`)}}async function ke(e,t){let n=`SHA-${e.slice(-3)}`;return new Uint8Array(await crypto.subtle.digest(n,t))}const Ae=e=>typeof e==`object`&&!!e;function F(e){if(!Ae(e)||Object.prototype.toString.call(e)!==`[object Object]`)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function I(...e){let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(let e of t){let t=Object.keys(e);if(!n||n.size===0){n=new Set(t);continue}for(let e of t){if(n.has(e))return!1;n.add(e)}}return!0}const L=e=>F(e)&&typeof e.kty==`string`,je=e=>e.kty!==`oct`&&(e.kty===`AKP`&&typeof e.priv==`string`||typeof e.d==`string`),Me=e=>e.kty!==`oct`&&e.d===void 0&&e.priv===void 0,Ne=e=>e.kty===`oct`&&typeof e.k==`string`;function Pe(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function Fe(e,t,n){return e instanceof Uint8Array?crypto.subtle.importKey(`raw`,e,`AES-KW`,!0,[n]):(b(e,t,n),e)}async function Ie(e,t,n){let r=await Fe(t,e,`wrapKey`);Pe(r,e);let i=await crypto.subtle.importKey(`raw`,n,{hash:`SHA-256`,name:`HMAC`},!0,[`sign`]);return new Uint8Array(await crypto.subtle.wrapKey(`raw`,i,r,`AES-KW`))}async function Le(e,t,n){let r=await Fe(t,e,`unwrapKey`);Pe(r,e);let i=await crypto.subtle.unwrapKey(`raw`,n,r,`AES-KW`,{hash:`SHA-256`,name:`HMAC`},!0,[`sign`]);return new Uint8Array(await crypto.subtle.exportKey(`raw`,i))}function Re(e){return i(s(e.length),e)}async function ze(e,t,n){let r=t>>3,i=Math.ceil(r/32),a=new Uint8Array(i*32);for(let t=1;t<=i;t++){let r=new Uint8Array(4+e.length+n.length);r.set(s(t),0),r.set(e,4),r.set(n,4+e.length);let i=await ke(`sha256`,r);a.set(i,(t-1)*32)}return a.slice(0,r)}async function Be(e,t,n,r,a=new Uint8Array,o=new Uint8Array){b(e,`ECDH`),b(t,`ECDH`,`deriveBits`);let l=i(Re(c(n)),Re(a),Re(o),s(r),new Uint8Array);return ze(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,Ve(e))),r,l)}function Ve(e){return e.algorithm.name===`X25519`?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3}function He(e){switch(e.algorithm.namedCurve){case`P-256`:case`P-384`:case`P-521`:return!0;default:return e.algorithm.name===`X25519`}}function Ue(e,t){return e instanceof Uint8Array?crypto.subtle.importKey(`raw`,e,`PBKDF2`,!1,[`deriveBits`]):(b(e,t,`deriveBits`),e)}const We=(e,t)=>i(c(e),Uint8Array.of(0),t);async function Ge(e,t,n,r){if(!(e instanceof Uint8Array)||e.length<8)throw new D(`PBES2 Salt Input must be 8 or more octets`);if(!Number.isSafeInteger(n)||Math.sign(n)!==1)throw new D(`PBES2 Count Input must be a positive integer`);let i=We(t,e),a=parseInt(t.slice(13,16),10),o={hash:`SHA-${t.slice(8,11)}`,iterations:n,name:`PBKDF2`,salt:i},s=await Ue(r,t);return new Uint8Array(await crypto.subtle.deriveBits(o,s,a))}async function Ke(e,t,n,r=2048,i=crypto.getRandomValues(new Uint8Array(16))){let a=await Ge(i,e,r,t);return{encryptedKey:await Ie(e.slice(-6),a,n),p2c:r,p2s:p(i)}}async function qe(e,t,n,r,i){let a=await Ge(i,e,r,t);return Le(e.slice(-6),a,n)}function R(e,t){if(e.startsWith(`RS`)||e.startsWith(`PS`)){let{modulusLength:n}=t.algorithm;if(typeof n!=`number`||n<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}}function Je(e,t){let n=`SHA-${e.slice(-3)}`;switch(e){case`HS256`:case`HS384`:case`HS512`:return{hash:n,name:`HMAC`};case`PS256`:case`PS384`:case`PS512`:return{hash:n,name:`RSA-PSS`,saltLength:parseInt(e.slice(-3),10)>>3};case`RS256`:case`RS384`:case`RS512`:return{hash:n,name:`RSASSA-PKCS1-v1_5`};case`ES256`:case`ES384`:case`ES512`:return{hash:n,name:`ECDSA`,namedCurve:t.namedCurve};case`Ed25519`:case`EdDSA`:return{name:`Ed25519`};case`ML-DSA-44`:case`ML-DSA-65`:case`ML-DSA-87`:return{name:e};default:throw new T(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function Ye(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith(`HS`))throw TypeError(S(t,`CryptoKey`,`KeyObject`,`JSON Web Key`));return crypto.subtle.importKey(`raw`,t,{hash:`SHA-${e.slice(-3)}`,name:`HMAC`},!1,[n])}return ee(t,e,n),t}async function Xe(e,t,n){let r=await Ye(e,t,`sign`);R(e,r);let i=await crypto.subtle.sign(Je(e,r.algorithm),r,n);return new Uint8Array(i)}async function Ze(e,t,n,r){let i=await Ye(e,t,`verify`);R(e,i);let a=Je(e,i.algorithm);try{return await crypto.subtle.verify(a,i,n,r)}catch{return!1}}const Qe=e=>{switch(e){case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:return`RSA-OAEP`;default:throw new T(`alg ${e} is not supported either by JOSE or your javascript runtime`)}};async function $e(e,t,n){return b(t,e,`encrypt`),R(e,t),new Uint8Array(await crypto.subtle.encrypt(Qe(e),t,n))}async function et(e,t,n){return b(t,e,`decrypt`),R(e,t),new Uint8Array(await crypto.subtle.decrypt(Qe(e),t,n))}const z=`Invalid or unsupported JWK "alg" (Algorithm) Parameter value`;function tt(e){let t,n;switch(e.kty){case`AKP`:switch(e.alg){case`ML-DSA-44`:case`ML-DSA-65`:case`ML-DSA-87`:t={name:e.alg},n=e.priv?[`sign`]:[`verify`];break;default:throw new T(z)}break;case`RSA`:switch(e.alg){case`PS256`:case`PS384`:case`PS512`:t={name:`RSA-PSS`,hash:`SHA-${e.alg.slice(-3)}`},n=e.d?[`sign`]:[`verify`];break;case`RS256`:case`RS384`:case`RS512`:t={name:`RSASSA-PKCS1-v1_5`,hash:`SHA-${e.alg.slice(-3)}`},n=e.d?[`sign`]:[`verify`];break;case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:t={name:`RSA-OAEP`,hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?[`decrypt`,`unwrapKey`]:[`encrypt`,`wrapKey`];break;default:throw new T(z)}break;case`EC`:switch(e.alg){case`ES256`:case`ES384`:case`ES512`:t={name:`ECDSA`,namedCurve:{ES256:`P-256`,ES384:`P-384`,ES512:`P-521`}[e.alg]},n=e.d?[`sign`]:[`verify`];break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:t={name:`ECDH`,namedCurve:e.crv},n=e.d?[`deriveBits`]:[];break;default:throw new T(z)}break;case`OKP`:switch(e.alg){case`Ed25519`:case`EdDSA`:t={name:`Ed25519`},n=e.d?[`sign`]:[`verify`];break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:t={name:e.crv},n=e.d?[`deriveBits`]:[];break;default:throw new T(z)}break;default:throw new T(`Invalid or unsupported JWK "kty" (Key Type) Parameter value`)}return{algorithm:t,keyUsages:n}}async function B(e){if(!e.alg)throw TypeError(`"alg" argument is required when "jwk.alg" is not present`);let{algorithm:t,keyUsages:n}=tt(e),r={...e};return r.kty!==`AKP`&&delete r.alg,delete r.use,crypto.subtle.importKey(`jwk`,r,t,e.ext??!(e.d||e.priv),e.key_ops??n)}const V=`given KeyObject instance cannot be used for this algorithm`;let H;const nt=async(e,t,n,r=!1)=>{H||=new WeakMap;let i=H.get(e);if(i?.[n])return i[n];let a=await B({...t,alg:n});return r&&Object.freeze(e),i?i[n]=a:H.set(e,{[n]:a}),a},rt=(e,t)=>{H||=new WeakMap;let n=H.get(e);if(n?.[t])return n[t];let r=e.type===`public`,i=!!r,a;if(e.asymmetricKeyType===`x25519`){switch(t){case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:break;default:throw TypeError(V)}a=e.toCryptoKey(e.asymmetricKeyType,i,r?[]:[`deriveBits`])}if(e.asymmetricKeyType===`ed25519`){if(t!==`EdDSA`&&t!==`Ed25519`)throw TypeError(V);a=e.toCryptoKey(e.asymmetricKeyType,i,[r?`verify`:`sign`])}switch(e.asymmetricKeyType){case`ml-dsa-44`:case`ml-dsa-65`:case`ml-dsa-87`:if(t!==e.asymmetricKeyType.toUpperCase())throw TypeError(V);a=e.toCryptoKey(e.asymmetricKeyType,i,[r?`verify`:`sign`])}if(e.asymmetricKeyType===`rsa`){let n;switch(t){case`RSA-OAEP`:n=`SHA-1`;break;case`RS256`:case`PS256`:case`RSA-OAEP-256`:n=`SHA-256`;break;case`RS384`:case`PS384`:case`RSA-OAEP-384`:n=`SHA-384`;break;case`RS512`:case`PS512`:case`RSA-OAEP-512`:n=`SHA-512`;break;default:throw TypeError(V)}if(t.startsWith(`RSA-OAEP`))return e.toCryptoKey({name:`RSA-OAEP`,hash:n},i,r?[`encrypt`]:[`decrypt`]);a=e.toCryptoKey({name:t.startsWith(`PS`)?`RSA-PSS`:`RSASSA-PKCS1-v1_5`,hash:n},i,[r?`verify`:`sign`])}if(e.asymmetricKeyType===`ec`){let n=new Map([[`prime256v1`,`P-256`],[`secp384r1`,`P-384`],[`secp521r1`,`P-521`]]).get(e.asymmetricKeyDetails?.namedCurve);if(!n)throw TypeError(V);let o={ES256:`P-256`,ES384:`P-384`,ES512:`P-521`};o[t]&&n===o[t]&&(a=e.toCryptoKey({name:`ECDSA`,namedCurve:n},i,[r?`verify`:`sign`])),t.startsWith(`ECDH-ES`)&&(a=e.toCryptoKey({name:`ECDH`,namedCurve:n},i,r?[]:[`deriveBits`]))}if(!a)throw TypeError(V);return n?n[t]=a:H.set(e,{[t]:a}),a};async function U(e,t){if(e instanceof Uint8Array||j(e))return e;if(de(e)){if(e.type===`secret`)return e.export();if(`toCryptoKey`in e&&typeof e.toCryptoKey==`function`)try{return rt(e,t)}catch(e){if(e instanceof TypeError)throw e}return nt(e,e.export({format:`jwk`}),t)}if(L(e))return e.k?f(e.k):nt(e,e,t,!0);throw Error(`unreachable`)}const it=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join(`
|
|
2
|
+
`)}\n-----END ${t}-----`,at=async(e,t,n)=>{if(de(n)){if(n.type!==e)throw TypeError(`key is not a ${e} key`);return n.export({format:`pem`,type:t})}if(!j(n))throw TypeError(S(n,`CryptoKey`,`KeyObject`));if(!n.extractable)throw TypeError(`CryptoKey is not extractable`);if(n.type!==e)throw TypeError(`key is not a ${e} key`);return it(l(new Uint8Array(await crypto.subtle.exportKey(t,n))),`${e.toUpperCase()} KEY`)},ot=e=>at(`public`,`spki`,e),st=e=>at(`private`,`pkcs8`,e),ct=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},lt=e=>({data:e,pos:0}),W=e=>{let t=e.data[e.pos++];if(t&128){let n=t&127,r=0;for(let t=0;t<n;t++)r=r<<8|e.data[e.pos++];return r}return t},ut=(e,t=1)=>{if(t<=0)return;e.pos++;let n=W(e);e.pos+=n,t>1&&ut(e,t-1)},G=(e,t,n)=>{if(e.data[e.pos++]!==t)throw Error(n)},dt=(e,t)=>{let n=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,n},ft=e=>(G(e,6,`Expected algorithm OID`),dt(e,W(e)));function pt(e){G(e,48,`Invalid PKCS#8 structure`),W(e),G(e,2,`Expected version field`);let t=W(e);e.pos+=t,G(e,48,`Expected algorithm identifier`);let n=W(e);return{algIdStart:e.pos,algIdLength:n}}function mt(e){G(e,48,`Invalid SPKI structure`),W(e),G(e,48,`Expected algorithm identifier`);let t=W(e);return{algIdStart:e.pos,algIdLength:t}}const ht=e=>{let t=ft(e);if(ct(t,[43,101,110]))return`X25519`;if(!ct(t,[42,134,72,206,61,2,1]))throw Error(`Unsupported key algorithm`);G(e,6,`Expected curve OID`);let n=dt(e,W(e));for(let{name:e,oid:t}of[{name:`P-256`,oid:[42,134,72,206,61,3,1,7]},{name:`P-384`,oid:[43,129,4,0,34]},{name:`P-521`,oid:[43,129,4,0,35]}])if(ct(n,t))return e;throw Error(`Unsupported named curve`)},gt=async(e,t,n,r)=>{let i,a,o=e===`spki`,s=()=>o?[`verify`]:[`sign`],c=()=>o?[`encrypt`,`wrapKey`]:[`decrypt`,`unwrapKey`];switch(n){case`PS256`:case`PS384`:case`PS512`:i={name:`RSA-PSS`,hash:`SHA-${n.slice(-3)}`},a=s();break;case`RS256`:case`RS384`:case`RS512`:i={name:`RSASSA-PKCS1-v1_5`,hash:`SHA-${n.slice(-3)}`},a=s();break;case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:i={name:`RSA-OAEP`,hash:`SHA-${parseInt(n.slice(-3),10)||1}`},a=c();break;case`ES256`:case`ES384`:case`ES512`:i={name:`ECDSA`,namedCurve:{ES256:`P-256`,ES384:`P-384`,ES512:`P-521`}[n]},a=s();break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:try{let e=r.getNamedCurve(t);i=e===`X25519`?{name:`X25519`}:{name:`ECDH`,namedCurve:e}}catch{throw new T(`Invalid or unsupported key format`)}a=o?[]:[`deriveBits`];break;case`Ed25519`:case`EdDSA`:i={name:`Ed25519`},a=s();break;case`ML-DSA-44`:case`ML-DSA-65`:case`ML-DSA-87`:i={name:n},a=s();break;default:throw new T(`Invalid or unsupported "alg" (Algorithm) value`)}return crypto.subtle.importKey(e,t,i,r?.extractable??!!o,a)},_t=(e,t)=>u(e.replace(t,``)),vt=(e,t,n)=>{let r=_t(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),i=n;return t?.startsWith?.(`ECDH-ES`)&&(i||={},i.getNamedCurve=e=>{let t=lt(e);return pt(t),ht(t)}),gt(`pkcs8`,r,t,i)},yt=(e,t,n)=>{let r=_t(e,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),i=n;return t?.startsWith?.(`ECDH-ES`)&&(i||={},i.getNamedCurve=e=>{let t=lt(e);return mt(t),ht(t)}),gt(`spki`,r,t,i)};function bt(e){let t=lt(e);G(t,48,`Invalid certificate structure`),W(t),G(t,48,`Invalid tbsCertificate structure`),W(t),e[t.pos]===160?ut(t,6):ut(t,5);let n=t.pos;G(t,48,`Invalid SPKI structure`);let r=W(t);return e.subarray(n,n+r+(t.pos-n))}function xt(e){return bt(_t(e,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g))}const St=(e,t,n)=>{let r;try{r=xt(e)}catch(e){throw TypeError(`Failed to parse the X.509 certificate`,{cause:e})}return yt(it(l(r),`PUBLIC KEY`),t,n)};async function Ct(e,t,n){if(typeof e!=`string`||e.indexOf(`-----BEGIN PUBLIC KEY-----`)!==0)throw TypeError(`"spki" must be SPKI formatted string`);return yt(e,t,n)}async function wt(e,t,n){if(typeof e!=`string`||e.indexOf(`-----BEGIN CERTIFICATE-----`)!==0)throw TypeError(`"x509" must be X.509 formatted string`);return St(e,t,n)}async function Tt(e,t,n){if(typeof e!=`string`||e.indexOf(`-----BEGIN PRIVATE KEY-----`)!==0)throw TypeError(`"pkcs8" must be PKCS#8 formatted string`);return vt(e,t,n)}async function Et(e,t,n){if(!F(e))throw TypeError(`JWK must be an object`);let r;switch(t??=e.alg,r??=n?.extractable??e.ext,e.kty){case`oct`:if(typeof e.k!=`string`||!e.k)throw TypeError(`missing "k" (Key Value) Parameter value`);return f(e.k);case`RSA`:if(`oth`in e&&e.oth!==void 0)throw new T(`RSA JWK "oth" (Other Primes Info) Parameter value is not supported`);return B({...e,alg:t,ext:r});case`AKP`:if(typeof e.alg!=`string`||!e.alg)throw TypeError(`missing "alg" (Algorithm) Parameter value`);if(t!==void 0&&t!==e.alg)throw TypeError(`JWK alg and alg option value mismatch`);return B({...e,ext:r});case`EC`:case`OKP`:return B({...e,alg:t,ext:r});default:throw new T(`Unsupported "kty" (Key Type) Parameter value`)}}async function Dt(e){if(de(e))if(e.type===`secret`)e=e.export();else return e.export({format:`jwk`});if(e instanceof Uint8Array)return{kty:`oct`,k:p(e)};if(!j(e))throw TypeError(S(e,`CryptoKey`,`KeyObject`,`Uint8Array`));if(!e.extractable)throw TypeError(`non-extractable CryptoKey cannot be exported as a JWK`);let{ext:t,key_ops:n,alg:r,use:i,...a}=await crypto.subtle.exportKey(`jwk`,e);return a.kty===`AKP`&&(a.alg=r),a}async function Ot(e){return ot(e)}async function kt(e){return st(e)}async function At(e){return Dt(e)}async function jt(e,t,n,r){let i=await Ee(e.slice(0,7),n,t,r,new Uint8Array);return{encryptedKey:i.ciphertext,iv:p(i.iv),tag:p(i.tag)}}async function Mt(e,t,n,r,i){return De(e.slice(0,7),t,n,r,i,new Uint8Array)}const Nt=`Invalid or unsupported "alg" (JWE Algorithm) header value`;function K(e){if(e===void 0)throw new D(`JWE Encrypted Key missing`)}async function Pt(e,t,n,r,i){switch(e){case`dir`:if(n!==void 0)throw new D(`Encountered unexpected JWE Encrypted Key`);return t;case`ECDH-ES`:if(n!==void 0)throw new D(`Encountered unexpected JWE Encrypted Key`);case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{if(!F(r.epk))throw new D(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);if(A(t),!He(t))throw new T(`ECDH with the provided key is not allowed or not supported by your javascript runtime`);let i=await Et(r.epk,e);A(i);let a,o;if(r.apu!==void 0){if(typeof r.apu!=`string`)throw new D(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);a=P(r.apu,`apu`,D)}if(r.apv!==void 0){if(typeof r.apv!=`string`)throw new D(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);o=P(r.apv,`apv`,D)}let s=await Be(i,t,e===`ECDH-ES`?r.enc:e,e===`ECDH-ES`?pe(r.enc):parseInt(e.slice(-5,-2),10),a,o);return e===`ECDH-ES`?s:(K(n),Le(e.slice(-6),s,n))}case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:return K(n),A(t),et(e,t,n);case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:{if(K(n),typeof r.p2c!=`number`)throw new D(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);let a=i?.maxPBES2Count||1e4;if(r.p2c>a)throw new D(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);if(typeof r.p2s!=`string`)throw new D(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);let o;return o=P(r.p2s,`p2s`,D),qe(e,t,n,r.p2c,o)}case`A128KW`:case`A192KW`:case`A256KW`:return K(n),Le(e,t,n);case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:{if(K(n),typeof r.iv!=`string`)throw new D(`JOSE Header "iv" (Initialization Vector) missing or invalid`);if(typeof r.tag!=`string`)throw new D(`JOSE Header "tag" (Authentication Tag) missing or invalid`);let i;i=P(r.iv,`iv`,D);let a;return a=P(r.tag,`tag`,D),Mt(e,t,n,i,a)}default:throw new T(Nt)}}async function Ft(e,t,n,r,i={}){let a,o,s;switch(e){case`dir`:s=n;break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{if(A(n),!He(n))throw new T(`ECDH with the provided key is not allowed or not supported by your javascript runtime`);let{apu:c,apv:l}=i,u;u=i.epk?await U(i.epk,e):(await crypto.subtle.generateKey(n.algorithm,!0,[`deriveBits`])).privateKey;let{x:d,y:f,crv:m,kty:h}=await At(u),g=await Be(n,u,e===`ECDH-ES`?t:e,e===`ECDH-ES`?pe(t):parseInt(e.slice(-5,-2),10),c,l);if(o={epk:{x:d,crv:m,kty:h}},h===`EC`&&(o.epk.y=f),c&&(o.apu=p(c)),l&&(o.apv=p(l)),e===`ECDH-ES`){s=g;break}s=r||M(t),a=await Ie(e.slice(-6),g,s);break}case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:s=r||M(t),A(n),a=await $e(e,n,s);break;case`PBES2-HS256+A128KW`:case`PBES2-HS384+A192KW`:case`PBES2-HS512+A256KW`:{s=r||M(t);let{p2c:c,p2s:l}=i;({encryptedKey:a,...o}=await Ke(e,n,s,c,l));break}case`A128KW`:case`A192KW`:case`A256KW`:s=r||M(t),a=await Ie(e,n,s);break;case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:{s=r||M(t);let{iv:c}=i;({encryptedKey:a,...o}=await jt(e,n,s,c));break}default:throw new T(Nt)}return{cek:s,encryptedKey:a,parameters:o}}function q(e,t,n,r,i){if(i.crit!==void 0&&r?.crit===void 0)throw new e(`"crit" (Critical) Header Parameter MUST be integrity protected`);if(!r||r.crit===void 0)return new Set;if(!Array.isArray(r.crit)||r.crit.length===0||r.crit.some(e=>typeof e!=`string`||e.length===0))throw new e(`"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present`);let a;a=n===void 0?t:new Map([...Object.entries(n),...t.entries()]);for(let t of r.crit){if(!a.has(t))throw new T(`Extension Header Parameter "${t}" is not recognized`);if(i[t]===void 0)throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&r[t]===void 0)throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)}function It(e,t){if(t!==void 0&&(!Array.isArray(t)||t.some(e=>typeof e!=`string`)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}const J=e=>e?.[Symbol.toStringTag],Lt=(e,t,n)=>{if(t.use!==void 0){let e;switch(n){case`sign`:case`verify`:e=`sig`;break;case`encrypt`:case`decrypt`:e=`enc`;break}if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(t.alg!==void 0&&t.alg!==e)throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`);if(Array.isArray(t.key_ops)){let r;switch(!0){case n===`sign`||n===`verify`:case e===`dir`:case e.includes(`CBC-HS`):r=n;break;case e.startsWith(`PBES2`):r=`deriveBits`;break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):r=!e.includes(`GCM`)&&e.endsWith(`KW`)?n===`encrypt`?`wrapKey`:`unwrapKey`:n;break;case n===`encrypt`&&e.startsWith(`RSA`):r=`wrapKey`;break;case n===`decrypt`:r=e.startsWith(`RSA`)?`unwrapKey`:`deriveBits`;break}if(r&&t.key_ops?.includes?.(r)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${r}" when present`)}return!0},Rt=(e,t,n)=>{if(!(t instanceof Uint8Array)){if(L(t)){if(Ne(t)&&Lt(e,t,n))return;throw TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`)}if(!fe(t))throw TypeError(te(e,t,`CryptoKey`,`KeyObject`,`JSON Web Key`,`Uint8Array`));if(t.type!==`secret`)throw TypeError(`${J(t)} instances for symmetric algorithms must be of type "secret"`)}},zt=(e,t,n)=>{if(L(t))switch(n){case`decrypt`:case`sign`:if(je(t)&&Lt(e,t,n))return;throw TypeError(`JSON Web Key for this operation must be a private JWK`);case`encrypt`:case`verify`:if(Me(t)&&Lt(e,t,n))return;throw TypeError(`JSON Web Key for this operation must be a public JWK`)}if(!fe(t))throw TypeError(te(e,t,`CryptoKey`,`KeyObject`,`JSON Web Key`));if(t.type===`secret`)throw TypeError(`${J(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type===`public`)switch(n){case`sign`:throw TypeError(`${J(t)} instances for asymmetric algorithm signing must be of type "private"`);case`decrypt`:throw TypeError(`${J(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type===`private`)switch(n){case`verify`:throw TypeError(`${J(t)} instances for asymmetric algorithm verifying must be of type "public"`);case`encrypt`:throw TypeError(`${J(t)} instances for asymmetric algorithm encryption must be of type "public"`)}};function Y(e,t,n){switch(e.substring(0,2)){case`A1`:case`A2`:case`di`:case`HS`:case`PB`:Rt(e,t,n);break;default:zt(e,t,n)}}function Bt(e){if(globalThis[e]===void 0)throw new T(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}async function Vt(e){Bt(`CompressionStream`);let t=new CompressionStream(`deflate-raw`),n=t.writable.getWriter();n.write(e).catch(()=>{}),n.close().catch(()=>{});let r=[],a=t.readable.getReader();for(;;){let{value:e,done:t}=await a.read();if(t)break;r.push(e)}return i(...r)}async function Ht(e,t){Bt(`DecompressionStream`);let n=new DecompressionStream(`deflate-raw`),r=n.writable.getWriter();r.write(e).catch(()=>{}),r.close().catch(()=>{});let a=[],o=0,s=n.readable.getReader();for(;;){let{value:e,done:n}=await s.read();if(n)break;if(a.push(e),o+=e.byteLength,t!==1/0&&o>t)throw new D(`Decompressed plaintext exceeded the configured limit`)}return i(...a)}async function Ut(e,t,r){if(!F(e))throw new D(`Flattened JWE must be an object`);if(e.protected===void 0&&e.header===void 0&&e.unprotected===void 0)throw new D(`JOSE Header missing`);if(e.iv!==void 0&&typeof e.iv!=`string`)throw new D(`JWE Initialization Vector incorrect type`);if(typeof e.ciphertext!=`string`)throw new D(`JWE Ciphertext missing or incorrect type`);if(e.tag!==void 0&&typeof e.tag!=`string`)throw new D(`JWE Authentication Tag incorrect type`);if(e.protected!==void 0&&typeof e.protected!=`string`)throw new D(`JWE Protected Header incorrect type`);if(e.encrypted_key!==void 0&&typeof e.encrypted_key!=`string`)throw new D(`JWE Encrypted Key incorrect type`);if(e.aad!==void 0&&typeof e.aad!=`string`)throw new D(`JWE AAD incorrect type`);if(e.header!==void 0&&!F(e.header))throw new D(`JWE Shared Unprotected Header incorrect type`);if(e.unprotected!==void 0&&!F(e.unprotected))throw new D(`JWE Per-Recipient Unprotected Header incorrect type`);let a;if(e.protected)try{let t=f(e.protected);a=JSON.parse(n.decode(t))}catch{throw new D(`JWE Protected Header is invalid`)}if(!I(a,e.header,e.unprotected))throw new D(`JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint`);let o={...a,...e.header,...e.unprotected};if(q(D,new Map,r?.crit,a,o),o.zip!==void 0&&o.zip!==`DEF`)throw new T(`Unsupported JWE "zip" (Compression Algorithm) Header Parameter value.`);if(o.zip!==void 0&&!a?.zip)throw new D(`JWE "zip" (Compression Algorithm) Header Parameter MUST be in a protected header.`);let{alg:s,enc:l}=o;if(typeof s!=`string`||!s)throw new D(`missing JWE Algorithm (alg) in JWE Header`);if(typeof l!=`string`||!l)throw new D(`missing JWE Encryption Algorithm (enc) in JWE Header`);let u=r&&It(`keyManagementAlgorithms`,r.keyManagementAlgorithms),d=r&&It(`contentEncryptionAlgorithms`,r.contentEncryptionAlgorithms);if(u&&!u.has(s)||!u&&s.startsWith(`PBES2`))throw new ie(`"alg" (Algorithm) Header Parameter value not allowed`);if(d&&!d.has(l))throw new ie(`"enc" (Encryption Algorithm) Header Parameter value not allowed`);let p;e.encrypted_key!==void 0&&(p=P(e.encrypted_key,`encrypted_key`,D));let m=!1;typeof t==`function`&&(t=await t(a,e),m=!0),Y(s===`dir`?l:s,t,`decrypt`);let h=await U(t,s),g;try{g=await Pt(s,h,p,o,r)}catch(e){if(e instanceof TypeError||e instanceof D||e instanceof T)throw e;g=M(l)}let _,v;e.iv!==void 0&&(_=P(e.iv,`iv`,D)),e.tag!==void 0&&(v=P(e.tag,`tag`,D));let y=e.protected===void 0?new Uint8Array:c(e.protected),ee;ee=e.aad===void 0?y:i(y,c(`.`),c(e.aad));let b=P(e.ciphertext,`ciphertext`,D),x=await De(l,g,b,_,v,ee),S={plaintext:x};if(o.zip===`DEF`){let e=r?.maxDecompressedLength??25e4;if(e===0)throw new T(`JWE "zip" (Compression Algorithm) Header Parameter is not supported.`);if(e!==1/0&&(!Number.isSafeInteger(e)||e<1))throw TypeError(`maxDecompressedLength must be 0, a positive safe integer, or Infinity`);S.plaintext=await Ht(x,e).catch(e=>{throw e instanceof D?e:new D(`Failed to decompress plaintext`,{cause:e})})}return e.protected!==void 0&&(S.protectedHeader=a),e.aad!==void 0&&(S.additionalAuthenticatedData=P(e.aad,`aad`,D)),e.unprotected!==void 0&&(S.sharedUnprotectedHeader=e.unprotected),e.header!==void 0&&(S.unprotectedHeader=e.header),m?{...S,key:h}:S}async function Wt(e,t,r){if(e instanceof Uint8Array&&(e=n.decode(e)),typeof e!=`string`)throw new D(`Compact JWE must be a string or Uint8Array`);let{0:i,1:a,2:o,3:s,4:c,length:l}=e.split(`.`);if(l!==5)throw new D(`Invalid Compact JWE`);let u=await Ut({ciphertext:s,iv:o||void 0,protected:i,tag:c||void 0,encrypted_key:a||void 0},t,r),d={plaintext:u.plaintext,protectedHeader:u.protectedHeader};return typeof t==`function`?{...d,key:u.key}:d}async function Gt(e,t,n){if(!F(e))throw new D(`General JWE must be an object`);if(!Array.isArray(e.recipients)||!e.recipients.every(F))throw new D(`JWE Recipients missing or incorrect type`);if(!e.recipients.length)throw new D(`JWE Recipients has no members`);for(let r of e.recipients)try{return await Ut({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:r.encrypted_key,header:r.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,n)}catch{}throw new E}var Kt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){if(!(e instanceof Uint8Array))throw TypeError(`plaintext must be an instance of Uint8Array`);this.#e=e}setKeyManagementParameters(e){return N(this.#s,`setKeyManagementParameters`),this.#s=e,this}setProtectedHeader(e){return N(this.#t,`setProtectedHeader`),this.#t=e,this}setSharedUnprotectedHeader(e){return N(this.#n,`setSharedUnprotectedHeader`),this.#n=e,this}setUnprotectedHeader(e){return N(this.#r,`setUnprotectedHeader`),this.#r=e,this}setAdditionalAuthenticatedData(e){return this.#i=e,this}setContentEncryptionKey(e){return N(this.#a,`setContentEncryptionKey`),this.#a=e,this}setInitializationVector(e){return N(this.#o,`setInitializationVector`),this.#o=e,this}async encrypt(e,t){if(!this.#t&&!this.#r&&!this.#n)throw new D(`either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()`);if(!I(this.#t,this.#r,this.#n))throw new D(`JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint`);let n={...this.#t,...this.#r,...this.#n};if(q(D,new Map,t?.crit,this.#t,n),n.zip!==void 0&&n.zip!==`DEF`)throw new T(`Unsupported JWE "zip" (Compression Algorithm) Header Parameter value.`);if(n.zip!==void 0&&!this.#t?.zip)throw new D(`JWE "zip" (Compression Algorithm) Header Parameter MUST be in a protected header.`);let{alg:r,enc:a}=n;if(typeof r!=`string`||!r)throw new D(`JWE "alg" (Algorithm) Header Parameter missing or invalid`);if(typeof a!=`string`||!a)throw new D(`JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid`);let o;if(this.#a&&(r===`dir`||r===`ECDH-ES`))throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${r}`);Y(r===`dir`?a:r,e,`encrypt`);let s;{let n,i=await U(e,r);({cek:s,encryptedKey:o,parameters:n}=await Ft(r,a,i,this.#a,this.#s)),n&&(t&&Oe in t?this.#r?this.#r={...this.#r,...n}:this.setUnprotectedHeader(n):this.#t?this.#t={...this.#t,...n}:this.setProtectedHeader(n))}let l,u,d,f;if(this.#t?(u=p(JSON.stringify(this.#t)),d=c(u)):(u=``,d=new Uint8Array),this.#i){f=p(this.#i);let e=c(f);l=i(d,c(`.`),e)}else l=d;let m=this.#e;n.zip===`DEF`&&(m=await Vt(m).catch(e=>{throw new D(`Failed to compress plaintext`,{cause:e})}));let{ciphertext:h,tag:g,iv:_}=await Ee(a,m,s,this.#o,l),v={ciphertext:p(h)};return _&&(v.iv=p(_)),g&&(v.tag=p(g)),o&&(v.encrypted_key=p(o)),f&&(v.aad=f),this.#t&&(v.protected=u),this.#n&&(v.unprotected=this.#n),this.#r&&(v.header=this.#r),v}},qt=class{#e;unprotectedHeader;keyManagementParameters;key;options;constructor(e,t,n){this.#e=e,this.key=t,this.options=n}setUnprotectedHeader(e){return N(this.unprotectedHeader,`setUnprotectedHeader`),this.unprotectedHeader=e,this}setKeyManagementParameters(e){return N(this.keyManagementParameters,`setKeyManagementParameters`),this.keyManagementParameters=e,this}addRecipient(...e){return this.#e.addRecipient(...e)}encrypt(...e){return this.#e.encrypt(...e)}done(){return this.#e}},Jt=class{#e;#t=[];#n;#r;#i;constructor(e){this.#e=e}addRecipient(e,t){let n=new qt(this,e,{crit:t?.crit});return this.#t.push(n),n}setProtectedHeader(e){return N(this.#n,`setProtectedHeader`),this.#n=e,this}setSharedUnprotectedHeader(e){return N(this.#r,`setSharedUnprotectedHeader`),this.#r=e,this}setAdditionalAuthenticatedData(e){return this.#i=e,this}async encrypt(){if(!this.#t.length)throw new D(`at least one recipient must be added`);if(this.#t.length===1){let[e]=this.#t,t=await new Kt(this.#e).setAdditionalAuthenticatedData(this.#i).setProtectedHeader(this.#n).setSharedUnprotectedHeader(this.#r).setUnprotectedHeader(e.unprotectedHeader).encrypt(e.key,{...e.options}),n={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.aad&&(n.aad=t.aad),t.protected&&(n.protected=t.protected),t.unprotected&&(n.unprotected=t.unprotected),t.encrypted_key&&(n.recipients[0].encrypted_key=t.encrypted_key),t.header&&(n.recipients[0].header=t.header),n}let e;for(let t=0;t<this.#t.length;t++){let n=this.#t[t];if(!I(this.#n,this.#r,n.unprotectedHeader))throw new D(`JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint`);let r={...this.#n,...this.#r,...n.unprotectedHeader},{alg:i}=r;if(typeof i!=`string`||!i)throw new D(`JWE "alg" (Algorithm) Header Parameter missing or invalid`);if(i===`dir`||i===`ECDH-ES`)throw new D(`"dir" and "ECDH-ES" alg may only be used with a single recipient`);if(typeof r.enc!=`string`||!r.enc)throw new D(`JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid`);if(!e)e=r.enc;else if(e!==r.enc)throw new D(`JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients`);if(q(D,new Map,n.options.crit,this.#n,r),r.zip!==void 0&&r.zip!==`DEF`)throw new T(`Unsupported JWE "zip" (Compression Algorithm) Header Parameter value.`);if(r.zip!==void 0&&!this.#n?.zip)throw new D(`JWE "zip" (Compression Algorithm) Header Parameter MUST be in a protected header.`)}let t=M(e),n={ciphertext:``,recipients:[]};for(let r=0;r<this.#t.length;r++){let i=this.#t[r],a={};if(n.recipients.push(a),r===0){let e=await new Kt(this.#e).setAdditionalAuthenticatedData(this.#i).setContentEncryptionKey(t).setProtectedHeader(this.#n).setSharedUnprotectedHeader(this.#r).setUnprotectedHeader(i.unprotectedHeader).setKeyManagementParameters(i.keyManagementParameters).encrypt(i.key,{...i.options,[Oe]:!0});n.ciphertext=e.ciphertext,n.iv=e.iv,n.tag=e.tag,e.aad&&(n.aad=e.aad),e.protected&&(n.protected=e.protected),e.unprotected&&(n.unprotected=e.unprotected),a.encrypted_key=e.encrypted_key,e.header&&(a.header=e.header);continue}let o=i.unprotectedHeader?.alg||this.#n?.alg||this.#r?.alg;Y(o===`dir`?e:o,i.key,`encrypt`);let s=await U(i.key,o),{encryptedKey:c,parameters:l}=await Ft(o,e,s,t,i.keyManagementParameters);a.encrypted_key=p(c),(i.unprotectedHeader||l)&&(a.header={...i.unprotectedHeader,...l})}return n}};async function Yt(e,r,a){if(!F(e))throw new O(`Flattened JWS must be an object`);if(e.protected===void 0&&e.header===void 0)throw new O(`Flattened JWS must have either of the "protected" or "header" members`);if(e.protected!==void 0&&typeof e.protected!=`string`)throw new O(`JWS Protected Header incorrect type`);if(e.payload===void 0)throw new O(`JWS Payload missing`);if(typeof e.signature!=`string`)throw new O(`JWS Signature missing or incorrect type`);if(e.header!==void 0&&!F(e.header))throw new O(`JWS Unprotected Header incorrect type`);let o={};if(e.protected)try{let t=f(e.protected);o=JSON.parse(n.decode(t))}catch{throw new O(`JWS Protected Header is invalid`)}if(!I(o,e.header))throw new O(`JWS Protected and JWS Unprotected Header Parameter names must be disjoint`);let s={...o,...e.header},l=q(O,new Map([[`b64`,!0]]),a?.crit,o,s),u=!0;if(l.has(`b64`)&&(u=o.b64,typeof u!=`boolean`))throw new O(`The "b64" (base64url-encode payload) Header Parameter must be a boolean`);let{alg:d}=s;if(typeof d!=`string`||!d)throw new O(`JWS "alg" (Algorithm) Header Parameter missing or invalid`);let p=a&&It(`algorithms`,a.algorithms);if(p&&!p.has(d))throw new ie(`"alg" (Algorithm) Header Parameter value not allowed`);if(u){if(typeof e.payload!=`string`)throw new O(`JWS Payload must be a string`)}else if(typeof e.payload!=`string`&&!(e.payload instanceof Uint8Array))throw new O(`JWS Payload must be a string or an Uint8Array instance`);let m=!1;typeof r==`function`&&(r=await r(o,e),m=!0),Y(d,r,`verify`);let h=i(e.protected===void 0?new Uint8Array:c(e.protected),c(`.`),typeof e.payload==`string`?u?c(e.payload):t.encode(e.payload):e.payload),g=P(e.signature,`signature`,O),_=await U(r,d);if(!await Ze(d,_,g,h))throw new ue;let v;v=u?P(e.payload,`payload`,O):typeof e.payload==`string`?t.encode(e.payload):e.payload;let y={payload:v};return e.protected!==void 0&&(y.protectedHeader=o),e.header!==void 0&&(y.unprotectedHeader=e.header),m?{...y,key:_}:y}async function Xt(e,t,r){if(e instanceof Uint8Array&&(e=n.decode(e)),typeof e!=`string`)throw new O(`Compact JWS must be a string or Uint8Array`);let{0:i,1:a,2:o,length:s}=e.split(`.`);if(s!==3)throw new O(`Invalid Compact JWS`);let c=await Yt({payload:a,protected:i,signature:o},t,r),l={payload:c.payload,protectedHeader:c.protectedHeader};return typeof t==`function`?{...l,key:c.key}:l}async function Zt(e,t,n){if(!F(e))throw new O(`General JWS must be an object`);if(!Array.isArray(e.signatures)||!e.signatures.every(F))throw new O(`JWS Signatures missing or incorrect type`);for(let r of e.signatures)try{return await Yt({header:r.header,payload:e.payload,protected:r.protected,signature:r.signature},t,n)}catch{}throw new ue}const X=e=>Math.floor(e.getTime()/1e3),Qt=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function Z(e){let t=Qt.exec(e);if(!t||t[4]&&t[1])throw TypeError(`Invalid time period format`);let n=parseFloat(t[2]),r=t[3].toLowerCase(),i;switch(r){case`sec`:case`secs`:case`second`:case`seconds`:case`s`:i=Math.round(n);break;case`minute`:case`minutes`:case`min`:case`mins`:case`m`:i=Math.round(n*60);break;case`hour`:case`hours`:case`hr`:case`hrs`:case`h`:i=Math.round(n*3600);break;case`day`:case`days`:case`d`:i=Math.round(n*86400);break;case`week`:case`weeks`:case`w`:i=Math.round(n*604800);break;default:i=Math.round(n*31557600);break}return t[1]===`-`||t[4]===`ago`?-i:i}function Q(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}const $t=e=>e.includes(`/`)?e.toLowerCase():`application/${e.toLowerCase()}`,en=(e,t)=>typeof e==`string`?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;function tn(e,t,r={}){let i;try{i=JSON.parse(n.decode(t))}catch{}if(!F(i))throw new k(`JWT Claims Set must be a top-level JSON object`);let{typ:a}=r;if(a&&(typeof e.typ!=`string`||$t(e.typ)!==$t(a)))throw new w(`unexpected "typ" JWT header value`,i,`typ`,`check_failed`);let{requiredClaims:o=[],issuer:s,subject:c,audience:l,maxTokenAge:u}=r,d=[...o];u!==void 0&&d.push(`iat`),l!==void 0&&d.push(`aud`),c!==void 0&&d.push(`sub`),s!==void 0&&d.push(`iss`);for(let e of new Set(d.reverse()))if(!(e in i))throw new w(`missing required "${e}" claim`,i,e,`missing`);if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new w(`unexpected "iss" claim value`,i,`iss`,`check_failed`);if(c&&i.sub!==c)throw new w(`unexpected "sub" claim value`,i,`sub`,`check_failed`);if(l&&!en(i.aud,typeof l==`string`?[l]:l))throw new w(`unexpected "aud" claim value`,i,`aud`,`check_failed`);let f;switch(typeof r.clockTolerance){case`string`:f=Z(r.clockTolerance);break;case`number`:f=r.clockTolerance;break;case`undefined`:f=0;break;default:throw TypeError(`Invalid clockTolerance option type`)}let{currentDate:p}=r,m=X(p||new Date);if((i.iat!==void 0||u)&&typeof i.iat!=`number`)throw new w(`"iat" claim must be a number`,i,`iat`,`invalid`);if(i.nbf!==void 0){if(typeof i.nbf!=`number`)throw new w(`"nbf" claim must be a number`,i,`nbf`,`invalid`);if(i.nbf>m+f)throw new w(`"nbf" claim timestamp check failed`,i,`nbf`,`check_failed`)}if(i.exp!==void 0){if(typeof i.exp!=`number`)throw new w(`"exp" claim must be a number`,i,`exp`,`invalid`);if(i.exp<=m-f)throw new re(`"exp" claim timestamp check failed`,i,`exp`,`check_failed`)}if(u){let e=m-i.iat,t=typeof u==`number`?u:Z(u);if(e-f>t)throw new re(`"iat" claim timestamp check failed (too far in the past)`,i,`iat`,`check_failed`);if(e<0-f)throw new w(`"iat" claim timestamp check failed (it should be in the past)`,i,`iat`,`check_failed`)}return i}var nn=class{#e;constructor(e){if(!F(e))throw TypeError(`JWT Claims Set MUST be an object`);this.#e=structuredClone(e)}data(){return t.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(e){this.#e.iss=e}get sub(){return this.#e.sub}set sub(e){this.#e.sub=e}get aud(){return this.#e.aud}set aud(e){this.#e.aud=e}set jti(e){this.#e.jti=e}set nbf(e){typeof e==`number`?this.#e.nbf=Q(`setNotBefore`,e):e instanceof Date?this.#e.nbf=Q(`setNotBefore`,X(e)):this.#e.nbf=X(new Date)+Z(e)}set exp(e){typeof e==`number`?this.#e.exp=Q(`setExpirationTime`,e):e instanceof Date?this.#e.exp=Q(`setExpirationTime`,X(e)):this.#e.exp=X(new Date)+Z(e)}set iat(e){e===void 0?this.#e.iat=X(new Date):e instanceof Date?this.#e.iat=Q(`setIssuedAt`,X(e)):typeof e==`string`?this.#e.iat=Q(`setIssuedAt`,X(new Date)+Z(e)):this.#e.iat=Q(`setIssuedAt`,e)}};async function rn(e,t,n){let r=await Xt(e,t,n);if(r.protectedHeader.crit?.includes(`b64`)&&r.protectedHeader.b64===!1)throw new k(`JWTs MUST NOT use unencoded payload`);let i={payload:tn(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return typeof t==`function`?{...i,key:r.key}:i}async function an(e,t,n){let r=await Wt(e,t,n),i=tn(r.protectedHeader,r.plaintext,n),{protectedHeader:a}=r;if(a.iss!==void 0&&a.iss!==i.iss)throw new w(`replicated "iss" claim header parameter mismatch`,i,`iss`,`mismatch`);if(a.sub!==void 0&&a.sub!==i.sub)throw new w(`replicated "sub" claim header parameter mismatch`,i,`sub`,`mismatch`);if(a.aud!==void 0&&JSON.stringify(a.aud)!==JSON.stringify(i.aud))throw new w(`replicated "aud" claim header parameter mismatch`,i,`aud`,`mismatch`);let o={payload:i,protectedHeader:a};return typeof t==`function`?{...o,key:r.key}:o}var on=class{#e;constructor(e){this.#e=new Kt(e)}setContentEncryptionKey(e){return this.#e.setContentEncryptionKey(e),this}setInitializationVector(e){return this.#e.setInitializationVector(e),this}setProtectedHeader(e){return this.#e.setProtectedHeader(e),this}setKeyManagementParameters(e){return this.#e.setKeyManagementParameters(e),this}async encrypt(e,t){let n=await this.#e.encrypt(e,t);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(`.`)}},sn=class{#e;#t;#n;constructor(e){if(!(e instanceof Uint8Array))throw TypeError(`payload must be an instance of Uint8Array`);this.#e=e}setProtectedHeader(e){return N(this.#t,`setProtectedHeader`),this.#t=e,this}setUnprotectedHeader(e){return N(this.#n,`setUnprotectedHeader`),this.#n=e,this}async sign(e,t){if(!this.#t&&!this.#n)throw new O(`either setProtectedHeader or setUnprotectedHeader must be called before #sign()`);if(!I(this.#t,this.#n))throw new O(`JWS Protected and JWS Unprotected Header Parameter names must be disjoint`);let n={...this.#t,...this.#n},r=q(O,new Map([[`b64`,!0]]),t?.crit,this.#t,n),a=!0;if(r.has(`b64`)&&(a=this.#t.b64,typeof a!=`boolean`))throw new O(`The "b64" (base64url-encode payload) Header Parameter must be a boolean`);let{alg:o}=n;if(typeof o!=`string`||!o)throw new O(`JWS "alg" (Algorithm) Header Parameter missing or invalid`);Y(o,e,`sign`);let s,l;a?(s=p(this.#e),l=c(s)):(l=this.#e,s=``);let u,d;this.#t?(u=p(JSON.stringify(this.#t)),d=c(u)):(u=``,d=new Uint8Array);let f=i(d,c(`.`),l),m={signature:p(await Xe(o,await U(e,o),f)),payload:s};return this.#n&&(m.header=this.#n),this.#t&&(m.protected=u),m}},cn=class{#e;constructor(e){this.#e=new sn(e)}setProtectedHeader(e){return this.#e.setProtectedHeader(e),this}async sign(e,t){let n=await this.#e.sign(e,t);if(n.payload===void 0)throw TypeError(`use the flattened module for creating JWS with b64: false`);return`${n.protected}.${n.payload}.${n.signature}`}},ln=class{#e;protectedHeader;unprotectedHeader;options;key;constructor(e,t,n){this.#e=e,this.key=t,this.options=n}setProtectedHeader(e){return N(this.protectedHeader,`setProtectedHeader`),this.protectedHeader=e,this}setUnprotectedHeader(e){return N(this.unprotectedHeader,`setUnprotectedHeader`),this.unprotectedHeader=e,this}addSignature(...e){return this.#e.addSignature(...e)}sign(...e){return this.#e.sign(...e)}done(){return this.#e}},un=class{#e;#t=[];constructor(e){this.#e=e}addSignature(e,t){let n=new ln(this,e,t);return this.#t.push(n),n}async sign(){if(!this.#t.length)throw new O(`at least one signature must be added`);let e={signatures:[],payload:``};for(let t=0;t<this.#t.length;t++){let n=this.#t[t],r=new sn(this.#e);r.setProtectedHeader(n.protectedHeader),r.setUnprotectedHeader(n.unprotectedHeader);let{payload:i,...a}=await r.sign(n.key,n.options);if(t===0)e.payload=i;else if(e.payload!==i)throw new O(`inconsistent use of JWS Unencoded Payload (RFC7797)`);e.signatures.push(a)}return e}},dn=class{#e;#t;constructor(e={}){this.#t=new nn(e)}setIssuer(e){return this.#t.iss=e,this}setSubject(e){return this.#t.sub=e,this}setAudience(e){return this.#t.aud=e,this}setJti(e){return this.#t.jti=e,this}setNotBefore(e){return this.#t.nbf=e,this}setExpirationTime(e){return this.#t.exp=e,this}setIssuedAt(e){return this.#t.iat=e,this}setProtectedHeader(e){return this.#e=e,this}async sign(e,t){let n=new cn(this.#t.data());if(n.setProtectedHeader(this.#e),Array.isArray(this.#e?.crit)&&this.#e.crit.includes(`b64`)&&this.#e.b64===!1)throw new k(`JWTs MUST NOT use unencoded payload`);return n.sign(e,t)}},fn=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#s=new nn(e)}setIssuer(e){return this.#s.iss=e,this}setSubject(e){return this.#s.sub=e,this}setAudience(e){return this.#s.aud=e,this}setJti(e){return this.#s.jti=e,this}setNotBefore(e){return this.#s.nbf=e,this}setExpirationTime(e){return this.#s.exp=e,this}setIssuedAt(e){return this.#s.iat=e,this}setProtectedHeader(e){return N(this.#r,`setProtectedHeader`),this.#r=e,this}setKeyManagementParameters(e){return N(this.#n,`setKeyManagementParameters`),this.#n=e,this}setContentEncryptionKey(e){return N(this.#e,`setContentEncryptionKey`),this.#e=e,this}setInitializationVector(e){return N(this.#t,`setInitializationVector`),this.#t=e,this}replicateIssuerAsHeader(){return this.#i=!0,this}replicateSubjectAsHeader(){return this.#a=!0,this}replicateAudienceAsHeader(){return this.#o=!0,this}async encrypt(e,t){let n=new on(this.#s.data());return this.#r&&(this.#i||this.#a||this.#o)&&(this.#r={...this.#r,iss:this.#i?this.#s.iss:void 0,sub:this.#a?this.#s.sub:void 0,aud:this.#o?this.#s.aud:void 0}),n.setProtectedHeader(this.#r),this.#t&&n.setInitializationVector(this.#t),this.#e&&n.setContentEncryptionKey(this.#e),this.#n&&n.setKeyManagementParameters(this.#n),n.encrypt(e,t)}};const $=(e,t)=>{if(typeof e!=`string`||!e)throw new ae(`${t} missing or invalid`)};async function pn(e,t){let n;if(L(e))n=e;else if(fe(e))n=await At(e);else throw TypeError(S(e,`CryptoKey`,`KeyObject`,`JSON Web Key`));if(t??=`sha256`,t!==`sha256`&&t!==`sha384`&&t!==`sha512`)throw TypeError(`digestAlgorithm must one of "sha256", "sha384", or "sha512"`);let r;switch(n.kty){case`AKP`:$(n.alg,`"alg" (Algorithm) Parameter`),$(n.pub,`"pub" (Public key) Parameter`),r={alg:n.alg,kty:n.kty,pub:n.pub};break;case`EC`:$(n.crv,`"crv" (Curve) Parameter`),$(n.x,`"x" (X Coordinate) Parameter`),$(n.y,`"y" (Y Coordinate) Parameter`),r={crv:n.crv,kty:n.kty,x:n.x,y:n.y};break;case`OKP`:$(n.crv,`"crv" (Subtype of Key Pair) Parameter`),$(n.x,`"x" (Public Key) Parameter`),r={crv:n.crv,kty:n.kty,x:n.x};break;case`RSA`:$(n.e,`"e" (Exponent) Parameter`),$(n.n,`"n" (Modulus) Parameter`),r={e:n.e,kty:n.kty,n:n.n};break;case`oct`:$(n.k,`"k" (Key Value) Parameter`),r={k:n.k,kty:n.kty};break;default:throw new T(`"kty" (Key Type) Parameter missing or unsupported`)}let i=c(JSON.stringify(r));return p(await ke(t,i))}async function mn(e,t){t??=`sha256`;let n=await pn(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${n}`}async function hn(e,t){let n={...e,...t?.header};if(!F(n.jwk))throw new O(`"jwk" (JSON Web Key) Header Parameter must be a JSON object`);let r=await Et({...n.jwk,ext:!0},n.alg);if(r instanceof Uint8Array||r.type!==`public`)throw new O(`"jwk" (JSON Web Key) Header Parameter must be a public key`);return r}function gn(e){switch(typeof e==`string`&&e.slice(0,2)){case`RS`:case`PS`:return`RSA`;case`ES`:return`EC`;case`Ed`:return`OKP`;case`ML`:return`AKP`;default:throw new T(`Unsupported "alg" value for a JSON Web Key Set`)}}function _n(e){return e&&typeof e==`object`&&Array.isArray(e.keys)&&e.keys.every(vn)}function vn(e){return F(e)}var yn=class{#e;#t=new WeakMap;constructor(e){if(!_n(e))throw new oe(`JSON Web Key Set malformed`);this.#e=structuredClone(e)}jwks(){return this.#e}async getKey(e,t){let{alg:n,kid:r}={...e,...t?.header},i=gn(n),a=this.#e.keys.filter(e=>{let t=i===e.kty;if(t&&typeof r==`string`&&(t=r===e.kid),t&&(typeof e.alg==`string`||i===`AKP`)&&(t=n===e.alg),t&&typeof e.use==`string`&&(t=e.use===`sig`),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes(`verify`)),t)switch(n){case`ES256`:t=e.crv===`P-256`;break;case`ES384`:t=e.crv===`P-384`;break;case`ES512`:t=e.crv===`P-521`;break;case`Ed25519`:case`EdDSA`:t=e.crv===`Ed25519`;break}return t}),{0:o,length:s}=a;if(s===0)throw new se;if(s!==1){let e=new ce,t=this.#t;throw e[Symbol.asyncIterator]=async function*(){for(let e of a)try{yield await bn(t,e,n)}catch{}},e}return bn(this.#t,o,n)}};async function bn(e,t,n){let r=e.get(t)||e.set(t,{}).get(t);if(r[n]===void 0){let e=await Et({...t,ext:!0},n);if(e instanceof Uint8Array||e.type!==`public`)throw new oe(`JSON Web Key Set members must be public keys`);r[n]=e}return r[n]}function xn(e){let t=new yn(e),n=async(e,n)=>t.getKey(e,n);return Object.defineProperties(n,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),n}function Sn(){return typeof WebSocketPair<`u`||typeof navigator<`u`&&navigator.userAgent===`Cloudflare-Workers`||typeof EdgeRuntime<`u`&&EdgeRuntime===`vercel`}let Cn;(typeof navigator>`u`||!navigator.userAgent?.startsWith?.(`Mozilla/5.0 `))&&(Cn=`jose/v6.2.3`);const wn=Symbol();async function Tn(e,t,n,r=fetch){let i=await r(e,{method:`GET`,signal:n,redirect:`manual`,headers:t}).catch(e=>{throw e.name===`TimeoutError`?new le:e});if(i.status!==200)throw new C(`Expected 200 OK from the JSON Web Key Set HTTP response`);try{return await i.json()}catch{throw new C(`Failed to parse the JSON Web Key Set HTTP response as JSON`)}}const En=Symbol();function Dn(e,t){return!(typeof e!=`object`||!e||!(`uat`in e)||typeof e.uat!=`number`||Date.now()-e.uat>=t||!(`jwks`in e)||!F(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,F))}var On=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;constructor(e,t){if(!(e instanceof URL))throw TypeError(`url must be an instance of URL`);this.#e=new URL(e.href),this.#t=typeof t?.timeoutDuration==`number`?t?.timeoutDuration:5e3,this.#n=typeof t?.cooldownDuration==`number`?t?.cooldownDuration:3e4,this.#r=typeof t?.cacheMaxAge==`number`?t?.cacheMaxAge:6e5,this.#o=new Headers(t?.headers),Cn&&!this.#o.has(`User-Agent`)&&this.#o.set(`User-Agent`,Cn),this.#o.has(`accept`)||(this.#o.set(`accept`,`application/json`),this.#o.append(`accept`,`application/jwk-set+json`)),this.#s=t?.[wn],t?.[En]!==void 0&&(this.#l=t?.[En],Dn(t?.[En],this.#r)&&(this.#i=this.#l.uat,this.#c=xn(this.#l.jwks)))}pendingFetch(){return!!this.#a}coolingDown(){return typeof this.#i==`number`?Date.now()<this.#i+this.#n:!1}fresh(){return typeof this.#i==`number`?Date.now()<this.#i+this.#r:!1}jwks(){return this.#c?.jwks()}async getKey(e,t){(!this.#c||!this.fresh())&&await this.reload();try{return await this.#c(e,t)}catch(n){if(n instanceof se&&this.coolingDown()===!1)return await this.reload(),this.#c(e,t);throw n}}async reload(){this.#a&&Sn()&&(this.#a=void 0),this.#a||=Tn(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#s).then(e=>{this.#c=xn(e),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=e),this.#i=Date.now(),this.#a=void 0}).catch(e=>{throw this.#a=void 0,e}),await this.#a}};function kn(e,t){let n=new On(e,t),r=async(e,t)=>n.getKey(e,t);return Object.defineProperties(r,{coolingDown:{get:()=>n.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>n.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>n.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>n.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>n.jwks(),enumerable:!0,configurable:!1,writable:!1}}),r}var An=class{#e;constructor(e={}){this.#e=new nn(e)}encode(){return`${p(JSON.stringify({alg:`none`}))}.${p(this.#e.data())}.`}setIssuer(e){return this.#e.iss=e,this}setSubject(e){return this.#e.sub=e,this}setAudience(e){return this.#e.aud=e,this}setJti(e){return this.#e.jti=e,this}setNotBefore(e){return this.#e.nbf=e,this}setExpirationTime(e){return this.#e.exp=e,this}setIssuedAt(e){return this.#e.iat=e,this}static decode(e,t){if(typeof e!=`string`)throw new k(`Unsecured JWT must be a string`);let{0:r,1:i,2:a,length:o}=e.split(`.`);if(o!==3||a!==``)throw new k(`Invalid Unsecured JWT`);let s;try{if(s=JSON.parse(n.decode(f(r))),s.alg!==`none`)throw Error()}catch{throw new k(`Invalid Unsecured JWT`)}return{payload:tn(s,f(i),t),header:s}}};function jn(e){let t;if(typeof e==`string`){let n=e.split(`.`);(n.length===3||n.length===5)&&([t]=n)}else if(typeof e==`object`&&e)if(`protected`in e)t=e.protected;else throw TypeError(`Token does not contain a Protected Header`);try{if(typeof t!=`string`||!t)throw Error();let e=JSON.parse(n.decode(f(t)));if(!F(e))throw Error();return e}catch{throw TypeError(`Invalid Token or Protected Header formatting`)}}function Mn(e){if(typeof e!=`string`)throw new k(`JWTs must use Compact JWS serialization, JWT must be a string`);let{1:t,length:r}=e.split(`.`);if(r===5)throw new k(`Only JWTs using Compact JWS serialization can be decoded`);if(r!==3)throw new k(`Invalid JWT`);if(!t)throw new k(`JWTs must contain a payload`);let i;try{i=f(t)}catch{throw new k(`Failed to base64url decode the payload`)}let a;try{a=JSON.parse(n.decode(i))}catch{throw new k(`Failed to parse the decoded payload as JSON`)}if(!F(a))throw new k(`Invalid JWT Claims Set`);return a}function Nn(e){let t=e?.modulusLength??2048;if(typeof t!=`number`||t<2048)throw new T(`Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used`);return t}async function Pn(e,t){let n,r;switch(e){case`PS256`:case`PS384`:case`PS512`:n={name:`RSA-PSS`,hash:`SHA-${e.slice(-3)}`,publicExponent:Uint8Array.of(1,0,1),modulusLength:Nn(t)},r=[`sign`,`verify`];break;case`RS256`:case`RS384`:case`RS512`:n={name:`RSASSA-PKCS1-v1_5`,hash:`SHA-${e.slice(-3)}`,publicExponent:Uint8Array.of(1,0,1),modulusLength:Nn(t)},r=[`sign`,`verify`];break;case`RSA-OAEP`:case`RSA-OAEP-256`:case`RSA-OAEP-384`:case`RSA-OAEP-512`:n={name:`RSA-OAEP`,hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:Uint8Array.of(1,0,1),modulusLength:Nn(t)},r=[`decrypt`,`unwrapKey`,`encrypt`,`wrapKey`];break;case`ES256`:n={name:`ECDSA`,namedCurve:`P-256`},r=[`sign`,`verify`];break;case`ES384`:n={name:`ECDSA`,namedCurve:`P-384`},r=[`sign`,`verify`];break;case`ES512`:n={name:`ECDSA`,namedCurve:`P-521`},r=[`sign`,`verify`];break;case`Ed25519`:case`EdDSA`:r=[`sign`,`verify`],n={name:`Ed25519`};break;case`ML-DSA-44`:case`ML-DSA-65`:case`ML-DSA-87`:r=[`sign`,`verify`],n={name:e};break;case`ECDH-ES`:case`ECDH-ES+A128KW`:case`ECDH-ES+A192KW`:case`ECDH-ES+A256KW`:{r=[`deriveBits`];let e=t?.crv??`P-256`;switch(e){case`P-256`:case`P-384`:case`P-521`:n={name:`ECDH`,namedCurve:e};break;case`X25519`:n={name:`X25519`};break;default:throw new T(`Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519`)}break}default:throw new T(`Invalid or unsupported JWK "alg" (Algorithm) Parameter value`)}return crypto.subtle.generateKey(n,t?.extractable??!1,r)}async function Fn(e,t){let n,r,i;switch(e){case`HS256`:case`HS384`:case`HS512`:n=parseInt(e.slice(-3),10),r={name:`HMAC`,hash:`SHA-${n}`,length:n},i=[`sign`,`verify`];break;case`A128CBC-HS256`:case`A192CBC-HS384`:case`A256CBC-HS512`:return n=parseInt(e.slice(-3),10),crypto.getRandomValues(new Uint8Array(n>>3));case`A128KW`:case`A192KW`:case`A256KW`:n=parseInt(e.slice(1,4),10),r={name:`AES-KW`,length:n},i=[`wrapKey`,`unwrapKey`];break;case`A128GCMKW`:case`A192GCMKW`:case`A256GCMKW`:case`A128GCM`:case`A192GCM`:case`A256GCM`:n=parseInt(e.slice(1,4),10),r={name:`AES-GCM`,length:n},i=[`encrypt`,`decrypt`];break;default:throw new T(`Invalid or unsupported JWK "alg" (Algorithm) Parameter value`)}return crypto.subtle.generateKey(r,t?.extractable??!1,i)}const In=`WebCryptoAPI`;export{on as CompactEncrypt,cn as CompactSign,hn as EmbeddedJWK,fn as EncryptJWT,Kt as FlattenedEncrypt,sn as FlattenedSign,Jt as GeneralEncrypt,un as GeneralSign,dn as SignJWT,An as UnsecuredJWT,d as base64url,pn as calculateJwkThumbprint,mn as calculateJwkThumbprintUri,Wt as compactDecrypt,Xt as compactVerify,xn as createLocalJWKSet,kn as createRemoteJWKSet,In as cryptoRuntime,wn as customFetch,Mn as decodeJwt,jn as decodeProtectedHeader,ne as errors,At as exportJWK,kt as exportPKCS8,Ot as exportSPKI,Ut as flattenedDecrypt,Yt as flattenedVerify,Gt as generalDecrypt,Zt as generalVerify,Pn as generateKeyPair,Fn as generateSecret,Et as importJWK,Tt as importPKCS8,Ct as importSPKI,wt as importX509,En as jwksCache,an as jwtDecrypt,rn as jwtVerify};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ParseError {
|
|
2
|
+
readonly error: number;
|
|
3
|
+
readonly offset: number;
|
|
4
|
+
readonly length: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ParseOptions {
|
|
8
|
+
readonly allowEmptyContent?: boolean | undefined;
|
|
9
|
+
readonly allowTrailingComma?: boolean | undefined;
|
|
10
|
+
readonly disallowComments?: boolean | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare function parse(text: string, errors?: ParseError[], options?: ParseOptions): unknown;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function e(e,i=!1){let a=e.length,o=0,s=``,c=0,l=16,u=0,d=0,f=0,p=0,m=0;function h(t,n){let r=0,i=0;for(;r<t||!n;){let t=e.charCodeAt(o);if(t>=48&&t<=57)i=i*16+t-48;else if(t>=65&&t<=70)i=i*16+t-65+10;else if(t>=97&&t<=102)i=i*16+t-97+10;else break;o++,r++}return r<t&&(i=-1),i}function g(e){o=e,s=``,c=0,l=16,m=0}function _(){let t=o;if(e.charCodeAt(o)===48)o++;else for(o++;o<e.length&&r(e.charCodeAt(o));)o++;if(o<e.length&&e.charCodeAt(o)===46)if(o++,o<e.length&&r(e.charCodeAt(o)))for(o++;o<e.length&&r(e.charCodeAt(o));)o++;else return m=3,e.substring(t,o);let n=o;if(o<e.length&&(e.charCodeAt(o)===69||e.charCodeAt(o)===101))if(o++,(o<e.length&&e.charCodeAt(o)===43||e.charCodeAt(o)===45)&&o++,o<e.length&&r(e.charCodeAt(o))){for(o++;o<e.length&&r(e.charCodeAt(o));)o++;n=o}else m=3;return e.substring(t,n)}function v(){let t=``,r=o;for(;;){if(o>=a){t+=e.substring(r,o),m=2;break}let i=e.charCodeAt(o);if(i===34){t+=e.substring(r,o),o++;break}if(i===92){if(t+=e.substring(r,o),o++,o>=a){m=2;break}switch(e.charCodeAt(o++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
2
|
+
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=h(4,!0);e>=0?t+=String.fromCharCode(e):m=4;break;default:m=5}r=o;continue}if(i>=0&&i<=31)if(n(i)){t+=e.substring(r,o),m=2;break}else m=6;o++}return t}function y(){if(s=``,m=0,c=o,d=u,p=f,o>=a)return c=a,l=17;let i=e.charCodeAt(o);if(t(i)){do o++,s+=String.fromCharCode(i),i=e.charCodeAt(o);while(t(i));return l=15}if(n(i))return o++,s+=String.fromCharCode(i),i===13&&e.charCodeAt(o)===10&&(o++,s+=`
|
|
3
|
+
`),u++,f=o,l=14;switch(i){case 123:return o++,l=1;case 125:return o++,l=2;case 91:return o++,l=3;case 93:return o++,l=4;case 58:return o++,l=6;case 44:return o++,l=5;case 34:return o++,s=v(),l=10;case 47:let t=o-1;if(e.charCodeAt(o+1)===47){for(o+=2;o<a&&!n(e.charCodeAt(o));)o++;return s=e.substring(t,o),l=12}if(e.charCodeAt(o+1)===42){o+=2;let r=a-1,i=!1;for(;o<r;){let t=e.charCodeAt(o);if(t===42&&e.charCodeAt(o+1)===47){o+=2,i=!0;break}o++,n(t)&&(t===13&&e.charCodeAt(o)===10&&o++,u++,f=o)}return i||(o++,m=1),s=e.substring(t,o),l=13}return s+=String.fromCharCode(i),o++,l=16;case 45:if(s+=String.fromCharCode(i),o++,o===a||!r(e.charCodeAt(o)))return l=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=_(),l=11;default:for(;o<a&&b(i);)o++,i=e.charCodeAt(o);if(c!==o){switch(s=e.substring(c,o),s){case`true`:return l=8;case`false`:return l=9;case`null`:return l=7}return l=16}return s+=String.fromCharCode(i),o++,l=16}}function b(e){if(t(e)||n(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let e;do e=y();while(e>=12&&e<=15);return e}return{setPosition:g,getPosition:()=>o,scan:i?x:y,getToken:()=>l,getTokenValue:()=>s,getTokenOffset:()=>c,getTokenLength:()=>o-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-p,getTokenError:()=>m}}function t(e){return e===32||e===9}function n(e){return e===10||e===13}function r(e){return e>=48&&e<=57}var i;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(i||={});const a=Array(20).fill(0).map((e,t)=>` `.repeat(t)),o={" ":{"\n":Array(200).fill(0).map((e,t)=>`
|
|
4
|
+
`+` `.repeat(t)),"\r":Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(200).fill(0).map((e,t)=>`\r
|
|
5
|
+
`+` `.repeat(t))}," ":{"\n":Array(200).fill(0).map((e,t)=>`
|
|
6
|
+
`+` `.repeat(t)),"\r":Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(200).fill(0).map((e,t)=>`\r
|
|
7
|
+
`+` `.repeat(t))}},s=[`
|
|
8
|
+
`,`\r`,`\r
|
|
9
|
+
`];function c(t,n,r){let i,c,p,m,h;if(n){for(m=n.offset,h=m+n.length,p=m;p>0&&!f(t,p-1);)p--;let e=h;for(;e<t.length&&!f(t,e);)e++;c=t.substring(p,e),i=u(c,r)}else c=t,i=0,p=0,m=0,h=t.length;let g=d(r,t),_=s.includes(g),v=0,y=0,b;b=r.insertSpaces?a[r.tabSize||4]??l(a[1],r.tabSize||4):` `;let x=b===` `?` `:` `,S=e(c,!1),C=!1;function w(){if(v>1)return l(g,v)+l(b,i+y);let e=b.length*(i+y);return!_||e>o[x][g].length?g+l(b,i+y):e<=0?g:o[x][g][e]}function T(){let e=S.scan();for(v=0;e===15||e===14;)e===14&&r.keepLines?v+=1:e===14&&(v=1),e=S.scan();return C=e===16||S.getTokenError()!==0,e}let E=[];function D(e,r,i){!C&&(!n||r<h&&i>m)&&t.substring(r,i)!==e&&E.push({offset:r,length:i-r,content:e})}let O=T();if(r.keepLines&&v>0&&D(l(g,v),0,0),O!==17){let e=S.getTokenOffset()+p;D(b.length*i<20&&r.insertSpaces?a[b.length*i]:l(b,i),p,e)}for(;O!==17;){let e=S.getTokenOffset()+S.getTokenLength()+p,t=T(),n=``,i=!1;for(;v===0&&(t===12||t===13);){let r=S.getTokenOffset()+p;D(a[1],e,r),e=S.getTokenOffset()+S.getTokenLength()+p,i=t===12,n=i?w():``,t=T()}if(t===2)O!==1&&y--,r.keepLines&&v>0||!r.keepLines&&O!==1?n=w():r.keepLines&&(n=a[1]);else if(t===4)O!==3&&y--,r.keepLines&&v>0||!r.keepLines&&O!==3?n=w():r.keepLines&&(n=a[1]);else{switch(O){case 3:case 1:y++,n=r.keepLines&&v>0||!r.keepLines?w():a[1];break;case 5:n=r.keepLines&&v>0||!r.keepLines?w():a[1];break;case 12:n=w();break;case 13:v>0?n=w():i||(n=a[1]);break;case 6:r.keepLines&&v>0?n=w():i||(n=a[1]);break;case 10:r.keepLines&&v>0?n=w():t===6&&!i&&(n=``);break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&v>0?n=w():(t===12||t===13)&&!i?n=a[1]:t!==5&&t!==17&&(C=!0);break;case 16:C=!0;break}v>0&&(t===12||t===13)&&(n=w())}t===17&&(n=r.keepLines&&v>0?w():r.insertFinalNewline?g:``);let o=S.getTokenOffset()+p;D(n,e,o),O=t}return E}function l(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}function u(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===a[1])r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}function d(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
|
|
10
|
+
`?`\r
|
|
11
|
+
`:`\r`;if(n===`
|
|
12
|
+
`)return`
|
|
13
|
+
`}return e&&e.eol||`
|
|
14
|
+
`}function f(e,t){return`\r
|
|
15
|
+
`.indexOf(e.charAt(t))!==-1}var p;(function(e){e.DEFAULT={allowTrailingComma:!1}})(p||={});function m(e,t){let n=[],r={},i,a={value:{},offset:0,length:0,type:`object`,parent:void 0},o=!1;function s(e,t,n,r){a.value=e,a.offset=t,a.length=n,a.type=r,a.colonOffset=void 0,i=a}try{S(e,{onObjectBegin:(e,a)=>{if(t<=e)throw r;i=void 0,o=t>e,n.push(``)},onObjectProperty:(e,i,a)=>{if(t<i||(s(e,i,a,`property`),n[n.length-1]=e,t<=i+a))throw r},onObjectEnd:(e,a)=>{if(t<=e)throw r;i=void 0,n.pop()},onArrayBegin:(e,a)=>{if(t<=e)throw r;i=void 0,n.push(0)},onArrayEnd:(e,a)=>{if(t<=e)throw r;i=void 0,n.pop()},onLiteralValue:(e,n,i)=>{if(t<n||(s(e,n,i,w(e)),t<=n+i))throw r},onSeparator:(e,a,s)=>{if(t<=a)throw r;if(e===`:`&&i&&i.type===`property`)i.colonOffset=a,o=!1,i=void 0;else if(e===`,`){let e=n[n.length-1];typeof e==`number`?n[n.length-1]=e+1:(o=!0,n[n.length-1]=``),i=void 0}}})}catch(e){if(e!==r)throw e}return{path:n,previousNode:i,isAtPropertyKey:o,matches:e=>{let t=0;for(let r=0;t<e.length&&r<n.length;r++)if(e[t]===n[r]||e[t]===`*`)t++;else if(e[t]!==`**`)return!1;return t===e.length}}}function h(e,t=[],n=p.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return S(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function g(e,t=[],n=p.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}function a(e){return r.children.push(e),e}S(e,{onObjectBegin:e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{a({type:w(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);let o=r.children[0];return o&&delete o.parent,o}function _(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function v(e){if(!e.parent||!e.parent.children)return[];let t=v(e.parent);if(e.parent.type===`property`){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type===`array`){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function y(e){switch(e.type){case`array`:return e.children.map(y);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=y(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function b(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function x(e,t,n=!1){if(b(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=x(r[e],t,n);if(i)return i}return e}}function S(t,n,r=p.DEFAULT){let i=e(t,!1),a=[],o=0;function s(e){return e?()=>o===0&&e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>o===0&&e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>o===0&&e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>a.slice()):()=>!0}function u(e){return e?()=>{o>0?o++:e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>a.slice())===!1&&(o=1)}:()=>!0}function d(e){return e?()=>{o>0&&o--,o===0&&e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:()=>!0}let f=u(n.onObjectBegin),m=l(n.onObjectProperty),h=d(n.onObjectEnd),g=u(n.onArrayBegin),_=d(n.onArrayEnd),v=l(n.onLiteralValue),y=c(n.onSeparator),b=s(n.onComment),x=c(n.onError),S=r&&r.disallowComments,C=r&&r.allowTrailingComma;function w(){for(;;){let e=i.scan();switch(i.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:S||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(e){case 12:case 13:S?T(10):b();break;case 16:T(1);break;case 15:case 14:break;default:return e}}}function T(e,t=[],n=[]){if(x(e),t.length+n.length>0){let e=i.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){w();break}else if(n.indexOf(e)!==-1)break;e=w()}}}function E(e){let t=i.getTokenValue();return e?v(t):(m(t),a.push(t)),w(),!0}function D(){switch(i.getToken()){case 11:let e=i.getTokenValue(),t=Number(e);isNaN(t)&&(T(2),t=0),v(t);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return!1}return w(),!0}function O(){return i.getToken()===10?(E(!1),i.getToken()===6?(y(`:`),w(),j()||T(4,[],[2,5])):T(5,[],[2,5]),a.pop(),!0):(T(3,[],[2,5]),!1)}function k(){f(),w();let e=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(e||T(4,[],[]),y(`,`),w(),i.getToken()===2&&C)break}else e&&T(6,[],[]);O()||T(4,[],[2,5]),e=!0}return h(),i.getToken()===2?w():T(7,[2],[]),!0}function A(){g(),w();let e=!0,t=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(t||T(4,[],[]),y(`,`),w(),i.getToken()===4&&C)break}else t&&T(6,[],[]);e?(a.push(0),e=!1):a[a.length-1]++,j()||T(4,[],[4,5]),t=!0}return _(),e||a.pop(),i.getToken()===4?w():T(8,[4],[]),!0}function j(){switch(i.getToken()){case 3:return A();case 1:return k();case 10:return E(!0);default:return D()}}return w(),i.getToken()===17?r.allowEmptyContent?!0:(T(4,[],[]),!1):j()?(i.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}function C(t,n){let r=e(t),i=[],a,o=0,s;do switch(s=r.getPosition(),a=r.scan(),a){case 12:case 13:case 17:o!==s&&i.push(t.substring(o,s)),n!==void 0&&i.push(r.getTokenValue().replace(/[^\r\n]/g,n)),o=r.getPosition();break}while(a!==17);return i.join(``)}function w(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}function T(e,t,n,r){let i=t.slice(),a=g(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=_(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return E(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=_(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return E(e,{offset:i,length:a-i,content:``},r)}else return E(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return E(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return E(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return E(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return E(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}function E(e,t,n){if(!n.formattingOptions)return[t];let r=D(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!f(r,i-1);)i--;for(;a<r.length&&!f(r,a);)a++}let o=c(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=D(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function D(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}const O=e;var k;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(k||={});var A;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(A||={});const j=m,M=h,N=g,P=_,F=x,I=v,L=y,R=S,z=C;var B;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(B||={});function V(e){switch(e){case 1:return`InvalidSymbol`;case 2:return`InvalidNumberFormat`;case 3:return`PropertyNameExpected`;case 4:return`ValueExpected`;case 5:return`ColonExpected`;case 6:return`CommaExpected`;case 7:return`CloseBraceExpected`;case 8:return`CloseBracketExpected`;case 9:return`EndOfFileExpected`;case 10:return`InvalidCommentToken`;case 11:return`UnexpectedEndOfComment`;case 12:return`UnexpectedEndOfString`;case 13:return`UnexpectedEndOfNumber`;case 14:return`InvalidUnicode`;case 15:return`InvalidEscapeCharacter`;case 16:return`InvalidCharacter`}return`<unknown ParseErrorCode>`}function H(e,t,n){return c(e,t,n)}function U(e,t,n,r){return T(e,t,n,r)}function W(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=D(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}export{B as ParseErrorCode,k as ScanError,A as SyntaxKind,W as applyEdits,O as createScanner,P as findNodeAtLocation,F as findNodeAtOffset,H as format,j as getLocation,I as getNodePath,L as getNodeValue,U as modify,M as parse,N as parseTree,V as printParseErrorCode,z as stripComments,R as visit};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Vercel Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// The network-policy types are copied verbatim from the installed just-bash at
|
|
2
|
+
// vendor time (see scripts/vendor-compiled/just-bash.mjs) so the credential-
|
|
3
|
+
// brokering surface (allowedUrlPrefixes + header transforms) never drifts.
|
|
4
|
+
import type { NetworkConfig } from "./network/types.js";
|
|
5
|
+
|
|
6
|
+
export type {
|
|
7
|
+
AllowedUrl,
|
|
8
|
+
AllowedUrlEntry,
|
|
9
|
+
HttpMethod,
|
|
10
|
+
NetworkConfig,
|
|
11
|
+
RequestTransform,
|
|
12
|
+
} from "./network/types.js";
|
|
13
|
+
|
|
14
|
+
export type InitialFileContent = string | Uint8Array;
|
|
15
|
+
export type InitialFiles = Record<string, InitialFileContent>;
|
|
16
|
+
|
|
17
|
+
export interface IFileSystem {
|
|
18
|
+
getAllPaths(): string[];
|
|
19
|
+
mkdir(path: string, options?: { recursive?: boolean | undefined }): Promise<void>;
|
|
20
|
+
readFileBuffer(path: string): Promise<Uint8Array>;
|
|
21
|
+
rm(
|
|
22
|
+
path: string,
|
|
23
|
+
options?: { force?: boolean | undefined; recursive?: boolean | undefined },
|
|
24
|
+
): Promise<void>;
|
|
25
|
+
stat(path: string): Promise<{
|
|
26
|
+
isDirectory: boolean;
|
|
27
|
+
isFile: boolean;
|
|
28
|
+
isSymbolicLink: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
writeFile(path: string, content: InitialFileContent): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface BeveOptions {
|
|
34
|
+
cwd: string;
|
|
35
|
+
env?: Readonly<Record<string, string>> | undefined;
|
|
36
|
+
fs: IFileSystem;
|
|
37
|
+
network?: NetworkConfig | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface BeveExecResult {
|
|
41
|
+
exitCode: number;
|
|
42
|
+
stderr: string;
|
|
43
|
+
stdout: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare class Bash {
|
|
47
|
+
constructor(options: BeveOptions);
|
|
48
|
+
dispose?(): Promise<void> | void;
|
|
49
|
+
exec(command: string): Promise<BeveExecResult>;
|
|
50
|
+
getEnv(): Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export declare class InMemoryFs implements IFileSystem {
|
|
54
|
+
constructor(files?: InitialFiles);
|
|
55
|
+
getAllPaths(): string[];
|
|
56
|
+
mkdir(path: string, options?: { recursive?: boolean | undefined }): Promise<void>;
|
|
57
|
+
readFileBuffer(path: string): Promise<Uint8Array>;
|
|
58
|
+
rm(
|
|
59
|
+
path: string,
|
|
60
|
+
options?: { force?: boolean | undefined; recursive?: boolean | undefined },
|
|
61
|
+
): Promise<void>;
|
|
62
|
+
stat(path: string): Promise<{
|
|
63
|
+
isDirectory: boolean;
|
|
64
|
+
isFile: boolean;
|
|
65
|
+
isSymbolicLink: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
writeFile(path: string, content: InitialFileContent): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface SandboxOptions {
|
|
71
|
+
cwd?: string | undefined;
|
|
72
|
+
env?: Record<string, string> | undefined;
|
|
73
|
+
fs?: IFileSystem | undefined;
|
|
74
|
+
network?: NetworkConfig | undefined;
|
|
75
|
+
timeoutMs?: number | undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface SandboxRunCommandParams {
|
|
79
|
+
cmd: string;
|
|
80
|
+
args?: string[] | undefined;
|
|
81
|
+
cwd?: string | undefined;
|
|
82
|
+
env?: Record<string, string> | undefined;
|
|
83
|
+
detached?: boolean | undefined;
|
|
84
|
+
signal?: AbortSignal | undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface SandboxCommandOutputMessage {
|
|
88
|
+
type: "stdout" | "stderr";
|
|
89
|
+
data: string;
|
|
90
|
+
timestamp: Date;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare class SandboxCommand {
|
|
94
|
+
readonly cmdId: string;
|
|
95
|
+
readonly cwd: string;
|
|
96
|
+
readonly startedAt: Date;
|
|
97
|
+
exitCode: number | undefined;
|
|
98
|
+
logs(): AsyncGenerator<SandboxCommandOutputMessage, void, unknown>;
|
|
99
|
+
wait(): Promise<SandboxCommandFinished>;
|
|
100
|
+
output(): Promise<string>;
|
|
101
|
+
stdout(): Promise<string>;
|
|
102
|
+
stderr(): Promise<string>;
|
|
103
|
+
kill(): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface SandboxCommandFinished extends SandboxCommand {
|
|
107
|
+
exitCode: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare class Sandbox {
|
|
111
|
+
static create(opts?: SandboxOptions): Promise<Sandbox>;
|
|
112
|
+
runCommand(params: SandboxRunCommandParams & { detached: true }): Promise<SandboxCommand>;
|
|
113
|
+
runCommand(params: SandboxRunCommandParams): Promise<SandboxCommandFinished>;
|
|
114
|
+
stop(): Promise<void>;
|
|
115
|
+
get bashEnvInstance(): Bash;
|
|
116
|
+
}
|