eve 0.44.3 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +13 -12
- package/dist/src/acp/adapter.d.ts +1 -1
- package/dist/src/approval/definition.d.ts +84 -0
- package/dist/src/approval/definition.js +1 -0
- package/dist/src/channel/adapter.d.ts +2 -2
- package/dist/src/{runtime/governance → channel}/auth/http-basic.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/jwt-ecdsa.d.ts +1 -1
- package/dist/src/channel/auth/jwt-ecdsa.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/jwt-hmac.d.ts +1 -1
- package/dist/src/channel/auth/jwt-hmac.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/oidc.d.ts +1 -1
- package/dist/src/channel/auth/oidc.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/token-claims.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/types.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.d.ts +1 -1
- package/dist/src/channel/channel-operations.d.ts +1 -1
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/instrumentation.d.ts +1 -0
- package/dist/src/channel/instrumentation.js +1 -1
- package/dist/src/channel/resolve-text.d.ts +1 -1
- package/dist/src/channel/routes.d.ts +1 -1
- package/dist/src/channel/session.d.ts +1 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +2 -2
- package/dist/src/chunks/{use-eve-agent-DpUEwS23.js → use-eve-agent-C46Kan_I.js} +390 -107
- package/dist/src/chunks/{use-eve-agent-BsLJiIbc.js → use-eve-agent-OtHRoxIS.js} +390 -107
- package/dist/src/cli/banner.js +1 -1
- package/dist/src/cli/commands/agent-instructions.js +2 -2
- package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
- package/dist/src/cli/commands/extension-build.js +1 -1
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/trace.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +2 -0
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +3 -1
- package/dist/src/cli/dev/tui/setup-selection-input.js +2 -2
- package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/ui/live-row.js +1 -1
- package/dist/src/cli/ui/output.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +1757 -302
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/client.js +1 -1
- package/dist/src/client/eve-agent-store.d.ts +6 -5
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/health-response-error.d.ts +5 -0
- package/dist/src/client/health-response-error.js +1 -0
- package/dist/src/client/health-schema.d.ts +7 -0
- package/dist/src/client/health-schema.js +1 -0
- package/dist/src/client/index.d.ts +6 -3
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -2
- package/dist/src/client/message-reducer-types.d.ts +1 -1
- package/dist/src/client/reducer.d.ts +1 -1
- package/dist/src/client/session-utils.d.ts +1 -1
- package/dist/src/client/session.d.ts +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +3 -7
- package/dist/src/compiler/artifacts.d.ts +37 -11
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/channel-route-plan.d.ts +10 -0
- package/dist/src/compiler/channel-route-plan.js +1 -0
- package/dist/src/compiler/compile-agent.d.ts +2 -2
- package/dist/src/compiler/compile-agent.js +2 -2
- package/dist/src/compiler/compile-from-memory.d.ts +13 -52
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +38 -0
- package/dist/src/compiler/diagnostics.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +14 -11
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/load-binding-namespace.d.ts +9 -0
- package/dist/src/compiler/load-binding-namespace.js +1 -0
- package/dist/src/compiler/manifest.d.ts +172 -51
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-map.d.ts +12 -30
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/node-source-state.d.ts +24 -0
- package/dist/src/compiler/node-source-state.js +1 -0
- package/dist/src/compiler/normalize-agent-config.d.ts +5 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.d.ts +8 -2
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-helpers.d.ts +13 -4
- package/dist/src/compiler/normalize-helpers.js +1 -1
- package/dist/src/compiler/normalize-hook.d.ts +4 -11
- package/dist/src/compiler/normalize-hook.js +1 -1
- package/dist/src/compiler/normalize-instructions.d.ts +3 -3
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +29 -0
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -0
- package/dist/src/compiler/normalize-manifest.d.ts +8 -4
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-sandbox.d.ts +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/normalize-schedule.d.ts +2 -2
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -2
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +21 -39
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +2 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +71 -0
- package/dist/src/compiler/project-sources.js +1 -0
- package/dist/src/compiler/remote-agent-node.d.ts +8 -0
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +153 -0
- package/dist/src/compiler/source-graph.js +1 -0
- package/dist/src/compiler/validate-artifact.d.ts +17 -0
- package/dist/src/compiler/validate-artifact.js +1 -0
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/connections/errors.d.ts +125 -0
- package/dist/src/connections/errors.js +1 -0
- package/dist/src/context/build-base-tool-context.d.ts +2 -2
- package/dist/src/context/build-callback-context.d.ts +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
- package/dist/src/context/dynamic-resolve-context.d.ts +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +0 -2
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +2 -2
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/key-names.d.ts +12 -0
- package/dist/src/context/key-names.js +1 -0
- package/dist/src/context/keys.d.ts +8 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/providers/connection-key.d.ts +1 -1
- package/dist/src/context/providers/connection.d.ts +1 -1
- package/dist/src/context/session-context.d.ts +32 -0
- package/dist/src/discover/discover-agent.d.ts +0 -13
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -6
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -1
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/dynamic/definition.d.ts +117 -0
- package/dist/src/dynamic/definition.js +1 -0
- package/dist/src/evals/autoevals-client.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/session.d.ts +1 -1
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/index.d.ts +12 -0
- package/dist/src/eve-channel/index.js +1 -0
- package/dist/src/eve-channel/request.d.ts +49 -0
- package/dist/src/eve-channel/request.js +3 -0
- package/dist/src/eve-channel/support.d.ts +34 -0
- package/dist/src/eve-channel/support.js +1 -0
- package/dist/src/eve-channel/types.d.ts +128 -0
- package/dist/src/eve-channel/types.js +1 -0
- package/dist/src/execution/agent-handle-dispatch.d.ts +1 -1
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/compaction.js +1 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +1 -1
- package/dist/src/{runtime → execution}/connections/callback-route.d.ts +2 -20
- package/dist/src/execution/connections/callback-route.js +1 -0
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/delegated-parent-notification.d.ts +2 -2
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/delegated-parent-result.d.ts +1 -1
- package/dist/src/execution/delegated-parent-result.js +1 -1
- package/dist/src/execution/delegation-tool.d.ts +1 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +1 -2
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +1 -1
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/effective-output-schema.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +6 -0
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/forward-turn-cancellation-step.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +10 -8
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/{bash-tool.d.ts → bash.d.ts} +2 -2
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +1 -0
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +1 -1
- package/dist/src/execution/sandbox/grep-tool.js +1 -1
- package/dist/src/execution/sandbox/{read-file-tool.d.ts → read-file.d.ts} +2 -2
- package/dist/src/execution/sandbox/{read-file-tool.js → read-file.js} +1 -1
- package/dist/src/execution/sandbox/{write-file-tool.d.ts → write-file.d.ts} +2 -2
- package/dist/src/execution/sandbox/write-file.js +1 -0
- package/dist/src/execution/session-callback-route.d.ts +2 -0
- package/dist/src/execution/session-callback-route.js +1 -0
- package/dist/src/execution/session-callback-step.js +1 -1
- package/dist/src/execution/session-timeout-steps.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/subagent-adapter.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
- package/dist/src/execution/subagent-invocation.d.ts +0 -3
- package/dist/src/execution/subagent-invocation.js +1 -1
- package/dist/src/execution/subagent-start-local.d.ts +1 -2
- package/dist/src/execution/subagent-start-local.js +1 -1
- package/dist/src/execution/subagent-start-remote.d.ts +1 -2
- package/dist/src/execution/subagent-start-remote.js +1 -1
- package/dist/src/execution/subagent-tool.d.ts +4 -8
- package/dist/src/execution/subagent-tool.js +1 -1
- package/dist/src/execution/subagent-usage-span.d.ts +1 -1
- package/dist/src/execution/task-input-response-route.d.ts +2 -0
- package/dist/src/execution/task-input-response-route.js +1 -0
- package/dist/src/execution/tasks/child/instructions.js +1 -1
- package/dist/src/execution/tasks/child/update.d.ts +1 -1
- package/dist/src/execution/tasks/child/update.js +1 -1
- package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +1 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +2 -2
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- 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/terminate-child-sessions-step.d.ts +4 -5
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.d.ts +5 -6
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/connection-search.d.ts +1 -0
- package/dist/src/execution/tools/connection-search.js +2 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/file-state.d.ts +2 -2
- package/dist/src/execution/tools/load-skill.d.ts +6 -0
- package/dist/src/execution/tools/load-skill.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/subagent/local.d.ts +7 -7
- package/dist/src/execution/tools/subagent/local.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/subagent/remote.d.ts +5 -5
- package/dist/src/execution/tools/subagent/remote.js +1 -0
- package/dist/src/execution/tools/tasks.d.ts +18 -0
- package/dist/src/execution/tools/tasks.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/todo.d.ts +0 -2
- package/dist/src/{runtime/framework-tools → execution/tools}/todo.js +1 -2
- package/dist/src/execution/turn-control-protocol.js +1 -1
- package/dist/src/execution/web-fetch/execute.js +1 -0
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-trace-context.js +1 -1
- package/dist/src/framework/host-inventory.d.ts +8 -0
- package/dist/src/framework/host-inventory.js +1 -0
- package/dist/src/framework/sources/modules/agent.d.ts +4 -0
- package/dist/src/framework/sources/modules/agent.js +1 -0
- package/dist/src/framework/sources/modules/eve-channel.d.ts +1 -0
- package/dist/src/framework/sources/modules/eve-channel.js +1 -0
- package/dist/src/framework/sources/modules/home-channel.d.ts +2 -0
- package/dist/src/framework/sources/modules/home-channel.js +1 -0
- package/dist/src/framework/sources/modules/sandbox.d.ts +2 -0
- package/dist/src/framework/sources/modules/sandbox.js +1 -0
- package/dist/src/framework/sources/registry.d.ts +5 -0
- package/dist/src/framework/sources/registry.js +1 -0
- package/dist/src/harness/action-result-helpers.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/authorization.d.ts +3 -3
- package/dist/src/harness/background-tools.d.ts +2 -2
- package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +3 -3
- package/dist/src/{runtime/framework-tools → harness}/final-output.d.ts +1 -1
- package/dist/src/harness/final-output.js +1 -0
- package/dist/src/harness/handles/query.d.ts +1 -1
- package/dist/src/harness/handles/store.d.ts +8 -0
- package/dist/src/harness/handles/store.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
- package/dist/src/harness/hitl/approval-prompt.d.ts +1 -1
- package/dist/src/harness/hitl/pending-input-resolution.d.ts +2 -2
- package/dist/src/harness/hitl/question-input-requests.d.ts +1 -1
- package/dist/src/harness/input-extraction.d.ts +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-class.d.ts +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +1 -1
- package/dist/src/harness/input-requests.d.ts +2 -2
- package/dist/src/harness/instrumentation/lifecycle.d.ts +3 -0
- package/dist/src/harness/instrumentation/providers.js +1 -1
- package/dist/src/harness/instrumentation/runtime.d.ts +2 -1
- package/dist/src/harness/pending-input-batches.d.ts +1 -1
- package/dist/src/harness/prepare-trace-context.d.ts +3 -0
- package/dist/src/harness/prepare-trace-context.js +1 -1
- package/dist/src/harness/provider-safety.d.ts +7 -0
- package/dist/src/harness/provider-safety.js +1 -0
- package/dist/src/{runtime/framework-tools/web-search.d.ts → harness/provider-tool-schemas.d.ts} +1 -9
- package/dist/src/harness/provider-tool-schemas.js +1 -0
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +1 -1
- package/dist/src/harness/request-input-tool.d.ts +4 -0
- package/dist/src/harness/request-input-tool.js +1 -0
- package/dist/src/harness/runtime-actions.d.ts +1 -1
- package/dist/src/harness/session-limit-continuation.d.ts +1 -1
- package/dist/src/harness/step-hooks.d.ts +2 -0
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/stream-actions.d.ts +1 -1
- package/dist/src/harness/subagent-depth.d.ts +1 -1
- package/dist/src/harness/tool-call-action.d.ts +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.d.ts +1 -1
- package/dist/src/harness/tools.d.ts +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +3 -9
- package/dist/src/harness/workflow-runtime-action-state.d.ts +1 -1
- package/dist/src/harness/workflow-subagent-limit.d.ts +1 -1
- package/dist/src/instrumentation/provider.d.ts +117 -0
- package/dist/src/instrumentation/provider.js +1 -0
- package/dist/src/internal/application/compiled-artifacts.js +5 -4
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/approval.d.ts +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -3
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +17 -0
- package/dist/src/internal/authored-definition/source-identity.js +1 -0
- package/dist/src/internal/authored-module-map-loader.d.ts +1 -5
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/invocation/agent-invocation.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.d.ts +1 -1
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/host/application-route-registry.d.ts +2 -41
- package/dist/src/internal/nitro/host/application-route-registry.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.js +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -4
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +2 -0
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +3 -3
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +9 -215
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +2 -13
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +5 -0
- package/dist/src/internal/nitro/routes/channel-route-context.js +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +0 -9
- package/dist/src/internal/nitro/routes/index.js +1 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +5 -5
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/programmatic-source-loader.d.ts +1 -0
- package/dist/src/internal/programmatic-source-loader.js +1 -0
- package/dist/src/internal/runtime-registry.d.ts +3 -4
- package/dist/src/protocol/message.d.ts +3 -3
- package/dist/src/protocol/routes.d.ts +2 -0
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/agents/auth.d.ts +10 -6
- package/dist/src/public/agents/auth.js +1 -1
- package/dist/src/public/channels/auth.d.ts +1 -1
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/authorization.d.ts +3 -0
- package/dist/src/public/channels/chat-sdk/authorization.js +3 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +2 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/hitl.d.ts +1 -1
- package/dist/src/public/channels/discord/hitl.js +1 -1
- package/dist/src/public/channels/discord/inbound.d.ts +1 -0
- package/dist/src/public/channels/discord/inbound.js +1 -1
- package/dist/src/public/channels/eve.d.ts +1 -139
- package/dist/src/public/channels/eve.js +1 -3
- package/dist/src/public/channels/github/dispatch.d.ts +5 -0
- package/dist/src/public/channels/github/dispatch.js +1 -1
- package/dist/src/public/channels/github/githubChannel.js +1 -1
- package/dist/src/public/channels/github/inbound.d.ts +2 -0
- package/dist/src/public/channels/github/inbound.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/index.js +1 -1
- package/dist/src/public/channels/linear/hitl.d.ts +1 -1
- package/dist/src/public/channels/linear/inbound.js +1 -1
- package/dist/src/public/channels/linq/index.d.ts +1 -1
- package/dist/src/public/channels/linq/index.js +1 -1
- package/dist/src/public/channels/linq/linqChannel.d.ts +3 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/mcp.js +1 -1
- package/dist/src/public/channels/photon/index.d.ts +1 -1
- package/dist/src/public/channels/photon/index.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +3 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +1 -1
- package/dist/src/public/channels/slack/api.d.ts +15 -5
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/attachments.d.ts +2 -2
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +3 -1
- package/dist/src/public/channels/slack/hitl.js +1 -1
- package/dist/src/public/channels/slack/inbound-content.d.ts +4 -0
- package/dist/src/public/channels/slack/inbound-content.js +4 -0
- package/dist/src/public/channels/slack/inbound.d.ts +17 -1
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -0
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.d.ts +10 -0
- package/dist/src/public/channels/slack/interaction-cards.js +1 -0
- package/dist/src/public/channels/slack/interactions.d.ts +1 -0
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/model-context.d.ts +3 -1
- package/dist/src/public/channels/slack/model-context.js +2 -2
- package/dist/src/public/channels/slack/session-operations.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +7 -2
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/hitl.d.ts +1 -1
- package/dist/src/public/channels/teams/hitl.js +1 -1
- package/dist/src/public/channels/teams/inbound.d.ts +2 -0
- package/dist/src/public/channels/teams/inbound.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/teams/verify.js +1 -1
- package/dist/src/public/channels/telegram/api.d.ts +15 -0
- package/dist/src/public/channels/telegram/api.js +2 -2
- package/dist/src/public/channels/telegram/authorization-callback.d.ts +10 -0
- package/dist/src/public/channels/telegram/authorization-callback.js +1 -0
- package/dist/src/public/channels/telegram/authorization.d.ts +19 -0
- package/dist/src/public/channels/telegram/authorization.js +3 -0
- package/dist/src/public/channels/telegram/defaults.d.ts +1 -0
- package/dist/src/public/channels/telegram/defaults.js +3 -3
- package/dist/src/public/channels/telegram/hitl.d.ts +1 -1
- package/dist/src/public/channels/telegram/hitl.js +1 -1
- package/dist/src/public/channels/telegram/inbound.d.ts +1 -0
- package/dist/src/public/channels/telegram/inbound.js +1 -1
- package/dist/src/public/channels/telegram/index.d.ts +1 -1
- package/dist/src/public/channels/telegram/index.js +1 -1
- package/dist/src/public/channels/telegram/state.d.ts +6 -0
- package/dist/src/public/channels/telegram/state.js +1 -0
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +11 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/connections/errors.d.ts +1 -125
- package/dist/src/public/connections/errors.js +1 -1
- package/dist/src/public/connections/index.d.ts +2 -2
- package/dist/src/public/connections/index.js +1 -1
- package/dist/src/public/definitions/agent.d.ts +1 -1
- package/dist/src/public/definitions/agent.js +1 -1
- package/dist/src/public/definitions/approval.d.ts +2 -84
- package/dist/src/public/definitions/approval.js +1 -1
- package/dist/src/public/definitions/callback-context.d.ts +1 -32
- package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
- package/dist/src/public/definitions/connections/mcp.js +1 -1
- package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
- package/dist/src/public/definitions/connections/openapi.js +1 -1
- package/dist/src/public/definitions/connections/protocol.d.ts +1 -1
- package/dist/src/public/definitions/instructions.d.ts +2 -2
- package/dist/src/public/definitions/instructions.js +1 -1
- package/dist/src/public/definitions/skill.js +1 -1
- package/dist/src/public/index.d.ts +1 -1
- package/dist/src/public/instructions/index.d.ts +1 -1
- package/dist/src/public/instrumentation/provider.d.ts +1 -117
- package/dist/src/public/instrumentation/provider.js +1 -1
- package/dist/src/public/models/openai/chatgpt/auth.js +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/sandbox/backends/default.d.ts +1 -49
- package/dist/src/public/sandbox/backends/default.js +1 -1
- package/dist/src/public/sandbox/backends/docker.d.ts +1 -14
- package/dist/src/public/sandbox/backends/docker.js +1 -1
- package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -17
- package/dist/src/public/sandbox/backends/just-bash.js +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -17
- package/dist/src/public/sandbox/backends/microsandbox.js +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +1 -30
- package/dist/src/public/sandbox/backends/vercel.js +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +12 -1
- package/dist/src/public/skills/index.d.ts +3 -3
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/tools/approval/index.d.ts +2 -2
- package/dist/src/public/tools/approval/index.js +1 -1
- package/dist/src/public/tools/bash.d.ts +3 -0
- package/dist/src/public/tools/bash.js +1 -0
- package/dist/src/public/tools/glob.d.ts +3 -0
- package/dist/src/public/tools/glob.js +1 -0
- package/dist/src/public/tools/grep.d.ts +3 -0
- package/dist/src/public/tools/grep.js +1 -0
- package/dist/src/public/tools/index.d.ts +6 -11
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/load-skill.d.ts +3 -0
- package/dist/src/public/tools/load-skill.js +1 -0
- package/dist/src/public/tools/read-file.d.ts +3 -0
- package/dist/src/public/tools/read-file.js +1 -0
- package/dist/src/public/{tool-result-narrowing.d.ts → tools/result.d.ts} +2 -28
- package/dist/src/public/tools/result.js +1 -0
- package/dist/src/public/tools/sleep.d.ts +1 -0
- package/dist/src/public/tools/sleep.js +1 -0
- package/dist/src/public/tools/todo.d.ts +3 -0
- package/dist/src/public/tools/todo.js +1 -0
- package/dist/src/public/tools/web-fetch.d.ts +3 -0
- package/dist/src/public/tools/web-fetch.js +1 -0
- package/dist/src/public/tools/web-search.d.ts +3 -36
- package/dist/src/public/tools/web-search.js +1 -1
- package/dist/src/public/tools/workflow.d.ts +4 -0
- package/dist/src/public/tools/workflow.js +1 -0
- package/dist/src/public/tools/write-file.d.ts +3 -0
- package/dist/src/public/tools/write-file.js +1 -0
- package/dist/src/public/types/json.d.ts +1 -28
- package/dist/src/react/use-eve-agent.d.ts +1 -0
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/actions/keys.d.ts +1 -1
- package/dist/src/runtime/actions/results.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/principal.d.ts +1 -1
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/connections/registry-types.d.ts +11 -0
- package/dist/src/runtime/connections/registry.d.ts +3 -2
- package/dist/src/runtime/connections/resolve-authorization.d.ts +2 -2
- package/dist/src/runtime/connections/resolve-authorization.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -2
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +0 -6
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-connection.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/resolve-tool.d.ts +2 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sandbox/keys.js +1 -1
- package/dist/src/runtime/sandbox/registry.d.ts +4 -20
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +3 -1
- package/dist/src/runtime/skills/sandbox-access.d.ts +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +0 -27
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +11 -27
- package/dist/src/sandbox/backends/default.d.ts +49 -0
- package/dist/src/sandbox/backends/default.js +1 -0
- package/dist/src/sandbox/backends/docker.d.ts +14 -0
- package/dist/src/sandbox/backends/docker.js +1 -0
- package/dist/src/sandbox/backends/just-bash.d.ts +17 -0
- package/dist/src/sandbox/backends/just-bash.js +1 -0
- package/dist/src/sandbox/backends/microsandbox.d.ts +17 -0
- package/dist/src/sandbox/backends/microsandbox.js +1 -0
- package/dist/src/sandbox/backends/vercel.d.ts +30 -0
- package/dist/src/sandbox/backends/vercel.js +1 -0
- package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
- package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
- package/dist/src/services/dev-client.d.ts +1 -1
- package/dist/src/setup/channel-add-conflicts.js +1 -1
- package/dist/src/setup/cli/select-component.js +1 -1
- package/dist/src/setup/flows/link.js +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +7 -1
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/integrations/runner.js +1 -1
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +40 -3
- package/dist/src/setup/scaffold/create/web-template.d.ts +8 -8
- package/dist/src/setup/scaffold/create/web-template.js +336 -120
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/scaffold/update/connections.js +1 -1
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/{runtime/actions/types.d.ts → shared/action-types.d.ts} +12 -12
- package/dist/src/{runtime/actions/types.js → shared/action-types.js} +1 -1
- package/dist/src/shared/agent-definition.d.ts +3 -10
- package/dist/src/shared/agent-definition.js +1 -1
- package/dist/src/shared/channel-definition.d.ts +5 -1
- package/dist/src/{runtime/connections/types.d.ts → shared/connection-types.d.ts} +3 -13
- package/dist/src/{runtime/input/types.d.ts → shared/input.d.ts} +1 -1
- package/dist/src/shared/input.js +1 -0
- package/dist/src/shared/instructions-definition.d.ts +2 -0
- package/dist/src/shared/instructions-definition.js +1 -1
- package/dist/src/shared/objects.d.ts +5 -0
- package/dist/src/shared/objects.js +1 -0
- package/dist/src/shared/sandbox-definition.d.ts +1 -1
- package/dist/src/shared/skill-definition.d.ts +2 -0
- package/dist/src/shared/skill-definition.js +1 -1
- package/dist/src/{execution/skills/types.d.ts → shared/skill-types.d.ts} +1 -1
- package/dist/src/shared/skill-types.js +1 -0
- package/dist/src/{runtime/connections → shared}/validate-authorization.d.ts +1 -1
- package/dist/src/shared/vercel-project.d.ts +1 -0
- package/dist/src/shared/vercel-project.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +8 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/json.d.ts +4 -89
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tasks/session-index.d.ts +1 -1
- package/dist/src/tasks/task-id.d.ts +0 -1
- package/dist/src/tasks/task-id.js +1 -1
- package/dist/src/tasks/types.d.ts +1 -1
- package/dist/src/tasks/types.js +1 -1
- package/dist/src/{public/tools/approval/approval-helpers.d.ts → tools/approval/policies.d.ts} +1 -1
- package/dist/src/tools/approval/policies.js +1 -0
- package/dist/src/tools/auth.d.ts +35 -0
- package/dist/src/tools/auth.js +1 -0
- package/dist/src/{public/definitions/tool.d.ts → tools/definition.d.ts} +42 -138
- package/dist/src/tools/definition.js +1 -0
- package/dist/src/{shared/durable-dynamic-tool-callbacks.d.ts → tools/durable-callbacks.d.ts} +1 -1
- package/dist/src/tools/durable-callbacks.js +1 -0
- package/dist/src/tools/dynamic.d.ts +68 -0
- package/dist/src/tools/dynamic.js +1 -0
- package/dist/src/tools/framework/agent-contract.d.ts +8 -0
- package/dist/src/tools/framework/agent-contract.js +1 -0
- package/dist/src/tools/framework/agent.d.ts +17 -0
- package/dist/src/tools/framework/agent.js +1 -0
- package/dist/src/tools/framework/ask-question.d.ts +50 -0
- package/dist/src/tools/framework/ask-question.js +1 -0
- package/dist/src/tools/framework/connection-search.d.ts +3 -0
- package/dist/src/tools/framework/connection-search.js +1 -0
- package/dist/src/tools/framework/task-cancel.d.ts +29 -0
- package/dist/src/tools/framework/task-cancel.js +1 -0
- package/dist/src/tools/framework/task-contract.d.ts +167 -0
- package/dist/src/tools/framework/task-contract.js +1 -0
- package/dist/src/tools/framework/task-update.d.ts +9 -0
- package/dist/src/tools/framework/task-update.js +1 -0
- package/dist/src/{public/tools/output-builders.d.ts → tools/model-output.d.ts} +41 -1
- package/dist/src/tools/provided/bash.d.ts +29 -0
- package/dist/src/tools/provided/bash.js +1 -0
- package/dist/src/tools/provided/glob.d.ts +26 -0
- package/dist/src/tools/provided/glob.js +2 -0
- package/dist/src/{runtime/framework-tools → tools/provided}/grep.d.ts +10 -10
- package/dist/src/tools/provided/grep.js +2 -0
- package/dist/src/tools/provided/load-skill.d.ts +2 -0
- package/dist/src/tools/provided/load-skill.js +1 -0
- package/dist/src/tools/provided/read-file.d.ts +27 -0
- package/dist/src/tools/provided/read-file.js +2 -0
- package/dist/src/{public/tools/sleep/index.d.ts → tools/provided/sleep.d.ts} +3 -3
- package/dist/src/tools/provided/sleep.js +1 -0
- package/dist/src/tools/provided/todo.d.ts +8 -0
- package/dist/src/tools/provided/todo.js +2 -0
- package/dist/src/{runtime/framework-tools → tools/provided}/web-fetch.d.ts +5 -2
- package/dist/src/tools/provided/web-fetch.js +2 -0
- package/dist/src/tools/provided/web-search.d.ts +39 -0
- package/dist/src/tools/provided/web-search.js +1 -0
- package/dist/src/tools/provided/write-file.d.ts +23 -0
- package/dist/src/tools/provided/write-file.js +2 -0
- package/dist/src/tools/workflow.d.ts +37 -0
- package/dist/src/tools/workflow.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.d.ts +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +1 -0
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +2 -6
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-trace-reader.d.ts +1 -3
- package/dist/src/tracing/local-trace-reader.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +1 -2
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/tracing/sampled-trace.d.ts +10 -2
- package/dist/src/tracing/sampled-trace.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +8 -4
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +16 -4
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/discord.mdx +5 -1
- package/docs/channels/eve.mdx +19 -3
- package/docs/channels/github.mdx +2 -0
- package/docs/channels/linear.mdx +1 -1
- package/docs/channels/linq.mdx +1 -1
- package/docs/channels/overview.mdx +1 -1
- package/docs/channels/photon.mdx +4 -4
- package/docs/channels/slack.mdx +20 -3
- package/docs/channels/teams.mdx +1 -1
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +31 -21
- package/docs/concepts/sessions-runs-and-streaming.md +3 -1
- package/docs/connections/overview.mdx +1 -1
- package/docs/extensions.md +2 -2
- package/docs/getting-started.mdx +10 -9
- package/docs/guides/auth-and-route-protection.md +3 -3
- package/docs/guides/client/output-schema.mdx +2 -2
- package/docs/guides/client/overview.mdx +4 -2
- package/docs/guides/dev-tui.md +26 -15
- package/docs/guides/frontend/nuxt.mdx +4 -3
- package/docs/guides/frontend/overview.mdx +21 -18
- package/docs/guides/frontend/sveltekit.mdx +4 -3
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +5 -4
- package/docs/guides/frontend/use-eve-agent-vue.mdx +5 -4
- package/docs/guides/instrumentation.md +1 -0
- package/docs/guides/remote-agents.md +37 -18
- package/docs/meta.json +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/reference/cli.md +2 -4
- package/docs/reference/typescript-api.md +35 -31
- package/docs/sandbox.mdx +21 -1
- package/docs/subagents/index.mdx +11 -28
- package/docs/tools/human-in-the-loop.md +43 -2
- package/docs/tools/overview.mdx +1 -1
- package/package.json +59 -9
- package/dist/src/compiler/normalize-extension.d.ts +0 -80
- package/dist/src/compiler/normalize-extension.js +0 -1
- package/dist/src/execution/sandbox/write-file-tool.js +0 -1
- package/dist/src/execution/web-fetch/tool.js +0 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +0 -9
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +0 -1
- package/dist/src/internal/nitro/routes/health.d.ts +0 -14
- package/dist/src/internal/nitro/routes/health.js +0 -1
- package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
- package/dist/src/public/definitions/tool.js +0 -1
- package/dist/src/public/tool-result-narrowing.js +0 -1
- package/dist/src/public/tools/approval/approval-helpers.js +0 -1
- package/dist/src/public/tools/defaults.d.ts +0 -46
- package/dist/src/public/tools/defaults.js +0 -1
- package/dist/src/public/tools/define-bash-tool.d.ts +0 -21
- package/dist/src/public/tools/define-bash-tool.js +0 -1
- package/dist/src/public/tools/define-glob-tool.d.ts +0 -22
- package/dist/src/public/tools/define-glob-tool.js +0 -1
- package/dist/src/public/tools/define-grep-tool.d.ts +0 -22
- package/dist/src/public/tools/define-grep-tool.js +0 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts +0 -21
- package/dist/src/public/tools/define-read-file-tool.js +0 -1
- package/dist/src/public/tools/define-write-file-tool.d.ts +0 -22
- package/dist/src/public/tools/define-write-file-tool.js +0 -1
- package/dist/src/public/tools/internal.d.ts +0 -13
- package/dist/src/public/tools/internal.js +0 -1
- package/dist/src/public/tools/sleep/index.js +0 -1
- package/dist/src/runtime/connections/callback-route.js +0 -1
- package/dist/src/runtime/framework-channels/index.d.ts +0 -6
- package/dist/src/runtime/framework-channels/index.js +0 -1
- package/dist/src/runtime/framework-tools/agent.d.ts +0 -29
- package/dist/src/runtime/framework-tools/agent.js +0 -1
- package/dist/src/runtime/framework-tools/ask-question.d.ts +0 -35
- package/dist/src/runtime/framework-tools/ask-question.js +0 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +0 -24
- package/dist/src/runtime/framework-tools/bash.js +0 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +0 -19
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +0 -2
- package/dist/src/runtime/framework-tools/final-output.js +0 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +0 -26
- package/dist/src/runtime/framework-tools/glob.js +0 -2
- package/dist/src/runtime/framework-tools/grep.js +0 -2
- package/dist/src/runtime/framework-tools/index.d.ts +0 -39
- package/dist/src/runtime/framework-tools/index.js +0 -1
- package/dist/src/runtime/framework-tools/read-file.d.ts +0 -27
- package/dist/src/runtime/framework-tools/read-file.js +0 -2
- package/dist/src/runtime/framework-tools/skill.d.ts +0 -12
- package/dist/src/runtime/framework-tools/skill.js +0 -1
- package/dist/src/runtime/framework-tools/subagent/local.js +0 -1
- package/dist/src/runtime/framework-tools/subagent/remote.js +0 -1
- package/dist/src/runtime/framework-tools/tasks.d.ts +0 -91
- package/dist/src/runtime/framework-tools/tasks.js +0 -1
- package/dist/src/runtime/framework-tools/web-fetch.js +0 -2
- package/dist/src/runtime/framework-tools/web-search.js +0 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +0 -23
- package/dist/src/runtime/framework-tools/write-file.js +0 -2
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +0 -1
- package/dist/src/runtime/governance/auth/jwt-hmac.js +0 -1
- package/dist/src/runtime/governance/auth/oidc.js +0 -1
- package/dist/src/runtime/input/types.js +0 -1
- package/dist/src/runtime/session-callback-route.d.ts +0 -6
- package/dist/src/runtime/session-callback-route.js +0 -1
- package/dist/src/runtime/task-input-response-route.d.ts +0 -5
- package/dist/src/runtime/task-input-response-route.js +0 -1
- package/dist/src/shared/durable-dynamic-tool-callbacks.js +0 -1
- package/dist/src/shared/dynamic-tool-definition.d.ts +0 -154
- package/dist/src/shared/dynamic-tool-definition.js +0 -1
- package/dist/src/shared/eve-server-health.d.ts +0 -5
- package/dist/src/shared/eve-server-health.js +0 -1
- package/dist/src/shared/tool-definition.d.ts +0 -89
- /package/dist/src/{runtime/governance → channel}/auth/http-basic.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/token-claims.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/types.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.js +0 -0
- /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.d.ts +0 -0
- /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.js +0 -0
- /package/dist/src/{execution/skills/types.js → context/session-context.js} +0 -0
- /package/dist/src/execution/sandbox/{bash-tool.js → bash.js} +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/file-state.js +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.d.ts +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.js +0 -0
- /package/dist/src/execution/web-fetch/{tool.d.ts → execute.d.ts} +0 -0
- /package/dist/src/{shared/tool-definition.js → runtime/connections/registry-types.js} +0 -0
- /package/dist/src/{runtime/connections/types.js → shared/connection-types.js} +0 -0
- /package/dist/src/{runtime/sessions/auth.d.ts → shared/session-auth.d.ts} +0 -0
- /package/dist/src/{runtime/sessions/auth.js → shared/session-auth.js} +0 -0
- /package/dist/src/{runtime/connections → shared}/validate-authorization.js +0 -0
- /package/dist/src/{public/tools/output-builders.js → tools/model-output.js} +0 -0
- /package/dist/src/{shared/tool-schema.d.ts → tools/schema.d.ts} +0 -0
- /package/dist/src/{shared/tool-schema.js → tools/schema.js} +0 -0
- /package/dist/src/{shared/tool-task.d.ts → tools/task.d.ts} +0 -0
- /package/dist/src/{shared/tool-task.js → tools/task.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{contextStorage,loadContext}from"#context/container.js";import{ContextKey}from"#context/key.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n!==void 0)return deserializeState(n).sessions[t]?.context}function readActionTraceContext(e,t,n,r){let a=e[AgentTraceContextKey.name];if(a===void 0)return;let o=Object.values(deserializeState(a).actions).find(e=>e.sessionId===t&&e.turnId===n&&e.callId===r);if(o!==void 0)return{isRemote:!1,spanId:o.spanId,traceFlags:o.parent.traceFlags,traceId:o.parent.traceId}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}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}})}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,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(t=>t.sessionId===e&&t.callId===n)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,n){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,n)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[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}}))}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??{actions:{},sessions:{},turns:{}}))}function turnKey(e,t){return`${e}\0${t}`}function serializeState(e){return{actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeState(t){return isRecord(t)?{actions:deserializeRecord(t.actions,deserializeAction),sessions:deserializeRecord(t.sessions,t=>{if(!(!isRecord(t)||!isSpanContext(t.context)))return{agentName:typeof t.agentName==`string`?t.agentName:void 0,channelAudience:normalizeChannelAudience(t.channelAudience),channelKind:typeof t.channelKind==`string`?t.channelKind:void 0,context:t.context,rootSessionId:typeof t.rootSessionId==`string`?t.rootSessionId
|
|
1
|
+
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{contextStorage,loadContext}from"#context/container.js";import{ContextKey}from"#context/key.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n!==void 0)return deserializeState(n).sessions[t]?.context}function readActionTraceContext(e,t,n,r){let a=e[AgentTraceContextKey.name];if(a===void 0)return;let o=Object.values(deserializeState(a).actions).find(e=>e.sessionId===t&&e.turnId===n&&e.callId===r);if(o!==void 0)return{isRemote:!1,spanId:o.spanId,traceFlags:o.parent.traceFlags,traceId:o.parent.traceId}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}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}})}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,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(t=>t.sessionId===e&&t.callId===n)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,n){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,n)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[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}}))}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??{actions:{},sessions:{},turns:{}}))}function turnKey(e,t){return`${e}\0${t}`}function serializeState(e){return{actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeState(t){return isRecord(t)?{actions:deserializeRecord(t.actions,deserializeAction),sessions:deserializeRecord(t.sessions,t=>{if(!(!isRecord(t)||!isSpanContext(t.context)))return{agentName:typeof t.agentName==`string`?t.agentName:void 0,channelAudience:normalizeChannelAudience(t.channelAudience),channelKind:typeof t.channelKind==`string`?t.channelKind:void 0,context:t.context,rootSessionId:typeof t.rootSessionId==`string`?t.rootSessionId:``}}),turns:deserializeRecord(t.turns,e=>{if(!(!isRecord(e)||!isSpanContext(e.context))&&!(typeof e.parentSpanId!=`string`||typeof e.startTimeMs!=`number`))return{context:e.context,parentIsRemote:typeof e.parentIsRemote==`boolean`?e.parentIsRemote:void 0,parentSpanId:e.parentSpanId,rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,sequence:typeof e.sequence==`number`?e.sequence:0,startTimeMs:e.startTimeMs,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,terminal:deserializeTerminal(e.terminal)}})}:{actions:{},sessions:{},turns:{}}}function deserializeAction(t){if(!(!isRecord(t)||typeof t.attemptIndex!=`number`||typeof t.callId!=`string`||!isActionKind(t.kind)||typeof t.name!=`string`||!isSpanContext(t.parent)||typeof t.rootSessionId!=`string`||typeof t.sessionId!=`string`||typeof t.spanId!=`string`||typeof t.startTimeMs!=`number`||typeof t.stepIndex!=`number`||typeof t.turnId!=`string`))return{attemptIndex:t.attemptIndex,callId:t.callId,channelAudience:normalizeChannelAudience(t.channelAudience),inputAttribute:typeof t.inputAttribute==`string`?t.inputAttribute:void 0,kind:t.kind,name:t.name,parent:t.parent,rootSessionId:t.rootSessionId,sessionId:t.sessionId,spanId:t.spanId,startTimeMs:t.startTimeMs,stepIndex:t.stepIndex,turnId:t.turnId}}function isActionKind(e){return e===`load-skill`||e===`remote-agent-call`||e===`subagent-call`||e===`tool-call`}function deserializeRecord(e,t){if(!isRecord(e))return{};let n={};for(let[r,i]of Object.entries(e)){let e=t(i);e!==void 0&&(n[r]=e)}return n}function deserializeTerminal(e){if(!isRecord(e)||typeof e.type!=`string`)return;let t=e.type;if(isTurnTerminalType(t))return t===`turn.failed`?{error:deserializeError(e.error),type:t}:{type:t}}function serializeSpanContext(e){return{isRemote:e.isRemote,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function isSpanContext(e){return isRecord(e)&&typeof e.spanId==`string`&&typeof e.traceFlags==`number`&&typeof e.traceId==`string`}function serializeError(e){return e instanceof Error?{message:e.message,name:e.name,stack:e.stack}:void 0}function deserializeError(e){if(!isRecord(e)||typeof e.message!=`string`)return;let t=Error(e.message);return typeof e.name==`string`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t}function isTurnTerminalType(e){return e===`turn.cancelled`||e===`turn.completed`||e===`turn.failed`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,readActionTraceContext,readSessionTraceContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var AgentTraceSpanProcessor=class{#e;#t=new Set;#n=new Map;constructor(e){this.#e=e}async forceFlush(){await Promise.all(this.#e.map(e=>e.forceFlush()))}onStart(e,t){if(!isSpanLike(e))return;let n=e.attributes[`agent.session.id`];if(typeof n==`string`){let t=e.
|
|
1
|
+
var AgentTraceSpanProcessor=class{#e;#t=new Set;#n=new Map;#r=new Map;constructor(e){this.#e=e}async forceFlush(){await Promise.all(this.#e.map(e=>e.forceFlush()))}onStart(e,t){if(!isSpanLike(e))return;let n=e.attributes[`agent.session.id`];if(typeof n==`string`){let t=e.spanContext().traceId;if(this.#t.add(t),!this.#r.has(t)){this.#r.set(t,n);let e=this.#n.get(n)??new Set;e.add(t),this.#n.set(n,e)}}if(this.#i(e))for(let n of this.#e)n.onStart(e,t)}onEnd(e){if(!(!isSpanLike(e)||!this.#i(e)))for(let t of this.#e)t.onEnd(e)}activeTraceIds(){return this.#t}releaseSession(e){let t=this.#n.get(e);if(t===void 0)return!1;for(let e of t)this.#t.delete(e),this.#r.delete(e);return this.#n.delete(e),!0}async shutdown(){await Promise.all(this.#e.map(e=>e.shutdown()))}#i(e){return e.instrumentationScope?.name!==`workflow`&&this.#t.has(e.spanContext().traceId)}};function isSpanLike(e){return typeof e==`object`&&!!e&&`attributes`in e&&`spanContext`in e&&typeof e.spanContext==`function`}export{AgentTraceSpanProcessor};
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import type { SpanContext } from "#compiled/@opentelemetry/api/index.js";
|
|
2
|
-
import type { InstrumentationActionKind,
|
|
2
|
+
import type { InstrumentationActionKind, InstrumentationTraceContext, InstrumentationTurnFailedEvent, InstrumentationTurnSettledEvent } from "#harness/instrumentation/lifecycle.js";
|
|
3
3
|
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
4
|
-
/** Sized so an ordinary session stays one trace and only an outsized one rolls. */
|
|
5
|
-
export declare const SESSION_WINDOW_TURN_LIMIT = 200;
|
|
6
4
|
export interface AgentSessionTraceState {
|
|
7
5
|
readonly channelAudience?: ChannelAudience;
|
|
8
6
|
readonly agentName?: string;
|
|
9
7
|
readonly channelKind?: string;
|
|
10
8
|
readonly context: SpanContext;
|
|
11
9
|
readonly rootSessionId: string;
|
|
12
|
-
readonly turnsInWindow: number;
|
|
13
|
-
readonly window: number;
|
|
14
10
|
}
|
|
15
11
|
export interface AgentTurnTraceState {
|
|
16
12
|
readonly context: SpanContext;
|
|
17
|
-
readonly lineage?: InstrumentationParentLineage;
|
|
18
13
|
readonly parentIsRemote?: boolean;
|
|
19
14
|
readonly parentSpanId: string;
|
|
20
15
|
readonly rootSessionId: string;
|
|
21
16
|
readonly sequence: number;
|
|
22
17
|
readonly startTimeMs: number;
|
|
18
|
+
readonly subagentName?: string;
|
|
23
19
|
readonly terminal?: {
|
|
24
20
|
readonly error: unknown;
|
|
25
21
|
readonly type: InstrumentationTurnFailedEvent["type"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var InMemoryAgentTraceStateStore=class{#e=new Map;#t=new Map;#n=new Map;deleteAction(e){this.#e.delete(e)}deleteActions(e,t){for(let[n,r]of this.#e)r.sessionId===e&&(t===void 0||r.turnId===t)&&this.#e.delete(n)}deleteSession(e){this.#t.delete(e)}deleteTurn(e,t){this.#n.delete(turnKey(e,t))}findAction(e,t){return[...this.#e.values()].find(n=>n.sessionId===e&&n.callId===t)}getAction(e){return this.#e.get(e)}getSession(e){return this.#t.get(e)}getTurn(e,t){return this.#n.get(turnKey(e,t))}setAction(e,t){this.#e.set(e,t)}setSession(e,t){this.#t.set(e,t)}setTurn(e,t,n){this.#n.set(turnKey(e,t),n)}};function turnKey(e,t){return`${e}:${t}`}export{InMemoryAgentTraceStateStore,turnKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#harness/instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#harness/instrumentation/lifecycle.js";import{hasSessionRelease}from"#tracing/local-traces.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],a=[],o,s,c,runInContext=(e,t)=>t();if(e.collected.declared){o=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let r=createAgentOtelInstrumentation({frameworkVersion:e.frameworkVersion,idGenerator:o.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...r.hook,stateNamespace:`internal:otel`}),s=r.prepareSessionTrace,c=r.prepareTurnTrace,runInContext=r.runInContext;let i=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasSessionRelease);i.length>0&&a.push(sessionReleaseProvider(i))}let l=[...t,...e.providers,...a],u;return registerInstrumentationRuntime({forceFlush:()=>settleAll([...o===void 0?[]:[o.forceFlush],...l.map(e=>()=>e.flush?.())]),hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:a,serialBefore:t}),otelSettings:e.collected.declared?e.collected.settings:void 0,prepareSessionTrace:s,prepareTurnTrace:c,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,shutdown:()=>(u??=settleAll([...o===void 0?[]:[o.shutdown],...l.map(e=>()=>e.shutdown?.())]),u)})}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{await Promise.all(e.map(e=>e.releaseSession(t.sessionId)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.session-release`,stateNamespace:`internal:session-release`}}async function settleAll(e){let n=await Promise.allSettled(e.map(async e=>e()));for(let e of n)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
|
|
1
|
+
import{createLogger,formatError}from"#internal/logging.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#harness/instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#harness/instrumentation/lifecycle.js";import{hasSessionRelease}from"#tracing/local-traces.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],a=[],o,s,c,runInContext=(e,t)=>t();if(e.collected.declared){o=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let r=createAgentOtelInstrumentation({frameworkVersion:e.frameworkVersion,idGenerator:o.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...r.hook,stateNamespace:`internal:otel`}),s=r.prepareSessionTrace,c=r.prepareTurnTrace,runInContext=r.runInContext;let i=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasSessionRelease);i.length>0&&a.push(sessionReleaseProvider(i))}let l=[...t,...e.providers,...a],u;return registerInstrumentationRuntime({forceFlush:()=>settleAll([...o===void 0?[]:[o.forceFlush],...l.map(e=>()=>e.flush?.())]),hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:a,serialBefore:t}),idGenerator:o?.idGenerator??new AgentSpanIdGenerator,otelSettings:e.collected.declared?e.collected.settings:void 0,prepareSessionTrace:s,prepareTurnTrace:c,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,shutdown:()=>(u??=settleAll([...o===void 0?[]:[o.shutdown],...l.map(e=>()=>e.shutdown?.())]),u)})}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{await Promise.all(e.map(e=>e.releaseSession(t.sessionId)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.session-release`,stateNamespace:`internal:session-release`}}async function settleAll(e){let n=await Promise.allSettled(e.map(async e=>e()));for(let e of n)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
|
|
@@ -36,15 +36,13 @@ export interface LocalTrace {
|
|
|
36
36
|
/**
|
|
37
37
|
* Every session recorded in the trace, opener first.
|
|
38
38
|
*
|
|
39
|
-
* A subagent child records into the
|
|
39
|
+
* A subagent child records into the trace its parent opened, so one
|
|
40
40
|
* trace can hold several sessions and any of their ids resolves to it.
|
|
41
41
|
*/
|
|
42
42
|
readonly sessionIds: readonly string[];
|
|
43
43
|
readonly spans: readonly LocalTraceSpan[];
|
|
44
44
|
readonly startTimeNs: bigint;
|
|
45
45
|
readonly traceId: string;
|
|
46
|
-
/** Zero-based session window this trace holds, when the spans record one. */
|
|
47
|
-
readonly window?: number;
|
|
48
46
|
}
|
|
49
47
|
/**
|
|
50
48
|
* Trace ids held by the spool, unordered. Empty when nothing has been written
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFile,readdir,stat}from"node:fs/promises";import{join}from"node:path";import{resolveLocalTraceSchemaDirectory,resolveLocalTraceSegmentsDirectory}from"#tracing/local-trace-span-processor.js";const TRACE_ID_PATTERN=/^[0-9a-f]{32}$/u,SPAN_FILE_PATTERN=/^[0-9a-f]{16}\.otlp\.json$/u;async function listLocalTraceIds(e){let n;try{n=await readdir(resolveLocalTraceSchemaDirectory(e),{withFileTypes:!0})}catch(e){if(isMissing(e))return[];throw e}return n.filter(e=>e.isDirectory()&&TRACE_ID_PATTERN.test(e.name)).map(e=>e.name)}async function readLocalTraceActivityMs(e,t){try{return(await stat(resolveLocalTraceSegmentsDirectory(e,t))).mtimeMs}catch(e){if(isMissing(e))return;throw e}}async function listLocalTraceSegments(e,n){let r;try{r=await readdir(resolveLocalTraceSegmentsDirectory(e,n),{withFileTypes:!0})}catch(e){if(isMissing(e))return;throw e}return r.filter(e=>e.isFile()&&SPAN_FILE_PATTERN.test(e.name)).map(e=>e.name).sort((e,t)=>e.localeCompare(t))}async function readLocalTraceSegment(t,i,o){let s=join(resolveLocalTraceSegmentsDirectory(t,i),o),c;try{if((await stat(s)).size>8388608)return[];c=await readFile(s,`utf8`)}catch{return[]}return parseLocalTraceSegment(c,i)}async function listLocalTraces(e){let t=[];for(let n of await listLocalTraceIds(e)){let r=await readLocalTrace(e,n).catch(()=>void 0);r!==void 0&&t.push(r)}return t.sort((e,t)=>e.startTimeNs===t.startTimeNs?e.traceId.localeCompare(t.traceId):e.startTimeNs>t.startTimeNs?-1:1)}async function readLocalTrace(e,t){let n=await listLocalTraceSegments(e,t);if(n===void 0)return;let r=new Map;for(let i of n)for(let n of await readLocalTraceSegment(e,t,i))r.has(n.spanId)||r.set(n.spanId,n);if(r.size!==0)return assembleLocalTrace(t,[...r.values()])}function compareLocalTraceSpans(e,t){return e.startTimeNs===t.startTimeNs?e.endTimeNs===t.endTimeNs?e.name.localeCompare(t.name)||e.spanId.localeCompare(t.spanId):e.endTimeNs<t.endTimeNs?-1:1:e.startTimeNs<t.startTimeNs?-1:1}function assembleLocalTrace(e,t){let n=[...t].sort(compareLocalTraceSpans),r=n.map(e=>e.attributes),i=distinctAttributes(r,`agent.session.id`);return{agentName:firstAttribute(r,`agent.name`),endTimeNs:n.reduce((e,t)=>t.endTimeNs>e?t.endTimeNs:e,0n),sessionId:i[0],sessionIds:i,spans:n,startTimeNs:n.reduce((e,t)=>t.startTimeNs<e?t.startTimeNs:e,n[0].startTimeNs),traceId:e
|
|
1
|
+
import{readFile,readdir,stat}from"node:fs/promises";import{join}from"node:path";import{resolveLocalTraceSchemaDirectory,resolveLocalTraceSegmentsDirectory}from"#tracing/local-trace-span-processor.js";const TRACE_ID_PATTERN=/^[0-9a-f]{32}$/u,SPAN_FILE_PATTERN=/^[0-9a-f]{16}\.otlp\.json$/u;async function listLocalTraceIds(e){let n;try{n=await readdir(resolveLocalTraceSchemaDirectory(e),{withFileTypes:!0})}catch(e){if(isMissing(e))return[];throw e}return n.filter(e=>e.isDirectory()&&TRACE_ID_PATTERN.test(e.name)).map(e=>e.name)}async function readLocalTraceActivityMs(e,t){try{return(await stat(resolveLocalTraceSegmentsDirectory(e,t))).mtimeMs}catch(e){if(isMissing(e))return;throw e}}async function listLocalTraceSegments(e,n){let r;try{r=await readdir(resolveLocalTraceSegmentsDirectory(e,n),{withFileTypes:!0})}catch(e){if(isMissing(e))return;throw e}return r.filter(e=>e.isFile()&&SPAN_FILE_PATTERN.test(e.name)).map(e=>e.name).sort((e,t)=>e.localeCompare(t))}async function readLocalTraceSegment(t,i,o){let s=join(resolveLocalTraceSegmentsDirectory(t,i),o),c;try{if((await stat(s)).size>8388608)return[];c=await readFile(s,`utf8`)}catch{return[]}return parseLocalTraceSegment(c,i)}async function listLocalTraces(e){let t=[];for(let n of await listLocalTraceIds(e)){let r=await readLocalTrace(e,n).catch(()=>void 0);r!==void 0&&t.push(r)}return t.sort((e,t)=>e.startTimeNs===t.startTimeNs?e.traceId.localeCompare(t.traceId):e.startTimeNs>t.startTimeNs?-1:1)}async function readLocalTrace(e,t){let n=await listLocalTraceSegments(e,t);if(n===void 0)return;let r=new Map;for(let i of n)for(let n of await readLocalTraceSegment(e,t,i))r.has(n.spanId)||r.set(n.spanId,n);if(r.size!==0)return assembleLocalTrace(t,[...r.values()])}function compareLocalTraceSpans(e,t){return e.startTimeNs===t.startTimeNs?e.endTimeNs===t.endTimeNs?e.name.localeCompare(t.name)||e.spanId.localeCompare(t.spanId):e.endTimeNs<t.endTimeNs?-1:1:e.startTimeNs<t.startTimeNs?-1:1}function assembleLocalTrace(e,t){let n=[...t].sort(compareLocalTraceSpans),r=n.map(e=>e.attributes),i=distinctAttributes(r,`agent.session.id`);return{agentName:firstAttribute(r,`agent.name`),endTimeNs:n.reduce((e,t)=>t.endTimeNs>e?t.endTimeNs:e,0n),sessionId:i[0],sessionIds:i,spans:n,startTimeNs:n.reduce((e,t)=>t.startTimeNs<e?t.startTimeNs:e,n[0].startTimeNs),traceId:e}}function describeLocalTraceSpan(e){let t=[],n=stringSpanAttribute(e,`agent.turn.id`),r=valueSpanAttribute(e,`agent.step.index`),i=valueSpanAttribute(e,`agent.step.attempt`),a=stringSpanAttribute(e,`agent.action.kind`),o=stringSpanAttribute(e,`agent.action.name`),s=stringSpanAttribute(e,`agent.model.id`)??stringSpanAttribute(e,`gen_ai.request.model`);return e.name===`agent.turn`&&n!==void 0&&t.push(n),e.name===`agent.step`&&r!==void 0&&t.push(`step ${String(r)}${i===void 0?``:`, attempt ${String(i)}`}`),e.name===`agent.action`&&o!==void 0&&t.push(`${a??`action`}: ${o}`),s!==void 0&&e.name.includes(`do`)&&t.push(`model ${s}`),t}function parseLocalTraceSegment(e,t){try{let n=JSON.parse(e);if(!isRecord(n)||!Array.isArray(n.resourceSpans))return[];let r=[];for(let e of n.resourceSpans)if(!(!isRecord(e)||!Array.isArray(e.scopeSpans)))for(let n of e.scopeSpans){if(!isRecord(n)||!Array.isArray(n.spans))continue;let e=isRecord(n.scope)&&typeof n.scope.name==`string`?n.scope.name:void 0;for(let i of n.spans){let n=parseLocalTraceSpan(i,t,e);n!==void 0&&r.push(n)}}return r}catch{return[]}}function parseLocalTraceSpan(e,t,n){if(!isRecord(e)||e.traceId!==t||typeof e.spanId!=`string`||!/^[0-9a-f]{16}$/u.test(e.spanId)||typeof e.name!=`string`)return;let r=parseNanos(e.startTimeUnixNano),i=parseNanos(e.endTimeUnixNano);if(!(r===void 0||i===void 0||i<r))return{attributes:parseAttributes(e.attributes),endTimeNs:i,events:parseEvents(e.events),kind:typeof e.kind==`number`?e.kind:void 0,name:e.name,parentSpanId:typeof e.parentSpanId==`string`&&/^[0-9a-f]{16}$/u.test(e.parentSpanId)?e.parentSpanId:void 0,scope:n,spanId:e.spanId,startTimeNs:r,statusCode:parseStatusCode(e.status),statusMessage:parseStatusMessage(e.status),traceId:t}}function parseEvents(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!isRecord(n)||typeof n.name!=`string`)continue;let e=parseNanos(n.timeUnixNano);e!==void 0&&t.push({attributes:parseAttributes(n.attributes),name:n.name,timeNs:e})}return t.sort((e,t)=>e.timeNs===t.timeNs?e.name.localeCompare(t.name):e.timeNs<t.timeNs?-1:1)}function parseAttributes(e){if(!Array.isArray(e))return{};let t={};for(let n of e){if(!isRecord(n)||typeof n.key!=`string`||!isRecord(n.value))continue;let e=parseAnyValue(n.value);e!==void 0&&(t[n.key]=e)}return t}function parseAnyValue(e){for(let t of[`stringValue`,`boolValue`,`intValue`,`doubleValue`])if(t in e)return e[t];if(isRecord(e.arrayValue)&&Array.isArray(e.arrayValue.values))return e.arrayValue.values.filter(isRecord).map(e=>parseAnyValue(e))}function parseNanos(e){if(!(typeof e!=`string`&&typeof e!=`number`))try{let t=BigInt(e);return t>=0n&&t<=18446744073709551615n?t:void 0}catch{return}}function parseStatusCode(e){return isRecord(e)?typeof e.code==`number`?e.code:e.code===`STATUS_CODE_ERROR`?2:0:0}function parseStatusMessage(e){if(!(!isRecord(e)||typeof e.message!=`string`))return e.message.length===0?void 0:e.message}function firstAttribute(e,t){for(let n of e){let e=n[t];if(typeof e==`string`&&e.length>0)return e}}function distinctAttributes(e,t){let n=new Set;for(let r of e){let e=r[t];typeof e==`string`&&e.length>0&&n.add(e)}return[...n]}function stringSpanAttribute(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function valueSpanAttribute(e,t){let n=e.attributes[t];return typeof n==`string`||typeof n==`number`?n:void 0}function isMissing(e){return e.code===`ENOENT`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{assembleLocalTrace,compareLocalTraceSpans,describeLocalTraceSpan,listLocalTraceIds,listLocalTraceSegments,listLocalTraces,parseLocalTraceSegment,readLocalTraceActivityMs,readLocalTraceSegment};
|
|
@@ -77,8 +77,7 @@ export interface ContentOptions {
|
|
|
77
77
|
export interface TraceCaptureContext {
|
|
78
78
|
readonly agentName?: string;
|
|
79
79
|
readonly audience: ChannelAudience;
|
|
80
|
-
readonly
|
|
81
|
-
readonly sessionId: string;
|
|
80
|
+
readonly channelType?: string;
|
|
82
81
|
}
|
|
83
82
|
export type TraceCapturePolicy = (trace: TraceCaptureContext) => boolean;
|
|
84
83
|
/** Where one `otelIntegration()` sends spans. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{context,propagation,trace}from"#compiled/@opentelemetry/api/index.js";import{
|
|
1
|
+
import{createRequire}from"node:module";import{context,propagation,trace}from"#compiled/@opentelemetry/api/index.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{registerOTel}from"#compiled/@vercel/otel/index.js";const REGISTRATION_SPAN_NAME=`eve.otel.registration`,REPLAY_DEDUPLICATION_LIMIT=1e5,require=createRequire(import.meta.url);var RegistrationMarkerPropagator=class{#e=!1;extract(e){return e}fields(){return[]}inject(){this.#e=!0}isInstalled(){return this.#e=!1,propagation.inject(context.active(),{},{set:()=>{}}),this.#e}},PrivateSpanFilteringProcessor=class{endedSpans=new Set;forwardedSpans=new Set;pendingByParent=new Map;processors;startedSpans=new Set;constructor(e){this.processors=e}async forceFlush(){await Promise.all(this.processors.map(e=>e.forceFlush()))}onEnd(e){if(isRegistrationSpan(e))return;let t=spanIdentity(e);if(t!==void 0){if(this.endedSpans.has(t))return;if(this.endedSpans.size>=REPLAY_DEDUPLICATION_LIMIT){let e=this.endedSpans.values().next().value;e!==void 0&&this.endedSpans.delete(e)}this.endedSpans.add(t)}let n=parentIdentity(e);if(n!==void 0&&this.startedSpans.has(n)&&!this.forwardedSpans.has(n)){let t=this.pendingByParent.get(n)??[];t.push(e),this.pendingByParent.set(n,t);return}this.forward(e,t)}onStart(e,t){if(isRegistrationSpan(e))return;let n=spanIdentity(e);n!==void 0&&addBounded(this.startedSpans,n);for(let n of this.processors)n.onStart(e,t)}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}forward(e,t){for(let t of this.processors)t.onEnd(e);if(t===void 0)return;addBounded(this.forwardedSpans,t);let n=this.pendingByParent.get(t);if(n!==void 0){this.pendingByParent.delete(t);for(let e of n)this.forward(e,spanIdentity(e))}}};function registerOtelPipeline(e){let{pipeline:t}=e,n=captureOptionalPeerTracerProxy(),r=new AgentSpanIdGenerator,i=new RegistrationMarkerPropagator,a={attributes:t.resource,autoDetectResources:!1,idGenerator:r,instrumentations:t.instrumentations??[],propagators:[...t.propagators??[`auto`],i],serviceName:e.serviceName,spanProcessors:t.spanProcessors.map(e=>isSpanProcessor(e)?new PrivateSpanFilteringProcessor([e]):e)};registerOTel(t.sampler===void 0?a:{...a,traceSampler:t.sampler});let o=globalTracerUses(r),s=i.isInstalled();if((!o||!s)&&rollbackRegistration({ownsPropagator:s,ownsTracer:o}),!o)throw Error("eve could not register OpenTelemetry because another runtime already owns the global tracer provider. Remove the other `registerOTel` call, or move its exporters into eve's `otelIntegration({ spanProcessors: [...] })`.");if(!s)throw Error("eve could not register OpenTelemetry because another runtime already owns the global propagator. Remove the other global propagator registration and declare propagators through eve's `otel()` instead.");let c=runtimeTracerProvider();if(typeof c.forceFlush!=`function`||typeof c.shutdown!=`function`)throw rollbackRegistration({ownsPropagator:s,ownsTracer:o}),Error(`The registered OpenTelemetry tracer provider has no lifecycle methods.`);return n?.setDelegate(c),{forceFlush:()=>c.forceFlush(),idGenerator:r,shutdown:()=>c.shutdown()}}function captureOptionalPeerTracerProxy(){try{let e=require("@opentelemetry/api"),t=e.trace.getTracerProvider();return t instanceof e.ProxyTracerProvider?t:void 0}catch{return}}function rollbackRegistration(e){if(e.ownsPropagator&&propagation.disable(),!e.ownsTracer)return;let t=runtimeTracerProvider();if(typeof t.shutdown==`function`)try{t.shutdown().catch(()=>{})}catch{}trace.disable()}function runtimeTracerProvider(){let e=trace.getTracerProvider();return e.getDelegate?.()??e}function globalTracerUses(e){let t=e.allocateSpanId();return e.withSpanId(t,()=>trace.getTracer(`eve.registration`).startSpan(REGISTRATION_SPAN_NAME)).spanContext().spanId===t}function isRegistrationSpan(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===REGISTRATION_SPAN_NAME}function spanIdentity(e){if(typeof e!=`object`||!e||!(`spanContext`in e)||typeof e.spanContext!=`function`)return;let t=e.spanContext();return typeof t.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function parentIdentity(e){if(typeof e!=`object`||!e||!(`parentSpanContext`in e))return;let t=e.parentSpanContext;return typeof t?.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function addBounded(e,t){if(e.size>=REPLAY_DEDUPLICATION_LIMIT){let t=e.values().next().value;t!==void 0&&e.delete(t)}e.add(t)}function isSpanProcessor(e){return e!==`auto`}export{registerOtelPipeline};
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
2
|
+
import type { TraceCapturePolicy } from "#tracing/otel-declaration.js";
|
|
3
|
+
export declare function isSampledTrace(context: {
|
|
4
|
+
readonly traceFlags: number;
|
|
5
|
+
}): boolean;
|
|
6
|
+
export declare function evaluateTracePolicy(policy: TraceCapturePolicy | undefined, trace: {
|
|
7
|
+
readonly agentName?: string;
|
|
8
|
+
readonly audience: ChannelAudience;
|
|
9
|
+
readonly channelType?: string;
|
|
10
|
+
}): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function isSampledTrace(e){return(e.traceFlags&1)==1}function evaluateTracePolicy(e,t){try{return e?.({agentName:t.agentName,audience:t.audience,channelType:t.channelType})??t.audience===`public`}catch{return!1}}export{evaluateTracePolicy,isSampledTrace};
|
package/dist/src/vue/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import type { MessageStreamEvent } from "#protocol/message.js";
|
|
|
8
8
|
import type { CancelSessionResult, ClientAuth, HeadersValue, RespondTurnOptions, SendTurnOptions, ClientSessionState } from "#client/types.js";
|
|
9
9
|
export type { PrepareSend };
|
|
10
10
|
/**
|
|
11
|
-
* Lifecycle phase of a `useEveAgent` session: `"ready"` (idle), `"
|
|
12
|
-
* (
|
|
13
|
-
* `"error"`.
|
|
11
|
+
* Lifecycle phase of a `useEveAgent` session: `"ready"` (idle), `"resuming"`
|
|
12
|
+
* (checking an attached session), `"submitted"` (request sent, awaiting first
|
|
13
|
+
* event), `"streaming"` (events arriving), or `"error"`.
|
|
14
14
|
*/
|
|
15
15
|
export type UseEveAgentStatus = EveAgentStoreStatus;
|
|
16
16
|
/**
|
|
@@ -43,7 +43,11 @@ export interface UseEveAgentReturn<TData> {
|
|
|
43
43
|
readonly respond: <TOutput = unknown>(inputResponses: Parameters<ClientSession["respond"]>[0], options?: RespondTurnOptions<TOutput>) => Promise<void>;
|
|
44
44
|
/** Current session identity and stream cursor. */
|
|
45
45
|
readonly session: ComputedRef<ClientSessionState | undefined>;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Lifecycle phase: `"ready"` (idle), `"resuming"` (checking an attached
|
|
48
|
+
* session), `"submitted"` (request sent, awaiting first event), `"streaming"`
|
|
49
|
+
* (events arriving), or `"error"`.
|
|
50
|
+
*/
|
|
47
51
|
readonly status: ComputedRef<UseEveAgentStatus>;
|
|
48
52
|
}
|
|
49
53
|
/**
|
package/docs/agent-config.md
CHANGED
|
@@ -21,8 +21,7 @@ For a static AI Gateway model ID, you can make the same source change from the
|
|
|
21
21
|
project root with `eve set --model anthropic/claude-opus-4.8` or from the local
|
|
22
22
|
dev TUI with `/model anthropic/claude-opus-4.8`.
|
|
23
23
|
|
|
24
|
-
The root `agent.ts` can be omitted when no runtime config is needed.
|
|
25
|
-
to `zai/glm-5.2`. GLM 5.2 does not support image input; choose a
|
|
24
|
+
The root `agent.ts` can be omitted when no runtime config is needed. eve then selects its default `agent.ts` source at the same slot, configured with `zai/glm-5.2`; authoring the file replaces that source. GLM 5.2 does not support image input; choose a
|
|
26
25
|
vision-capable model or [route image inputs to Gemini
|
|
27
26
|
Flash](./guides/dynamic-capabilities#route-image-inputs-to-a-vision-model).
|
|
28
27
|
When `agent.ts` is present, `model` is required.
|
|
@@ -50,6 +49,19 @@ version uses hyphens (`claude-opus-4-8`), while the Gateway id above uses a dot
|
|
|
50
49
|
|
|
51
50
|
Model use is subject to the terms, data-processing commitments, retention behavior, and available controls of the selected provider and routing path. Review the [AI Gateway model catalog](https://vercel.com/ai-gateway/models) for gateway-routed models, and review the provider's terms when you configure a direct `LanguageModel`.
|
|
52
51
|
|
|
52
|
+
For every OpenAI or Anthropic model call, eve fills the provider's end-user
|
|
53
|
+
safety identifier from the active turn's
|
|
54
|
+
[`auth.current`](./guides/auth-and-route-protection#what-reaches-ctxsessionauth)
|
|
55
|
+
principal when you have not configured it. For OpenAI, the option is
|
|
56
|
+
`providerOptions.openai.safetyIdentifier`; for Anthropic, it is
|
|
57
|
+
`providerOptions.anthropic.metadata.userId`. The default value is a SHA-256
|
|
58
|
+
fingerprint of the principal's authenticator, issuer, type, id, and subject;
|
|
59
|
+
eve does not send the raw principal fields or attributes. The fingerprint
|
|
60
|
+
follows the current caller when a later turn changes users. An authored value
|
|
61
|
+
at either provider path takes precedence and is forwarded unchanged. When
|
|
62
|
+
`auth.current` is `null`, eve does not add an identifier. The same rules apply
|
|
63
|
+
to compaction calls.
|
|
64
|
+
|
|
53
65
|
### Choose the model dynamically
|
|
54
66
|
|
|
55
67
|
`model` also accepts `defineDynamic({ events })`. Each matching handler must
|
|
@@ -173,7 +185,7 @@ is queued while the existing prompt stays pending; eve does not raise another
|
|
|
173
185
|
copy. The reply is processed once the budget is granted.
|
|
174
186
|
|
|
175
187
|
Sessions that cannot reach a human — task-mode runs such as schedules and
|
|
176
|
-
|
|
188
|
+
delegated runs without input proxying — skip the prompt and fail the next model
|
|
177
189
|
call with `SESSION_TOKEN_LIMIT_REACHED`. A delegated task with no inherited
|
|
178
190
|
quota also fails instead of raising a continuation prompt that could only
|
|
179
191
|
grant another zero-token window.
|
|
@@ -240,7 +252,7 @@ installed package must stay external in hosted output, list it in
|
|
|
240
252
|
| `modelOptions` | `AgentModelOptionsDefinition` | none | Provider option overrides forwarded to the model call. |
|
|
241
253
|
| `limits` | `AgentLimitsDefinition` | field-specific | Framework-owned runtime limits. Sessions complete after 30 days by default; token-limit defaults and inheritance are described above. Set a limit to `false` to disable it. |
|
|
242
254
|
| `experimental` | `{ workflow?: { world?: string } }` | unset | Opt-in settings that can change or disappear in any release. Treat them as unstable. `workflow.world` selects the Workflow world package backing session state, queues, hooks, and streams on the root agent. |
|
|
243
|
-
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for
|
|
255
|
+
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for function-like invocations such as a subagent turn, schedule, or remote job. Ordinary interactive turns ignore it unless the client supplies a per-message schema. |
|
|
244
256
|
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while eve compiles authored modules such as tools and channels, and traces those packages into the hosted output. |
|
|
245
257
|
|
|
246
258
|
`externalDependencies` is a packaging control only. It keeps selected packages as runtime dependencies in the hosted output; it does not authorize, configure, or review any third-party service those packages may call.
|
|
@@ -63,7 +63,7 @@ eve deploy
|
|
|
63
63
|
|
|
64
64
|
## Configure the webhook route
|
|
65
65
|
|
|
66
|
-
Each adapter
|
|
66
|
+
Each adapter registers `GET` and `POST` handlers at `/eve/v1/{adapterName}`, so the `resend` adapter above is served at `/eve/v1/resend`. Point your provider's webhook (the Resend inbound address, the Slack Event Subscriptions URL, etc.) at that path. The adapter handles the incoming method. For example, X sends its webhook-verification challenge with `GET` and delivers events with `POST`.
|
|
67
67
|
|
|
68
68
|
Override the base path for every adapter with `route`, or pin an individual adapter's path with `routes`:
|
|
69
69
|
|
|
@@ -56,7 +56,11 @@ Then configure the public `https://…/eve/v1/discord` route as the application'
|
|
|
56
56
|
|
|
57
57
|
### Dispatch
|
|
58
58
|
|
|
59
|
-
`onCommand(ctx, interaction)` decides whether to dispatch and under what `auth`. Return `{ auth }` to proceed, `null` to drop the interaction, or `title` alongside `auth` to set the title when the dispatch starts a run. By default, auth comes from the invoking user.
|
|
59
|
+
`onCommand(ctx, interaction)` decides whether to dispatch and under what `auth`. Return `{ auth }` to proceed, `null` to drop the interaction, or `title` alongside `auth` to set the title when the dispatch starts a run. By default, auth comes from the invoking user.
|
|
60
|
+
|
|
61
|
+
The model-visible `<discord_context>` includes `user_id` and the receiving application's `application_id`.
|
|
62
|
+
|
|
63
|
+
Event handlers receive `(eventData, channel, ctx)`, with Discord platform handles on `channel.discord`:
|
|
60
64
|
|
|
61
65
|
```ts
|
|
62
66
|
import { discordChannel } from "eve/channels/discord";
|
package/docs/channels/eve.mdx
CHANGED
|
@@ -3,7 +3,7 @@ title: "eve"
|
|
|
3
3
|
description: "The default HTTP API for an agent, covering session routes, auth, and customization."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
The eve channel is the framework's default HTTP API. It's what the terminal UI, [`useEveAgent`](../guides/frontend/overview), `curl`, and any SDK client talk to when they start sessions, send messages, and stream events. `
|
|
6
|
+
The eve channel is the framework's default HTTP API. It's what the terminal UI, [`useEveAgent`](../guides/frontend/overview), `curl`, and any SDK client talk to when they start sessions, send messages, and stream events. The selected `channels/eve.ts` source owns the complete `/eve/v1` surface, including health, inspection, callbacks, task input, and session routes. eve supplies that source when `agent/channels/eve.ts` does not exist.
|
|
7
7
|
|
|
8
8
|
Every running eve app exposes its own API. `eve.dev` publishes framework documentation; it is not a shared API, authorization server, MCP server, or A2A server. Each deployment supplies its own host and authentication policy.
|
|
9
9
|
|
|
@@ -20,7 +20,7 @@ export default eveChannel({
|
|
|
20
20
|
|
|
21
21
|
## Routes
|
|
22
22
|
|
|
23
|
-
The
|
|
23
|
+
The default eve channel inspects the agent, creates sessions, accepts callbacks and task input, controls sessions, and streams events. Its public routes include:
|
|
24
24
|
|
|
25
25
|
- `GET /eve/v1/health` (check whether the application is reachable)
|
|
26
26
|
- `GET /eve/v1/info` (inspect the agent)
|
|
@@ -34,6 +34,8 @@ The application exposes a health route plus eve channel routes that inspect the
|
|
|
34
34
|
|
|
35
35
|
The session routes use only durable session IDs. Create a session explicitly, then put its returned ID in every follow-up, control, and stream path.
|
|
36
36
|
|
|
37
|
+
`GET /eve/v1/health` is public and returns `{ ok: true, status: "ready", workflowId: string }`. `GET /eve/v1/info` uses the channel's auth policy and returns agent-info version 3. The TypeScript client validates both successful payloads: malformed health JSON throws `HealthResponseError`, malformed inspection JSON throws `AgentInfoResponseError`, and a non-success response from either route throws `ClientError`.
|
|
38
|
+
|
|
37
39
|
### Start and continue a session
|
|
38
40
|
|
|
39
41
|
Start a session with an initial message, then use the returned `sessionId` for every follow-up and control operation:
|
|
@@ -97,6 +99,20 @@ Post to `/eve/v1/session/:sessionId/compact` to summarize context without sendin
|
|
|
97
99
|
|
|
98
100
|
Post to `/eve/v1/session/:sessionId/reset` to terminally retire that session. Reset never replaces the ID automatically; create a new session explicitly for a fresh conversation. See [Compact, clear, and reset](../concepts/sessions-runs-and-streaming#compact-clear-and-reset).
|
|
99
101
|
|
|
102
|
+
## Replace or disable the defaults
|
|
103
|
+
|
|
104
|
+
An authored `agent/channels/eve.ts` replaces the complete default eve channel. An `eveChannel(...)` replacement keeps the standard route set with your options; a custom `defineChannel(...)` replacement exposes only the routes you declare. Health, inspection, and callbacks do not reappear through a hidden host fallback.
|
|
105
|
+
|
|
106
|
+
Disable the complete surface by exporting `disableRoute()` at that slot:
|
|
107
|
+
|
|
108
|
+
```ts title="agent/channels/eve.ts"
|
|
109
|
+
import { disableRoute } from "eve/channels";
|
|
110
|
+
|
|
111
|
+
export default disableRoute();
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The default home page is a separate `channels/home.ts` source that serves `GET /` and `HEAD /`. Author `agent/channels/home.ts` to replace it or export `disableRoute()` there to remove it without affecting `/eve/v1`.
|
|
115
|
+
|
|
100
116
|
## CORS
|
|
101
117
|
|
|
102
118
|
The eve channel leaves CORS untouched by default. Pass `cors: true` to enable
|
|
@@ -129,7 +145,7 @@ The `auth` option decides who can call `/eve/v1/info` and the session routes. Th
|
|
|
129
145
|
|
|
130
146
|
Neither admits browser users or external clients in production. For a public app, wire the channel to your own auth (Clerk, Auth.js, your own OIDC/JWT verification, an API-key verifier, or any custom `AuthFn`). Vercel OIDC is optional; use it only when Vercel-issued deployment tokens are part of your trust model.
|
|
131
147
|
|
|
132
|
-
`eve init` scaffolds an `agent/channels/eve.ts` with a production placeholder so you replace it before going live. The generated channel checks Vercel OIDC before falling back to localhost access, and includes `placeholderAuth()`, which returns a setup-focused 401 in production until you swap it for real auth. Delete the file and eve
|
|
148
|
+
`eve init` scaffolds an `agent/channels/eve.ts` with a production placeholder so you replace it before going live. The generated channel checks Vercel OIDC before falling back to localhost access, and includes `placeholderAuth()`, which returns a setup-focused 401 in production until you swap it for real auth. Delete the file and eve selects its default channel source with `[vercelOidc(), localDev(), placeholderAuth()]`, which rejects all production traffic.
|
|
133
149
|
|
|
134
150
|
For the full auth model and helper list, see [Auth & route protection](../guides/auth-and-route-protection).
|
|
135
151
|
|
package/docs/channels/github.mdx
CHANGED
|
@@ -68,6 +68,8 @@ Point the GitHub App webhook URL at `https://<deployment>/eve/v1/github`. For co
|
|
|
68
68
|
|
|
69
69
|
Inbound hooks return `{ auth }` to dispatch, or `null` to ignore. Return `title` alongside `auth` to set the title when the dispatch starts a run. Use `defaultGitHubAuth(ctx)` to derive auth from the actor.
|
|
70
70
|
|
|
71
|
+
The model-visible `<github_context>` includes `sender`, `bot_name` when resolved, and `is_mentioned` for comments. eve computes `is_mentioned` before removing the invocation token.
|
|
72
|
+
|
|
71
73
|
```ts
|
|
72
74
|
import { defaultGitHubAuth, githubChannel } from "eve/channels/github";
|
|
73
75
|
|
package/docs/channels/linear.mdx
CHANGED
|
@@ -71,7 +71,7 @@ Linear sends webhook signatures in `Linear-Signature`; eve verifies the HMAC ove
|
|
|
71
71
|
|
|
72
72
|
### Dispatch
|
|
73
73
|
|
|
74
|
-
The default hook dispatches `created` and `prompted` Agent Session events.
|
|
74
|
+
The default hook dispatches `created` and `prompted` Agent Session events. The Linear context includes `app_user_id` when available, plus the agent session, issue, comment, and organization identifiers. The session continues with `agent-session:<id>`.
|
|
75
75
|
|
|
76
76
|
### Delivery
|
|
77
77
|
|
package/docs/channels/linq.mdx
CHANGED
|
@@ -16,7 +16,7 @@ export default linqChannel({
|
|
|
16
16
|
});
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The default webhook route is `/eve/v1/linq`. The channel verifies forwarded webhooks with same-project Vercel OIDC by default, marks accepted messages as read, and continues the same eve session for every message in a Linq conversation. A new accepted message cooperatively cancels an active turn and steers its replacement turn.
|
|
19
|
+
The default webhook route is `/eve/v1/linq`. The channel verifies forwarded webhooks with same-project Vercel OIDC by default, derives user auth from each message author, marks accepted messages as read, and continues the same eve session for every message in a Linq conversation. A new accepted message cooperatively cancels an active turn and steers its replacement turn.
|
|
20
20
|
|
|
21
21
|
Set `turnPolicy: "queue"` when every response should finish before Linq starts the next message.
|
|
22
22
|
|
|
@@ -51,7 +51,7 @@ Install a channel from the registry with `eve add channel/<name>`, such as `eve
|
|
|
51
51
|
|
|
52
52
|
## The eve HTTP channel (default)
|
|
53
53
|
|
|
54
|
-
The eve channel is the framework's default HTTP session API, the routes the terminal UI, [`useEveAgent`](../guides/frontend/overview), and `curl` all talk to.
|
|
54
|
+
The eve channel is the framework's default HTTP session API, the routes the terminal UI, [`useEveAgent`](../guides/frontend/overview), and `curl` all talk to. Its selected `channels/eve.ts` source owns health, inspection, callbacks, task input, and the session protocol as one replaceable surface. eve supplies the source when no `agent/channels/eve.ts` file exists; author that file to replace it, most often to change route auth. See [HTTP channel](./eve) for routes, auth, replacement, and disablement.
|
|
55
55
|
|
|
56
56
|
## Custom channels
|
|
57
57
|
|
package/docs/channels/photon.mdx
CHANGED
|
@@ -22,10 +22,10 @@ export default photonIMessageChannel({
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
The default webhook route is `/eve/v1/photon`. The channel verifies forwarded
|
|
25
|
-
webhooks with same-project Vercel OIDC by default,
|
|
26
|
-
read, and continues the same eve
|
|
27
|
-
conversation. A new accepted message
|
|
28
|
-
steers its replacement turn.
|
|
25
|
+
webhooks with same-project Vercel OIDC by default, derives user auth from each
|
|
26
|
+
message author, marks accepted messages as read, and continues the same eve
|
|
27
|
+
session for every message in an iMessage conversation. A new accepted message
|
|
28
|
+
cooperatively cancels an active turn and steers its replacement turn.
|
|
29
29
|
|
|
30
30
|
Set `turnPolicy: "queue"` when every response should finish before Photon starts the next message.
|
|
31
31
|
|
package/docs/channels/slack.mdx
CHANGED
|
@@ -33,6 +33,20 @@ export default slackChannel({
|
|
|
33
33
|
|
|
34
34
|
`connectSlackCredentials` returns `{ botToken, webhookVerifier }`, keeping token rotation, multi-workspace tenancy, and request verification inside Connect rather than your code.
|
|
35
35
|
|
|
36
|
+
Function-form bot tokens receive `{ teamId }` when Slack supplies the app installation workspace. Use it to select an installation in a self-managed multi-workspace app. The id can differ from the actor or content workspace for Slack Connect events:
|
|
37
|
+
|
|
38
|
+
```ts title="agent/channels/slack.ts"
|
|
39
|
+
import { slackChannel } from "eve/channels/slack";
|
|
40
|
+
|
|
41
|
+
export default slackChannel({
|
|
42
|
+
credentials: {
|
|
43
|
+
botToken: ({ teamId }) => loadInstallationToken(teamId),
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Literal tokens and zero-argument token functions remain supported. A multi-workspace provider should reject a missing `teamId` instead of selecting a default installation.
|
|
49
|
+
|
|
36
50
|
### Manage Slack credentials yourself
|
|
37
51
|
|
|
38
52
|
Use this fallback when the agent does not run on Vercel or Vercel Connect is unavailable. In the setup command, **Use portable credentials** is the environment-variable option; eve adds `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` to `.env.example`.
|
|
@@ -142,6 +156,8 @@ Only the first available handler runs. A message hook returning `null` drops the
|
|
|
142
156
|
|
|
143
157
|
`onInteraction(action, ctx)` separately handles user-owned `block_actions` callbacks. eve-owned HITL buttons and modal submissions go through `onInputResponse(ctx, submission)` instead. eve attaches the triggering Slack user id to the same model message as its text, preserving speaker attribution without profile lookups.
|
|
144
158
|
|
|
159
|
+
The model-visible `<slack_message>` includes `sender_id`, `bot_user_id` when available, and the `is_mentioned` value from `ctx.isBotMentioned()`. Its `<content>` keeps `<@USER_ID>` intact while converting other mrkdwn to Markdown; routing is unchanged.
|
|
160
|
+
|
|
145
161
|
#### Restrict who can invoke the agent
|
|
146
162
|
|
|
147
163
|
A valid Slack signature proves that Slack sent the event. It does not decide which channel or person your agent should trust. Fail closed in the inbound handler before returning auth, especially when the app is installed in a shared Slack Connect channel:
|
|
@@ -357,6 +373,7 @@ import { connectSlackCredentials } from "@vercel/connect/eve";
|
|
|
357
373
|
const { botToken } = connectSlackCredentials("slack/my-agent");
|
|
358
374
|
const response = await callSlackApi({
|
|
359
375
|
botToken,
|
|
376
|
+
context: { teamId: "T0123456789" },
|
|
360
377
|
operation: "reactions.get",
|
|
361
378
|
body: { channel: "C0123456789", timestamp: "1712345678.000100", full: true },
|
|
362
379
|
});
|
|
@@ -364,7 +381,7 @@ if (!response.ok) throw new Error(String(response.error));
|
|
|
364
381
|
```
|
|
365
382
|
|
|
366
383
|
`callSlackApi` resolves function-form tokens (secret managers, Connect
|
|
367
|
-
rotation) at call time and form-encodes the body — the only safe default,
|
|
384
|
+
rotation) with the supplied `context` at call time and form-encodes the body — the only safe default,
|
|
368
385
|
since Slack's JSON support is partial (`conversations.replies` rejects
|
|
369
386
|
JSON). `resolveSlackBotToken` materializes a `SlackBotToken` to a string
|
|
370
387
|
when you need the bearer token itself.
|
|
@@ -414,7 +431,7 @@ events: {
|
|
|
414
431
|
|
|
415
432
|
### Proactive sessions
|
|
416
433
|
|
|
417
|
-
Start a session without an inbound message through `ctx.to(slack, target).send(message, { auth })` from another channel, or `to(slack, target).send(message, { auth })` from a schedule `run` handler. The proactive target shape is `{ channelId, threadTs?, initialMessage? }`. This sends turn input to the agent; it is not a direct Slack post.
|
|
434
|
+
Start a session without an inbound message through `ctx.to(slack, target).send(message, { auth })` from another channel, or `to(slack, target).send(message, { auth })` from a schedule `run` handler. The proactive target shape is `{ channelId, installationTeamId?, threadTs?, initialMessage? }`. Set `installationTeamId` to the app installation workspace when a function-form bot token must select an installation. This sends turn input to the agent; it is not a direct Slack post.
|
|
418
435
|
|
|
419
436
|
To post without invoking the model, use `ctx.thread.post(...)` in an inbound Slack handler or `channel.thread.post(...)` in an `events` handler. Use `callSlackApi(...)` where no Slack channel context exists. For application-managed retries and deduplication, see [Durable cross-channel notifications](../patterns/durable-cross-channel-notifications).
|
|
420
437
|
|
|
@@ -422,7 +439,7 @@ To post without invoking the model, use `ctx.thread.post(...)` in an inbound Sla
|
|
|
422
439
|
|
|
423
440
|
Inbound files behind authenticated Slack URLs are staged with `fetchFile`. See [File uploads](./custom#file-uploads) for the `fetchFile` contract.
|
|
424
441
|
|
|
425
|
-
Private file downloads require the Slack bot token's `files:read` scope. Add the scope and reinstall the Slack app before sending attachments.
|
|
442
|
+
Private file downloads resolve credentials from the session's app installation workspace and require the Slack bot token's `files:read` scope. Add the scope and reinstall the Slack app before sending attachments.
|
|
426
443
|
|
|
427
444
|
Staged files live in the session sandbox under `/workspace/attachments`. Session history keeps a reference to that path, not a second copy of the Slack file. If the backend can no longer reattach the original sandbox, eve cannot restore the attachment bytes from history; later turns receive a missing-file result. Store files outside the sandbox when the agent must retain them independently of sandbox availability.
|
|
428
445
|
|
package/docs/channels/teams.mdx
CHANGED
|
@@ -26,7 +26,7 @@ By default the channel mounts at `POST /eve/v1/teams`. Point your Azure Bot or T
|
|
|
26
26
|
|
|
27
27
|
### Dispatch
|
|
28
28
|
|
|
29
|
-
The default `onMessage` handles two cases: personal-chat messages, and channel or group-chat messages that mention the bot directly. Ambient resource-specific-consent messages are dropped unless you override it. Return `title` alongside `auth` to set the title when the dispatch starts a run. Before dispatch, eve strips the mention, adds
|
|
29
|
+
The default `onMessage` handles two cases: personal-chat messages, and channel or group-chat messages that mention the bot directly. Ambient resource-specific-consent messages are dropped unless you override it. Return `title` alongside `auth` to set the title when the dispatch starts a run. Before dispatch, eve strips the mention, adds `<teams_context>` with `user_id`, `bot_id`, and `is_mentioned`, and scopes channel and group threads by root activity id (`replyToId ?? id`).
|
|
30
30
|
|
|
31
31
|
For example, use the contextual `isSubscribed()` helper to continue active threads without requiring another mention:
|
|
32
32
|
|
|
@@ -37,6 +37,8 @@ curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/setWebhook" \
|
|
|
37
37
|
|
|
38
38
|
In a private chat, text, captions, photos, and documents all go through. Groups are stricter. Only three things wake the bot: a command (`/ask`, `/ask@my_bot`), an `@my_bot` mention (when `botUsername` is set), or a reply to one of the bot's own messages. Everything else is ignored.
|
|
39
39
|
|
|
40
|
+
The model-visible `<telegram_context>` includes `bot_username` and `is_mentioned`. `is_mentioned` is `true` only for an exact `@bot_username` token or targeted command such as `/ask@my_bot`; other accepted messages set it to `false`.
|
|
41
|
+
|
|
40
42
|
Forum topics carry `message_thread_id` in the continuation token, so each topic stays on its own thread.
|
|
41
43
|
|
|
42
44
|
To customize auth or filtering, override `onMessage`. Return `title` alongside `auth` to set the title when the dispatch starts a run. Group privacy mode itself lives in BotFather, not here.
|