eve 0.65.0 → 0.66.1
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 +40 -0
- package/README.md +1 -2
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/channel/forwarded-principal.d.ts +26 -6
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/chunks/{use-eve-agent-BIouJCii.js → use-eve-agent-Di1u2zKu.js} +266 -5
- package/dist/src/chunks/{use-eve-agent-BRvEh9sO.js → use-eve-agent-PbSMyJ6e.js} +266 -5
- package/dist/src/cli/commands/extension-build.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +2 -1
- package/dist/src/cli/commands/registry-project.js +2 -2
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/trace-detail.d.ts +5 -25
- package/dist/src/cli/commands/trace-detail.js +1 -1
- package/dist/src/cli/commands/trace.js +2 -2
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +36 -0
- package/dist/src/cli/dev/tui/argument-typeahead.js +2 -0
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +3 -0
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +5 -9
- package/dist/src/cli/dev/tui/setup-commands.js +1 -2
- package/dist/src/cli/dev/tui/setup-flow.d.ts +0 -3
- package/dist/src/cli/dev/tui/setup-panel.d.ts +14 -0
- package/dist/src/cli/dev/tui/setup-panel.js +4 -4
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +2 -10
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -0
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -11
- package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/vercel-trusted-sources-policy.d.ts +1 -1
- package/dist/src/cli/dev/tui/vercel-trusted-sources.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/invoke/result.js +1 -1
- package/dist/src/cli/telemetry/preference.js +1 -1
- package/dist/src/client/client-error.js +1 -1
- package/dist/src/client/index.d.ts +1 -3
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/open-stream.d.ts +3 -2
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session.d.ts +16 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +4 -2
- package/dist/src/compiled/@agentclientprotocol/sdk/index.js +2 -51
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +4 -4
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@cfworker/json-schema/index.d.ts +18 -0
- package/dist/src/compiled/@cfworker/json-schema/index.js +2 -0
- package/dist/src/compiled/@modelcontextprotocol/server/index.js +9 -58
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
- package/dist/src/compiled/@opentelemetry/otlp-transformer/index.js +1 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +55 -55
- package/dist/src/compiled/@vercel/blob/index.js +14 -36
- package/dist/src/compiled/@vercel/oidc/index.js +6 -28
- package/dist/src/compiled/@vercel/otel/index.js +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
- package/dist/src/compiled/@vercel/sdk/LICENSE +201 -0
- package/dist/src/compiled/@vercel/sdk/index.d.ts +41 -0
- package/dist/src/compiled/@vercel/sdk/index.js +1 -0
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/client/core-CspsxXR-.js +52 -0
- package/dist/src/compiled/_chunks/client/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/dist/src/compiled/_chunks/node/auth-Dztlx9pE.js +2 -0
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DFx4eluc.js → attribute-changes-89Nwz7XW.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{chunk-5MU5Z6L3-CrYztnvh.js → chunk-5MU5Z6L3-z9-dfnHp.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{chunk-NWCAEW5Y-ClfmNvkQ.js → chunk-NWCAEW5Y-8afLJrun.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{dist-C3919PVU.js → dist-C3ZE62yI.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/dist-CNT2vjZ4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{dist-xTushGCp.js → dist-DtXwQbZr.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{esm-DyLz8Egm.js → esm-DtrPCf49.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{experimental-evaluation-D8_K_Pe9.js → experimental-evaluation-Dm32egEG.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/frames-DnrfSd1P.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{functions-C06vHfWP.js → functions-DpZiBxgQ.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-bsd-WEBNKY2R-DcIEvZzd.js → getMachineId-bsd-WEBNKY2R-D5OkV-EY.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-darwin-LT47KAXP-C4nRhfn9.js → getMachineId-darwin-LT47KAXP-BqwKrkSO.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-linux-LTVQO6VW-BqQf2T4W.js → getMachineId-linux-LTVQO6VW-CJlbJ4KP.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-unsupported-UKWBA27G-oYffWhib.js → getMachineId-unsupported-UKWBA27G-C4Y3-LZG.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-win-NLJKOPY6-CpL96LtN.js → getMachineId-win-NLJKOPY6-CsPs71SE.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{global-DFW-hO6M.js → global-DIlFoH2w.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{helpers-Bw52uyzw.js → helpers-k3zcudWr.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{logger-DFNCa8Nl.js → logger-Bzc8jWWj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BmJ263ZR.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{rolldown-runtime-DPpTSio4.js → rolldown-runtime-B_knIduE.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{run-BT6SQv5f.js → run-NLvREued.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{serialization-Cl0SYU0I.js → serialization-HCDeQWcR.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{signal-exit-B9U6kH7R.js → signal-exit-DZKTacNU.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-Bi508qmg.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{token-CrFhCmWs.js → token-1wSBbi5N.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-U5XEWlVM.js → token-BhlnqoHM.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-util-BkqzD0OM.js → token-util-Cm4Ec1Bg.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/token-util-DaeRTzDa.js +5 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-Dzhr6tzf.js → wait-until-DXLZx3tU.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{wrapper-CKui_eTd.js → wrapper-CzrF_dmI.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/ws-transport-BSM_Cl7a.js +1 -0
- package/dist/src/compiled/jose/index.js +1 -1
- package/dist/src/compiled/zod/index.js +1 -51
- package/dist/src/compiled/zod/v3.js +1 -0
- package/dist/src/compiled/zod/v4/core.js +1 -0
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +20 -14
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/build-base-tool-context.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +3 -3
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +18 -4
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/session-context.d.ts +5 -4
- package/dist/src/evals/session.d.ts +3 -2
- package/dist/src/evals/session.js +1 -1
- package/dist/src/evals/types.d.ts +8 -2
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +12 -4
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/route-child-delivery.js +2 -2
- package/dist/src/execution/sandbox/bindings/docker-templates.d.ts +6 -0
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.d.ts +6 -2
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +7 -2
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +6 -2
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +6 -3
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +2 -2
- package/dist/src/execution/sandbox/provider-host.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +5 -2
- package/dist/src/execution/sandbox/session.js +1 -1
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/event-sink.d.ts +7 -13
- package/dist/src/execution/session/event-sink.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +2 -2
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +12 -10
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +3 -1
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +7 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/skills/instructions.d.ts +6 -8
- package/dist/src/execution/skills/instructions.js +2 -2
- package/dist/src/execution/tasks/parent/control-shared.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +1 -0
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -2
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/ask-question.d.ts +17 -18
- package/dist/src/execution/tools/ask-question.js +2 -2
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/load-skill.d.ts +9 -5
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/sleep.d.ts +8 -9
- package/dist/src/execution/tools/sleep.js +1 -1
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +2 -1
- package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/extensions/code/extension/extension.d.ts +57 -0
- package/dist/src/extensions/code/extension/extension.js +1 -0
- package/dist/src/extensions/code/extension/hooks/authenticate.d.ts +2 -0
- package/dist/src/extensions/code/extension/hooks/authenticate.js +1 -0
- package/dist/src/extensions/code/extension/instructions.md +87 -0
- package/dist/src/extensions/code/extension/lib/command-failure.d.ts +7 -0
- package/dist/src/extensions/code/extension/lib/command-failure.js +2 -0
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +14 -0
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +1309 -0
- package/dist/src/extensions/code/extension/lib/computer-use-sandbox.d.ts +9 -0
- package/dist/src/extensions/code/extension/lib/computer-use-sandbox.js +120 -0
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +36 -0
- package/dist/src/extensions/code/extension/lib/computer-use.js +78 -0
- package/dist/src/extensions/code/extension/lib/connect-authentication.d.ts +7 -0
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -0
- package/dist/src/extensions/code/extension/lib/credentials.d.ts +13 -0
- package/dist/src/extensions/code/extension/lib/credentials.js +3 -0
- package/dist/src/extensions/code/extension/lib/diagnostics.d.ts +30 -0
- package/dist/src/extensions/code/extension/lib/diagnostics.js +6 -0
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +18 -0
- package/dist/src/extensions/code/extension/lib/generated-paths.js +2 -0
- package/dist/src/extensions/code/extension/lib/github-shell-schema.d.ts +11 -0
- package/dist/src/extensions/code/extension/lib/github-shell-schema.js +1 -0
- package/dist/src/extensions/code/extension/lib/github-shell.d.ts +53 -0
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -0
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +61 -0
- package/dist/src/extensions/code/extension/lib/grep-search.js +6 -0
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +25 -0
- package/dist/src/extensions/code/extension/lib/guidelines.js +2 -0
- package/dist/src/extensions/code/extension/lib/patch.d.ts +35 -0
- package/dist/src/extensions/code/extension/lib/patch.js +20 -0
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +70 -0
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -0
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +27 -0
- package/dist/src/extensions/code/extension/lib/prwatch-registry.js +1 -0
- package/dist/src/extensions/code/extension/lib/prwatch.d.ts +2 -0
- package/dist/src/extensions/code/extension/lib/prwatch.js +1 -0
- package/dist/src/extensions/code/extension/lib/repository-root.d.ts +4 -0
- package/dist/src/extensions/code/extension/lib/repository-root.js +1 -0
- package/dist/src/extensions/code/extension/lib/sandbox.d.ts +12 -0
- package/dist/src/extensions/code/extension/lib/sandbox.js +2 -0
- package/dist/src/extensions/code/extension/lib/shell.d.ts +1 -0
- package/dist/src/extensions/code/extension/lib/shell.js +1 -0
- package/dist/src/extensions/code/extension/lib/signed-commit.d.ts +2 -0
- package/dist/src/extensions/code/extension/lib/signed-commit.js +130 -0
- package/dist/src/extensions/code/extension/lib/tooling.d.ts +27 -0
- package/dist/src/extensions/code/extension/lib/tooling.js +92 -0
- package/dist/src/extensions/code/extension/skills/investigate/SKILL.md +30 -0
- package/dist/src/extensions/code/extension/skills/lookup-agent-run/SKILL.md +29 -0
- package/dist/src/extensions/code/extension/skills/pr/SKILL.md +53 -0
- package/dist/src/extensions/code/extension/skills/review/SKILL.md +21 -0
- package/dist/src/extensions/code/extension/subagents/worker/agent.d.ts +17 -0
- package/dist/src/extensions/code/extension/subagents/worker/agent.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/instructions.md +20 -0
- package/dist/src/extensions/code/extension/subagents/worker/sandbox.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/sandbox.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/glob.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/glob.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/grep.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/grep.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/read_file.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/read_file.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_fetch.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_fetch.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_search.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_search.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/write_file.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/write_file.js +1 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.d.ts +28 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.js +2 -0
- package/dist/src/extensions/code/extension/tools/computer_use.d.ts +400 -0
- package/dist/src/extensions/code/extension/tools/computer_use.js +1 -0
- package/dist/src/extensions/code/extension/tools/gh.d.ts +27 -0
- package/dist/src/extensions/code/extension/tools/gh.js +1 -0
- package/dist/src/extensions/code/extension/tools/grep.d.ts +28 -0
- package/dist/src/extensions/code/extension/tools/grep.js +1 -0
- package/dist/src/extensions/code/tools.d.ts +4 -0
- package/dist/src/extensions/code/tools.js +1 -0
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/final-output.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +2 -2
- package/dist/src/harness/workflow-tool-runs.d.ts +33 -5
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/internal/application/optional-package-import.d.ts +9 -0
- package/dist/src/internal/application/optional-package-import.js +1 -0
- package/dist/src/internal/application/optional-package-install.d.ts +1 -5
- package/dist/src/internal/application/optional-package-install.js +2 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.js +1 -1
- package/dist/src/internal/nitro/host/extension-build-lock.d.ts +9 -0
- package/dist/src/internal/nitro/host/extension-build-lock.js +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +5 -4
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +2 -2
- package/dist/src/internal/nitro/host/workspace-extensions.d.ts +31 -0
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.7/node_modules/@vercel/cli-config/dist/index.js +21 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/authorization.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/connector.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/installation.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/base-url.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/default-scopes.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/env.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/url-validation.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/auth-errors.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-context.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/oauth.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-error.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-io.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-util.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/version.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +2 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +1 -0
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +1 -0
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +1 -0
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +1 -0
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +1 -0
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +1 -0
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +1 -0
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +1 -0
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +1 -0
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +1 -0
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +1 -0
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +1 -0
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +2 -0
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +1 -0
- package/dist/src/public/channels/github/checkout.d.ts +7 -2
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/github/defaults.js +1 -1
- package/dist/src/public/channels/slack/api-errors.d.ts +33 -0
- package/dist/src/public/channels/slack/api-errors.js +1 -0
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/next/index.d.ts +10 -7
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +3 -0
- package/dist/src/public/next/server.js +2 -2
- package/dist/src/public/sandbox/docker.d.ts +7 -0
- package/dist/src/public/sandbox/index.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox.d.ts +7 -0
- package/dist/src/public/sandbox/vercel.d.ts +7 -0
- package/dist/src/public/skills/index.d.ts +1 -2
- package/dist/src/runtime/connections/mcp-client.d.ts +0 -7
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +0 -3
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/workspace/seed-files.js +1 -1
- package/dist/src/sandbox/providers/docker.d.ts +4 -4
- package/dist/src/sandbox/providers/just-bash.d.ts +2 -2
- package/dist/src/sandbox/providers/microsandbox.d.ts +4 -4
- package/dist/src/sandbox/providers/vercel.d.ts +4 -3
- package/dist/src/sandbox/state.d.ts +2 -0
- package/dist/src/self-modification/config.d.ts +6 -0
- package/dist/src/self-modification/extension/config-schema.d.ts +25 -0
- package/dist/src/self-modification/extension/config-schema.js +1 -0
- package/dist/src/self-modification/extension/extension.d.ts +3 -47
- package/dist/src/self-modification/extension/extension.js +1 -1
- package/dist/src/self-modification/extension/local-only.d.ts +5 -0
- package/dist/src/self-modification/extension/local-only.js +1 -0
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +6 -6
- package/dist/src/self-modification/extension/subagents/agent/skills/trace_analysis.d.ts +10 -0
- package/dist/src/self-modification/extension/subagents/agent/skills/trace_analysis.js +19 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace.d.ts +128 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace.js +1 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace_spans.d.ts +80 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace_spans.js +1 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.d.ts +53 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -0
- package/dist/src/self-modification/extension/trace-inspection.d.ts +15 -0
- package/dist/src/self-modification/extension/trace-inspection.js +1 -0
- package/dist/src/self-modification/git-workspace.d.ts +5 -1
- package/dist/src/self-modification/git.d.ts +5 -1
- package/dist/src/self-modification/sandbox.js +1 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/services/dev-client/request-headers.js +1 -1
- package/dist/src/setup/ask.d.ts +2 -0
- package/dist/src/setup/ask.js +1 -1
- package/dist/src/setup/cli/option-row.d.ts +3 -1
- package/dist/src/setup/cli/option-row.js +1 -1
- package/dist/src/setup/flows/model-login.d.ts +4 -0
- package/dist/src/setup/flows/model-login.js +1 -1
- package/dist/src/setup/flows/model.d.ts +0 -108
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/integrations/discord/api.js +1 -1
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/integrations/web/setup.d.ts +15 -10
- package/dist/src/setup/integrations/web/setup.js +30 -1
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/create/web-template.d.ts +7 -3
- package/dist/src/setup/scaffold/create/web-template.js +39 -20
- package/dist/src/setup/scaffold/update/channels.js +2 -2
- package/dist/src/setup/slack-connect.d.ts +1 -1
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/vercel-api-failure.js +1 -1
- package/dist/src/setup/vercel-deployment.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project-api.js +1 -1
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/connection-types.d.ts +0 -2
- package/dist/src/shared/sandbox-network-policy.d.ts +5 -4
- package/dist/src/shared/sandbox-session.d.ts +0 -15
- package/dist/src/shared/skill-package.d.ts +3 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/subagents/parent-notification.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.d.ts +1 -0
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/delivery-context.js +2 -2
- package/dist/src/tasks/json.d.ts +72 -2
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tasks/notification.d.ts +6 -0
- package/dist/src/tasks/notification.js +1 -1
- package/dist/src/tools/framework/agent-contract.d.ts +7 -6
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +4 -13
- package/dist/src/tools/framework/task-cancel.d.ts +1 -17
- package/dist/src/tools/framework/task-contract.d.ts +16 -137
- package/dist/src/tools/framework/task-contract.js +1 -1
- package/dist/src/tools/provided/bash.d.ts +11 -12
- package/dist/src/tools/provided/bash.js +1 -1
- package/dist/src/tools/provided/glob.d.ts +13 -14
- package/dist/src/tools/provided/glob.js +1 -1
- package/dist/src/tools/provided/grep.d.ts +17 -18
- package/dist/src/tools/provided/grep.js +1 -1
- package/dist/src/tools/provided/read-file.d.ts +14 -15
- package/dist/src/tools/provided/read-file.js +1 -1
- package/dist/src/tools/provided/web-fetch.d.ts +13 -18
- package/dist/src/tools/provided/web-fetch.js +1 -1
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/provided/write-file.d.ts +10 -11
- package/dist/src/tools/provided/write-file.js +1 -1
- package/dist/src/tools/schema.d.ts +40 -10
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/local-trace-analysis.d.ts +51 -0
- package/dist/src/tracing/local-trace-analysis.js +1 -0
- package/dist/src/tracing/local-trace-discovery-index.d.ts +15 -0
- package/dist/src/tracing/local-trace-discovery-index.js +1 -0
- package/dist/src/tracing/local-trace-operations.d.ts +13 -0
- package/dist/src/tracing/local-trace-operations.js +1 -0
- package/dist/src/tracing/local-trace-query.d.ts +17 -0
- package/dist/src/tracing/local-trace-query.js +1 -0
- package/dist/src/tracing/local-trace-span-processor.js +1 -1
- package/dist/src/tracing/local-trace-summary.d.ts +31 -0
- package/dist/src/tracing/local-trace-summary.js +1 -0
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +1 -1
- package/docs/channels/slack.mdx +1 -1
- package/docs/concepts/project-structure.mdx +2 -4
- package/docs/concepts/sessions-runs-and-streaming.md +2 -2
- package/docs/connections/overview.mdx +1 -1
- package/docs/evals/cases.mdx +1 -0
- package/docs/extensions.md +7 -1
- package/docs/getting-started.mdx +1 -1
- package/docs/guides/auth-and-route-protection.md +33 -1
- package/docs/guides/client/streaming.mdx +26 -0
- package/docs/guides/deployment/vercel.mdx +9 -5
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/dynamic-capabilities.md +2 -0
- package/docs/guides/frontend/nextjs.mdx +20 -7
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/guides/hooks.md +6 -3
- package/docs/guides/instrumentation/agent-runs.mdx +101 -0
- package/docs/guides/instrumentation/instrumentation.mdx +2 -1
- package/docs/guides/instrumentation/meta.json +1 -1
- package/docs/guides/instrumentation/migration.md +5 -1
- package/docs/guides/instrumentation/otel.mdx +8 -27
- package/docs/guides/remote-agents.md +3 -1
- package/docs/guides/self-modification.md +37 -0
- package/docs/guides/session-context.md +11 -13
- package/docs/install-integrations.mdx +2 -2
- package/docs/meta.json +1 -0
- package/docs/reference/cli.md +2 -2
- package/docs/reference/typescript-api.md +1 -2
- package/docs/sandbox/index.mdx +11 -0
- package/docs/skills.mdx +3 -10
- package/docs/subagents/index.mdx +9 -3
- package/docs/tools/overview.mdx +7 -1
- package/docs/tools/workflows.mdx +1 -1
- package/package.json +30 -1
- package/dist/src/cli/dev/tui/model-picker.d.ts +0 -50
- package/dist/src/cli/dev/tui/model-picker.js +0 -1
- package/dist/src/compiled/_chunks/client/errors-Cd0_QQdM.js +0 -2
- package/dist/src/compiled/_chunks/node/auth-DDrvYko5.js +0 -2
- package/dist/src/compiled/_chunks/node/schemas-g-rLPCNX.js +0 -50
- package/dist/src/compiled/_chunks/workflow/coerce-D0oqvQ_w.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-DjECvUyK.js +0 -2
- package/dist/src/compiled/_chunks/workflow/frames-D_Q-7A1N.js +0 -3
- package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +0 -1
- package/dist/src/compiled/_chunks/workflow/schemas-4CmFgxN_.js +0 -50
- package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +0 -1
- package/dist/src/compiled/_chunks/workflow/token-util-pP4KRRl0.js +0 -27
- package/dist/src/compiled/_chunks/workflow/ws-transport-BpTMh40s.js +0 -1
- package/dist/src/internal/nitro/host/dev-workspace-extensions.d.ts +0 -18
- package/dist/src/internal/nitro/host/dev-workspace-extensions.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/lib/primitives.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/lib/schemas.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/aclaction.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/sdkvalidationerror.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/updateprojectblock.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/updateprojectprojectsbranchmatcher.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/defaultToZeroValue.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/fp.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/primitives.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/rfcdate.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/smartUnion.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/unrecognized.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/ZodError.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/external.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/errorUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/parseUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/util.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/locales/en.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/types.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/checks.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/coerce.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/compat.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/deep-partial.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/external.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/from-json-schema.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/in-out.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/iso.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/schemas.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/checks.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/compile.js +0 -2
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/doc.js +0 -3
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-generator.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/memoizer.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/regexes.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/registries.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/schemas.js +0 -46
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js +0 -3
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/versions.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/visit.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ar.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/az.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/be.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/bg.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/bn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ca.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ckb.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/cs.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/da.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/de.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/el.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/eo.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/es.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fa.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fr-CA.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/gu.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/he.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hu.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hy.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/id.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/is.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/it.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ja.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ka.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/kh.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/km.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/kn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ko.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/lt.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/mk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ms.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ne.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/nl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/nn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/no.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ota.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ps.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pt-BR.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pt.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ro.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ru.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sv.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ta.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/th.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/tk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/tr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ua.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/uk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ur.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/uz.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/vi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/yo.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/zh-CN.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/zh-TW.js +0 -1
- package/dist/src/runtime/skills/sandbox-access.d.ts +0 -22
- package/dist/src/runtime/skills/sandbox-access.js +0 -1
- package/dist/src/shared/skill-types.d.ts +0 -22
- package/dist/src/shared/skill-types.js +0 -1
- package/dist/src/tasks/session-task-cohorts.d.ts +0 -7
- package/dist/src/tasks/session-task-cohorts.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeBashOnSandbox}from"#execution/sandbox/bash.js";const BASH_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{command:{type:`string`,description:`The shell command to execute.`}},required:[`command`],additionalProperties:!1}),BASH_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{exitCode:{type:`number`},stderr:{type:`string`},stdout:{type:`string`},truncated:{type:`boolean`}},required:[`exitCode`,`stderr`,`stdout`,`truncated`],additionalProperties:!1}),bash=defineTool({label:{start:e=>toolLabel(`Run`,e.command)},description:`Execute a shell command in the shared workspace environment.`,async execute(e,t){return await executeBashOnSandbox(await t.getSandbox(),e)},inputSchema:BASH_INPUT_SCHEMA,outputSchema:BASH_OUTPUT_SCHEMA});export{BASH_INPUT_SCHEMA,BASH_OUTPUT_SCHEMA,bash,bash as default};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import { type ToolDefinition } from "#tools/definition.js";
|
|
2
|
+
export interface GlobToolInput {
|
|
3
|
+
limit?: number;
|
|
4
|
+
path?: string;
|
|
5
|
+
pattern: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GlobToolOutput {
|
|
8
|
+
content: string;
|
|
9
|
+
count: number;
|
|
10
|
+
path: string;
|
|
11
|
+
truncated: boolean;
|
|
12
|
+
}
|
|
3
13
|
/**
|
|
4
14
|
* Input schema for the provided `glob` tool.
|
|
5
15
|
*/
|
|
6
|
-
export declare const GLOB_INPUT_SCHEMA:
|
|
7
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
path: z.ZodOptional<z.ZodString>;
|
|
9
|
-
pattern: z.ZodString;
|
|
10
|
-
}, z.core.$strict>;
|
|
16
|
+
export declare const GLOB_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<GlobToolInput, GlobToolInput>;
|
|
11
17
|
/**
|
|
12
18
|
* Output schema for the provided `glob` tool.
|
|
13
19
|
*/
|
|
14
|
-
export declare const GLOB_OUTPUT_SCHEMA:
|
|
15
|
-
content: z.ZodString;
|
|
16
|
-
count: z.ZodNumber;
|
|
17
|
-
path: z.ZodString;
|
|
18
|
-
truncated: z.ZodBoolean;
|
|
19
|
-
}, z.core.$strict>;
|
|
20
|
-
export type GlobToolInput = z.infer<typeof GLOB_INPUT_SCHEMA>;
|
|
21
|
-
export type GlobToolOutput = z.infer<typeof GLOB_OUTPUT_SCHEMA>;
|
|
20
|
+
export declare const GLOB_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<GlobToolOutput, GlobToolOutput>;
|
|
22
21
|
/**
|
|
23
22
|
* Framework-owned executor that delegates to the default sandbox.
|
|
24
23
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeGlobOnSandbox}from"#execution/sandbox/glob-tool.js";const GLOB_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{limit:{type:`integer`,minimum:1,maximum:1e3,description:`Maximum number of results to return. Defaults to 100.`},path:{type:`string`,description:`The directory to search in. Defaults to /workspace. Must be an absolute path or begin with $HOME/. Omit to use the default.`},pattern:{type:`string`,description:`The glob pattern to match files against (e.g. "**/*.ts", "src/**/*.js").`}},required:[`pattern`],additionalProperties:!1}),GLOB_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{content:{type:`string`},count:{type:`integer`},path:{type:`string`},truncated:{type:`boolean`}},required:[`content`,`count`,`path`,`truncated`],additionalProperties:!1}),glob=defineTool({label:{start:e=>toolLabel(`Find`,e.pattern)},description:[`Fast file pattern matching tool that works with any codebase size.`,``,`Usage:`,`- Supports glob patterns like "**/*.js" or "src/**/*.ts".`,`- Returns matching file paths.`,`- Call this tool in parallel when you know there are multiple patterns to search for.`].join(`
|
|
2
2
|
`),async execute(e,t){return await executeGlobOnSandbox(await t.getSandbox(),e)},inputSchema:GLOB_INPUT_SCHEMA,outputSchema:GLOB_OUTPUT_SCHEMA});export{GLOB_INPUT_SCHEMA,GLOB_OUTPUT_SCHEMA,glob as default,glob};
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import { type ToolDefinition } from "#tools/definition.js";
|
|
2
|
+
export interface GrepToolInput {
|
|
3
|
+
context?: number;
|
|
4
|
+
glob?: string;
|
|
5
|
+
ignoreCase?: boolean;
|
|
6
|
+
limit?: number;
|
|
7
|
+
literal?: boolean;
|
|
8
|
+
path?: string;
|
|
9
|
+
pattern: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GrepToolOutput {
|
|
12
|
+
content: string;
|
|
13
|
+
matchCount: number;
|
|
14
|
+
path: string;
|
|
15
|
+
truncated: boolean;
|
|
16
|
+
}
|
|
3
17
|
/**
|
|
4
18
|
* Input schema for the provided `grep` tool.
|
|
5
19
|
*/
|
|
6
|
-
export declare const GREP_INPUT_SCHEMA:
|
|
7
|
-
context: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
glob: z.ZodOptional<z.ZodString>;
|
|
9
|
-
ignoreCase: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
literal: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
path: z.ZodOptional<z.ZodString>;
|
|
13
|
-
pattern: z.ZodString;
|
|
14
|
-
}, z.core.$strict>;
|
|
20
|
+
export declare const GREP_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<GrepToolInput, GrepToolInput>;
|
|
15
21
|
/**
|
|
16
22
|
* Output schema for the provided `grep` tool.
|
|
17
23
|
*/
|
|
18
|
-
export declare const GREP_OUTPUT_SCHEMA:
|
|
19
|
-
content: z.ZodString;
|
|
20
|
-
matchCount: z.ZodNumber;
|
|
21
|
-
path: z.ZodString;
|
|
22
|
-
truncated: z.ZodBoolean;
|
|
23
|
-
}, z.core.$strict>;
|
|
24
|
-
export type GrepToolInput = z.infer<typeof GREP_INPUT_SCHEMA>;
|
|
25
|
-
export type GrepToolOutput = z.infer<typeof GREP_OUTPUT_SCHEMA>;
|
|
24
|
+
export declare const GREP_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<GrepToolOutput, GrepToolOutput>;
|
|
26
25
|
/**
|
|
27
26
|
* Framework-owned executor that delegates to the default sandbox.
|
|
28
27
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeGrepOnSandbox}from"#execution/sandbox/grep-tool.js";const GREP_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{context:{type:`integer`,minimum:0,description:`Number of surrounding context lines to include before and after each match. Defaults to 0.`},glob:{type:`string`,description:`Filter files by glob pattern (e.g. "*.ts", "*.{ts,tsx}").`},ignoreCase:{type:`boolean`,description:`Perform case-insensitive search. Defaults to false.`},limit:{type:`integer`,minimum:1,maximum:1e3,description:`Maximum number of matches to return per file. Defaults to 100.`},literal:{type:`boolean`,description:`Treat the pattern as a literal string instead of a regular expression. Defaults to false.`},path:{type:`string`,description:`The directory or file to search in. Defaults to /workspace. Must be an absolute path or begin with $HOME/. Omit to use the default.`},pattern:{type:`string`,description:`The regex pattern to search for in file contents (e.g. "log.*Error", "function\\s+\\w+").`}},required:[`pattern`],additionalProperties:!1}),GREP_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{content:{type:`string`},matchCount:{type:`integer`},path:{type:`string`},truncated:{type:`boolean`}},required:[`content`,`matchCount`,`path`,`truncated`],additionalProperties:!1}),grep=defineTool({label:{start:e=>toolLabel(`Search`,e.pattern)},description:[`Fast content search tool that works with any codebase size.`,``,`Usage:`,`- Searches file contents using regular expressions.`,`- Supports full regex syntax (e.g. "log.*Error", "function\\s+\\w+").`,`- Filter files by pattern with the glob parameter (e.g. "*.js", "*.{ts,tsx}").`,`- Returns matching lines with file paths and line numbers.`,`- Call this tool in parallel when you have multiple independent searches.`,`- Any line longer than 2000 characters is truncated.`].join(`
|
|
2
2
|
`),async execute(e,t){return await executeGrepOnSandbox(await t.getSandbox(),e)},inputSchema:GREP_INPUT_SCHEMA,outputSchema:GREP_OUTPUT_SCHEMA});export{GREP_INPUT_SCHEMA,GREP_OUTPUT_SCHEMA,grep as default,grep};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import { type ToolDefinition } from "#tools/definition.js";
|
|
2
|
+
export interface ReadFileToolInput {
|
|
3
|
+
filePath: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ReadFileToolOutput {
|
|
8
|
+
content: string;
|
|
9
|
+
nextOffset?: number;
|
|
10
|
+
path: string;
|
|
11
|
+
totalLines: number;
|
|
12
|
+
truncated: boolean;
|
|
13
|
+
}
|
|
3
14
|
/**
|
|
4
15
|
* Input schema for the provided `read_file` tool.
|
|
5
16
|
*/
|
|
6
|
-
export declare const READ_FILE_INPUT_SCHEMA:
|
|
7
|
-
filePath: z.ZodString;
|
|
8
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
}, z.core.$strict>;
|
|
17
|
+
export declare const READ_FILE_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<ReadFileToolInput, ReadFileToolInput>;
|
|
11
18
|
/**
|
|
12
19
|
* Output schema for the provided `read_file` tool.
|
|
13
20
|
*/
|
|
14
|
-
export declare const READ_FILE_OUTPUT_SCHEMA:
|
|
15
|
-
content: z.ZodString;
|
|
16
|
-
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
path: z.ZodString;
|
|
18
|
-
totalLines: z.ZodNumber;
|
|
19
|
-
truncated: z.ZodBoolean;
|
|
20
|
-
}, z.core.$strict>;
|
|
21
|
-
export type ReadFileToolInput = z.infer<typeof READ_FILE_INPUT_SCHEMA>;
|
|
22
|
-
export type ReadFileToolOutput = z.infer<typeof READ_FILE_OUTPUT_SCHEMA>;
|
|
21
|
+
export declare const READ_FILE_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<ReadFileToolOutput, ReadFileToolOutput>;
|
|
23
22
|
/**
|
|
24
23
|
* Framework-owned executor that delegates to the default sandbox.
|
|
25
24
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeReadFileOnSandbox}from"#execution/sandbox/read-file.js";const READ_FILE_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{filePath:{type:`string`,description:`The absolute path to the file to read. A leading $HOME is supported.`},limit:{type:`integer`,minimum:1,description:`Maximum number of lines to return. Defaults to 2000.`},offset:{type:`integer`,minimum:1,description:`1-based line number to start from. Defaults to 1.`}},required:[`filePath`],additionalProperties:!1}),READ_FILE_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{content:{type:`string`},nextOffset:{type:`integer`,minimum:1},path:{type:`string`},totalLines:{type:`integer`,minimum:0},truncated:{type:`boolean`}},required:[`content`,`path`,`totalLines`,`truncated`],additionalProperties:!1}),readFile=defineTool({label:{start:e=>toolLabel(`Read`,e.filePath)},description:[`Read a file from the local filesystem. If the path does not exist, an error is returned.`,``,`Usage:`,`- The filePath parameter should be an absolute path or begin with $HOME/.`,`- By default, this tool returns up to 2000 lines from the start of the file.`,`- The offset parameter is the line number to start from (1-indexed).`,`- To read later sections, call this tool again with a larger offset.`,'- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n".',`- Any line longer than 2000 characters is truncated.`,`- Call this tool in parallel when you know there are multiple files you want to read.`,`- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.`].join(`
|
|
2
2
|
`),async execute(e,t){return await executeReadFileOnSandbox(await t.getSandbox(),e)},inputSchema:READ_FILE_INPUT_SCHEMA,outputSchema:READ_FILE_OUTPUT_SCHEMA});export{READ_FILE_INPUT_SCHEMA,READ_FILE_OUTPUT_SCHEMA,readFile as default,readFile};
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import { type ToolDefinition } from "#tools/definition.js";
|
|
3
|
-
export
|
|
4
|
-
format
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
url: z.ZodString;
|
|
17
|
-
}, z.core.$strict>;
|
|
18
|
-
export type WebFetchToolInput = z.infer<typeof WEB_FETCH_INPUT_SCHEMA>;
|
|
19
|
-
export type WebFetchToolOutput = z.infer<typeof WEB_FETCH_OUTPUT_SCHEMA>;
|
|
2
|
+
export interface WebFetchToolInput {
|
|
3
|
+
format?: "markdown" | "text" | "html";
|
|
4
|
+
timeout?: number;
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
export interface WebFetchToolOutput {
|
|
8
|
+
content: string;
|
|
9
|
+
contentType: string;
|
|
10
|
+
truncated: boolean;
|
|
11
|
+
url: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const WEB_FETCH_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<WebFetchToolInput, WebFetchToolInput>;
|
|
14
|
+
export declare const WEB_FETCH_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<WebFetchToolOutput, WebFetchToolOutput>;
|
|
20
15
|
export declare const webFetch: ToolDefinition<WebFetchToolInput, WebFetchToolOutput>;
|
|
21
16
|
export default webFetch;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeWebFetchTool}from"#execution/web-fetch/execute.js";const WEB_FETCH_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{format:{type:`string`,enum:[`markdown`,`text`,`html`],description:`The format to return the content in (text, markdown, or html). HTML responses are automatically converted to the requested format. Defaults to "markdown".`},timeout:{type:`number`,description:`Optional timeout in seconds. Defaults to 30, max 120.`},url:{type:`string`,description:`The fully-formed URL to fetch content from. Must start with https://.`}},required:[`url`],additionalProperties:!1}),WEB_FETCH_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{content:{type:`string`},contentType:{type:`string`},truncated:{type:`boolean`},url:{type:`string`}},required:[`content`,`contentType`,`truncated`,`url`],additionalProperties:!1}),webFetch=defineTool({label:{start:e=>toolLabel(`Fetch`,e.url)},description:[`Fetch a webpage and return its content in the requested format. Use this to retrieve and analyze content from URLs.`,``,`Usage notes:`,`- The URL must be a fully-formed valid URL starting with https://`,`- HTML responses are automatically converted to markdown or plain text based on the requested format`,`- Format options: "markdown" (default), "text", or "html"`,`- Default timeout is 30 seconds (max 120 seconds)`,`- Maximum response size is 5 MB; content is further capped at the shared tool-output budget (50 KB / 2000 lines)`,`- This tool is read-only and does not modify any files`].join(`
|
|
2
2
|
`),async execute(e,t){return await executeWebFetchTool(e,{abortSignal:t.abortSignal})},inputSchema:WEB_FETCH_INPUT_SCHEMA,outputSchema:WEB_FETCH_OUTPUT_SCHEMA});export{WEB_FETCH_INPUT_SCHEMA,WEB_FETCH_OUTPUT_SCHEMA,webFetch as default,webFetch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineWorkflowTool}from"#tools/workflow-definition.js";import{DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS,parseWorkflowProgramOptions}from"#execution/dynamic-workflow/schema.js";import{attachWorkflowProgramOptions}from"#tools/workflow-program-input.js";import{executeWorkflowProgram}from"#execution/dynamic-workflow/tool.js";const workflowProgramAgentContract=`Call ctx.agent(name, { message: string, agentId?: string, outputSchema?: object }). It resolves directly to the child's JSON-serializable output; when outputSchema is provided, the output matches that schema. It does not return an agent metadata wrapper. Use an agentId from the conversation's <agents> block to continue that child. The owning agent resolves the target and applies its existing availability and authorization checks.`,workflowInputSchema=defineJsonSchema({type:`object`,properties:{js:{type:`string`,description:`JavaScript statements executed inside an async function. Supply only the body, without a surrounding function declaration or arrow function. ${workflowProgramAgentContract} Return one JSON-serializable value.`}},required:[`js`],additionalProperties:!1});function workflow(e={}){let t=normalizeWorkflowToolOptions(e),n=[`Run an async JavaScript function body that invokes agents and returns one JSON-serializable value.`,workflowProgramAgentContract,`Supply the body directly, for example: return await ctx.agent("researcher", { message: "Describe the task" });`,`The program may invoke at most ${String(t.maxSubagents)} agents.`].join(` `);return attachWorkflowProgramOptions(defineWorkflowTool({description:n,execute:executeWorkflowProgram,inputSchema:workflowInputSchema}),t)}function normalizeWorkflowToolOptions(e){if(typeof e!=`object`||!e)throw TypeError(`workflow options must be an object.`);return parseWorkflowProgramOptions({maxSubagents:e.maxSubagents??DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS})}export{workflow};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import { type ToolDefinition } from "#tools/definition.js";
|
|
2
|
+
export interface WriteFileToolInput {
|
|
3
|
+
content: string;
|
|
4
|
+
filePath: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WriteFileToolOutput {
|
|
7
|
+
existed: boolean;
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
3
10
|
/**
|
|
4
11
|
* Input schema for the provided `write_file` tool.
|
|
5
12
|
*/
|
|
6
|
-
export declare const WRITE_FILE_INPUT_SCHEMA:
|
|
7
|
-
content: z.ZodString;
|
|
8
|
-
filePath: z.ZodString;
|
|
9
|
-
}, z.core.$strict>;
|
|
13
|
+
export declare const WRITE_FILE_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<WriteFileToolInput, WriteFileToolInput>;
|
|
10
14
|
/**
|
|
11
15
|
* Output schema for the provided `write_file` tool.
|
|
12
16
|
*/
|
|
13
|
-
export declare const WRITE_FILE_OUTPUT_SCHEMA:
|
|
14
|
-
existed: z.ZodBoolean;
|
|
15
|
-
path: z.ZodString;
|
|
16
|
-
}, z.core.$strict>;
|
|
17
|
-
export type WriteFileToolInput = z.infer<typeof WRITE_FILE_INPUT_SCHEMA>;
|
|
18
|
-
export type WriteFileToolOutput = z.infer<typeof WRITE_FILE_OUTPUT_SCHEMA>;
|
|
17
|
+
export declare const WRITE_FILE_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<WriteFileToolOutput, WriteFileToolOutput>;
|
|
19
18
|
/**
|
|
20
19
|
* Framework-owned executor that delegates to the default sandbox.
|
|
21
20
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeWriteFileOnSandbox}from"#execution/sandbox/write-file.js";const WRITE_FILE_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{content:{type:`string`,description:`Complete replacement file contents.`},filePath:{type:`string`,description:`The absolute path to the file to write. A leading $HOME is supported.`}},required:[`content`,`filePath`],additionalProperties:!1}),WRITE_FILE_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{existed:{type:`boolean`},path:{type:`string`}},required:[`existed`,`path`],additionalProperties:!1}),writeFile=defineTool({label:{start:e=>toolLabel(`Write`,e.filePath)},description:[`Writes a file to the local filesystem.`,``,`Usage:`,`- This tool will overwrite the existing file if there is one at the provided path.`,`- If this is an existing file, you MUST use the read_file tool first to read the file's contents. This tool will fail if you did not read the file first.`,`- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.`,`- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.`,`- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`].join(`
|
|
2
2
|
`),async execute(e,t){return await executeWriteFileOnSandbox(await t.getSandbox(),e)},inputSchema:WRITE_FILE_INPUT_SCHEMA,outputSchema:WRITE_FILE_OUTPUT_SCHEMA});export{WRITE_FILE_INPUT_SCHEMA,WRITE_FILE_OUTPUT_SCHEMA,writeFile as default,writeFile};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type FlexibleSchema } from "ai";
|
|
1
2
|
import type { StandardJSONSchemaV1, StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
2
3
|
import { type JsonObject } from "#shared/json.js";
|
|
3
4
|
/**
|
|
4
5
|
* eve-owned schema contract for tool input and output schemas: a Standard
|
|
5
|
-
* Schema validator that can also emit JSON Schema.
|
|
6
|
-
*
|
|
6
|
+
* Schema validator that can also emit JSON Schema. Author schemas (Zod,
|
|
7
|
+
* Valibot, ArkType) implement it directly; plain JSON Schema data is lowered
|
|
8
|
+
* onto it by {@link defineJsonSchema}.
|
|
7
9
|
*/
|
|
8
10
|
export type ToolSchema<Input = unknown, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
9
11
|
/**
|
|
@@ -13,22 +15,19 @@ export type ToolSchema<Input = unknown, Output = Input> = StandardSchemaV1<Input
|
|
|
13
15
|
* conversion.
|
|
14
16
|
*/
|
|
15
17
|
export type ToolSchemaSource = StandardJSONSchemaV1 | StandardSchemaV1 | Record<string, unknown>;
|
|
18
|
+
type SchemaDirection = "input" | "output";
|
|
16
19
|
/** `null` and `undefined` pass through every conversion untouched. */
|
|
17
20
|
type SchemaResult<TSource, TResult> = TSource extends null | undefined ? TSource : TResult;
|
|
18
21
|
/**
|
|
19
22
|
* Resolves a source into a live input {@link ToolSchema}. Live schemas pass
|
|
20
|
-
* through unchanged;
|
|
21
|
-
*
|
|
22
|
-
* validation-free schema that still advertises the source JSON Schema. `null`
|
|
23
|
-
* and `undefined` pass through untouched.
|
|
23
|
+
* through unchanged; plain JSON Schema data becomes a {@link defineJsonSchema}
|
|
24
|
+
* schema. `null` and `undefined` pass through untouched.
|
|
24
25
|
*/
|
|
25
26
|
export declare function toInputSchema<T extends ToolSchemaSource | null | undefined>(source: T): SchemaResult<T, ToolSchema>;
|
|
26
27
|
/**
|
|
27
28
|
* Resolves a source into a live output {@link ToolSchema}. Live schemas pass
|
|
28
|
-
* through unchanged;
|
|
29
|
-
*
|
|
30
|
-
* validation-free schema that still advertises the source JSON Schema. `null`
|
|
31
|
-
* and `undefined` pass through untouched.
|
|
29
|
+
* through unchanged; plain JSON Schema data becomes a {@link defineJsonSchema}
|
|
30
|
+
* schema. `null` and `undefined` pass through untouched.
|
|
32
31
|
*/
|
|
33
32
|
export declare function toOutputSchema<T extends ToolSchemaSource | null | undefined>(source: T): SchemaResult<T, ToolSchema>;
|
|
34
33
|
/**
|
|
@@ -48,10 +47,41 @@ export declare function serializeOutputSchema<T extends ToolSchemaSource | null
|
|
|
48
47
|
* Standard Schema validation plus JSON Schema emission.
|
|
49
48
|
*/
|
|
50
49
|
export declare function isToolSchema(value: unknown): value is ToolSchema;
|
|
50
|
+
/**
|
|
51
|
+
* Builds a {@link ToolSchema} from plain JSON Schema data. The schema is
|
|
52
|
+
* advertised exactly as given, and values are validated against it with a
|
|
53
|
+
* JSON Schema 2020-12 validator that also accepts draft-07 constructs.
|
|
54
|
+
*
|
|
55
|
+
* `format` is treated as an annotation, as JSON Schema 2020-12 specifies by
|
|
56
|
+
* default. A valid value's omitted properties receive their `default` values.
|
|
57
|
+
* A schema the validator cannot evaluate faithfully (unknown `type`
|
|
58
|
+
* names, invalid `pattern` expressions, unresolvable `$ref`s) is still
|
|
59
|
+
* advertised, but its values pass through unvalidated; the tool's executor,
|
|
60
|
+
* such as a remote MCP server, remains the authority for its own contract.
|
|
61
|
+
*
|
|
62
|
+
* `check` runs after the JSON Schema accepts a value and reports a message
|
|
63
|
+
* for constraints JSON Schema cannot express.
|
|
64
|
+
*/
|
|
65
|
+
export declare function defineJsonSchema<T = unknown>(schema: JsonObject, check?: (value: T) => string | undefined): ToolSchema<T>;
|
|
51
66
|
/**
|
|
52
67
|
* Permissive schema lowered onto model-visible tools whose definitions
|
|
53
68
|
* declare no input schema. Accepts any input — an absent schema declares no
|
|
54
69
|
* contract, so rejecting stray properties would only force needless retries.
|
|
55
70
|
*/
|
|
56
71
|
export declare const UNSPECIFIED_INPUT_SCHEMA: ToolSchema;
|
|
72
|
+
/**
|
|
73
|
+
* Lowers a harness tool schema onto the AI SDK boundary.
|
|
74
|
+
*
|
|
75
|
+
* Every Standard Schema is wrapped in an AI SDK `jsonSchema()` schema whose
|
|
76
|
+
* JSON Schema and validation both come from the schema's own library. The
|
|
77
|
+
* AI SDK treats an existing `Schema` as final, so it never reaches for the
|
|
78
|
+
* app's `zod` copy to convert or parse a schema built by another copy — a
|
|
79
|
+
* mismatch that crashes JSON Schema conversion across Zod minor versions.
|
|
80
|
+
* AI SDK-native schemas (already wrapped, or lazy) pass through.
|
|
81
|
+
*
|
|
82
|
+
* Library schemas get the object closing the AI SDK applies to them itself;
|
|
83
|
+
* plain JSON Schema from {@link defineJsonSchema} is advertised as written.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toModelSchema(schema: FlexibleSchema, direction: SchemaDirection): FlexibleSchema;
|
|
86
|
+
export declare function toModelSchema(schema: FlexibleSchema | undefined, direction: SchemaDirection): FlexibleSchema | undefined;
|
|
57
87
|
export {};
|
package/dist/src/tools/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{asSchema}from"ai";import{
|
|
1
|
+
import{TypeValidationError,asSchema,jsonSchema}from"ai";import{isObject}from"#shared/guards.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonObject}from"#shared/json.js";import{Validator}from"#compiled/@cfworker/json-schema/index.js";function toInputSchema(e){return toSchema(e,`input`)}function toOutputSchema(e){return toSchema(e,`output`)}function serializeInputSchema(e){return serializeSchema(e,`input`)}function serializeOutputSchema(e){return serializeSchema(e,`output`)}function isToolSchema(e){let t=getStandardSchemaProperties(e);if(t===void 0)return!1;let n=t.jsonSchema;return typeof t.validate==`function`&&typeof n==`object`&&!!n&&typeof n.input==`function`&&typeof n.output==`function`}function defineJsonSchema(e,t){let emit=()=>structuredClone(e),n={"~standard":{version:1,vendor:`eve`,validate:createJsonSchemaValidator(e,t),jsonSchema:{input:emit,output:emit}}};return plainJsonSchemas.add(n),n}const plainJsonSchemas=new WeakSet,UNSPECIFIED_INPUT_SCHEMA=defineJsonSchema({});function toModelSchema(e,t){if(e===void 0||typeof e==`function`||!(`~standard`in e))return e;let n=e,r=plainJsonSchemas.has(n);return jsonSchema(()=>{let e=serializeSchema(n,t);return r?e:closeObjectSchemas(e)},{validate:async e=>{let t=await n[`~standard`].validate(e);return t.issues===void 0?{success:!0,value:t.value}:{success:!1,error:new TypeValidationError({value:e,cause:t.issues})}}})}function closeObjectSchemas(e){if(!isObject(e))return e;let t={...e},{type:n}=t;(n===`object`||Array.isArray(n)&&n.includes(`object`))&&(t.additionalProperties=isObject(t.additionalProperties)?closeObjectSchemas(t.additionalProperties):!1,isObject(t.properties)&&(t.properties=mapValues(t.properties,closeObjectSchemas))),Array.isArray(t.items)?t.items=t.items.map(closeObjectSchemas):isObject(t.items)&&(t.items=closeObjectSchemas(t.items));for(let e of[`allOf`,`anyOf`,`oneOf`]){let n=t[e];Array.isArray(n)&&(t[e]=n.map(closeObjectSchemas))}return isObject(t.definitions)&&(t.definitions=mapValues(t.definitions,closeObjectSchemas)),t}function mapValues(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]))}function toSchema(e,t){return e==null||isToolSchema(e)?e:defineJsonSchema(toJsonObject(e,t))}function serializeSchema(e,t){return e==null?e:toJsonObject(e,t)}function toJsonObject(e,t){let n=getStandardSchemaProperties(e),r=n?.jsonSchema,i=typeof r==`object`&&r?r[t]:void 0,a=typeof n?.vendor==`string`?n.vendor:`unknown`;if(n!==void 0&&typeof i!=`function`&&a===`zod`){if(t===`input`){let t=asSchema(e),{$schema:n,...r}=parseJsonObject(t.jsonSchema);return r}throw Error(`Zod 3 cannot emit an output JSON Schema. Upgrade to Zod 4 or provide a plain JSON Schema object.`)}if(n!==void 0&&typeof i!=`function`)throw Error(`Standard Schema vendor "${a}" does not support JSON Schema conversion. Provide a Standard Schema implementation with JSON Schema conversion or a plain JSON Schema object.`);let{$schema:o,...s}=parseJsonObject(n===void 0?e:i({target:`draft-07`}));return s}function getStandardSchemaProperties(e){if(typeof e!=`object`||!e||!(`~standard`in e))return;let t=e[`~standard`];return typeof t==`object`&&t?t:void 0}function createJsonSchemaValidator(e,t){let n,r=!1,passThrough=(e,t)=>(r||(r=!0,console.warn(`[eve] Tool schema cannot validate values locally; passing them through unvalidated: ${t}`)),{value:e});return r=>{if(n===void 0){let t=buildValidator(e);if(typeof t==`string`)return n=null,passThrough(r,t);n=t}if(n===null)return{value:r};let i;try{i=n.validate(r)}catch(e){return r===void 0?{issues:[{message:`Expected a JSON value.`}]}:passThrough(r,toErrorMessage(e))}if(!i.valid)return{issues:toIssues(i.errors)};let a=applyDefaults(e,e,r),o=t?.(a);return o===void 0?{value:a}:{issues:[{message:o}]}}}function applyDefaults(e,t,n){let r=n;for(let n of followRefs(e,t)){let{items:t,properties:i}=n;if(isObject(r)&&isObject(i))r=fillProperties(e,i,r);else if(Array.isArray(r)&&isObject(t)){let n=r,i=n.map(n=>applyDefaults(e,t,n));i.some((e,t)=>e!==n[t])&&(r=i)}}return r}function fillProperties(e,t,n){let r=n;for(let[i,a]of Object.entries(t)){let t=Object.hasOwn(n,i)?n[i]:void 0,o=t===void 0?findDefault(e,a):applyDefaults(e,a,t);o!==t&&(r===n&&(r={...n}),r[i]=o)}return r}function findDefault(e,t){for(let n of followRefs(e,t))if(`default`in n)return structuredClone(n.default)}function*followRefs(e,t){let n=new Set,r=t;for(;isObject(r)&&!n.has(r);)n.add(r),yield r,r=resolveLocalRef(e,r.$ref)}function resolveLocalRef(e,t){if(typeof t!=`string`||t!==`#`&&!t.startsWith(`#/`))return;let n=e;for(let e of decodePointer(t)){if(typeof n!=`object`||!n||!Object.hasOwn(n,e))return;n=n[e]}return n}function buildValidator(e){try{let t=structuredClone(e);return prepareForValidation(t)??new Validator(t,`2020-12`,!1)}catch(e){return toErrorMessage(e)}}const JSON_TYPES=new Set([`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]),EXCLUSIVE_BOUNDS=[[`exclusiveMinimum`,`minimum`],[`exclusiveMaximum`,`maximum`]],SUBSCHEMA_KEYWORDS=[`additionalItems`,`additionalProperties`,`contains`,`else`,`if`,`not`,`propertyNames`,`then`,`unevaluatedItems`,`unevaluatedProperties`],SUBSCHEMA_LIST_KEYWORDS=[`allOf`,`anyOf`,`oneOf`,`prefixItems`],SUBSCHEMA_MAP_KEYWORDS=[`$defs`,`definitions`,`dependencies`,`dependentSchemas`,`patternProperties`,`properties`];function prepareForValidation(e){if(typeof e==`boolean`)return;if(typeof e!=`object`||!e||Array.isArray(e))return`a subschema is neither an object nor a boolean`;let t=e;delete t.format;for(let[e,n]of EXCLUSIVE_BOUNDS)typeof t[e]==`boolean`&&(t[e]&&typeof t[n]==`number`?(t[e]=t[n],delete t[n]):delete t[e]);let{enum:n,pattern:r,required:i,type:a}=t;if(a!==void 0&&!(Array.isArray(a)?a.every(isJsonType):isJsonType(a)))return`unsupported type ${JSON.stringify(a)}`;if(n!==void 0&&!Array.isArray(n))return"`enum` is not an array";if(i!==void 0&&!(Array.isArray(i)&&i.every(e=>typeof e==`string`)))return"`required` is not an array of strings";if(r!==void 0&&!isRegExpSource(r))return`invalid pattern ${JSON.stringify(r)}`;for(let e of SUBSCHEMA_KEYWORDS)if(e in t){let n=prepareForValidation(t[e]);if(n!==void 0)return n}let o=t.items;for(let e of Array.isArray(o)?o:o===void 0?[]:[o]){let t=prepareForValidation(e);if(t!==void 0)return t}for(let e of SUBSCHEMA_LIST_KEYWORDS){let n=t[e];if(n!==void 0){if(!Array.isArray(n))return`\`${e}\` is not an array`;for(let e of n){let t=prepareForValidation(e);if(t!==void 0)return t}}}for(let e of SUBSCHEMA_MAP_KEYWORDS){let n=t[e];if(n!==void 0){if(typeof n!=`object`||!n||Array.isArray(n))return`\`${e}\` is not an object`;for(let[t,r]of Object.entries(n)){if(e===`patternProperties`&&!isRegExpSource(t))return`invalid pattern ${JSON.stringify(t)}`;if(e===`dependencies`&&Array.isArray(r))continue;let n=prepareForValidation(r);if(n!==void 0)return n}}}}function isJsonType(e){return typeof e==`string`&&JSON_TYPES.has(e)}function isRegExpSource(e){if(typeof e!=`string`)return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}const CLOSED_OBJECT_KEYWORD=/\/(?:additional|unevaluated)Properties$/;function toIssues(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=e[n+1];if(CLOSED_OBJECT_KEYWORD.test(r.keywordLocation)&&i?.keyword===`false`){let e=decodePointer(i.instanceLocation).at(-1);t.push({keyword:`false`,location:i.instanceLocation,message:`Unrecognized key: ${JSON.stringify(e)}`,object:r.instanceLocation}),n++}else t.push({keyword:r.keyword,location:r.instanceLocation,message:r.error})}let n=t.filter(e=>e.object===void 0||!t.some(t=>t.object===void 0&&(t.location===e.location||t.location.startsWith(`${e.location}/`))));return n.filter((e,t)=>{let r=n[t+1];return r===void 0?!0:r.location.startsWith(`${e.location}/`)?!1:e.keyword!==`$ref`||r.location!==e.location}).map(({location:e,message:t,object:n})=>{let r=decodePointer(n??e);return r.length===0?{message:t}:{message:t,path:r}})}function decodePointer(e){return e.split(`/`).slice(1).map(e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replaceAll(`~1`,`/`).replaceAll(`~0`,`~`)})}export{UNSPECIFIED_INPUT_SCHEMA,defineJsonSchema,isToolSchema,serializeInputSchema,serializeOutputSchema,toInputSchema,toModelSchema,toOutputSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{decisionToTraceContentCeiling,resolveForwardedTraceSeed}from"#shared/forwarded-trace-policy.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{decisionToTraceContentCeiling,resolveForwardedTraceSeed}from"#shared/forwarded-trace-policy.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";import{getBackgroundTasks,getBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{deriveTaskId}from"#tasks/task-id.js";import{actionIdempotencyKey}from"#instrumentation/lifecycle.js";import{AGENT_TRACE_CONTEXT_KEY,deserializeAgentTraceContextState,emptyAgentTraceContextState,serializeAgentTraceContextState}from"#tracing/agent-trace-context-codec.js";const AgentTraceContextKey=new ContextKey(AGENT_TRACE_CONTEXT_KEY,{codec:{deserialize:deserializeAgentTraceContextState,serialize:serializeAgentTraceContextState}});function pruneAgentTraceState(e,t,n){try{pruneTraceOwnership(e,t,n)}catch(e){createLogger(`tracing.retention`).warn(`could not reconcile trace ownership; preserving trace state`,{error:e})}}function pruneTraceOwnership(e,t,n){let r=e.get(AgentTraceContextKey);if(r===void 0)return;let i=new Set(getBlockingWorkflowToolRuns(n).map(e=>e.callId)),a=new Set(getBackgroundTasks(n).query({state:`working`}).map(e=>e.taskId)),o=Object.fromEntries(Object.entries(r.actionAnchors).filter(([e,n])=>n.sessionId!==t||r.actions[e]!==void 0||i.has(n.callId)||a.has(deriveTaskId({callId:n.callId,parentSessionId:t,parentTurnId:n.turnId})))),s=new Set(Object.values(o).filter(e=>e.sessionId===t).map(e=>e.callId)),c=Object.fromEntries(Object.entries(r.invocations).filter(([,e])=>e.sessionId!==t||e.terminal!==void 0||s.has(e.parentActionCallId)));e.set(AgentTraceContextKey,{...r,actionAnchors:o,invocations:c})}function readCurrentSessionTraceDecision(e){let t=contextStorage.getStore();return t===void 0?void 0:readSessionTraceDecision(t,e)}function readSessionTraceDecision(e,t){return e.get(AgentTraceContextKey)?.sessions[t]?.decision}function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readTurnTraceContext(e,t,n){let r=e[AgentTraceContextKey.name];if(r===void 0)return;let i=deserializeAgentTraceContextState(r),a=i.turns[turnKey(t,n)];return a===void 0?void 0:withTraceDecision(e,a.context,i.sessions[t]?.decision)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let a=deserializeAgentTraceContextState(i),o=actionIdempotencyKey(t,n,r),s=a.invocations[o]??a.actions[o]??a.actionAnchors[o];if(s!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:s.spanId,traceFlags:s.parent.traceFlags,traceId:s.parent.traceId},a.sessions[s.sessionId]?.decision)}function readTaskActionTrace(e,t,n){let r=deserializeAgentTraceContextState(e[AgentTraceContextKey.name]);return Object.values(r.actionAnchors).find(e=>e.sessionId===t&&deriveTaskId({callId:e.callId,parentSessionId:t,parentTurnId:e.turnId})===n)}function recordNestedAgentInvocation(e){let t=e.serializedContext[AgentTraceContextKey.name];if(t===void 0)return e.serializedContext;let n=deserializeAgentTraceContextState(t),r=actionIdempotencyKey(e.sessionId,e.turnId,e.outerCallId),i=n.actions[r]??n.actionAnchors[r];if(i===void 0)return e.serializedContext;let a=actionIdempotencyKey(e.sessionId,e.turnId,e.callId),promote=e=>e.isWorkflowTool===!0&&e.kind===`tool-call`?{...e,workflowName:e.name}:e,o=n.actions[r]===void 0?n.actions:{...n.actions,[r]:promote(n.actions[r])},s=n.actionAnchors[r]===void 0?n.actionAnchors:{...n.actionAnchors,[r]:promote(n.actionAnchors[r])};if(n.invocations[a]!==void 0)return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:s,actions:o})};let c={attemptIndex:i.attemptIndex,callId:e.callId,channelAudience:i.channelAudience,kind:e.kind,name:e.name,parent:{spanId:i.spanId,traceFlags:i.parent.traceFlags,traceId:i.parent.traceId},parentActionCallId:e.outerCallId,recordOutputs:e.recordOutputs===!0,rootSessionId:i.rootSessionId,sessionId:i.sessionId,spanId:e.spanId,startTimeMs:e.startTimeMs,stepIndex:i.stepIndex,turnId:i.turnId};return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:s,actions:o,invocations:{...n.invocations,[a]:c}})}}function recordActionInvocationKind(e){let t=e.serializedContext[AgentTraceContextKey.name];if(t===void 0)return e.serializedContext;let n=deserializeAgentTraceContextState(t),update=t=>t.sessionId===e.sessionId&&t.turnId===e.turnId&&t.callId===e.callId?{...t,isWorkflowTool:void 0,kind:e.kind,workflowName:void 0}:t;return{...e.serializedContext,[AgentTraceContextKey.name]:serializeAgentTraceContextState({...n,actionAnchors:Object.fromEntries(Object.entries(n.actionAnchors).map(([e,t])=>[e,update(t)])),actions:Object.fromEntries(Object.entries(n.actions).map(([e,t])=>[e,update(t)]))})}}function withTraceDecision(e,t,n){let r=e[SessionTraceSeedKey.name],i=resolveForwardedTraceSeed({decision:n??r?.decision,forwardedTracePolicy:r?.forwardedTracePolicy,traceFlags:t.traceFlags}),a=i.decision,o=i.forwardedTracePolicy,s=decisionToTraceContentCeiling(a),c={...t,traceFlags:i.traceFlags};if(o===void 0)return a===void 0?c:{...c,decision:a};let l=s===void 0?o:{...o,ceiling:s};return a===void 0?{...c,forwardedTracePolicy:l}:{...c,decision:a,forwardedTracePolicy:l}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActionAnchors(e){updateState(t=>({...t,actionAnchors:Object.fromEntries(Object.entries(t.actionAnchors).filter(([,t])=>t.sessionId!==e))}))}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteInvocation(e){updateState(t=>{let n={...t.invocations};return delete n[e],{...t,invocations:n}})}deleteInvocations(e,t){updateState(n=>({...n,invocations:Object.fromEntries(Object.entries(n.invocations).filter(([,n])=>n.sessionId!==e||t!==void 0&&n.turnId!==t))}))}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,t){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(n=>n.sessionId===e&&n.callId===t)}findActionAnchor(e,t,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actionAnchors??{}).find(r=>r.sessionId===e&&r.turnId===t&&r.callId===n)}findInvocations(e,t,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.invocations??{}).filter(r=>(e===void 0||r.sessionId===e)&&(t===void 0||r.turnId===t)&&(n===void 0||r.parentActionCallId===n))}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,t){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,t)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setActionAnchor(e,t){updateState(n=>({...n,actionAnchors:{...n.actionAnchors,[e]:t}}))}setInvocation(e,t){updateState(n=>({...n,invocations:{...n.invocations,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}updateTurn(e,t,n){updateState(r=>{let i=turnKey(e,t),a=r.turns[i];return a===void 0?r:{...r,turns:{...r.turns,[i]:n(a)}}})}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??emptyAgentTraceContextState()))}function turnKey(e,t){return`${e}\0${t}`}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,pruneAgentTraceState,readActionTraceContext,readCurrentSessionTraceDecision,readSessionTraceDecision,readTaskActionTrace,readTurnTraceContext,recordActionInvocationKind,recordNestedAgentInvocation};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { LocalTraceSpan } from "#tracing/local-trace-reader.js";
|
|
2
|
+
import { type LocalTraceSummary } from "#tracing/local-trace-summary.js";
|
|
3
|
+
export interface TraceAnalysisSelector {
|
|
4
|
+
readonly excludeSessionId?: string;
|
|
5
|
+
readonly fromMs?: number;
|
|
6
|
+
readonly sessionId?: string;
|
|
7
|
+
readonly toMs?: number;
|
|
8
|
+
readonly turnId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TraceTokenUsage {
|
|
11
|
+
readonly inputTokens?: number;
|
|
12
|
+
readonly outputTokens?: number;
|
|
13
|
+
readonly cacheReadTokens?: number;
|
|
14
|
+
readonly cacheWriteTokens?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface TraceTimelineRecord {
|
|
17
|
+
readonly actionDurationMs?: number;
|
|
18
|
+
readonly actionName?: string;
|
|
19
|
+
readonly callId?: string;
|
|
20
|
+
readonly category: "model" | "other" | "tool";
|
|
21
|
+
readonly durationMs: number;
|
|
22
|
+
readonly endOffsetMs: number;
|
|
23
|
+
readonly error?: string;
|
|
24
|
+
readonly model?: string;
|
|
25
|
+
readonly outcome: "completed" | "failed";
|
|
26
|
+
readonly parentSpanId?: string;
|
|
27
|
+
readonly sessionId?: string;
|
|
28
|
+
readonly spanId: string;
|
|
29
|
+
readonly startOffsetMs: number;
|
|
30
|
+
readonly toolName?: string;
|
|
31
|
+
readonly turnId?: string;
|
|
32
|
+
readonly usage?: TraceTokenUsage;
|
|
33
|
+
}
|
|
34
|
+
export interface TraceAnalysis {
|
|
35
|
+
readonly summary: LocalTraceSummary;
|
|
36
|
+
readonly groups: readonly TraceAnalysisGroup[];
|
|
37
|
+
/** Accumulated operation time, not elapsed time; parallel calls can overlap. */
|
|
38
|
+
readonly modelWorkMs: number;
|
|
39
|
+
readonly toolWorkMs: number;
|
|
40
|
+
readonly records: readonly TraceTimelineRecord[];
|
|
41
|
+
}
|
|
42
|
+
export interface TraceAnalysisGroup {
|
|
43
|
+
readonly modelWorkMs: number;
|
|
44
|
+
readonly modelCalls: number;
|
|
45
|
+
readonly sessionId?: string;
|
|
46
|
+
readonly toolWorkMs: number;
|
|
47
|
+
readonly toolCalls: number;
|
|
48
|
+
readonly turnId?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Builds the detailed timeline only when inspection, rather than search, needs it. */
|
|
51
|
+
export declare function analyzeLocalTrace(traceId: string, spans: readonly LocalTraceSpan[], selector?: TraceAnalysisSelector): TraceAnalysis;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{summarizeLocalTrace}from"#tracing/local-trace-summary.js";import{localTraceOperations,traceModelName,traceSessionId,traceStringAttribute,traceToolName,uniqueLocalTraceSpans}from"#tracing/local-trace-operations.js";function analyzeLocalTrace(e,t,n={}){let r=uniqueLocalTraceSpans(t),i=new Map(localTraceOperations(r).map(({span:e})=>[e.spanId,e])),a=r.filter(e=>matches(i.get(e.spanId)??e,n)),o=a.reduce((e,t)=>t.startTimeNs<e?t.startTimeNs:e,a[0]?.startTimeNs??0n),s=localTraceOperations(a).map(e=>recordFor(e,o)).sort((e,t)=>e.startOffsetMs-t.startOffsetMs||e.endOffsetMs-t.endOffsetMs||e.spanId.localeCompare(t.spanId));return{summary:summarizeLocalTrace(e,a),groups:groups(s),modelWorkMs:sum(s,`model`),toolWorkMs:sum(s,`tool`),records:s}}function matches(e,t){let n=traceSessionId(e),r=traceStringAttribute(e,`agent.turn.id`);if(t.excludeSessionId!==void 0&&n===t.excludeSessionId||t.sessionId!==void 0&&n!==t.sessionId||t.turnId!==void 0&&r!==t.turnId)return!1;let i=Number(e.startTimeNs/1000000n);return(t.fromMs===void 0||i>=t.fromMs)&&(t.toMs===void 0||i<=t.toMs)}function recordFor(e,t){let{span:n,category:r}=e,i={category:r,durationMs:Number(n.endTimeNs-n.startTimeNs)/1e6,endOffsetMs:Number(n.endTimeNs-t)/1e6,outcome:n.statusCode===2?`failed`:`completed`,spanId:n.spanId,startOffsetMs:Number(n.startTimeNs-t)/1e6},a=traceStringAttribute(n,`agent.action.call_id`),o=traceModelName(n),s=traceSessionId(n),c=traceToolName(n),l=traceStringAttribute(n,`agent.turn.id`);if(a!==void 0&&(i.callId=a),n.statusMessage!==void 0&&(i.error=n.statusMessage),o!==void 0&&(i.model=o),n.parentSpanId!==void 0&&(i.parentSpanId=n.parentSpanId),s!==void 0&&(i.sessionId=s),c!==void 0&&r===`tool`&&(i.toolName=c),c!==void 0&&r===`other`&&(i.actionName=c),l!==void 0&&(i.turnId=l),e.actionDurationMs!==void 0&&(i.actionDurationMs=e.actionDurationMs),r===`model`){let e={};for(let[t,r]of Object.entries({inputTokens:`agent.usage.input_tokens`,outputTokens:`agent.usage.output_tokens`,cacheReadTokens:`agent.usage.cache_read_tokens`,cacheWriteTokens:`agent.usage.cache_write_tokens`})){let i=n.attributes[r];typeof i==`number`&&Number.isFinite(i)&&i>=0&&(e[t]=i)}Object.keys(e).length>0&&(i.usage=e)}return i}function groups(e){let t=new Map;for(let n of e){let e=JSON.stringify([n.sessionId,n.turnId]),r=t.get(e);r===void 0&&(r={modelCalls:0,modelWorkMs:0,toolCalls:0,toolWorkMs:0},n.sessionId!==void 0&&(r.sessionId=n.sessionId),n.turnId!==void 0&&(r.turnId=n.turnId),t.set(e,r)),n.category===`model`&&(r.modelCalls+=1,r.modelWorkMs+=n.durationMs),n.category===`tool`&&(r.toolCalls+=1,r.toolWorkMs+=n.durationMs)}return[...t.values()]}function sum(e,t){return e.reduce((e,n)=>e+(n.category===t?n.durationMs:0),0)}export{analyzeLocalTrace};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A path-safe, non-reversible key for one recorded conversation identifier. */
|
|
2
|
+
export declare function localTraceConversationIndexKey(conversationId: string): string;
|
|
3
|
+
/** Marker path relative to one trace directory. */
|
|
4
|
+
export declare function localTraceConversationMarker(conversationId: string): string;
|
|
5
|
+
/** Marker proving that a trace was written by an index-aware writer. */
|
|
6
|
+
export declare function localTraceIndexedMarker(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Records conversation membership without rewriting shared state. Empty marker
|
|
9
|
+
* creation is idempotent, so overlapping dev workers cannot lose each other's
|
|
10
|
+
* conversation entries.
|
|
11
|
+
*/
|
|
12
|
+
export declare function indexLocalTraceConversation(input: {
|
|
13
|
+
readonly conversationId: string;
|
|
14
|
+
readonly traceDirectory: string;
|
|
15
|
+
}): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{join}from"node:path";const INDEX_DIRECTORY=`index/v1`,CONVERSATIONS_DIRECTORY=`${INDEX_DIRECTORY}/conversations`,INDEXED_MARKER=`${INDEX_DIRECTORY}/indexed`;function localTraceConversationIndexKey(e){return createHash(`sha256`).update(e).digest(`hex`)}function localTraceConversationMarker(e){return`${CONVERSATIONS_DIRECTORY}/${localTraceConversationIndexKey(e)}`}function localTraceIndexedMarker(){return INDEXED_MARKER}async function indexLocalTraceConversation(e){let t=join(e.traceDirectory,localTraceConversationMarker(e.conversationId));await mkdir(join(e.traceDirectory,CONVERSATIONS_DIRECTORY),{recursive:!0}),await createMarker(t),await createMarker(join(e.traceDirectory,INDEXED_MARKER))}async function createMarker(e){try{await writeFile(e,``,{flag:`wx`})}catch(e){if(!isAlreadyPresent(e))throw e}}function isAlreadyPresent(e){return e instanceof Error&&`code`in e&&e.code===`EEXIST`}export{indexLocalTraceConversation,localTraceConversationIndexKey,localTraceConversationMarker,localTraceIndexedMarker};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LocalTraceSpan } from "#tracing/local-trace-reader.js";
|
|
2
|
+
export interface LocalTraceOperation {
|
|
3
|
+
readonly span: LocalTraceSpan;
|
|
4
|
+
readonly category: "model" | "other" | "tool";
|
|
5
|
+
readonly actionDurationMs?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function uniqueLocalTraceSpans(spans: readonly LocalTraceSpan[]): LocalTraceSpan[];
|
|
8
|
+
/** Pairs action wrappers with execution spans without constructing a sorted timeline. */
|
|
9
|
+
export declare function localTraceOperations(spans: readonly LocalTraceSpan[]): LocalTraceOperation[];
|
|
10
|
+
export declare function traceModelName(span: LocalTraceSpan): string | undefined;
|
|
11
|
+
export declare function traceToolName(span: LocalTraceSpan): string | undefined;
|
|
12
|
+
export declare function traceSessionId(span: LocalTraceSpan): string | undefined;
|
|
13
|
+
export declare function traceStringAttribute(span: LocalTraceSpan, key: string): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function uniqueLocalTraceSpans(e){let t=new Map;for(let n of e)t.has(n.spanId)||t.set(n.spanId,n);return[...t.values()]}function localTraceOperations(e){let t=new Map(e.map(e=>[e.spanId,e])),n=new Set,r=[];for(let i of e){let e=categoryFor(i);if(e===void 0)continue;let a=i.parentSpanId===void 0?void 0:t.get(i.parentSpanId);i.attributes[`gen_ai.operation.name`]===`execute_tool`&&a?.name===`agent.action`&&traceToolName(a)===traceToolName(i)?(n.add(a.spanId),r.push({category:e,span:{...i,attributes:{...a.attributes,...i.attributes},parentSpanId:a.parentSpanId,statusCode:a.statusCode===2?a.statusCode:i.statusCode,statusMessage:a.statusCode===2?a.statusMessage:i.statusMessage},...a.attributes[`agent.action.kind`]===`subagent-call`?{actionDurationMs:Number(a.endTimeNs-a.startTimeNs)/1e6}:{}})):r.push({category:e,span:i})}return r.filter(({span:e})=>!n.has(e.spanId))}function categoryFor(e){if(e.attributes[`gen_ai.operation.name`]===`chat`)return`model`;if(e.attributes[`gen_ai.operation.name`]===`execute_tool`)return`tool`;if(e.name===`agent.action`)return e.attributes[`agent.action.kind`]===`tool-call`?`tool`:`other`}function traceModelName(e){return traceStringAttribute(e,`agent.model.id`)??traceStringAttribute(e,`gen_ai.request.model`)}function traceToolName(e){return traceStringAttribute(e,`gen_ai.tool.name`)??traceStringAttribute(e,`agent.action.name`)}function traceSessionId(e){return traceStringAttribute(e,`agent.run.id`)??traceStringAttribute(e,`agent.session.id`)}function traceStringAttribute(e,t){let n=e.attributes[t];return typeof n==`string`&&n.length>0?n:void 0}export{localTraceOperations,traceModelName,traceSessionId,traceStringAttribute,traceToolName,uniqueLocalTraceSpans};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LocalTraceSummary } from "#tracing/local-trace-summary.js";
|
|
2
|
+
export type LocalTraceSortBy = "duration" | "failures" | "inputTokens" | "latest";
|
|
3
|
+
export interface LocalTraceQueryFilter {
|
|
4
|
+
readonly agentName?: string;
|
|
5
|
+
/** Selects traces containing error spans, not necessarily failed activations. */
|
|
6
|
+
readonly failedOnly?: boolean;
|
|
7
|
+
readonly sessionId?: string;
|
|
8
|
+
readonly toolName?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Filters whole traces without restricting their totals to matching spans. */
|
|
11
|
+
export declare function queryLocalTraceSummaries(summaries: readonly LocalTraceSummary[], options: LocalTraceQueryFilter & {
|
|
12
|
+
readonly limit: number;
|
|
13
|
+
readonly sortBy: LocalTraceSortBy;
|
|
14
|
+
}): {
|
|
15
|
+
readonly matches: readonly LocalTraceSummary[];
|
|
16
|
+
readonly truncated: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function queryLocalTraceSummaries(e,t){let n=e.filter(e=>matchesFilter(e,t));return n.sort((e,n)=>compareSummaries(e,n,t.sortBy)),{matches:n.slice(0,t.limit),truncated:n.length>t.limit}}function matchesFilter(e,t){return(t.agentName===void 0||e.agentNames.includes(t.agentName))&&(t.sessionId===void 0||e.sessionIds.includes(t.sessionId))&&(t.toolName===void 0||e.toolNames.includes(t.toolName))&&(t.failedOnly!==!0||e.errorSpanCount>0)}function compareSummaries(e,t,n){return(n===`duration`?t.durationMs-e.durationMs:n===`failures`?t.errorSpanCount-e.errorSpanCount:n===`inputTokens`?t.inputTokens-e.inputTokens:Date.parse(t.startedAt)-Date.parse(e.startedAt))||e.traceId.localeCompare(t.traceId)}export{queryLocalTraceSummaries};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mkdir}from"node:fs/promises";import{createLogger,formatError}from"#internal/logging.js";import{join}from"node:path";import{atomicWriteFile}from"#shared/atomic-write-file.js";import{JsonTraceSerializer}from"#compiled/@opentelemetry/otlp-transformer/index.js";const log=createLogger(`harness.local-trace-span-processor`);function resolveLocalTraceStoreDirectory(e){return join(e,`.eve`,`traces`)}function resolveLocalTraceSchemaDirectory(e){return join(resolveLocalTraceStoreDirectory(e),`v1`)}function
|
|
1
|
+
import{mkdir}from"node:fs/promises";import{createLogger,formatError}from"#internal/logging.js";import{join}from"node:path";import{atomicWriteFile}from"#shared/atomic-write-file.js";import{indexLocalTraceConversation}from"#tracing/local-trace-discovery-index.js";import{JsonTraceSerializer}from"#compiled/@opentelemetry/otlp-transformer/index.js";const log=createLogger(`harness.local-trace-span-processor`);function resolveLocalTraceStoreDirectory(e){return join(e,`.eve`,`traces`)}function resolveLocalTraceSchemaDirectory(e){return join(resolveLocalTraceStoreDirectory(e),`v1`)}function resolveLocalTraceDirectory(e,t){return join(resolveLocalTraceSchemaDirectory(e),t)}function resolveLocalTraceSegmentsDirectory(e,t){return join(resolveLocalTraceDirectory(e,t),`segments`)}var LocalTraceSpanProcessor=class{#e;#t=Promise.resolve();#n=!1;constructor(e){this.#e=e}forceFlush(){return this.#t}onStart(){}onEnd(e){if(!isReadableSpan(e))return;let{spanId:t,traceId:n}=e.spanContext();if(!isHexId(n,32)||!isHexId(t,16))return;let r=JsonTraceSerializer.serializeRequest([e]);if(r===void 0)return;let i=e.attributes[`gen_ai.conversation.id`],a=typeof i==`string`&&i.length>0?i:void 0;this.#t=this.#t.then(async()=>{let e=resolveLocalTraceDirectory(this.#e,n),i=resolveLocalTraceSegmentsDirectory(this.#e,n);await mkdir(i,{recursive:!0}),await atomicWriteFile(join(i,`${t}.otlp.json`),r),a!==void 0&&await indexLocalTraceConversation({conversationId:a,traceDirectory:e})}).catch(e=>{this.#n||(this.#n=!0,log.warn(`local trace persistence failed`,{error:formatError(e)}))})}shutdown(){return this.forceFlush()}};function isReadableSpan(e){return typeof e==`object`&&!!e&&`attributes`in e&&`spanContext`in e&&typeof e.spanContext==`function`}function isHexId(e,t){return e.length===t&&/^[0-9a-f]+$/u.test(e)}export{LocalTraceSpanProcessor,resolveLocalTraceSchemaDirectory,resolveLocalTraceSegmentsDirectory};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { LocalTraceSpan } from "#tracing/local-trace-reader.js";
|
|
2
|
+
/** Structural metadata and totals for one retained trace, not its final outcome. */
|
|
3
|
+
export interface LocalTraceSummary {
|
|
4
|
+
readonly traceId: string;
|
|
5
|
+
readonly startedAt: string;
|
|
6
|
+
/** Elapsed time from the earliest span start to the latest span end. */
|
|
7
|
+
readonly durationMs: number;
|
|
8
|
+
readonly spanCount: number;
|
|
9
|
+
readonly agentNames: readonly string[];
|
|
10
|
+
readonly conversationIds: readonly string[];
|
|
11
|
+
readonly sessionIds: readonly string[];
|
|
12
|
+
readonly models: readonly string[];
|
|
13
|
+
readonly toolNames: readonly string[];
|
|
14
|
+
readonly modelCalls: number;
|
|
15
|
+
readonly toolCalls: number;
|
|
16
|
+
/** Error-bearing spans; one failure can be recorded on multiple ancestors. */
|
|
17
|
+
readonly errorSpanCount: number;
|
|
18
|
+
readonly inputTokens: number;
|
|
19
|
+
readonly outputTokens: number;
|
|
20
|
+
readonly cacheReadTokens: number;
|
|
21
|
+
readonly cacheWriteTokens: number;
|
|
22
|
+
/** Total gateway cost in USD; undefined when no step reported cost. */
|
|
23
|
+
readonly costUsd?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Only agent.step spans contribute usage: model spans repeat the same counters.
|
|
27
|
+
* Operation counts collapse action/execution pairs, but error counts retain all
|
|
28
|
+
* error-bearing spans so summaries agree with the raw trace tree.
|
|
29
|
+
*/
|
|
30
|
+
export declare function summarizeLocalTrace(traceId: string, spans: readonly LocalTraceSpan[]): LocalTraceSummary;
|
|
31
|
+
export declare function localTraceSpanCostUsd(span: LocalTraceSpan): number | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AGENT_USAGE_ATTRIBUTES}from"#tracing/agent-span-contract.js";import{localTraceOperations,traceModelName,traceSessionId,traceStringAttribute,traceToolName,uniqueLocalTraceSpans}from"#tracing/local-trace-operations.js";function summarizeLocalTrace(e,t){let n=uniqueLocalTraceSpans(t),r=new Set,i=new Set,a=new Set,o=new Set,s=n[0]?.startTimeNs??0n,c=s,l=0,u=0,d,f=0,p=0,m=0;for(let e of n){if(e.startTimeNs<s&&(s=e.startTimeNs),e.endTimeNs>c&&(c=e.endTimeNs),add(r,traceModelName(e)),add(i,traceStringAttribute(e,`agent.name`)),add(a,traceStringAttribute(e,`gen_ai.conversation.id`)),add(o,traceSessionId(e)),e.statusCode===2&&(f+=1),e.name!==`agent.step`)continue;p+=numberAttribute(e,`agent.usage.input_tokens`)??0,m+=numberAttribute(e,`agent.usage.output_tokens`)??0,l+=numberAttribute(e,AGENT_USAGE_ATTRIBUTES.cacheReadTokens)??numberAttribute(e,`gen_ai.usage.cache_read.input_tokens`)??0,u+=numberAttribute(e,AGENT_USAGE_ATTRIBUTES.cacheWriteTokens)??numberAttribute(e,`gen_ai.usage.cache_creation.input_tokens`)??0;let t=localTraceSpanCostUsd(e);t!==void 0&&(d=(d??0)+t)}let h=new Set,g=0,_=0;for(let e of localTraceOperations(n))e.category===`model`&&(g+=1),e.category===`tool`&&(_+=1,add(h,traceToolName(e.span)));return{traceId:e,startedAt:new Date(Number(s/1000000n)).toISOString(),durationMs:Number(c-s)/1e6,spanCount:n.length,agentNames:[...i].sort(),conversationIds:[...a].sort(),sessionIds:[...o].sort(),models:[...r].sort(),toolNames:[...h].sort(),modelCalls:g,toolCalls:_,errorSpanCount:f,cacheReadTokens:l,cacheWriteTokens:u,costUsd:d,inputTokens:p,outputTokens:m}}function localTraceSpanCostUsd(e){return numberAttribute(e,`gen_ai.usage.gateway_cost`)??numberAttribute(e,`gen_ai.usage.cost`)}function numberAttribute(e,t){let n=e.attributes[t];if(typeof n==`number`)return Number.isFinite(n)&&n>=0?n:void 0;if(typeof n==`string`&&n.trim()!==``){let e=Number(n);return Number.isFinite(e)&&e>=0?e:void 0}}function add(e,t){t!==void 0&&e.add(t)}export{localTraceSpanCostUsd,summarizeLocalTrace};
|