eve 0.82.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/NOTICE +1 -1
- package/dist/src/channel/pending-authorization.d.ts +5 -0
- package/dist/src/channel/pending-authorization.js +1 -1
- package/dist/src/channel/session.d.ts +2 -0
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +5 -0
- package/dist/src/chunks/{use-eve-agent-DlznYwQk.js → use-eve-agent-3-WRmJkd.js} +40 -5
- package/dist/src/chunks/{use-eve-agent-DTu78IAF.js → use-eve-agent-Ci5dr0aR.js} +40 -5
- package/dist/src/cli/dev/local-server-child.js +1 -1
- package/dist/src/cli/dev/local-server-cleanup.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.d.ts +4 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +4 -4
- package/dist/src/client/eve-agent-store.d.ts +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/session-controls.d.ts +6 -0
- package/dist/src/client/session-controls.js +1 -1
- package/dist/src/client/session.d.ts +4 -0
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +8 -8
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +5 -3
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +1 -37
- package/dist/src/compiled/@workflow/core/runtime/event-limit-warning.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +5 -6
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +8 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +15 -18
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +20 -0
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/seeded-nanoid.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +14 -3
- package/dist/src/compiled/@workflow/core/serialization.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +0 -18
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +48 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/env-config.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +126 -7
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +59 -8
- package/dist/src/compiled/@workflow/world/queue.d.ts +71 -9
- package/dist/src/compiled/@workflow/world/recovery.d.ts +6 -0
- package/dist/src/compiled/@workflow/world/test-support/duplicate-event-fixtures.d.ts +3 -0
- package/dist/src/compiled/@workflow/world/test-support/in-band-fence-conformance.d.ts +46 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +18 -18
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-BW-kbMMn.js → attribute-changes-7se_SE2q.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/dist-CcnNPAp4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-S9cZRway.js +3 -0
- package/dist/src/compiled/_chunks/workflow/helpers-CxNRXH0a.js +1 -0
- package/dist/src/compiled/_chunks/workflow/private-DLYTSBbu.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-CPiIfe8r.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{run-DzdAqdb1.js → run-BJSLCXR4.js} +6 -6
- package/dist/src/compiled/_chunks/workflow/serialization-B9gneT9Z.js +15 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BL0oQs3R.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-xbRRDuUf.js → wait-until-BPou0RGO.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/workflow-routes-BaljomCk.js +1 -0
- package/dist/src/compiled/{@ai-sdk/code-mode → run}/LICENSE +1 -1
- package/dist/src/compiled/run/index.d.ts +384 -0
- package/dist/src/compiled/run/index.js +650 -0
- package/dist/src/compiler/extension-compatibility.d.ts +21 -14
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/providers/sandbox.js +1 -1
- package/dist/src/discover/extension-specifier.d.ts +1 -0
- package/dist/src/discover/extension-specifier.js +1 -1
- package/dist/src/evals/cli/eval.js +2 -2
- package/dist/src/evals/runner/artifacts.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +12 -0
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/types.d.ts +3 -2
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +0 -1
- package/dist/src/eve-channel/request.js +2 -2
- package/dist/src/execution/agent-sessions/context.d.ts +1 -1
- package/dist/src/execution/agent-sessions/context.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +3 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.d.ts +7 -7
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +18 -11
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/invoke-tool.js +1 -1
- package/dist/src/execution/sandbox/abort-bound-session.js +1 -1
- package/dist/src/execution/sandbox/active-connections.d.ts +28 -0
- package/dist/src/execution/sandbox/active-connections.js +1 -0
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +10 -2
- package/dist/src/execution/sandbox/bindings/docker-cli.js +2 -2
- package/dist/src/execution/sandbox/bindings/docker-connection.d.ts +15 -0
- package/dist/src/execution/sandbox/bindings/docker-connection.js +2 -0
- package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.d.ts +5 -0
- package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.d.ts +12 -15
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +19 -29
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +2 -4
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +0 -20
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -1
- package/dist/src/execution/sandbox/bindings/local.d.ts +4 -6
- package/dist/src/execution/sandbox/bindings/local.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-errors.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +7 -5
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +5 -11
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -2
- package/dist/src/execution/sandbox/development-cleanup.d.ts +0 -1
- package/dist/src/execution/sandbox/development-cleanup.js +1 -1
- package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -1
- package/dist/src/execution/sandbox/development-run.d.ts +0 -2
- package/dist/src/execution/sandbox/development-run.js +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -4
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +23 -11
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +3 -3
- package/dist/src/execution/sandbox/grep-tool.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +23 -3
- package/dist/src/execution/sandbox/prewarm.js +2 -1
- package/dist/src/execution/sandbox/read-file.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +3 -2
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +10 -20
- package/dist/src/execution/sandbox/session.js +2 -2
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/checkpoint-migrations.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +5 -4
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/handoff-state.d.ts +5 -0
- package/dist/src/execution/session/handoff-state.js +1 -0
- package/dist/src/execution/session/handoff-steps.d.ts +0 -5
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +2 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +3 -0
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +3 -0
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/timeout-control.d.ts +4 -0
- package/dist/src/execution/session/timeout-control.js +1 -1
- package/dist/src/execution/session/turn-control.d.ts +5 -2
- package/dist/src/execution/session/turn-control.js +1 -1
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-inbox/inbox.d.ts +9 -1
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/resume.d.ts +2 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-prewarm.d.ts +8 -0
- package/dist/src/execution/session-prewarm.js +1 -0
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/step-context.d.ts +11 -0
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/extensions/git/extension/lib/github-shell-schema.js +1 -1
- package/dist/src/framework/sources/modules/sandbox.d.ts +1 -1
- package/dist/src/harness/attachment-staging.d.ts +0 -7
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +2 -1
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/view.d.ts +1 -0
- package/dist/src/harness/hitl/view.js +1 -0
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/semantic-errors/rules/sandbox.d.ts +3 -5
- package/dist/src/harness/semantic-errors/rules/sandbox.js +1 -1
- package/dist/src/harness/step/prompt.js +1 -1
- package/dist/src/harness/tool-history-repair.d.ts +9 -0
- package/dist/src/harness/tool-history-repair.js +1 -0
- package/dist/src/harness/tool-model-output.d.ts +19 -3
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +8 -4
- package/dist/src/internal/application/optional-package-import.d.ts +10 -0
- package/dist/src/internal/application/optional-package-import.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/attachments/limited-read.d.ts +2 -2
- package/dist/src/internal/authored-module-build-options.d.ts +6 -0
- package/dist/src/internal/authored-module-build-options.js +1 -1
- package/dist/src/internal/authored-module-cache.d.ts +10 -0
- package/dist/src/internal/authored-module-cache.js +1 -0
- package/dist/src/internal/authored-module-graph.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +3 -1
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/bundler/pseudo-packages.d.ts +11 -0
- package/dist/src/internal/bundler/pseudo-packages.js +1 -0
- package/dist/src/internal/nitro/host/build-extension.d.ts +6 -0
- package/dist/src/internal/nitro/host/build-extension.js +2 -2
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +3 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +3 -5
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +2 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -0
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-build-host.d.ts +83 -0
- package/dist/src/internal/nitro/host/dev-build-host.js +1 -0
- package/dist/src/internal/nitro/host/dev-build-operations.d.ts +6 -0
- package/dist/src/internal/nitro/host/dev-build-operations.js +1 -0
- package/dist/src/internal/nitro/host/dev-build-process.d.ts +1 -0
- package/dist/src/internal/nitro/host/dev-build-process.js +1 -0
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +4 -1
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +3 -2
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +13 -0
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -1
- package/dist/src/internal/nitro/host/optional-engine-dependency-plugin.js +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +3 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +3 -3
- package/dist/src/internal/nitro/host/workflow-sandbox-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/host.js +1 -1
- package/dist/src/internal/workflow/local-world-delivery-auth.d.ts +17 -0
- package/dist/src/internal/workflow/local-world-delivery-auth.js +1 -0
- package/dist/src/internal/workflow/queue-namespace.d.ts +2 -0
- package/dist/src/internal/workflow/queue-namespace.js +1 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
- package/dist/src/protocol/prewarm-session.d.ts +14 -0
- package/dist/src/protocol/prewarm-session.js +1 -0
- package/dist/src/protocol/routes.d.ts +2 -2
- package/dist/src/public/channels/discord/authorization.d.ts +45 -0
- package/dist/src/public/channels/discord/authorization.js +3 -0
- package/dist/src/public/channels/discord/defaults.d.ts +14 -3
- package/dist/src/public/channels/discord/defaults.js +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +15 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/gateway/connection.d.ts +26 -0
- package/dist/src/public/channels/discord/gateway/connection.js +1 -0
- package/dist/src/public/channels/discord/gateway/forwarder.d.ts +14 -0
- package/dist/src/public/channels/discord/gateway/forwarder.js +1 -0
- package/dist/src/public/channels/discord/gateway/index.d.ts +59 -0
- package/dist/src/public/channels/discord/gateway/index.js +1 -0
- package/dist/src/public/channels/discord/inbound.d.ts +10 -3
- package/dist/src/public/channels/discord/inbound.js +2 -2
- package/dist/src/public/channels/discord/index.d.ts +3 -2
- package/dist/src/public/channels/discord/index.js +1 -1
- package/dist/src/public/channels/discord/messages.d.ts +116 -0
- package/dist/src/public/channels/discord/messages.js +2 -0
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/linq/linqChannel.d.ts +4 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/same-environment-oidc.d.ts +7 -0
- package/dist/src/public/channels/same-environment-oidc.js +1 -0
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +6 -1
- package/dist/src/public/sandbox/docker.d.ts +1 -8
- package/dist/src/public/sandbox/index.d.ts +3 -3
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +87 -7
- package/dist/src/public/sandbox/just-bash.d.ts +1 -1
- package/dist/src/public/sandbox/provider.d.ts +5 -1
- package/dist/src/public/sandbox/provider.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +16 -9
- package/dist/src/public/sandbox/vercel.d.ts +0 -1
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/public/tools/agent.d.ts +8 -1
- package/dist/src/public/tools/agent.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +2 -0
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-channel.js +1 -1
- package/dist/src/runtime/resolve-sandbox.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/sandbox/registry.d.ts +2 -0
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +6 -0
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/workspace/seed-files.d.ts +9 -12
- package/dist/src/runtime/workspace/seed-files.js +1 -1
- package/dist/src/runtime/workspace/spec.d.ts +1 -1
- package/dist/src/runtime/workspace/spec.js +1 -1
- package/dist/src/runtime/workspace/types.d.ts +2 -6
- package/dist/src/sandbox/provider.d.ts +185 -0
- package/dist/src/sandbox/provider.js +1 -0
- package/dist/src/sandbox/providers/default.d.ts +20 -19
- package/dist/src/sandbox/providers/default.js +1 -1
- package/dist/src/sandbox/providers/docker.d.ts +5 -2
- package/dist/src/sandbox/providers/docker.js +1 -1
- package/dist/src/sandbox/providers/just-bash.d.ts +4 -3
- package/dist/src/sandbox/providers/just-bash.js +1 -1
- package/dist/src/sandbox/providers/vercel.d.ts +4 -10
- package/dist/src/sandbox/providers/vercel.js +1 -1
- package/dist/src/sandbox/providers.d.ts +0 -1
- package/dist/src/sandbox/providers.js +1 -1
- package/dist/src/sandbox/state.d.ts +44 -0
- package/dist/src/sandbox/state.js +1 -1
- package/dist/src/self-modification/deployed-sandbox.d.ts +4 -9
- package/dist/src/self-modification/deployed-sandbox.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +3 -3
- package/dist/src/self-modification/remote/config.d.ts +2 -2
- package/dist/src/self-modification/remote/config.js +1 -1
- package/dist/src/self-modification/setup.d.ts +0 -1
- package/dist/src/self-modification/setup.js +8 -8
- package/dist/src/setup/integrations/discord/api.d.ts +7 -0
- package/dist/src/setup/integrations/discord/api.js +1 -1
- package/dist/src/setup/integrations/discord/daemon.d.ts +18 -0
- package/dist/src/setup/integrations/discord/daemon.js +21 -0
- package/dist/src/setup/integrations/discord/setup.d.ts +24 -4
- package/dist/src/setup/integrations/discord/setup.js +5 -4
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/setup/scaffold/version-tokens.d.ts +0 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +2 -0
- package/dist/src/shared/built-server-start-failure.d.ts +12 -0
- package/dist/src/shared/built-server-start-failure.js +3 -0
- package/dist/src/shared/framework-eve-server.d.ts +2 -0
- package/dist/src/shared/framework-eve-server.js +2 -2
- package/dist/src/shared/sandbox-environment.d.ts +4 -10
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/sandbox-network-policy.d.ts +45 -9
- package/dist/src/shared/sandbox-provider.d.ts +0 -103
- package/dist/src/shared/sandbox-provider.js +1 -1
- package/dist/src/shared/sandbox-recorded-data-error.d.ts +4 -0
- package/dist/src/shared/sandbox-recorded-data-error.js +1 -0
- package/dist/src/shared/sandbox-session-gone-error.d.ts +12 -0
- package/dist/src/shared/sandbox-session-gone-error.js +1 -0
- package/dist/src/shared/sandbox-session.d.ts +97 -83
- package/dist/src/shared/sandbox-template-error.d.ts +19 -4
- package/dist/src/shared/sandbox-template-error.js +1 -1
- package/dist/src/shared/sandbox-tool-session-error.d.ts +4 -0
- package/dist/src/shared/sandbox-tool-session-error.js +1 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/skill-paths.d.ts +4 -5
- package/dist/src/shared/skill-paths.js +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +4 -41
- package/dist/src/shared/workflow-sandbox.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/model-output.d.ts +23 -5
- package/dist/src/tools/model-output.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/glob.js +1 -1
- package/dist/src/tools/provided/grep.js +1 -1
- package/dist/src/tools/provided/read-file.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/provided/write-file.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +19 -4
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +3 -3
- package/docs/channels/discord.mdx +279 -7
- package/docs/channels/eve.mdx +13 -2
- package/docs/channels/linq.mdx +2 -2
- package/docs/channels/mcp.mdx +2 -2
- package/docs/channels/overview.mdx +1 -1
- package/docs/channels/photon.mdx +1 -1
- package/docs/concepts/built-in-tools.md +31 -8
- package/docs/concepts/execution-model-and-durability.mdx +6 -101
- package/docs/concepts/security-model.md +2 -0
- package/docs/concepts/sessions-runs-and-streaming.md +44 -36
- package/docs/connections/openapi.mdx +2 -0
- package/docs/evals/reporters.mdx +1 -1
- package/docs/evals/running.mdx +1 -1
- package/docs/guides/client/messages.mdx +1 -1
- package/docs/guides/deployment/overview.md +4 -4
- package/docs/guides/deployment/self-hosting.md +50 -1
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/dynamic-capabilities.md +1 -1
- package/docs/guides/frontend/overview.mdx +26 -6
- package/docs/guides/instrumentation/agent-runs.mdx +16 -0
- package/docs/guides/self-modification.md +1 -1
- package/docs/guides/session-context.md +1 -1
- package/docs/instructions.mdx +1 -1
- package/docs/reference/agent-files.md +3 -3
- package/docs/reference/cli.md +7 -2
- package/docs/reference/typescript-api.md +9 -3
- package/docs/sandbox/custom-providers.mdx +254 -0
- package/docs/sandbox/default.mdx +71 -4
- package/docs/sandbox/docker.mdx +15 -3
- package/docs/sandbox/index.mdx +27 -103
- package/docs/sandbox/just-bash.mdx +54 -0
- package/docs/sandbox/meta.json +9 -1
- package/docs/sandbox/troubleshooting.mdx +215 -0
- package/docs/sandbox/vercel.mdx +48 -7
- package/docs/skills.mdx +1 -1
- package/docs/subagents/index.mdx +2 -2
- package/docs/tools/overview.mdx +19 -0
- package/docs/tools/workflows.mdx +73 -5
- package/docs/tutorial/run-analysis.mdx +2 -2
- package/package.json +14 -20
- package/dist/src/compiled/@ai-sdk/code-mode/_run.d.ts +0 -1
- package/dist/src/compiled/@ai-sdk/code-mode/index.d.ts +0 -325
- package/dist/src/compiled/@ai-sdk/code-mode/index.js +0 -660
- package/dist/src/compiled/_chunks/workflow/dist-CyBgVS7g.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-T5NnW-0k.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-DlLD3ov_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/private-tQUuwBoQ.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-DMsV_b4n.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-DPdYS_w2.js +0 -16
- package/dist/src/compiled/_chunks/workflow/sleep-BY6leHh8.js +0 -1
- package/dist/src/compiled/_chunks/workflow/workflow-routes-CwqB063q.js +0 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +0 -32
- package/dist/src/execution/sandbox/active-handles.js +0 -1
- package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/docker-session.js +0 -2
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -15
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +0 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-create.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/microsandbox-create.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -42
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +0 -29
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +0 -18
- package/dist/src/execution/sandbox/bindings/microsandbox-network.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -37
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.d.ts +0 -21
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +0 -21
- package/dist/src/execution/sandbox/bindings/microsandbox-process.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-process.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.d.ts +0 -11
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +0 -82
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +0 -16
- package/dist/src/execution/sandbox/bindings/microsandbox.js +0 -1
- package/dist/src/execution/sandbox/provider-host-development.d.ts +0 -2
- package/dist/src/execution/sandbox/provider-host-development.js +0 -1
- package/dist/src/execution/sandbox/provider-host.d.ts +0 -2
- package/dist/src/execution/sandbox/provider-host.js +0 -1
- package/dist/src/execution/tool-session/sandbox.d.ts +0 -22
- package/dist/src/execution/tool-session/sandbox.js +0 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +0 -48
- package/dist/src/public/sandbox/microsandbox-sandbox.js +0 -1
- package/dist/src/public/sandbox/microsandbox.d.ts +0 -9
- package/dist/src/public/sandbox/microsandbox.js +0 -1
- package/dist/src/sandbox/providers/microsandbox.d.ts +0 -12
- package/dist/src/sandbox/providers/microsandbox.js +0 -1
- package/docs/sandbox/microsandbox.mdx +0 -31
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
declare const runErrorSymbol: unique symbol;
|
|
2
|
+
/**
|
|
3
|
+
* Base class for errors raised by the JavaScript runtime.
|
|
4
|
+
*
|
|
5
|
+
* All package-specific errors include a stable `code` string and may include
|
|
6
|
+
* structured `details` for diagnostics.
|
|
7
|
+
*/
|
|
8
|
+
declare class RunError extends Error {
|
|
9
|
+
private readonly [runErrorSymbol];
|
|
10
|
+
/** Stable machine-readable error code. */
|
|
11
|
+
code: string;
|
|
12
|
+
/** Optional structured diagnostic details. */
|
|
13
|
+
readonly details?: unknown;
|
|
14
|
+
constructor(message: string, code?: string, details?: unknown);
|
|
15
|
+
/** Identifies `RunError` instances across duplicate package copies. */
|
|
16
|
+
static isInstance(error: unknown): error is RunError;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Raised when the caller's abort signal aborts a run invocation. */
|
|
20
|
+
declare class RunAbortedError extends RunError {
|
|
21
|
+
constructor();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Base class for failures caused by nested host function execution. */
|
|
25
|
+
declare class RunHostFunctionError extends RunError {
|
|
26
|
+
constructor(message: string, details?: unknown);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Raised when sandboxed code exceeds bridge request limits. */
|
|
30
|
+
declare class RunBridgeLimitError extends RunError {
|
|
31
|
+
constructor(message: string, details?: unknown);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Raised when the process-global worker cap has been reached.
|
|
36
|
+
*
|
|
37
|
+
* Configure the cap with `setMaxWorkers`.
|
|
38
|
+
*/
|
|
39
|
+
declare class RunConcurrencyError extends RunError {
|
|
40
|
+
constructor(maxWorkers: number);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Raised when guest JavaScript exceeds its per-invocation CPU time limit. */
|
|
44
|
+
declare class RunCpuTimeoutError extends RunError {
|
|
45
|
+
constructor(cpuTimeoutMs: number);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Raised when sandboxed code starts host bridge work and returns without
|
|
50
|
+
* awaiting or otherwise observing it.
|
|
51
|
+
*/
|
|
52
|
+
declare class RunDetachedBridgeRequestError extends RunError {
|
|
53
|
+
constructor(message: string, details?: unknown);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Raised when the main thread and worker protocol observes an invalid or
|
|
58
|
+
* mismatched message.
|
|
59
|
+
*/
|
|
60
|
+
declare class RunProtocolError extends RunError {
|
|
61
|
+
constructor(message: string, details?: unknown);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Raised when the provided source exceeds `limits.maxSourceBytes`. */
|
|
65
|
+
declare class RunSourceTooLargeError extends RunError {
|
|
66
|
+
constructor(bytes: number, maxBytes: number);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Raised when a sandbox invocation exceeds its timeout. */
|
|
70
|
+
declare class RunTimeoutError extends RunError {
|
|
71
|
+
constructor(timeoutMs: number);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A host function made available to sandboxed JavaScript.
|
|
76
|
+
*/
|
|
77
|
+
type HostFunction<ARGUMENTS extends unknown[] = unknown[], OUTPUT = unknown> = (...args: ARGUMENTS) => OUTPUT | Promise<OUTPUT>;
|
|
78
|
+
/**
|
|
79
|
+
* Context supplied to each host function invocation.
|
|
80
|
+
*/
|
|
81
|
+
interface HostFunctionContext {
|
|
82
|
+
/** Signal aborted when the run is aborted, times out, or fails. */
|
|
83
|
+
abortSignal: AbortSignal;
|
|
84
|
+
/** Stable identifier for the current run attempt. */
|
|
85
|
+
invocationId: string;
|
|
86
|
+
/** Stable identifier for the logical run across every replay attempt. */
|
|
87
|
+
logicalRunId: string;
|
|
88
|
+
/** Stable identifier for this host function request within the run attempt. */
|
|
89
|
+
requestId: string;
|
|
90
|
+
/** One-based request order within the run attempt. */
|
|
91
|
+
requestIndex: number;
|
|
92
|
+
/** Fully qualified host function path, for example `tools.search`. */
|
|
93
|
+
hostFunctionName: string;
|
|
94
|
+
/** Interrupts this host function and suspends the run. */
|
|
95
|
+
interrupt(payload: unknown): never;
|
|
96
|
+
/** Present when an interrupted host function is reinvoked during replay. */
|
|
97
|
+
resume?: HostFunctionResumeContext;
|
|
98
|
+
}
|
|
99
|
+
interface HostFunctionResumeContext {
|
|
100
|
+
interruptionId: string;
|
|
101
|
+
payload: unknown;
|
|
102
|
+
resolution: unknown;
|
|
103
|
+
}
|
|
104
|
+
/** A named collection of host functions. */
|
|
105
|
+
type HostFunctionGroup = Record<string, HostFunction<never[], unknown>>;
|
|
106
|
+
/**
|
|
107
|
+
* Host function groups installed as guest globals.
|
|
108
|
+
*
|
|
109
|
+
* A group named `tools` containing `search` is called as `tools.search()` in
|
|
110
|
+
* sandboxed code.
|
|
111
|
+
*/
|
|
112
|
+
type HostFunctions = Record<string, HostFunctionGroup>;
|
|
113
|
+
/** Host functions exposed to guest JavaScript with synchronous call semantics. */
|
|
114
|
+
type SyncHostFunctions = HostFunctions;
|
|
115
|
+
/** Native ES module resolver used by QuickJS. */
|
|
116
|
+
interface RunModuleLoader {
|
|
117
|
+
/** Stable identity authenticated by continuations that use this loader. */
|
|
118
|
+
identity?: string;
|
|
119
|
+
/** Resolve a raw specifier relative to its importing module. */
|
|
120
|
+
normalize?(specifier: string, importer: string): string | Promise<string>;
|
|
121
|
+
/** Return source code for a normalized module specifier. */
|
|
122
|
+
load(specifier: string): string | Promise<string>;
|
|
123
|
+
}
|
|
124
|
+
/** Resource limits applied to one sandbox invocation. */
|
|
125
|
+
interface RunLimits {
|
|
126
|
+
/**
|
|
127
|
+
* Wall-clock ceiling for the complete invocation, including time spent
|
|
128
|
+
* waiting on host functions, module loaders, and continuation codecs.
|
|
129
|
+
* Exceeding it fails with `RUN_TIMEOUT`.
|
|
130
|
+
*
|
|
131
|
+
* @default `30_000`
|
|
132
|
+
*/
|
|
133
|
+
timeoutMs?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Time the worker may spend running guest JavaScript in one invocation.
|
|
136
|
+
* Time spent awaiting asynchronous host functions or blocked in synchronous
|
|
137
|
+
* host functions and module loaders does not count. Each invocation,
|
|
138
|
+
* including each continuation resume, starts with a fresh budget. Exceeding
|
|
139
|
+
* it fails with `RUN_CPU_TIMEOUT`.
|
|
140
|
+
*
|
|
141
|
+
* This measures elapsed time while guest code runs, so it approximates CPU
|
|
142
|
+
* time rather than reading per-thread CPU counters. Guest time never exceeds
|
|
143
|
+
* wall time, so this limit only takes effect when it is lower than
|
|
144
|
+
* `timeoutMs`.
|
|
145
|
+
*
|
|
146
|
+
* @default `10_000`
|
|
147
|
+
*/
|
|
148
|
+
cpuTimeoutMs?: number;
|
|
149
|
+
/** @default `64 * 1024 * 1024` */
|
|
150
|
+
memoryLimitBytes?: number;
|
|
151
|
+
/** @default `2 * 1024 * 1024` */
|
|
152
|
+
maxStackSizeBytes?: number;
|
|
153
|
+
/** @default `1024 * 1024` */
|
|
154
|
+
maxResultBytes?: number;
|
|
155
|
+
/** @default `64 * 1024` */
|
|
156
|
+
maxConsoleOutputBytes?: number;
|
|
157
|
+
/** @default `256 * 1024` */
|
|
158
|
+
maxSourceBytes?: number;
|
|
159
|
+
/** @default `1024 * 1024` */
|
|
160
|
+
maxHostFunctionArgumentsBytes?: number;
|
|
161
|
+
/** @default `4 * 1024 * 1024` */
|
|
162
|
+
maxHostFunctionOutputBytes?: number;
|
|
163
|
+
/** @default `256` */
|
|
164
|
+
maxBridgeRequests?: number;
|
|
165
|
+
/** @default `32` */
|
|
166
|
+
maxInFlightBridgeRequests?: number;
|
|
167
|
+
/** @default `32 * 1024 * 1024` */
|
|
168
|
+
maxContinuationBytes?: number;
|
|
169
|
+
}
|
|
170
|
+
/** Shared defaults used by a runner. */
|
|
171
|
+
interface RunnerOptions<TOKEN = string> {
|
|
172
|
+
limits?: RunLimits;
|
|
173
|
+
/** Host functions exposed with synchronous guest call semantics. */
|
|
174
|
+
syncHostFunctions?: SyncHostFunctions;
|
|
175
|
+
/** HMAC key used for signed continuations. Cannot be combined with continuationCodec. */
|
|
176
|
+
continuationSecret?: string | Uint8Array;
|
|
177
|
+
continuationCodec?: ContinuationCodec<TOKEN>;
|
|
178
|
+
/** Authenticated application/endpoint audience for every continuation. */
|
|
179
|
+
continuationAudience?: string;
|
|
180
|
+
}
|
|
181
|
+
/** How the entry source is evaluated. */
|
|
182
|
+
type RunSourceType = 'function-body' | 'module';
|
|
183
|
+
/** Input accepted by `run` and `Runner.run`. */
|
|
184
|
+
interface RunInput<TOKEN = unknown> {
|
|
185
|
+
/**
|
|
186
|
+
* JavaScript or type-stripped TypeScript function-body source. Runtime type
|
|
187
|
+
* stripping is used when provided natively by Node or Bun, or through the
|
|
188
|
+
* optional TypeScript peer dependency on Node 20.
|
|
189
|
+
* Top-level `await` and `return` are supported.
|
|
190
|
+
*/
|
|
191
|
+
source: string;
|
|
192
|
+
/**
|
|
193
|
+
* Entry-source evaluation mode. A function body supports top-level `await`
|
|
194
|
+
* and `return`; a module supports static imports and has no return value.
|
|
195
|
+
* Defaults to `module` when `moduleLoader` is present and `function-body`
|
|
196
|
+
* otherwise.
|
|
197
|
+
*/
|
|
198
|
+
sourceType?: RunSourceType;
|
|
199
|
+
hostFunctions?: HostFunctions;
|
|
200
|
+
/**
|
|
201
|
+
* Optional native ES module loader. It enables native dynamic imports in a
|
|
202
|
+
* function body and static and dynamic imports in a module.
|
|
203
|
+
*/
|
|
204
|
+
moduleLoader?: RunModuleLoader;
|
|
205
|
+
abortSignal?: AbortSignal;
|
|
206
|
+
limits?: RunLimits;
|
|
207
|
+
continuation?: TOKEN;
|
|
208
|
+
/**
|
|
209
|
+
* Resolutions for a non-empty subset of pending interruptions. Required when
|
|
210
|
+
* resuming a continuation; interruptions without a resolution remain pending.
|
|
211
|
+
*/
|
|
212
|
+
resolutions?: RunResolution[];
|
|
213
|
+
/**
|
|
214
|
+
* Serializable tenant, principal, or policy context authenticated by a
|
|
215
|
+
* continuation and required unchanged when it is resumed.
|
|
216
|
+
*/
|
|
217
|
+
continuationContext?: unknown;
|
|
218
|
+
}
|
|
219
|
+
/** Result of a completed sandbox invocation. */
|
|
220
|
+
interface RunCompletedResult<OUTPUT = unknown> {
|
|
221
|
+
status: 'completed';
|
|
222
|
+
value: OUTPUT;
|
|
223
|
+
}
|
|
224
|
+
interface RunInterruption<PAYLOAD = unknown> {
|
|
225
|
+
id: string;
|
|
226
|
+
hostFunctionName: string;
|
|
227
|
+
/** Complete guest argument list for the interrupted host function call. */
|
|
228
|
+
arguments: unknown[];
|
|
229
|
+
payload: PAYLOAD;
|
|
230
|
+
}
|
|
231
|
+
interface RunInterruptedResult<TOKEN = unknown> {
|
|
232
|
+
status: 'interrupted';
|
|
233
|
+
interruptions: RunInterruption[];
|
|
234
|
+
/** Opaque bearer capability. Persist it without modifying it. */
|
|
235
|
+
continuation: TOKEN;
|
|
236
|
+
}
|
|
237
|
+
interface RunResolution<VALUE = unknown> {
|
|
238
|
+
interruptionId: string;
|
|
239
|
+
value: VALUE;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Result of a sandbox invocation.
|
|
243
|
+
*/
|
|
244
|
+
type RunResult<OUTPUT = unknown, TOKEN = unknown> = RunCompletedResult<OUTPUT> | RunInterruptedResult<TOKEN>;
|
|
245
|
+
interface ContinuationCodec<TOKEN = unknown> {
|
|
246
|
+
encode(state: RunContinuationState, context?: ContinuationOperationContext): TOKEN | Promise<TOKEN>;
|
|
247
|
+
decode(token: TOKEN, context?: ContinuationOperationContext): RunContinuationState | Promise<RunContinuationState>;
|
|
248
|
+
/**
|
|
249
|
+
* Optionally acquires a continuation for validation before consuming it.
|
|
250
|
+
* The runtime commits valid continuations and rolls back failed or cancelled
|
|
251
|
+
* decode attempts.
|
|
252
|
+
*/
|
|
253
|
+
decodeTransaction?(token: TOKEN, context?: ContinuationOperationContext): ContinuationDecodeTransaction | Promise<ContinuationDecodeTransaction>;
|
|
254
|
+
}
|
|
255
|
+
interface ContinuationDecodeTransaction {
|
|
256
|
+
state: RunContinuationState;
|
|
257
|
+
commit(): void | Promise<void>;
|
|
258
|
+
rollback(): void | Promise<void>;
|
|
259
|
+
}
|
|
260
|
+
interface ContinuationOperationContext {
|
|
261
|
+
abortSignal: AbortSignal;
|
|
262
|
+
deadlineMs: number;
|
|
263
|
+
}
|
|
264
|
+
/** Serializable replay state passed to a configured continuation codec. */
|
|
265
|
+
interface RunContinuationState {
|
|
266
|
+
version: 2;
|
|
267
|
+
runtime: 'run-replay-v2';
|
|
268
|
+
/** Present for workflows using aggregate attempt accounting; absent on legacy state. */
|
|
269
|
+
bridgeRequestLimits?: {
|
|
270
|
+
maxBridgeRequests: number;
|
|
271
|
+
maxHostFunctionArgumentsBytes: number;
|
|
272
|
+
};
|
|
273
|
+
serde: 'run-js-v1';
|
|
274
|
+
source: string;
|
|
275
|
+
logicalRunId: string;
|
|
276
|
+
scopeHash: string;
|
|
277
|
+
determinism: RunDeterminismState;
|
|
278
|
+
ledger: RunLedgerEntry[];
|
|
279
|
+
}
|
|
280
|
+
interface RunDeterminismState {
|
|
281
|
+
/** Initial Unix timestamp used by deterministic guest date APIs. */
|
|
282
|
+
dateNowMs: number;
|
|
283
|
+
/** 128-bit seed used by deterministic guest `Math.random()`. */
|
|
284
|
+
randomSeed: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* One recorded host function outcome in a continuation ledger.
|
|
288
|
+
*
|
|
289
|
+
* The `bindingName` property name is part of the persisted continuation wire
|
|
290
|
+
* format and must remain stable across package releases.
|
|
291
|
+
*/
|
|
292
|
+
type RunLedgerEntry = {
|
|
293
|
+
bindingName: string;
|
|
294
|
+
inputJson: string;
|
|
295
|
+
status: 'fulfilled';
|
|
296
|
+
settledOrder: number;
|
|
297
|
+
dateNowMs: number;
|
|
298
|
+
valueJson: string;
|
|
299
|
+
} | {
|
|
300
|
+
bindingName: string;
|
|
301
|
+
inputJson: string;
|
|
302
|
+
status: 'rejected';
|
|
303
|
+
settledOrder: number;
|
|
304
|
+
dateNowMs: number;
|
|
305
|
+
error: SerializableError;
|
|
306
|
+
} | {
|
|
307
|
+
bindingName: string;
|
|
308
|
+
inputJson: string;
|
|
309
|
+
status: 'interrupted';
|
|
310
|
+
interruptionId: string;
|
|
311
|
+
payloadJson: string;
|
|
312
|
+
} | {
|
|
313
|
+
bridgeKind: 'sync-host' | 'module-normalize' | 'module-load';
|
|
314
|
+
bindingName: string;
|
|
315
|
+
inputJson: string;
|
|
316
|
+
status: 'fulfilled';
|
|
317
|
+
valueJson: string;
|
|
318
|
+
} | {
|
|
319
|
+
bridgeKind: 'sync-host' | 'module-normalize' | 'module-load';
|
|
320
|
+
bindingName: string;
|
|
321
|
+
inputJson: string;
|
|
322
|
+
status: 'rejected';
|
|
323
|
+
error: SerializableError;
|
|
324
|
+
};
|
|
325
|
+
/** Configured JavaScript runner. */
|
|
326
|
+
interface Runner<TOKEN = unknown> {
|
|
327
|
+
run<OUTPUT = unknown>(input: RunInput<TOKEN>): Promise<RunResult<OUTPUT, TOKEN>>;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
interface SignedContinuationCodecOptions {
|
|
331
|
+
/** Primary HMAC key used for new tokens and verification. */
|
|
332
|
+
secret: string | Uint8Array;
|
|
333
|
+
/** Previous HMAC keys accepted only for verification during key rotation. */
|
|
334
|
+
verificationSecrets?: (string | Uint8Array)[];
|
|
335
|
+
maxAgeMs?: number;
|
|
336
|
+
maxTokenBytes?: number;
|
|
337
|
+
/** Allowed positive clock skew for issued-at validation. @defaultValue `60_000` */
|
|
338
|
+
clockSkewMs?: number;
|
|
339
|
+
}
|
|
340
|
+
interface ContinuationStorage {
|
|
341
|
+
set(key: string, value: StoredContinuation, context?: ContinuationOperationContext): void | Promise<void>;
|
|
342
|
+
/**
|
|
343
|
+
* Atomically claims a continuation without removing it. Claims must become
|
|
344
|
+
* available again after a bounded interval if neither consume nor release runs.
|
|
345
|
+
*/
|
|
346
|
+
acquire(key: string, claimId: string, context?: ContinuationOperationContext): StoredContinuation | undefined | Promise<StoredContinuation | undefined>;
|
|
347
|
+
/** Atomically removes a continuation only when its claim identifier matches. */
|
|
348
|
+
consume(key: string, claimId: string): void | Promise<void>;
|
|
349
|
+
/** Atomically releases a continuation only when its claim identifier matches. */
|
|
350
|
+
release(key: string, claimId: string): void | Promise<void>;
|
|
351
|
+
}
|
|
352
|
+
interface StoredContinuation {
|
|
353
|
+
state: RunContinuationState;
|
|
354
|
+
expiresAtMs: number;
|
|
355
|
+
}
|
|
356
|
+
declare const createSignedContinuationCodec: (options: SignedContinuationCodecOptions) => ContinuationCodec<string>;
|
|
357
|
+
declare const createStoredContinuationCodec: ({ storage, maxAgeMs, }: {
|
|
358
|
+
storage: ContinuationStorage;
|
|
359
|
+
maxAgeMs?: number;
|
|
360
|
+
}) => ContinuationCodec<string>;
|
|
361
|
+
|
|
362
|
+
/** Creates a runner with shared defaults. */
|
|
363
|
+
declare const createRunner: <TOKEN = string>(options?: RunnerOptions<TOKEN>) => Runner<TOKEN>;
|
|
364
|
+
/** Executes JavaScript in a fresh, hardened QuickJS context. */
|
|
365
|
+
declare const run: <OUTPUT = unknown>(input: RunInput<string>) => Promise<RunResult<OUTPUT, string>>;
|
|
366
|
+
|
|
367
|
+
/** Returns the context for the currently executing host function. */
|
|
368
|
+
declare const getHostFunctionContext: () => HostFunctionContext;
|
|
369
|
+
|
|
370
|
+
/** Returns whether a value is an interrupted run result. */
|
|
371
|
+
declare const isRunInterruptedResult: (value: unknown) => value is RunInterruptedResult<unknown>;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Sets the process-global maximum number of active run workers.
|
|
375
|
+
*
|
|
376
|
+
* Pass `undefined` or call without an argument to restore the dynamic
|
|
377
|
+
* memory-based default. The default admits at least one invocation and admits
|
|
378
|
+
* additional workers only when available memory can cover another worker.
|
|
379
|
+
*
|
|
380
|
+
* @param maxWorkers - Positive integer worker cap, or `undefined` to reset.
|
|
381
|
+
*/
|
|
382
|
+
declare const setMaxWorkers: (maxWorkers?: number) => void;
|
|
383
|
+
|
|
384
|
+
export { type ContinuationCodec, type ContinuationDecodeTransaction, type ContinuationOperationContext, type ContinuationStorage, type HostFunction, type HostFunctionContext, type HostFunctionGroup, type HostFunctionResumeContext, type HostFunctions, RunAbortedError, RunBridgeLimitError, type RunCompletedResult, RunConcurrencyError, type RunContinuationState, RunCpuTimeoutError, RunDetachedBridgeRequestError, RunError, RunHostFunctionError, type RunInput, type RunInterruptedResult, type RunInterruption, type RunLedgerEntry, type RunLimits, type RunModuleLoader, RunProtocolError, type RunResolution, type RunResult, RunSourceTooLargeError, type RunSourceType, RunTimeoutError, type Runner, type RunnerOptions, type SignedContinuationCodecOptions, type StoredContinuation, type SyncHostFunctions, createRunner, createSignedContinuationCodec, createStoredContinuationCodec, getHostFunctionContext, isRunInterruptedResult, run, setMaxWorkers };
|