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,2 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeGrepOnSandbox}from"#execution/sandbox/grep-tool.js";const GREP_INPUT_SCHEMA=z.strictObject({context:z.number().int().min(0).describe(`Number of surrounding context lines to include before and after each match. Defaults to 0.`).optional(),glob:z.string().describe(`Filter files by glob pattern (e.g. "*.ts", "*.{ts,tsx}").`).optional(),ignoreCase:z.boolean().describe(`Perform case-insensitive search. Defaults to false.`).optional(),limit:z.number().int().min(1).max(1e3).describe(`Maximum number of matches to return per file. Defaults to 100.`).optional(),literal:z.boolean().describe(`Treat the pattern as a literal string instead of a regular expression. Defaults to false.`).optional(),path:z.string().describe(`The directory or file to search in. Defaults to /workspace. Must be an absolute path or begin with $HOME/. Omit to use the default.`).optional(),pattern:z.string().describe(`The regex pattern to search for in file contents (e.g. "log.*Error", "function\\s+\\w+").`)}),GREP_OUTPUT_SCHEMA=z.strictObject({content:z.string(),matchCount:z.number().int(),path:z.string(),truncated:z.boolean()});async function executeGrep(e,t){return executeGrepOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const GREP_TOOL_DEFINITION={description:[`Fast content search tool that works with any codebase size.`,``,`Usage:`,`- Searches file contents using regular expressions.`,`- Supports full regex syntax (e.g. "log.*Error", "function\\s+\\w+").`,`- Filter files by pattern with the glob parameter (e.g. "*.js", "*.{ts,tsx}").`,`- Returns matching lines with file paths and line numbers.`,`- Call this tool in parallel when you have multiple independent searches.`,`- Any line longer than 2000 characters is truncated.`].join(`
|
|
2
|
-
`),execute:executeGrep,inputSchema:GREP_INPUT_SCHEMA,logicalPath:`eve:framework/grep`,name:`grep`,outputSchema:GREP_OUTPUT_SCHEMA,sourceId:`eve:grep-tool`,sourceKind:`module`};export{GREP_INPUT_SCHEMA,GREP_OUTPUT_SCHEMA,GREP_TOOL_DEFINITION};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export { ConnectionRegistryKey } from "#context/providers/connection-key.js";
|
|
2
|
-
export type { ReadFileStamp, ReadFileState } from "#runtime/framework-tools/file-state.js";
|
|
3
|
-
export { ReadFileStateKey } from "#runtime/framework-tools/file-state.js";
|
|
4
|
-
export type { TodoItem, TodoState } from "#runtime/framework-tools/todo.js";
|
|
5
|
-
export { TodoStateKey } from "#runtime/framework-tools/todo.js";
|
|
6
|
-
import type { ResolvedDynamicToolResolver, ResolvedSkillDefinition, ResolvedToolDefinition } from "#runtime/types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Returns framework-owned tool definitions registered in the tool registry
|
|
9
|
-
* alongside authored tools during graph resolution.
|
|
10
|
-
*
|
|
11
|
-
* `connection_search` is no longer in this list. The graph resolution path
|
|
12
|
-
* registers it as a framework dynamic tool resolver.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getFrameworkToolDefinitions(config?: {
|
|
15
|
-
readonly authoredSkills?: readonly ResolvedSkillDefinition[];
|
|
16
|
-
}): readonly ResolvedToolDefinition[];
|
|
17
|
-
/**
|
|
18
|
-
* Returns framework-owned dynamic tool resolvers.
|
|
19
|
-
* Framework definitions use the public `defineDynamic()` contract and enter
|
|
20
|
-
* the same loaded-definition resolver path as authored dynamic tools.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getFrameworkDynamicToolResolvers(): readonly ResolvedDynamicToolResolver[];
|
|
23
|
-
/**
|
|
24
|
-
* Returns every static framework-owned tool definition, including tools such
|
|
25
|
-
* as `agent` that the runtime does not register in the tool registry.
|
|
26
|
-
*/
|
|
27
|
-
export declare function getAllFrameworkToolDefinitions(): readonly ResolvedToolDefinition[];
|
|
28
|
-
/** Returns framework tools that authors must explicitly add to an agent. */
|
|
29
|
-
export declare function getOptInFrameworkToolNames(): ReadonlySet<string>;
|
|
30
|
-
/**
|
|
31
|
-
* Returns the names of every framework-provided tool the framework knows
|
|
32
|
-
* about, regardless of whether the current agent gates any of them on
|
|
33
|
-
* runtime configuration.
|
|
34
|
-
*
|
|
35
|
-
* Used by the graph resolver to validate `disableTool(name)` arguments —
|
|
36
|
-
* disabling a name that does not match any known framework tool is treated
|
|
37
|
-
* as an authoring error rather than silently dropping the request.
|
|
38
|
-
*/
|
|
39
|
-
export declare function getAllFrameworkToolNames(): ReadonlySet<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{ReadFileStateKey}from"#runtime/framework-tools/file-state.js";import{TODO_TOOL_DEFINITION,TodoStateKey}from"#runtime/framework-tools/todo.js";import{TASK_TOOL_DEFINITIONS}from"#runtime/framework-tools/tasks.js";import{AGENT_TOOL_DEFINITION}from"#runtime/framework-tools/agent.js";import{ASK_QUESTION_TOOL_DEFINITION}from"#runtime/framework-tools/ask-question.js";import{WEB_SEARCH_TOOL_DEFINITION}from"#runtime/framework-tools/web-search.js";import{BASH_TOOL_DEFINITION}from"#runtime/framework-tools/bash.js";import{GLOB_TOOL_DEFINITION}from"#runtime/framework-tools/glob.js";import{GREP_TOOL_DEFINITION}from"#runtime/framework-tools/grep.js";import{READ_FILE_TOOL_DEFINITION}from"#runtime/framework-tools/read-file.js";import{SKILL_TOOL_DEFINITION,createSkillToolDefinition}from"#runtime/framework-tools/skill.js";import{WEB_FETCH_TOOL_DEFINITION}from"#runtime/framework-tools/web-fetch.js";import{WRITE_FILE_TOOL_DEFINITION}from"#runtime/framework-tools/write-file.js";import connectionSearchDynamicDefinition from"#runtime/framework-tools/connection-search-dynamic.js";import{resolveLoadedDynamicToolDefinition}from"#runtime/resolve-dynamic-tool.js";const REGISTERED_FRAMEWORK_DYNAMIC_TOOLS=[{definition:connectionSearchDynamicDefinition,logicalPath:`eve:framework/connection-search-dynamic`,slug:`connection`,sourceId:`eve:connection-search-dynamic`}],REGISTERED_FRAMEWORK_TOOLS=[ASK_QUESTION_TOOL_DEFINITION,BASH_TOOL_DEFINITION,READ_FILE_TOOL_DEFINITION,WRITE_FILE_TOOL_DEFINITION,TODO_TOOL_DEFINITION,WEB_FETCH_TOOL_DEFINITION,WEB_SEARCH_TOOL_DEFINITION,SKILL_TOOL_DEFINITION],OPT_IN_FRAMEWORK_TOOLS=[GLOB_TOOL_DEFINITION,GREP_TOOL_DEFINITION],ALL_FRAMEWORK_TOOLS=[...REGISTERED_FRAMEWORK_TOOLS,...OPT_IN_FRAMEWORK_TOOLS,AGENT_TOOL_DEFINITION,...TASK_TOOL_DEFINITIONS];function getFrameworkToolDefinitions(e){let t=e?.authoredSkills;return t===void 0?REGISTERED_FRAMEWORK_TOOLS:REGISTERED_FRAMEWORK_TOOLS.map(e=>e.name===SKILL_TOOL_DEFINITION.name?createSkillToolDefinition(t):e)}function getFrameworkDynamicToolResolvers(){return REGISTERED_FRAMEWORK_DYNAMIC_TOOLS.map(e=>resolveLoadedDynamicToolDefinition(e.definition,{logicalPath:e.logicalPath,slug:e.slug,sourceId:e.sourceId,sourceKind:`module`}))}function getAllFrameworkToolDefinitions(){return ALL_FRAMEWORK_TOOLS}function getOptInFrameworkToolNames(){return new Set(OPT_IN_FRAMEWORK_TOOLS.map(e=>e.name))}function getAllFrameworkToolNames(){return new Set(ALL_FRAMEWORK_TOOLS.map(e=>e.name))}export{ConnectionRegistryKey,ReadFileStateKey,TodoStateKey,getAllFrameworkToolDefinitions,getAllFrameworkToolNames,getFrameworkDynamicToolResolvers,getFrameworkToolDefinitions,getOptInFrameworkToolNames};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { ResolvedToolDefinition } from "#runtime/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Shared input schema used by the framework `read_file` tool and any author
|
|
5
|
-
* tool constructed via {@link defineReadFileTool}.
|
|
6
|
-
*
|
|
7
|
-
* Exported so the public `defineReadFileTool` factory and the framework
|
|
8
|
-
* `READ_FILE_TOOL_DEFINITION` use the exact same schema object — keeping
|
|
9
|
-
* model input contracts in sync without duplication.
|
|
10
|
-
*/
|
|
11
|
-
export declare const READ_FILE_INPUT_SCHEMA: z.ZodObject<{
|
|
12
|
-
filePath: z.ZodString;
|
|
13
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
15
|
-
}, z.core.$strict>;
|
|
16
|
-
/**
|
|
17
|
-
* Shared output schema used by the framework `read_file` tool and any author
|
|
18
|
-
* tool constructed via {@link defineReadFileTool}.
|
|
19
|
-
*/
|
|
20
|
-
export declare const READ_FILE_OUTPUT_SCHEMA: z.ZodObject<{
|
|
21
|
-
content: z.ZodString;
|
|
22
|
-
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
path: z.ZodString;
|
|
24
|
-
totalLines: z.ZodNumber;
|
|
25
|
-
truncated: z.ZodBoolean;
|
|
26
|
-
}, z.core.$strict>;
|
|
27
|
-
export declare const READ_FILE_TOOL_DEFINITION: ResolvedToolDefinition;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeReadFileOnSandbox}from"#execution/sandbox/read-file-tool.js";const READ_FILE_INPUT_SCHEMA=z.strictObject({filePath:z.string().describe(`The absolute path to the file to read. A leading $HOME is supported.`),limit:z.number().int().min(1).describe(`Maximum number of lines to return. Defaults to 2000.`).optional(),offset:z.number().int().min(1).describe(`1-based line number to start from. Defaults to 1.`).optional()}),READ_FILE_OUTPUT_SCHEMA=z.strictObject({content:z.string(),nextOffset:z.number().int().min(1).optional(),path:z.string(),totalLines:z.number().int().min(0),truncated:z.boolean()});async function executeReadFile(e,t){return executeReadFileOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const READ_FILE_TOOL_DEFINITION={description:[`Read a file from the local filesystem. If the path does not exist, an error is returned.`,``,`Usage:`,`- The filePath parameter should be an absolute path or begin with $HOME/.`,`- By default, this tool returns up to 2000 lines from the start of the file.`,`- The offset parameter is the line number to start from (1-indexed).`,`- To read later sections, call this tool again with a larger offset.`,'- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n".',`- Any line longer than 2000 characters is truncated.`,`- Call this tool in parallel when you know there are multiple files you want to read.`,`- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.`].join(`
|
|
2
|
-
`),execute:executeReadFile,inputSchema:READ_FILE_INPUT_SCHEMA,logicalPath:`eve:framework/read-file`,name:`read_file`,outputSchema:READ_FILE_OUTPUT_SCHEMA,sourceId:`eve:read-file-tool`,sourceKind:`module`};export{READ_FILE_INPUT_SCHEMA,READ_FILE_OUTPUT_SCHEMA,READ_FILE_TOOL_DEFINITION};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { ResolvedSkillDefinition, ResolvedToolDefinition } from "#runtime/types.js";
|
|
3
|
-
export declare const SKILL_INPUT_SCHEMA: z.ZodObject<{
|
|
4
|
-
skill: z.ZodString;
|
|
5
|
-
}, z.core.$strict>;
|
|
6
|
-
export declare const SKILL_OUTPUT_SCHEMA: z.ZodString;
|
|
7
|
-
/**
|
|
8
|
-
* Creates a node-specific `load_skill` definition with authored skills bound
|
|
9
|
-
* into its executor.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createSkillToolDefinition(authoredSkills: readonly ResolvedSkillDefinition[]): ResolvedToolDefinition;
|
|
12
|
-
export declare const SKILL_TOOL_DEFINITION: ResolvedToolDefinition;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{DynamicSkillManifestKey,SandboxKey}from"#context/keys.js";import{loadContext}from"#context/container.js";import{loadSkillFromSandbox}from"#runtime/skills/sandbox-access.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";async function executeLoadSkillTool(e,t){let r=loadContext(),{skill:i}=e,a=availableDynamicSkillNames(r),o=[...new Set([...t.map(e=>e.name),...a])].sort();try{if(a.includes(i)){let e=r.get(SandboxKey);if(e===void 0)throw Error(`The dynamic skill "${i}" requires sandbox access on the runtime context.`);return await loadSkillFromSandbox(e,i,o)}let e=t.find(e=>e.name===i);if(e!==void 0)return e.markdown;throw Error(formatSkillNotFoundError(i,o))}catch(e){let t=r.get(ConnectionRegistryKey)?.getConnectionNames().find(e=>e.toLowerCase()===i.toLowerCase());if(t===void 0||o.includes(i))throw e;let n=e instanceof Error?e.message:String(e);throw Error(`${n} "${t}" is an installed connection, not a skill. Use connection_search with connection "${t}" to find its tools.`,{cause:e})}}function availableDynamicSkillNames(e){let n=Object.values(e.get(DynamicSkillManifestKey)??{}).flat().map(e=>e.name);return[...new Set(n)].sort()}function formatSkillNotFoundError(e,t){return`No skill named "${e}".${t.length>0?` Available skills: ${t.join(`, `)}.`:``}`}const SKILL_INPUT_SCHEMA=z.strictObject({skill:z.string().describe(`Available skill name or id.`)}),SKILL_OUTPUT_SCHEMA=z.string(),SKILL_TOOL_METADATA={description:[`Load the full instructions for one available skill by name or id.`,`Use this tool when the request clearly matches a listed skill description or when the user explicitly asks for that skill.`,`Loading adds the skill instructions to the current turn.`,`Choose the "skill" value from the Available skills block.`].join(` `),inputSchema:SKILL_INPUT_SCHEMA,logicalPath:`eve:framework/load-skill`,name:`load_skill`,outputSchema:SKILL_OUTPUT_SCHEMA,sourceId:`eve:load-skill-tool`,sourceKind:`module`};function createSkillToolDefinition(e){return{...SKILL_TOOL_METADATA,execute:t=>executeLoadSkillTool(t,e)}}const SKILL_TOOL_DEFINITION=createSkillToolDefinition([]);export{SKILL_INPUT_SCHEMA,SKILL_OUTPUT_SCHEMA,SKILL_TOOL_DEFINITION,createSkillToolDefinition};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{HandleEventKey}from"#context/keys.js";import{createSubagentCalledEvent}from"#protocol/message.js";import{parseJsonObject}from"#shared/json.js";import{loadContext}from"#context/container.js";import{PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA}from"#runtime/subagents/registry.js";import{getHarnessEmissionState}from"#harness/emission.js";import{workflowEntryReference}from"#execution/workflow-runtime.js";import{serializeContext}from"#context/serialize.js";import{createDurableSessionState}from"#execution/durable-session-store.js";import{SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA}from"#runtime/framework-tools/tasks.js";import{dispatchToTaskAgentAddress}from"#execution/agent-handle-dispatch.js";import{createAgentContinuationBundle}from"#execution/agent-continuation-bundle.js";import{prepareAgentActionDispatch,startSubagent}from"#execution/dispatch-runtime-actions-shared.js";import{CallbackBaseUrlKey}from"#harness/authorization.js";import{activeTurnId}from"#harness/active-turn-id.js";import{createSubagentExecutorBinding}from"#tasks/types.js";import{findTaskAgentAddress}from"#execution/tasks/parent/control-shared.js";import{checkTaskContinuationAvailability,createTaskContinuationBusyResult,describeTaskDispatch}from"#execution/tasks/parent/continuation-dispatch.js";import{defineTool}from"#public/definitions/tool.js";const localSubagentExecutors=new WeakSet,batchAgentClaims=new WeakMap,log=createLogger(`runtime.framework-tools.subagent`);function defineSubagent(e){return defineTool({description:e.description,execution:`background`,inputSchema:PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA,outputSchema:SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA,execute:(t,n,r)=>executeSubagentTool({definition:e,kind:`local`,task:r,toolContext:n,toolInput:t})})}function registerLocalSubagentExecutor(e){localSubagentExecutors.add(e)}function countLocalSubagentCalls(e){return e.filter(e=>localSubagentExecutors.has(e.definition.execute)).length}async function executeSubagentTool(e){let t=loadContext(),{batch:n,session:r,task:o}=e.task,s=getHarnessEmissionState(r.state),c={callId:e.toolContext.callId,description:e.definition.description,input:parseJsonObject(PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA.parse(e.toolInput)),name:e.definition.name,nodeId:e.definition.nodeId},l=await dispatchSubagent({action:e.kind===`remote`?{...c,kind:`remote-agent-call`,remoteAgentName:e.definition.name}:{...c,kind:`subagent-call`,subagentName:e.definition.name},batch:n,callbackBaseUrl:t.get(CallbackBaseUrlKey),ctx:t,event:{...s,turnId:activeTurnId(s)},localFanoutSize:countLocalSubagentCalls(n),serializedContext:serializeContext(t),sessionState:createDurableSessionState({session:r}),task:o}),u=findTaskAgentAddress(l.session,l.agentId);if(u===void 0)throw Error(`Subagent dispatch for "${l.agentId}" recorded no task agent address.`);let d=createSubagentExecutorBinding({address:u.address,identity:u.identity});await emitSubagentCalled$1({callId:e.toolContext.callId,childSessionId:l.address.sessionId,event:{...s,turnId:activeTurnId(s)},name:l.name,remote:l.remote,sessionId:r.sessionId,toolName:e.definition.name});let f=e.task.delegated({executor:d,receipt:{agentId:l.agentId}});return await emitSubagentCompleted({callId:e.toolContext.callId,output:JSON.stringify(f.receipt),subagentName:l.name,taskId:f.receipt.taskId}),f}async function dispatchSubagent(e){let t=await prepareAgentActionDispatch({action:e.action,ctx:e.ctx,event:e.event,localFanoutSize:e.localFanoutSize,serializedContext:e.serializedContext,sessionState:e.sessionState}),n=t.plan[0];if(n===void 0||n.kind===`task-control`)throw Error(`Subagent tool dispatch produced no executable plan entry.`);if(n.kind===`reject`)throw Error(JSON.stringify(n.result.output));if(n.kind===`resume`){let r=await checkTaskContinuationAvailability({action:n.action,agentId:n.agentId,parentStepIndex:e.event.stepIndex,parentTurnId:e.event.turnId,session:t.session});if(r!==void 0)throw Error(JSON.stringify(r.output));let i=claimBatchAgent(e.batch,n.agentId,e.task.taskId);if(i!==void 0){let e=createTaskContinuationBusyResult({action:n.action,agentId:n.agentId,status:`working`,taskId:i});throw Error(JSON.stringify(e.output))}}let r=n.kind===`resume`?await dispatchToTaskAgentAddress({action:n.action,agentId:n.agentId,auth:t.auth,bundle:createAgentContinuationBundle({action:n.action,bundle:t.bundle,dynamicRemoteAgent:n.dynamicRemoteAgent}),currentSession:t.session,parentToken:e.task.taskInboxToken}):await startSubagent({auth:t.auth,batchEvent:e.event,bundle:t.bundle,callbackBaseUrl:e.callbackBaseUrl,capabilities:t.capabilities,channelMetadata:t.channelMetadata,currentSession:t.session,fanoutSize:t.fanoutSize,initiatorAuth:t.initiatorAuth,parentContinuationToken:e.task.taskInboxToken,parentTraceContext:t.parentTraceContext,persistentSessions:!0,sandboxSessionId:t.sandboxSessionId,serializedContext:t.serializedContext,session:t.session,taskOwned:!0,target:n.target});if(r.kind===`error`)throw Error(JSON.stringify(r.result.output));let i=describeTaskDispatch({action:e.action,agentId:n.kind===`resume`?n.agentId:void 0,parentSessionId:t.session.sessionId,parentTurnId:e.event.turnId,session:r.session}),a=n.kind===`resume`?n.dynamicRemoteAgent:n.target.kind===`remote`?n.target.dynamicRemoteAgent:void 0;return{address:r.address,agentId:i.agentId,mode:i.mode,name:i.name,...r.address.kind===`agent/remote`?{remote:{resolverId:a?.credentialsStepId??e.action.nodeId,url:r.address.url}}:{},session:r.session}}function claimBatchAgent(e,t,n){let r=batchAgentClaims.get(e);r===void 0&&(r=new Map,batchAgentClaims.set(e,r));let i=r.get(t);if(i!==void 0)return i;r.set(t,n)}async function emitSubagentCalled$1(e){let i=loadContext().get(HandleEventKey);if(i!==void 0)try{await i(createSubagentCalledEvent({callId:e.callId,childSessionId:e.childSessionId,name:e.name,remote:e.remote,sequence:e.event.sequence,sessionId:e.sessionId,toolName:e.toolName,turnId:e.event.turnId,workflowId:workflowEntryReference.workflowId}))}catch(n){logError(log,`subagent.called emission failed`,n,{callId:e.callId,childSessionId:e.childSessionId,toolName:e.toolName})}}async function emitSubagentCompleted(e){let r=loadContext().get(HandleEventKey);if(r!==void 0)try{await r({data:{backgroundTask:{status:`working`,taskId:e.taskId},callId:e.callId,output:e.output,subagentName:e.subagentName},type:`subagent.completed`})}catch(n){logError(log,`subagent.completed emission failed`,n,{callId:e.callId,taskId:e.taskId})}}export{countLocalSubagentCalls,defineSubagent,executeSubagentTool,registerLocalSubagentExecutor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA}from"#runtime/subagents/registry.js";import{SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA}from"#runtime/framework-tools/tasks.js";import{executeSubagentTool}from"#runtime/framework-tools/subagent/local.js";import{defineTool}from"#public/definitions/tool.js";function defineRemoteSubagent(r){return defineTool({description:r.description,execution:`background`,inputSchema:PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA,outputSchema:SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA,execute:(e,t,n)=>executeSubagentTool({definition:r,kind:`remote`,task:n,toolContext:t,toolInput:e})})}export{defineRemoteSubagent};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
3
|
-
import type { ResolvedToolDefinition } from "#runtime/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Framework task tools for `experimental.tasks`.
|
|
6
|
-
*
|
|
7
|
-
* With the flag on, subagent calls return a task receipt instead of
|
|
8
|
-
* blocking the parent turn; these tools coordinate that delegated work.
|
|
9
|
-
* `task_cancel` and `task_update` are execute-less runtime actions —
|
|
10
|
-
* they need durable session state and world access, so the runtime-action
|
|
11
|
-
* dispatch step executes them.
|
|
12
|
-
*/
|
|
13
|
-
export declare const TASK_CANCEL_TOOL_NAME = "task_cancel";
|
|
14
|
-
export declare const TASK_UPDATE_TOOL_NAME = "task_update";
|
|
15
|
-
/** Every model-visible task tool name, for gating and dispatch matching. */
|
|
16
|
-
export declare const TASK_TOOL_NAMES: ReadonlySet<string>;
|
|
17
|
-
/** Task-control tools executed by the runtime-action dispatch step. */
|
|
18
|
-
export declare const TASK_CONTROL_TOOL_NAMES: ReadonlySet<string>;
|
|
19
|
-
export declare const TASK_CANCEL_INPUT_SCHEMA: z.ZodObject<{
|
|
20
|
-
taskIds: z.ZodArray<z.ZodString>;
|
|
21
|
-
}, z.core.$strict>;
|
|
22
|
-
export declare const TASK_UPDATE_INPUT_SCHEMA: z.ZodObject<{
|
|
23
|
-
message: z.ZodString;
|
|
24
|
-
}, z.core.$strict>;
|
|
25
|
-
export declare const TASK_VIEWS_OUTPUT_SCHEMA: z.ZodObject<{
|
|
26
|
-
tasks: z.ZodArray<z.ZodObject<{
|
|
27
|
-
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
28
|
-
lastOutput: z.ZodOptional<z.ZodObject<{
|
|
29
|
-
data: z.ZodUnknown;
|
|
30
|
-
type: z.ZodEnum<{
|
|
31
|
-
error: "error";
|
|
32
|
-
result: "result";
|
|
33
|
-
}>;
|
|
34
|
-
}, z.core.$strip>>;
|
|
35
|
-
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
36
|
-
agentId: z.ZodString;
|
|
37
|
-
kind: z.ZodLiteral<"subagent">;
|
|
38
|
-
mode: z.ZodEnum<{
|
|
39
|
-
local: "local";
|
|
40
|
-
remote: "remote";
|
|
41
|
-
}>;
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
45
|
-
kind: z.ZodString;
|
|
46
|
-
name: z.ZodString;
|
|
47
|
-
}, z.core.$strip>]>;
|
|
48
|
-
status: z.ZodEnum<{
|
|
49
|
-
cancelled: "cancelled";
|
|
50
|
-
completed: "completed";
|
|
51
|
-
failed: "failed";
|
|
52
|
-
input_required: "input_required";
|
|
53
|
-
working: "working";
|
|
54
|
-
}>;
|
|
55
|
-
taskId: z.ZodString;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
export declare const SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA: z.ZodObject<{
|
|
59
|
-
agentId: z.ZodString;
|
|
60
|
-
status: z.ZodLiteral<"working">;
|
|
61
|
-
taskId: z.ZodString;
|
|
62
|
-
}, z.core.$strict>;
|
|
63
|
-
/**
|
|
64
|
-
* Builds the harness definitions injected when the root agent enables
|
|
65
|
-
* `experimental.tasks`. Follows the implicit `agent` tool pattern:
|
|
66
|
-
* inline definitions, no registry entry, session-shape hiding in
|
|
67
|
-
* advertised-tools, and re-validation at dispatch.
|
|
68
|
-
*/
|
|
69
|
-
export declare function createTaskToolHarnessDefinitions(): readonly HarnessToolDefinition[];
|
|
70
|
-
/**
|
|
71
|
-
* Whether one node's sessions receive the task tools.
|
|
72
|
-
*
|
|
73
|
-
* Mirrors `isImplicitAgentToolAvailable`: the compile step already
|
|
74
|
-
* rejects `experimental.tasks` on subagents, authored tools with the
|
|
75
|
-
* same name shadow the framework tool, and `disableTool(name)` removes
|
|
76
|
-
* individual tools. Root-node self-delegated children share this node's
|
|
77
|
-
* config, so advertised-tools uses caller/session shape to expose only
|
|
78
|
-
* `task_update` to delegated task children.
|
|
79
|
-
*/
|
|
80
|
-
export declare function isTaskToolAvailable(input: {
|
|
81
|
-
readonly disabledFrameworkTools: readonly string[];
|
|
82
|
-
readonly hasAuthoredTool: boolean;
|
|
83
|
-
readonly tasksEnabled: boolean;
|
|
84
|
-
readonly toolName: string;
|
|
85
|
-
}): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Registry-shaped metadata for the task tools. Not registered in the
|
|
88
|
-
* tool registry (the harness injects the real definitions per node);
|
|
89
|
-
* these entries exist so `disableTool(name)` validates the names.
|
|
90
|
-
*/
|
|
91
|
-
export declare const TASK_TOOL_DEFINITIONS: readonly ResolvedToolDefinition[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";const TASK_CANCEL_TOOL_NAME=`task_cancel`,TASK_UPDATE_TOOL_NAME=`task_update`,TASK_TOOL_NAMES=new Set([TASK_CANCEL_TOOL_NAME,TASK_UPDATE_TOOL_NAME]),TASK_CONTROL_TOOL_NAMES=new Set([TASK_CANCEL_TOOL_NAME,TASK_UPDATE_TOOL_NAME]),TASK_IDS_SCHEMA=z.array(z.string().min(1)).min(1).describe(`Task ids from earlier subagent task receipts.`),TASK_CANCEL_INPUT_SCHEMA=z.strictObject({taskIds:TASK_IDS_SCHEMA}),TASK_UPDATE_INPUT_SCHEMA=z.strictObject({message:z.string().min(1).describe(`Brief description of what this task is currently doing.`)}),TASK_VIEW_SCHEMA=z.object({inputRequests:z.array(z.unknown()).optional(),lastOutput:z.object({data:z.unknown(),type:z.enum([`result`,`error`])}).optional(),metadata:z.union([z.object({agentId:z.string(),kind:z.literal(`subagent`),mode:z.enum([`local`,`remote`]),name:z.string()}),z.object({data:z.record(z.string(),z.unknown()).optional(),kind:z.string(),name:z.string()})]),status:z.enum([`working`,`input_required`,`completed`,`failed`,`cancelled`]),taskId:z.string()}),TASK_VIEWS_OUTPUT_SCHEMA=z.object({tasks:z.array(TASK_VIEW_SCHEMA)}),SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA=z.strictObject({agentId:z.string(),status:z.literal(`working`),taskId:z.string()}),TASK_CANCEL_DESCRIPTION=`Request cooperative cancellation of one or more background tasks. Cancellation is final: a task that finishes after you cancel it stays cancelled. Cancelling an already-finished task changes nothing.`,TASK_UPDATE_DESCRIPTION=`Briefly tell the parent agent what this background task is currently doing. Report activity, not preliminary findings or results.`;function createTaskToolHarnessDefinitions(){return[{description:TASK_CANCEL_DESCRIPTION,inputSchema:TASK_CANCEL_INPUT_SCHEMA,name:TASK_CANCEL_TOOL_NAME,outputSchema:TASK_VIEWS_OUTPUT_SCHEMA,runtimeAction:{kind:`task-control`}},{description:TASK_UPDATE_DESCRIPTION,inputSchema:TASK_UPDATE_INPUT_SCHEMA,name:TASK_UPDATE_TOOL_NAME,runtimeAction:{kind:`task-control`}}]}function isTaskToolAvailable(e){return e.tasksEnabled&&!e.disabledFrameworkTools.includes(e.toolName)&&!e.hasAuthoredTool}function createResolvedTaskToolStub(e){return{description:e.description,inputSchema:null,logicalPath:`eve:framework/${e.name}`,name:e.name,sourceId:`eve:${e.name}-tool`,sourceKind:`module`}}const TASK_TOOL_DEFINITIONS=[createResolvedTaskToolStub({description:TASK_CANCEL_DESCRIPTION,name:TASK_CANCEL_TOOL_NAME}),createResolvedTaskToolStub({description:TASK_UPDATE_DESCRIPTION,name:TASK_UPDATE_TOOL_NAME})];export{SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA,TASK_CANCEL_INPUT_SCHEMA,TASK_CANCEL_TOOL_NAME,TASK_CONTROL_TOOL_NAMES,TASK_TOOL_DEFINITIONS,TASK_TOOL_NAMES,TASK_UPDATE_INPUT_SCHEMA,TASK_UPDATE_TOOL_NAME,TASK_VIEWS_OUTPUT_SCHEMA,createTaskToolHarnessDefinitions,isTaskToolAvailable};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{executeWebFetchTool}from"#execution/web-fetch/tool.js";async function executeWebFetch(e,t){return executeWebFetchTool(e,{abortSignal:t?.abortSignal})}const WEB_FETCH_INPUT_SCHEMA=z.strictObject({format:z.enum([`markdown`,`text`,`html`]).describe(`The format to return the content in (text, markdown, or html). HTML responses are automatically converted to the requested format. Defaults to "markdown".`).optional(),timeout:z.number().describe(`Optional timeout in seconds. Defaults to 30, max 120.`).optional(),url:z.string().describe(`The fully-formed URL to fetch content from. Must start with https://.`)}),WEB_FETCH_OUTPUT_SCHEMA=z.strictObject({content:z.string(),contentType:z.string(),truncated:z.boolean(),url:z.string()}),WEB_FETCH_TOOL_DEFINITION={description:[`Fetch a webpage and return its content in the requested format. Use this to retrieve and analyze content from URLs.`,``,`Usage notes:`,`- The URL must be a fully-formed valid URL starting with https://`,`- HTML responses are automatically converted to markdown or plain text based on the requested format`,`- Format options: "markdown" (default), "text", or "html"`,`- Default timeout is 30 seconds (max 120 seconds)`,`- Maximum response size is 5 MB; content is further capped at the shared tool-output budget (50 KB / 2000 lines)`,`- This tool is read-only and does not modify any files`].join(`
|
|
2
|
-
`),execute:executeWebFetch,inputSchema:WEB_FETCH_INPUT_SCHEMA,logicalPath:`eve:framework/web-fetch`,name:`web_fetch`,outputSchema:WEB_FETCH_OUTPUT_SCHEMA,sourceId:`eve:web-fetch-tool`,sourceKind:`module`};export{WEB_FETCH_INPUT_SCHEMA,WEB_FETCH_OUTPUT_SCHEMA,WEB_FETCH_TOOL_DEFINITION};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const WEB_SEARCH_OPENAI_OUTPUT_SCHEMA={$schema:`http://json-schema.org/draft-07/schema#`,additionalProperties:!1,properties:{action:{oneOf:[{additionalProperties:!1,properties:{queries:{items:{type:`string`},type:`array`},query:{type:`string`},type:{const:`search`,type:`string`}},required:[`type`],type:`object`},{additionalProperties:!1,properties:{type:{const:`openPage`,type:`string`},url:{anyOf:[{type:`string`},{type:`null`}]}},required:[`type`],type:`object`},{additionalProperties:!1,properties:{pattern:{anyOf:[{type:`string`},{type:`null`}]},type:{const:`findInPage`,type:`string`},url:{anyOf:[{type:`string`},{type:`null`}]}},required:[`type`],type:`object`}]},sources:{items:{oneOf:[{additionalProperties:!1,properties:{type:{const:`url`,type:`string`},url:{type:`string`}},required:[`type`,`url`],type:`object`},{additionalProperties:!1,properties:{name:{type:`string`},type:{const:`api`,type:`string`}},required:[`type`,`name`],type:`object`}]},type:`array`}},type:`object`},WEB_SEARCH_ANTHROPIC_OUTPUT_SCHEMA={$schema:`http://json-schema.org/draft-07/schema#`,items:{additionalProperties:!1,properties:{encryptedContent:{type:`string`},pageAge:{anyOf:[{type:`string`},{type:`null`}]},title:{anyOf:[{type:`string`},{type:`null`}]},type:{const:`web_search_result`,type:`string`},url:{type:`string`}},required:[`url`,`title`,`pageAge`,`encryptedContent`,`type`],type:`object`},type:`array`},WEB_SEARCH_GOOGLE_OUTPUT_SCHEMA={$schema:`http://json-schema.org/draft-07/schema#`,additionalProperties:!1,properties:{},type:`object`},WEB_SEARCH_EXA_OUTPUT_SCHEMA={$schema:`http://json-schema.org/draft-07/schema#`,anyOf:[{properties:{costDollars:{additionalProperties:!1,properties:{search:{additionalProperties:{type:`number`},type:`object`},total:{type:`number`}},type:`object`},requestId:{type:`string`},resolvedSearchType:{type:`string`},results:{items:{properties:{author:{anyOf:[{type:`string`},{type:`null`}]},entities:{items:{properties:{id:{type:`string`},properties:{type:`object`},type:{type:`string`},version:{type:`number`}},required:[`id`,`type`,`version`,`properties`],type:`object`},type:`array`},extras:{additionalProperties:!1,properties:{imageLinks:{items:{type:`string`},type:`array`},links:{items:{type:`string`},type:`array`}},type:`object`},favicon:{anyOf:[{type:`string`},{type:`null`}]},highlightScores:{items:{type:`number`},type:`array`},highlights:{items:{type:`string`},type:`array`},id:{type:`string`},image:{anyOf:[{type:`string`},{type:`null`}]},publishedDate:{anyOf:[{type:`string`},{type:`null`}]},score:{anyOf:[{type:`number`},{type:`null`}]},subpages:{items:{},type:`array`},summary:{type:`string`},text:{type:`string`},title:{anyOf:[{type:`string`},{type:`null`}]},url:{type:`string`}},required:[`url`,`id`],type:`object`},type:`array`},searchTime:{type:`number`},searchType:{type:`string`}},required:[`requestId`,`results`],type:`object`},{additionalProperties:!1,properties:{error:{enum:[`api_error`,`rate_limit`,`timeout`,`invalid_input`,`configuration_error`,`execution_error`,`unknown`],type:`string`},message:{type:`string`},statusCode:{type:`number`}},required:[`error`,`message`],type:`object`}]},WEB_SEARCH_PARALLEL_OUTPUT_SCHEMA={$schema:`http://json-schema.org/draft-07/schema#`,anyOf:[{additionalProperties:!1,properties:{results:{items:{additionalProperties:!1,properties:{excerpt:{type:`string`},publishDate:{anyOf:[{type:`string`},{type:`null`}]},relevanceScore:{type:`number`},title:{type:`string`},url:{type:`string`}},required:[`url`,`title`,`excerpt`],type:`object`},type:`array`},searchId:{type:`string`}},required:[`searchId`,`results`],type:`object`},{additionalProperties:!1,properties:{error:{enum:[`api_error`,`rate_limit`,`timeout`,`invalid_input`,`configuration_error`,`unknown`],type:`string`},message:{type:`string`},statusCode:{type:`number`}},required:[`error`,`message`],type:`object`}]},WEB_SEARCH_TOOL_DEFINITION={description:`Search the web for real-time information. Use this to find up-to-date information about current events, recent developments, or topics that may have changed since the knowledge cutoff.`,inputSchema:null,logicalPath:`eve:framework/web-search`,name:`web_search`,sourceId:`eve:web-search-tool`,sourceKind:`module`};export{WEB_SEARCH_ANTHROPIC_OUTPUT_SCHEMA,WEB_SEARCH_EXA_OUTPUT_SCHEMA,WEB_SEARCH_GOOGLE_OUTPUT_SCHEMA,WEB_SEARCH_OPENAI_OUTPUT_SCHEMA,WEB_SEARCH_PARALLEL_OUTPUT_SCHEMA,WEB_SEARCH_TOOL_DEFINITION};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { ResolvedToolDefinition } from "#runtime/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Shared input schema used by the framework `write_file` tool and any author
|
|
5
|
-
* tool constructed via {@link defineWriteFileTool}.
|
|
6
|
-
*
|
|
7
|
-
* Exported so the public `defineWriteFileTool` factory and the framework
|
|
8
|
-
* `WRITE_FILE_TOOL_DEFINITION` use the exact same schema object — keeping
|
|
9
|
-
* model input contracts in sync without duplication.
|
|
10
|
-
*/
|
|
11
|
-
export declare const WRITE_FILE_INPUT_SCHEMA: z.ZodObject<{
|
|
12
|
-
content: z.ZodString;
|
|
13
|
-
filePath: z.ZodString;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
/**
|
|
16
|
-
* Shared output schema used by the framework `write_file` tool and any author
|
|
17
|
-
* tool constructed via {@link defineWriteFileTool}.
|
|
18
|
-
*/
|
|
19
|
-
export declare const WRITE_FILE_OUTPUT_SCHEMA: z.ZodObject<{
|
|
20
|
-
existed: z.ZodBoolean;
|
|
21
|
-
path: z.ZodString;
|
|
22
|
-
}, z.core.$strict>;
|
|
23
|
-
export declare const WRITE_FILE_TOOL_DEFINITION: ResolvedToolDefinition;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeWriteFileOnSandbox}from"#execution/sandbox/write-file-tool.js";const WRITE_FILE_INPUT_SCHEMA=z.strictObject({content:z.string().describe(`Complete replacement file contents.`),filePath:z.string().describe(`The absolute path to the file to write. A leading $HOME is supported.`)}),WRITE_FILE_OUTPUT_SCHEMA=z.strictObject({existed:z.boolean(),path:z.string()});async function executeWriteFile(e,t){return executeWriteFileOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const WRITE_FILE_TOOL_DEFINITION={description:[`Writes a file to the local filesystem.`,``,`Usage:`,`- This tool will overwrite the existing file if there is one at the provided path.`,`- If this is an existing file, you MUST use the read_file tool first to read the file's contents. This tool will fail if you did not read the file first.`,`- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.`,`- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.`,`- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`].join(`
|
|
2
|
-
`),execute:executeWriteFile,inputSchema:WRITE_FILE_INPUT_SCHEMA,logicalPath:`eve:framework/write-file`,name:`write_file`,outputSchema:WRITE_FILE_OUTPUT_SCHEMA,sourceId:`eve:write-file-tool`,sourceKind:`module`};export{WRITE_FILE_INPUT_SCHEMA,WRITE_FILE_OUTPUT_SCHEMA,WRITE_FILE_TOOL_DEFINITION};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importJWK,importSPKI,jwtVerify}from"#compiled/jose/index.js";import{areTokenClaimMatchersSatisfied,createJwtAuthenticatedCallerPrincipal}from"#runtime/governance/auth/token-claims.js";const importedJwtPublicKeyCache=new Map;async function authenticateJwtEcdsaStrategy(e){let t;try{t=await getImportedJwtPublicKey(e.strategy)}catch(e){return{kind:`misconfigured`,message:`Failed to import JWT ECDSA public key. ${e instanceof Error?e.message:`Unknown key import failure.`}`}}try{let a=await jwtVerify(e.token,t,{algorithms:[e.strategy.algorithm],audience:[...e.strategy.audiences],clockTolerance:e.strategy.clockSkewSeconds,issuer:e.strategy.issuer});return typeof a.payload.sub!=`string`||a.payload.sub.length===0?{kind:`not-authenticated`}:areTokenClaimMatchersSatisfied(a.payload,e.strategy)?{kind:`authenticated`,principal:createJwtAuthenticatedCallerPrincipal({authenticator:`jwt-ecdsa`,payload:a.payload,principalType:`service`})}:{kind:`caller-not-allowed`}}catch{return{kind:`not-authenticated`}}}async function getImportedJwtPublicKey(e){let t=`${e.algorithm}:${e.publicKey}`,n=importedJwtPublicKeyCache.get(t);if(n!==void 0)return await n;let r=importJwtPublicKey(e.publicKey,e.algorithm).catch(e=>{throw importedJwtPublicKeyCache.delete(t),e});return importedJwtPublicKeyCache.set(t,r),await r}async function importJwtPublicKey(n,r){let i=n.trim();return i.startsWith(`{`)?await importJWK(JSON.parse(i),r):await importSPKI(i,r)}export{authenticateJwtEcdsaStrategy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createSecretKey}from"node:crypto";import{jwtVerify}from"#compiled/jose/index.js";import{areTokenClaimMatchersSatisfied,createJwtAuthenticatedCallerPrincipal}from"#runtime/governance/auth/token-claims.js";async function authenticateJwtHmacStrategy(e){try{let t=await jwtVerify(e.token,createSecretKey(Buffer.from(e.strategy.secret,`utf8`)),{algorithms:[e.strategy.algorithm],audience:[...e.strategy.audiences],clockTolerance:e.strategy.clockSkewSeconds,issuer:e.strategy.issuer});return typeof t.payload.sub!=`string`||t.payload.sub.length===0?{kind:`not-authenticated`}:areTokenClaimMatchersSatisfied(t.payload,e.strategy)?{kind:`authenticated`,principal:createJwtAuthenticatedCallerPrincipal({authenticator:`jwt-hmac`,payload:t.payload,principalType:`service`})}:{kind:`caller-not-allowed`}}catch{return{kind:`not-authenticated`}}}export{authenticateJwtHmacStrategy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{createRemoteJWKSet,jwtVerify}from"#compiled/jose/index.js";import{areTokenClaimMatchersSatisfied,createJwtAuthenticatedCallerPrincipal}from"#runtime/governance/auth/token-claims.js";const oidcDiscoveryDocumentSchema=z.object({issuer:z.string().optional(),jwks_uri:z.string().url()}).passthrough(),oidcDiscoveryDocumentCache=new Map,oidcJwksCache=new Map;async function authenticateOidcStrategy(e){let t;try{t=await getOidcRemoteJwks(e.strategy)}catch(e){return{kind:`misconfigured`,message:`Failed to load OIDC discovery metadata. ${e instanceof Error?e.message:`Unknown discovery failure.`}`}}try{let a=await jwtVerify(e.token,t,{audience:[...e.strategy.audiences],clockTolerance:e.strategy.clockSkewSeconds,issuer:e.strategy.issuer});if(e.strategy.acceptCurrentVercelProject&&e.strategy.issuer.startsWith(`https://oidc.vercel.com/`)&&a.payload.external_sub!==void 0)return typeof a.payload.external_sub!=`string`||a.payload.external_sub.length===0||!currentVercelProjectMatches({payload:a.payload,strategy:e.strategy})||!currentVercelEnvironmentMatches({payload:a.payload,strategy:e.strategy})?{kind:`caller-not-allowed`}:{kind:`authenticated`,principal:createJwtAuthenticatedCallerPrincipal({authenticator:`oidc`,issuerClaims:[`external_iss`,`connector_id`],payload:a.payload,principalType:`user`,subjectClaim:`external_sub`})};if(e.strategy.acceptCurrentVercelProject&&e.strategy.issuer.startsWith(`https://oidc.vercel.com/`)&&a.payload.user_id!==void 0){if(typeof a.payload.user_id!=`string`||a.payload.user_id.length===0||a.payload.environment!==`development`||!currentVercelProjectMatches({payload:a.payload,strategy:e.strategy}))return{kind:`caller-not-allowed`};if(currentVercelEnvironmentMatches({payload:a.payload,strategy:e.strategy}))return{kind:`authenticated`,principal:createJwtAuthenticatedCallerPrincipal({authenticator:`oidc`,payload:a.payload,principalType:`user`,subjectClaim:`user_id`})}}if(typeof a.payload.sub!=`string`||a.payload.sub.length===0)return{kind:`not-authenticated`};let o=e.strategy.acceptCurrentVercelProject&&isCurrentVercelProjectToken({issuer:e.strategy.issuer,payload:a.payload,strategy:e.strategy}),s=o&&isCurrentVercelEnvironmentToken({payload:a.payload,strategy:e.strategy});return!o&&!areTokenClaimMatchersSatisfied(a.payload,e.strategy)?{kind:`caller-not-allowed`}:{kind:`authenticated`,principal:createJwtAuthenticatedCallerPrincipal({authenticator:`oidc`,payload:a.payload,principalType:s?`runtime`:`service`})}}catch{return{kind:`not-authenticated`}}}async function getOidcRemoteJwks(e){let n=await getOidcDiscoveryDocument(e.discoveryUrl),r=oidcJwksCache.get(n.jwks_uri);if(r!==void 0)return r;let i=createRemoteJWKSet(new URL(n.jwks_uri));return oidcJwksCache.set(n.jwks_uri,i),i}async function getOidcDiscoveryDocument(e){let t=oidcDiscoveryDocumentCache.get(e);if(t!==void 0)return await t;let n=fetch(e,{headers:{accept:`application/json`}}).then(async e=>{if(!e.ok)throw Error(`Discovery route returned HTTP ${e.status}.`);return oidcDiscoveryDocumentSchema.parse(await e.json())}).catch(t=>{throw oidcDiscoveryDocumentCache.delete(e),t});return oidcDiscoveryDocumentCache.set(e,n),await n}function isCurrentVercelProjectToken(e){if(!e.issuer.startsWith(`https://oidc.vercel.com`))return!1;let t=e.strategy.currentVercelProject;return t!==void 0&&typeof e.payload.project_id==`string`&&e.payload.project_id===t.projectId}function currentVercelProjectMatches(e){let t=e.strategy.currentVercelProject;return t!==void 0&&typeof e.payload.project_id==`string`&&e.payload.project_id===t.projectId}function isCurrentVercelEnvironmentToken(e){let t=e.strategy.currentVercelProject?.environment;return t===void 0||t.length===0?!1:typeof e.payload.environment==`string`&&e.payload.environment===t}function currentVercelEnvironmentMatches(e){let t=e.strategy.currentVercelProject?.environment;return t===void 0||t.length===0?!1:typeof e.payload.environment==`string`&&e.payload.environment===t}export{authenticateOidcStrategy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{runtimeToolCallActionRequestSchema}from"#runtime/actions/types.js";const inputOptionSchema=z.object({description:z.string().describe(`Optional additional context for this option.`).optional(),id:z.string().describe(`Stable identifier for the option.`),label:z.string().describe(`User-facing label for the option.`),style:z.enum([`primary`,`danger`,`default`]).describe(`Visual treatment hint for the option.`).optional()}).strict(),inputRequestKindSchema=z.enum([`question`,`session-limit`,`tool-approval`]),inputRequestSchema=z.object({action:runtimeToolCallActionRequestSchema,allowFreeform:z.boolean().describe(`Whether the user may answer with freeform text instead of selecting one of the provided options.`).optional(),display:z.enum([`confirmation`,`select`,`text`]).describe(`Rendering hint: the channel uses this to pick a UX treatment.`).optional(),kind:inputRequestKindSchema.describe(`Framework-owned request source used to resolve, route, and render the response.`),options:z.array(inputOptionSchema).describe(`Selectable answer options to present to the user.`).optional(),prompt:z.string().describe(`The prompt to present to the user.`),requestId:z.string().describe(`Stable identifier for this request.`)}).strict(),inputResponseSchema=z.object({optionId:z.string().optional(),requestId:z.string(),text:z.string().optional()}).strict();function parseInputResponse(e){return inputResponseSchema.parse(e)}function parseInputResponses(e){return inputResponseSchema.array().parse(e).map(e=>e)}function isInputRequest(e){return inputRequestSchema.safeParse(e).success}function isInputResponse(e){return inputResponseSchema.safeParse(e).success}export{inputOptionSchema,inputRequestKindSchema,inputRequestSchema,inputResponseSchema,isInputRequest,isInputResponse,parseInputResponse,parseInputResponses};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RouteContext } from "#public/definitions/channel.js";
|
|
2
|
-
import type { ResolvedChannelDefinition } from "#runtime/types.js";
|
|
3
|
-
export declare const HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX = "eve/v1/callback";
|
|
4
|
-
export declare function getSessionCallbackChannelDefinitions(): readonly ResolvedChannelDefinition[];
|
|
5
|
-
export declare function getSessionCallbackChannelNames(): ReadonlySet<string>;
|
|
6
|
-
export declare function handleSessionCallbackRequest(request: Request, ctx: RouteContext): Promise<Response>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isInputRequest}from"#runtime/input/types.js";import{z}from"#compiled/zod/index.js";import{EVE_CALLBACK_ROUTE_PATTERN}from"#protocol/routes.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{REMOTE_AGENT_FAILED}from"#harness/agent-handle-errors.js";import{readTaskIdFromInboxToken}from"#tasks/task-id.js";import{resumeHook}from"#internal/workflow/runtime.js";import{tokenUsageSchema}from"#shared/token-usage.js";import{agentTurnOutcomeSchema}from"#shared/agent-turn-outcome.js";const HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX=`eve/v1/callback`,HANDLED_METHODS=[`POST`],ZERO_TOKEN_USAGE={cacheReadTokens:0,cacheWriteTokens:0,inputTokens:0,outputTokens:0},eventCoordinateSchema=z.number().int().nonnegative(),authorizationChallengeSchema=z.looseObject({displayName:z.string().optional(),expiresAt:z.string().optional(),instructions:z.string().optional(),url:z.string().optional(),userCode:z.string().optional()}),taskInputEventSchema=z.looseObject({requests:z.array(jsonValueSchema.refine(isInputRequest)).min(1),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string()}),taskAuthorizationEventSchema=z.discriminatedUnion(`type`,[z.looseObject({data:z.looseObject({attemptId:z.string().optional(),authorization:authorizationChallengeSchema.optional(),description:z.string(),name:z.string(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string(),webhookUrl:z.string().optional()}),type:z.literal(`authorization.required`)}),z.looseObject({data:z.looseObject({attemptId:z.string().optional(),authorization:authorizationChallengeSchema.optional(),name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),reason:z.string().optional(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string()}),type:z.literal(`authorization.completed`)})]),taskEventCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string(),childContinuationToken:z.string(),childSessionId:z.string(),event:taskInputEventSchema,kind:z.literal(`task.input-requested`),subagentName:z.string(),taskId:z.string()}),z.object({callId:z.string(),childContinuationToken:z.string(),childSessionId:z.string(),event:taskAuthorizationEventSchema,kind:z.literal(`task.authorization`),subagentName:z.string(),taskId:z.string()})]),taskTurnStartedCallbackSchema=z.object({kind:z.literal(`turn.started`),sessionId:z.string().min(1),taskId:z.string().min(1),turnId:z.string().min(1)}),taskUpdateCallbackSchema=z.object({callId:z.string().min(1),kind:z.literal(`task.update`),message:z.string().min(1),taskId:z.string().min(1),updateEpoch:z.string().min(1),updateIndex:eventCoordinateSchema}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`session.completed`),output:jsonValueSchema.optional(),subagentName:z.string().min(1),usage:z.unknown().optional()}),z.object({callId:z.string().min(1),error:jsonValueSchema.optional(),kind:z.literal(`session.failed`),subagentName:z.string().min(1),usage:z.unknown().optional()}),z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeSchema,subagentName:z.string().min(1)})]);function getSessionCallbackChannelDefinitions(){return HANDLED_METHODS.map(e=>buildCallbackChannelDefinition(e))}function getSessionCallbackChannelNames(){return new Set(HANDLED_METHODS.map(channelNameForMethod))}function buildCallbackChannelDefinition(e){let t=channelNameForMethod(e);return{name:t,method:e,urlPath:EVE_CALLBACK_ROUTE_PATTERN,fetch:handleSessionCallbackRequest,logicalPath:`framework://channels/${t}`,sourceId:`eve:framework:session-callback-${e.toLowerCase()}`,sourceKind:`module`}}function channelNameForMethod(e){return`${HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX}/${e.toLowerCase()}`}async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let r;try{r=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=projectTaskEvent(r,n);if(i instanceof Response)return i;if(i!==void 0){try{await resumeHook(n,i)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let a=projectTaskUpdate(r,n);if(a instanceof Response)return a;if(a!==void 0){try{await resumeHook(n,a)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let o=projectTaskTurnStarted(r,n);if(o instanceof Response)return o;if(o!==void 0){try{await resumeHook(n,o)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let s=projectSessionCallbackResult(r);if(s instanceof Response)return s;try{await resumeHook(n,{kind:`runtime-action-result`,results:[s]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(!(typeof e!=`object`||!e))return Reflect.get(e,`kind`)}function projectTaskEvent(e,t){let n=callbackKind(e);if(n!==`task.input-requested`&&n!==`task.authorization`)return;let r=taskEventCallbackSchema.safeParse(e);if(!r.success)return Response.json({error:`Invalid task event callback.`,ok:!1},{status:400});let i=r.data,a=rejectMismatchedTaskToken(t,i.taskId);return a===void 0?i.kind===`task.input-requested`?{callId:i.callId,childContinuationToken:i.childContinuationToken,childSessionId:i.childSessionId,event:i.event,kind:`subagent-input-request`,subagentName:i.subagentName}:{callId:i.callId,childSessionId:i.childSessionId,event:i.event,kind:`authorization-event`,subagentName:i.subagentName}:a}function projectTaskTurnStarted(e,t){if(callbackKind(e)!==`turn.started`)return;let n=taskTurnStartedCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid task turn-start callback.`,ok:!1},{status:400});let r=rejectMismatchedTaskToken(t,n.data.taskId);return r===void 0?{childSessionId:n.data.sessionId,childTurnId:n.data.turnId,kind:`turn-started`,taskId:n.data.taskId}:r}function projectTaskUpdate(e,t){if(callbackKind(e)!==`task.update`)return;let n=taskUpdateCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid task update callback.`,ok:!1},{status:400});let r=rejectMismatchedTaskToken(t,n.data.taskId);return r===void 0?{callId:n.data.callId,kind:`task-update`,message:n.data.message,updateEpoch:n.data.updateEpoch,updateIndex:n.data.updateIndex}:r}function rejectMismatchedTaskToken(e,t){return readTaskIdFromInboxToken(e)===t?void 0:Response.json({error:`Task callback token mismatch.`,ok:!1},{status:403})}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`session.completed`&&t!==`session.failed`&&t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;if(r.kind===`session.completed`){let e=r.output??``,t=parseCallbackUsage(r.usage),n={callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:{kind:`terminal`,result:{kind:`succeeded`,output:e},usageDelta:t??ZERO_TOKEN_USAGE},output:e,subagentName:r.subagentName};return t===void 0?n:{...n,usage:t}}if(r.kind===`session.failed`){let e=r.error===void 0?{code:REMOTE_AGENT_FAILED,message:`Remote agent failed.`}:r.error,t=parseCallbackUsage(r.usage);return{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:`terminal`,result:{error:e,kind:`failed`},usageDelta:t??ZERO_TOKEN_USAGE},output:e,subagentName:r.subagentName}}return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}function parseCallbackUsage(e){if(e===void 0)return;let t=tokenUsageSchema.safeParse(e);return t.success?t.data:void 0}export{HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX,getSessionCallbackChannelDefinitions,getSessionCallbackChannelNames,handleSessionCallbackRequest};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RouteContext } from "#public/definitions/channel.js";
|
|
2
|
-
import type { ResolvedChannelDefinition } from "#runtime/types.js";
|
|
3
|
-
export declare function getTaskInputResponseChannelDefinitions(): readonly ResolvedChannelDefinition[];
|
|
4
|
-
export declare function getTaskInputResponseChannelNames(): ReadonlySet<string>;
|
|
5
|
-
export declare function handleTaskInputResponseRequest(request: Request, ctx: RouteContext): Promise<Response>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EVE_TASK_INPUT_ROUTE_PATTERN}from"#protocol/routes.js";import{resumeSessionInbox}from"#execution/wire/session-inbox-resume.js";import{readTaskInputTargetToken}from"#execution/task-input-capability.js";const NAME=`eve/v1/task-input/post`;function getTaskInputResponseChannelDefinitions(){return[{fetch:handleTaskInputResponseRequest,logicalPath:`framework://channels/${NAME}`,method:`POST`,name:NAME,sourceId:`eve:framework:task-input-post`,sourceKind:`module`,urlPath:EVE_TASK_INPUT_ROUTE_PATTERN}]}function getTaskInputResponseChannelNames(){return new Set([NAME])}async function handleTaskInputResponseRequest(e,r){let i=r.params.token;if(typeof i!=`string`||i.length===0)return Response.json({error:`Missing task input token.`,ok:!1},{status:400});let a=readTaskInputTargetToken(i);if(a===void 0)return Response.json({error:`Invalid task input token.`,ok:!1},{status:403});let o;try{o=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let s=readInputResponses(o);if(s===void 0||s.length===0)return Response.json({error:`Expected a non-empty inputResponses array.`,ok:!1},{status:400});try{await resumeSessionInbox(a,{kind:`send`,payload:{inputResponses:s}})}catch{return Response.json({error:`Task input target is not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function readInputResponses(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=Reflect.get(e,`inputResponses`);if(!Array.isArray(t))return;let n=[];for(let e of t){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=Reflect.get(e,`requestId`),r=Reflect.get(e,`optionId`),i=Reflect.get(e,`text`);if(typeof t!=`string`||r!==void 0&&typeof r!=`string`||i!==void 0&&typeof i!=`string`)return;let a={requestId:t};typeof r==`string`&&(a.optionId=r),typeof i==`string`&&(a.text=i),n.push(a)}return n}export{getTaskInputResponseChannelDefinitions,getTaskInputResponseChannelNames,handleTaskInputResponseRequest};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolveApprovalPolicy}from"#public/definitions/approval.js";const STAMPED_CALLBACK=Symbol.for(`eve:durable-dynamic-callback`),DURABLE_DYNAMIC_TOOL_CALLBACKS=Symbol.for(`eve:durable-dynamic-tool-callbacks`),REGISTRY=Symbol.for(`eve:dynamic-tool-callbacks`);function getRegistry(){let e=globalThis,t=e[REGISTRY];if(t!==void 0)return t;let n=new Map;return e[REGISTRY]=n,n}function registerDurableDynamicCallback(e){let t=getRegistry(),n=t.get(e.toolName);n===void 0&&(n=new Map,t.set(e.toolName,n)),n.set(e.phase,e.callback)}function lookupDurableDynamicCallback(e,t){return getRegistry().get(e)?.get(t)}function callDurableDynamicCallback(e,t,...n){return e(t,...n)}function hasUnregisteredDurableDynamicCallbacks(e){return e.some(e=>Object.keys(e.callbacks).some(t=>lookupDurableDynamicCallback(e.name,t)===void 0))}function stampDurableDynamicCallback(e,n){return Object.defineProperty(e,STAMPED_CALLBACK,{configurable:!0,value:n}),e}function readDurableDynamicCallback(e){if(typeof e==`function`)return Reflect.get(e,STAMPED_CALLBACK)}function stampDurableDynamicToolCallbacks(e,t){Object.defineProperty(e,DURABLE_DYNAMIC_TOOL_CALLBACKS,{configurable:!0,value:t})}function collectDurableDynamicToolCallbacks(t){let n=t.approval===void 0?void 0:readDurableDynamicCallback(resolveApprovalPolicy(t.approval)),r=t.approval===void 0||typeof t.approval==`function`?void 0:readDurableDynamicCallback(t.approval.response),i=readDurableDynamicCallback(t.execute),a=readDurableDynamicCallback(t.toModelOutput),o={};return i!==void 0&&(o.execute=i),n!==void 0&&(o.approvalRequest=n),r!==void 0&&(o.approvalResponse=r),a!==void 0&&(o.toModelOutput=a),o}function readDurableDynamicToolCallbacks(e){return e[DURABLE_DYNAMIC_TOOL_CALLBACKS]}export{DURABLE_DYNAMIC_TOOL_CALLBACKS,callDurableDynamicCallback,collectDurableDynamicToolCallbacks,hasUnregisteredDurableDynamicCallbacks,lookupDurableDynamicCallback,readDurableDynamicCallback,readDurableDynamicToolCallbacks,registerDurableDynamicCallback,stampDurableDynamicCallback,stampDurableDynamicToolCallbacks};
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import type { ModelMessage } from "ai";
|
|
2
|
-
import type { PublicToolInputSchema, PublicToolOutputSchema, ToolModelOutput } from "#shared/tool-definition.js";
|
|
3
|
-
import type { Approval } from "#public/definitions/approval.js";
|
|
4
|
-
import type { ToolContext } from "#public/definitions/tool.js";
|
|
5
|
-
import type { SessionAuth } from "#context/keys.js";
|
|
6
|
-
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
7
|
-
/**
|
|
8
|
-
* Stream event types allowed for dynamic tool resolvers. Dispatch
|
|
9
|
-
* supports any event; this extract restricts the public surface until
|
|
10
|
-
* more events are validated.
|
|
11
|
-
*/
|
|
12
|
-
export type DynamicToolEventName = Extract<UnstampedMessageStreamEvent["type"], "session.started" | "turn.started" | "step.started">;
|
|
13
|
-
export declare const ALLOWED_DYNAMIC_TOOL_EVENTS: ReadonlySet<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Instructions and skills are restricted to session/turn boundaries.
|
|
16
|
-
* Keeping their resolved context stable within a turn avoids changing the
|
|
17
|
-
* model input between tool-loop steps.
|
|
18
|
-
*/
|
|
19
|
-
export declare const ALLOWED_DYNAMIC_INSTRUCTION_EVENTS: ReadonlySet<string>;
|
|
20
|
-
export declare const ALLOWED_DYNAMIC_SKILL_EVENTS: ReadonlySet<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Context passed to a dynamic resolver's event handler.
|
|
23
|
-
*
|
|
24
|
-
* Exposes read-only session identity, auth, and channel metadata. State
|
|
25
|
-
* is not exposed here; resolvers read it through `defineState` handles or
|
|
26
|
-
* the session context inside tool `execute` functions.
|
|
27
|
-
*/
|
|
28
|
-
export interface DynamicResolveContext {
|
|
29
|
-
readonly session: {
|
|
30
|
-
readonly id: string;
|
|
31
|
-
readonly auth: SessionAuth;
|
|
32
|
-
};
|
|
33
|
-
/** Channel metadata for the request that triggered this resolve. */
|
|
34
|
-
readonly channel: {
|
|
35
|
-
/** Channel type that produced the request (e.g. `"slack"`, `"http"`), when known. */
|
|
36
|
-
readonly kind?: string;
|
|
37
|
-
/** Channel-owned resume handle for the conversation, when the channel supplies one. */
|
|
38
|
-
readonly continuationToken?: string;
|
|
39
|
-
/** Free-form channel-specific metadata attached to the request. */
|
|
40
|
-
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
41
|
-
};
|
|
42
|
-
/** Conversation history visible at this resolve point, oldest first. */
|
|
43
|
-
readonly messages: readonly ModelMessage[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A single tool entry within a resolved dynamic tool set.
|
|
47
|
-
*
|
|
48
|
-
* Identity comes from context: a single returned entry is named after
|
|
49
|
-
* the file slug; entries in a returned `Record<string, DynamicToolEntry>`
|
|
50
|
-
* are each named `slug__key`.
|
|
51
|
-
*
|
|
52
|
-
* `TInput` defaults to `Record<string, unknown>` but is inferred when
|
|
53
|
-
* `inputSchema` is a Standard Schema (e.g. Zod) via the `defineTool`
|
|
54
|
-
* wrapper. `TOutput` defaults to `any`; provide an `outputSchema`
|
|
55
|
-
* (Standard Schema) to infer and check the executor return type.
|
|
56
|
-
*/
|
|
57
|
-
export interface DynamicToolEntry<TInput = Record<string, unknown>, TOutput = any> {
|
|
58
|
-
readonly description: string;
|
|
59
|
-
readonly inputSchema: PublicToolInputSchema<TInput>;
|
|
60
|
-
readonly outputSchema?: PublicToolOutputSchema<TOutput>;
|
|
61
|
-
execute(input: TInput, ctx: ToolContext): TOutput | Promise<TOutput>;
|
|
62
|
-
readonly toModelOutput?: (output: TOutput) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
63
|
-
/**
|
|
64
|
-
* Optional per-call approval gate, mirroring the authored-tool
|
|
65
|
-
* `approval` contract: return `"user-approval"` to require user approval
|
|
66
|
-
* before the call executes. Dynamic approval request and response callbacks
|
|
67
|
-
* use the same durable descriptor boundary as `execute` and `toModelOutput`.
|
|
68
|
-
*/
|
|
69
|
-
readonly approval?: Approval;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* A resolved tool set: keys are entry identifiers, values are
|
|
73
|
-
* {@link DynamicToolEntry} objects created via `defineTool` inside a
|
|
74
|
-
* resolver. Entry type params are `any` so entries with differing
|
|
75
|
-
* schemas stay assignable to one Record; `defineTool` captures each
|
|
76
|
-
* entry's concrete types before this widened container.
|
|
77
|
-
*/
|
|
78
|
-
export type DynamicToolSet = Readonly<Record<string, DynamicToolEntry<any, any>>>;
|
|
79
|
-
/**
|
|
80
|
-
* Return type for a `defineDynamic` event handler: a single tool entry
|
|
81
|
-
* (named after the file slug), a map of entries (named `slug__key`), or
|
|
82
|
-
* `null` for no tools.
|
|
83
|
-
*/
|
|
84
|
-
export type DynamicToolResult = DynamicToolEntry<any, any> | DynamicToolSet | null;
|
|
85
|
-
/**
|
|
86
|
-
* Strongly-typed tool-handler map: each key is a supported event name,
|
|
87
|
-
* each value a resolver that takes the stream event and resolve context
|
|
88
|
-
* and returns a {@link DynamicToolResult}. `defineDynamic` accepts the
|
|
89
|
-
* wider {@link DynamicEvents} (handlers return `unknown`) because the
|
|
90
|
-
* slot directory (tools/ vs skills/) decides the expected return at
|
|
91
|
-
* runtime. Reference `DynamicToolEvents` to check the tool-specific
|
|
92
|
-
* return type at authoring time.
|
|
93
|
-
*/
|
|
94
|
-
export type DynamicToolEvents = {
|
|
95
|
-
readonly [K in DynamicToolEventName]?: (event: unknown, ctx: DynamicResolveContext) => DynamicToolResult | Promise<DynamicToolResult>;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Base event handler map accepted by `defineDynamic`. Intentionally
|
|
99
|
-
* wide so it accepts both tool-returning and skill-returning handlers:
|
|
100
|
-
* the slot directory (tools/ vs skills/) determines the required return,
|
|
101
|
-
* validated at runtime by the respective resolver.
|
|
102
|
-
*/
|
|
103
|
-
export type DynamicEvents<TResult = unknown> = {
|
|
104
|
-
readonly [K in DynamicToolEventName]?: (event: unknown, ctx: DynamicResolveContext) => TResult | Promise<TResult>;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Marker discriminator for a `defineDynamic({ events })` export.
|
|
108
|
-
*/
|
|
109
|
-
export declare const DYNAMIC_SENTINEL_KIND: "eve:dynamic";
|
|
110
|
-
/**
|
|
111
|
-
* Return value of `defineDynamic`: the runtime shape of a dynamic export,
|
|
112
|
-
* stamped with a sentinel kind the compiler/normalizer detects.
|
|
113
|
-
*/
|
|
114
|
-
export type DynamicSentinel<TResult = unknown> = {
|
|
115
|
-
readonly kind: typeof DYNAMIC_SENTINEL_KIND;
|
|
116
|
-
readonly events: DynamicEvents<TResult>;
|
|
117
|
-
};
|
|
118
|
-
export declare function assertResolverOnlyDynamicSentinel(sentinel: DynamicSentinel, message: string): void;
|
|
119
|
-
export declare function isDynamicSentinel(value: unknown): value is DynamicSentinel;
|
|
120
|
-
/**
|
|
121
|
-
* Symbol-based brand stamped by `defineTool` on every entry. Invisible
|
|
122
|
-
* in IntelliSense, checked at runtime to enforce the wrapper and to
|
|
123
|
-
* distinguish a single entry from a map of entries.
|
|
124
|
-
*/
|
|
125
|
-
export declare const TOOL_BRAND: unique symbol;
|
|
126
|
-
/**
|
|
127
|
-
* Returns true if `value` carries the `defineTool` brand symbol. Used
|
|
128
|
-
* to detect single entry vs map of entries and to validate that entries
|
|
129
|
-
* are properly wrapped.
|
|
130
|
-
*/
|
|
131
|
-
export declare function isBrandedToolEntry(value: unknown): boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Symbol-based brand stamped by `defineInstructions` on every entry.
|
|
134
|
-
* Invisible in IntelliSense, checked at runtime to validate that dynamic
|
|
135
|
-
* instruction resolver returns are properly wrapped.
|
|
136
|
-
*/
|
|
137
|
-
export declare const INSTRUCTIONS_BRAND: unique symbol;
|
|
138
|
-
/**
|
|
139
|
-
* Returns true if `value` carries the `defineInstructions` brand symbol.
|
|
140
|
-
* Used to validate that dynamic instruction entries are properly wrapped.
|
|
141
|
-
*/
|
|
142
|
-
export declare function isBrandedInstructionsEntry(value: unknown): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Symbol-based brand stamped by `defineSkill` on every entry. Invisible
|
|
145
|
-
* in IntelliSense, checked at runtime to detect single-entry vs
|
|
146
|
-
* map-of-entries return shapes in dynamic skill resolvers.
|
|
147
|
-
*/
|
|
148
|
-
export declare const SKILL_BRAND: unique symbol;
|
|
149
|
-
/**
|
|
150
|
-
* Returns true if `value` carries the `defineSkill` brand symbol. Used
|
|
151
|
-
* to detect single entry vs map of entries and to validate that entries
|
|
152
|
-
* are properly wrapped.
|
|
153
|
-
*/
|
|
154
|
-
export declare function isBrandedSkillEntry(value: unknown): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const ALLOWED_DYNAMIC_TOOL_EVENTS=new Set([`session.started`,`turn.started`,`step.started`]),ALLOWED_DYNAMIC_INSTRUCTION_EVENTS=new Set([`session.started`,`turn.started`]),ALLOWED_DYNAMIC_SKILL_EVENTS=new Set([`session.started`,`turn.started`]),DYNAMIC_SENTINEL_KIND=`eve:dynamic`;function assertResolverOnlyDynamicSentinel(e,t){let n=Object.keys(e).filter(e=>e!==`events`&&e!==`kind`);if(n.length>0)throw Error(`${t} Unknown key(s): ${n.join(`, `)}.`)}function isDynamicSentinel(e){return typeof e==`object`&&!!e&&e.kind===`eve:dynamic`}const TOOL_BRAND=Symbol.for(`eve:tool-brand`);function isBrandedToolEntry(e){return typeof e==`object`&&!!e&&e[TOOL_BRAND]===!0}const INSTRUCTIONS_BRAND=Symbol.for(`eve:instructions-brand`);function isBrandedInstructionsEntry(e){return typeof e==`object`&&!!e&&e[INSTRUCTIONS_BRAND]===!0}const SKILL_BRAND=Symbol.for(`eve:skill-brand`);function isBrandedSkillEntry(e){return typeof e==`object`&&!!e&&e[SKILL_BRAND]===!0}export{ALLOWED_DYNAMIC_INSTRUCTION_EVENTS,ALLOWED_DYNAMIC_SKILL_EVENTS,ALLOWED_DYNAMIC_TOOL_EVENTS,DYNAMIC_SENTINEL_KIND,INSTRUCTIONS_BRAND,SKILL_BRAND,TOOL_BRAND,assertResolverOnlyDynamicSentinel,isBrandedInstructionsEntry,isBrandedSkillEntry,isBrandedToolEntry,isDynamicSentinel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EVE_HEALTH_ROUTE_PATH}from"#protocol/routes.js";async function isEveServerHealthy(e,t={}){let n=AbortSignal.timeout(t.timeoutMs??1e3),r=t.signal===void 0?n:AbortSignal.any([t.signal,n]);try{let t=new URL(EVE_HEALTH_ROUTE_PATH,e).toString();return(await fetch(t,{redirect:`error`,signal:r})).ok}catch{return!1}}export{isEveServerHealthy};
|