eve 0.44.4 → 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 +30 -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/{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-BJwaMe5k.js → use-eve-agent-C46Kan_I.js} +385 -106
- package/dist/src/chunks/{use-eve-agent-BtsOXv3s.js → use-eve-agent-OtHRoxIS.js} +385 -106
- 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/remote-auth.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/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/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/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/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/mcp.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +1 -1
- package/dist/src/public/channels/slack/hitl.js +1 -1
- package/dist/src/public/channels/slack/inbound.d.ts +9 -0
- package/dist/src/public/channels/slack/inbound.js +1 -1
- 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 +1 -1
- 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/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.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 +2 -2
- 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/{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/overview.mdx +1 -1
- package/docs/channels/slack.mdx +2 -0
- package/docs/channels/teams.mdx +1 -1
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +30 -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 +9 -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/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/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 +1 -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 +58 -8
- 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/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/execution/web-fetch/{tool.js → execute.js} +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,48 +1,30 @@
|
|
|
1
1
|
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
3
2
|
import type { CompiledAgentManifest, CompiledAgentNodeManifest, CompiledAgentResources } from "#compiler/manifest.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
3
|
+
import { type AgentSourceRegistry, type CompiledModuleBinding } from "#compiler/source-graph.js";
|
|
4
|
+
export { resolveCompiledModuleExtensionScopeNamespace } from "#compiler/load-binding-namespace.js";
|
|
7
5
|
export type CompiledModuleNodeScope = z.infer<typeof compiledModuleNodeScopeSchema>;
|
|
8
|
-
/**
|
|
9
|
-
* Flattened compiled authored module map keyed by stable node ids.
|
|
10
|
-
*/
|
|
11
6
|
export type CompiledModuleMap = z.infer<typeof compiledModuleMapSchema>;
|
|
12
7
|
declare const compiledModuleNodeScopeSchema: z.ZodObject<{
|
|
13
8
|
modules: z.ZodRecord<z.ZodString, z.ZodObject<{}, z.core.$loose>>;
|
|
14
9
|
}, z.core.$strict>;
|
|
15
|
-
/**
|
|
16
|
-
* Zod schema for the flattened compiled authored module map.
|
|
17
|
-
*/
|
|
18
10
|
export declare const compiledModuleMapSchema: z.ZodObject<{
|
|
19
11
|
nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
20
12
|
modules: z.ZodRecord<z.ZodString, z.ZodObject<{}, z.core.$loose>>;
|
|
21
13
|
}, z.core.$strict>>;
|
|
22
14
|
}, z.core.$strict>;
|
|
23
|
-
/**
|
|
24
|
-
* Input for generating the compiled authored module map artifact.
|
|
25
|
-
*/
|
|
26
15
|
export interface CreateCompiledModuleMapSourceInput {
|
|
27
|
-
/**
|
|
28
|
-
* Controls how generated authored-module imports are written. Relative
|
|
29
|
-
* specifiers are the compiler default; absolute specifiers are useful when a
|
|
30
|
-
* bundler consumes the module map from a virtual module id.
|
|
31
|
-
*/
|
|
32
16
|
importSpecifierStyle?: "absolute" | "relative";
|
|
33
17
|
manifest: CompiledAgentManifest;
|
|
34
18
|
moduleMapPath: string;
|
|
19
|
+
programmaticLoaderImportSpecifier?: string;
|
|
35
20
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
interface BoundModule {
|
|
22
|
+
readonly binding: CompiledModuleBinding;
|
|
23
|
+
readonly sourceId: string;
|
|
24
|
+
}
|
|
25
|
+
/** Generates the authoritative module-map artifact from required bindings. */
|
|
40
26
|
export declare function createCompiledModuleMapSource(input: CreateCompiledModuleMapSourceInput): string;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* from the manifest when the pre-built artifact is unavailable).
|
|
46
|
-
*/
|
|
47
|
-
export declare function collectModuleRefsForManifest(manifest: CompiledAgentNodeManifest | CompiledAgentResources): ModuleSourceRef[];
|
|
48
|
-
export {};
|
|
27
|
+
/** Loads the same binding set used by generated maps without fabricating descriptors. */
|
|
28
|
+
export declare function createProgrammaticCompiledModuleMap(manifest: CompiledAgentManifest, registries: readonly AgentSourceRegistry[]): Promise<CompiledModuleMap>;
|
|
29
|
+
/** Returns every binding owned by one compiled node, including remote config modules. */
|
|
30
|
+
export declare function collectModuleBindingsForManifest(manifest: CompiledAgentNodeManifest | CompiledAgentResources): readonly BoundModule[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";const compiledModuleNodeScopeSchema=z.object({modules:z.record(z.string(),z.object({}).passthrough())}).strict(),compiledModuleMapSchema=z.object({nodes:z.record(z.string(),compiledModuleNodeScopeSchema)}).strict();function createCompiledModuleMapSource(e){let
|
|
2
|
-
`)}function
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{createCompiledBindingNamespaceLoader,resolveCompiledModuleExtensionScopeNamespace}from"#compiler/load-binding-namespace.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import"#compiler/source-graph.js";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";const compiledModuleNodeScopeSchema=z.object({modules:z.record(z.string(),z.object({}).passthrough())}).strict(),compiledModuleMapSchema=z.object({nodes:z.record(z.string(),compiledModuleNodeScopeSchema)}).strict();function createCompiledModuleMapSource(e){let t=dirnameFilesystemPath(e.moduleMapPath),n=e.importSpecifierStyle??`relative`,r=0,a=!1,o=collectBoundNodeScopes(e.manifest).map(e=>{let i=new Map(e.modules.map(e=>[e.sourceId,`module_${r++}`]));return{modules:e.modules.map(({binding:e,sourceId:r})=>{let o=i.get(r);return e.backing.kind===`filesystem`?{bindingName:o,importSpecifier:createImportSpecifier({fromDirectory:t,importSpecifierStyle:n,targetPath:e.backing.sourcePath}),sourceId:r}:(a=!0,{bindingName:o,initializer:`await loadProgrammaticModule(${JSON.stringify(e.backing)}, ${renderProgrammaticDependencies(e.backing.dependencies,i)})`,sourceId:r})}),nodeId:e.nodeId}}),s=o.flatMap(e=>e.modules),c=s.flatMap(e=>e.importSpecifier===void 0?[]:[`import * as ${e.bindingName} from ${JSON.stringify(e.importSpecifier)};`]),l=s.flatMap(e=>e.initializer===void 0?[]:[`const ${e.bindingName} = ${e.initializer};`]);return[`// Generated by eve. Do not edit by hand.`,...a?[`import { loadFrameworkProgrammaticModule as loadProgrammaticModule } from ${JSON.stringify(normalizeEsmImportSpecifier(e.programmaticLoaderImportSpecifier??`eve/internal/programmatic-source-loader`))};`]:[],...c,...a||c.length>0?[``]:[],...l,...l.length>0?[``]:[],`export const moduleMap = ${renderModuleMap(o)};`,``,`export default moduleMap;`,``].join(`
|
|
2
|
+
`)}async function createProgrammaticCompiledModuleMap(e,n){let r={};for(let i of collectBoundNodeScopes(e)){let e={},a=createCompiledBindingNamespaceLoader({bindings:Object.fromEntries(i.modules.map(({binding:e,sourceId:t})=>[t,e])),registries:n});for(let{sourceId:t}of i.modules)e[t]=await a(t);r[i.nodeId]={modules:e}}return{nodes:r}}function collectModuleBindingsForManifest(e){let t=new Map(Object.entries(e.bindings));for(let n of e.remoteAgents){if(t.has(n.sourceId))throw Error(`Remote agent binding "${n.sourceId}" collides with a node binding.`);t.set(n.sourceId,n.binding)}return orderBoundModules([...t].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({binding:t,sourceId:e})))}function orderBoundModules(e){let t=new Map(e.map(e=>[e.sourceId,e])),n=[],r=new Set,i=new Set,visit=e=>{if(!i.has(e.sourceId)){if(r.has(e.sourceId))throw Error(`Compiled module dependency cycle includes "${e.sourceId}".`);if(r.add(e.sourceId),e.binding.backing.kind===`programmatic`)for(let n of Object.values(e.binding.backing.dependencies??{})){let r=t.get(n);if(r===void 0)throw Error(`Programmatic binding "${e.sourceId}" depends on missing binding "${n}".`);visit(r)}r.delete(e.sourceId),i.add(e.sourceId),n.push(e)}};for(let t of e)visit(t);return n}function renderProgrammaticDependencies(e,t){let n=Object.entries(e??{});return n.length===0?`Object.freeze({})`:`Object.freeze({ ${n.map(([e,n])=>`${JSON.stringify(e)}: ${t.get(n)}`).join(`, `)} })`}function collectBoundNodeScopes(e){return[{modules:collectModuleBindingsForManifest(e),nodeId:ROOT_COMPILED_AGENT_NODE_ID},...[...e.subagents].sort((e,t)=>e.nodeId.localeCompare(t.nodeId)).map(e=>({modules:collectModuleBindingsForManifest(e.agent),nodeId:e.nodeId}))]}function renderModuleMap(e){return renderFrozenObject([{key:`nodes`,value:renderFrozenObject(e.map(e=>({key:e.nodeId,value:renderFrozenObject([{key:`modules`,value:renderFrozenObject(e.modules.map(e=>({key:e.sourceId,value:e.bindingName})))}],3)})))}],0)}function renderFrozenObject(e,t=1){if(e.length===0)return`Object.freeze({})`;let n=` `.repeat(t),r=` `.repeat(t+1);return[`Object.freeze({`,e.map(e=>`${r}${JSON.stringify(e.key)}: ${e.value.replaceAll(`
|
|
3
3
|
`,`\n${r}`)}`).join(`,
|
|
4
4
|
`),`${n}})`].join(`
|
|
5
|
-
`)}function
|
|
5
|
+
`)}function createImportSpecifier(e){if(e.importSpecifierStyle===`absolute`)return normalizeEsmImportSpecifier(normalizeFilesystemPath(e.targetPath));let t=relativeFilesystemPath(e.fromDirectory,e.targetPath);return t.startsWith(`.`)?t:`./${t}`}function dirnameFilesystemPath(e){let t=splitFilesystemPath(e);return t.segments.length===0?t.root.length===0?`.`:t.root:createFilesystemPath(t.root,t.segments.slice(0,-1))}function relativeFilesystemPath(e,t){let n=splitFilesystemPath(e),r=splitFilesystemPath(t);if(n.root!==r.root)return normalizeFilesystemPath(t);let i=0;for(;i<n.segments.length&&i<r.segments.length&&n.segments[i]===r.segments[i];)i+=1;return[...Array.from({length:n.segments.length-i},()=>`..`),...r.segments.slice(i)].join(`/`)||`.`}function normalizeFilesystemPath(e){let t=splitFilesystemPath(e);return createFilesystemPath(t.root,t.segments)}function splitFilesystemPath(e){let t=e.replaceAll(`\\`,`/`),n=``,r=t,i=t.match(/^[A-Za-z]:/);i===null?t.startsWith(`/`)&&(n=`/`,r=t.slice(1)):(n=i[0],r=t.slice(n.length),r.startsWith(`/`)&&(n+=`/`,r=r.slice(1)));let a=[];for(let e of r.split(`/`))e.length===0||e===`.`||(e===`..`?a.length>0&&a.at(-1)!==`..`?a.pop():n.length===0&&a.push(e):a.push(e));return{root:n,segments:a}}function createFilesystemPath(e,t){return e===`/`?t.length===0?`/`:`/${t.join(`/`)}`:e.endsWith(`/`)?t.length===0?e:`${e}${t.join(`/`)}`:e.length>0?t.length===0?e:`${e}/${t.join(`/`)}`:t.length===0?`.`:t.join(`/`)}export{collectModuleBindingsForManifest,compiledModuleMapSchema,createCompiledModuleMapSource,createProgrammaticCompiledModuleMap,resolveCompiledModuleExtensionScopeNamespace};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
2
|
+
import type { ProjectedAgentSources, ProjectedSource, ProjectedSubagentSource } from "#compiler/project-sources.js";
|
|
3
|
+
import { type AgentModuleCandidate, type AgentSourceCandidate, type ComposedAgentModuleCandidates, type CompiledModuleBinding } from "#compiler/source-graph.js";
|
|
4
|
+
export interface ComposedNodeSourceGraph {
|
|
5
|
+
composed: ComposedAgentModuleCandidates;
|
|
6
|
+
readonly orderedCandidates: readonly AgentSourceCandidate[];
|
|
7
|
+
readonly projected: ProjectedAgentSources;
|
|
8
|
+
readonly sourcesBySourceId: ReadonlyMap<string, ProjectedSource>;
|
|
9
|
+
readonly subagentsBySourceId: ReadonlyMap<string, ProjectedSubagentSource>;
|
|
10
|
+
}
|
|
11
|
+
export interface SelectedNodeConfig {
|
|
12
|
+
readonly binding: CompiledModuleBinding;
|
|
13
|
+
readonly candidate: AgentModuleCandidate;
|
|
14
|
+
readonly definition: unknown;
|
|
15
|
+
readonly source: ModuleSourceRef;
|
|
16
|
+
}
|
|
17
|
+
export interface PhaseOneNodeSourceState {
|
|
18
|
+
readonly graph: ComposedNodeSourceGraph;
|
|
19
|
+
readonly selectedConfig: SelectedNodeConfig;
|
|
20
|
+
}
|
|
21
|
+
export interface FinalizedNodeSourceState extends ComposedNodeSourceGraph {
|
|
22
|
+
readonly bindings: Record<string, CompiledModuleBinding>;
|
|
23
|
+
}
|
|
24
|
+
export declare function finalizeNodeSourceState(phaseOne: PhaseOneNodeSourceState, externalDependencies: readonly string[]): FinalizedNodeSourceState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCompiledModuleBinding}from"#compiler/source-graph.js";import{collectSelectedSourceIds,mergeExternalDependencies}from"#compiler/normalize-manifest-helpers.js";function finalizeNodeSourceState(n,r){let i=n.graph,a=new Map(i.orderedCandidates.map(e=>{let t=finalizeCandidateExternalDependencies(e,r);return[e.sourceId,t]})),candidateFor=e=>{let t=a.get(e.sourceId);if(t===void 0)throw Error(`Agent source candidate "${e.sourceId}" is missing from its node.`);return t},o={candidates:i.projected.candidates.map(candidateFor),resources:i.projected.resources.map(e=>({...e,candidate:candidateFor(e.candidate)})),subagents:i.projected.subagents.map(e=>({...e,candidate:candidateFor(e.candidate)}))},s={composition:{entries:i.composed.composition.entries.map(e=>({...e,source:finalizeDescriptorExternalDependencies(e.source,r)}))},selected:new Map([...i.composed.selected].map(([e,t])=>[e,candidateFor(t)]))},c=collectSelectedSourceIds(s);return{bindings:Object.fromEntries([...a.values()].filter(e=>c.has(e.sourceId)&&e.backing.kind!==`resource`).map(t=>[t.sourceId,createCompiledModuleBinding(t)])),composed:s,orderedCandidates:i.orderedCandidates.map(candidateFor),projected:o,sourcesBySourceId:new Map([...i.sourcesBySourceId].map(([e,t])=>[e,{...t,candidate:candidateFor(t.candidate)}])),subagentsBySourceId:new Map(o.subagents.map(e=>[e.candidate.sourceId,e]))}}function finalizeCandidateExternalDependencies(e,t){return e.backing.kind===`filesystem`?{...e,backing:finalizeBackingExternalDependencies(e.backing,t)}:e}function finalizeDescriptorExternalDependencies(e,t){return e.backing.kind===`filesystem`?{...e,backing:finalizeBackingExternalDependencies(e.backing,t)}:e}function finalizeBackingExternalDependencies(e,t){return{...e,externalDependencies:mergeExternalDependencies(t,e.externalDependencies)}}export{finalizeNodeSourceState};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { AgentSourceManifest } from "#discover/manifest.js";
|
|
2
|
+
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
2
3
|
import type { CompiledAgentDefinition } from "#compiler/manifest.js";
|
|
3
4
|
import { type ManifestCompileContext } from "#compiler/normalize-helpers.js";
|
|
5
|
+
import type { CompiledModuleBinding } from "#compiler/source-graph.js";
|
|
4
6
|
/**
|
|
5
7
|
* Compiles the agent-level configuration (model, compaction, build,
|
|
6
8
|
* workspace) for one authored agent node.
|
|
7
9
|
*/
|
|
8
|
-
export declare function compileAgentConfig(manifest: AgentSourceManifest, context: ManifestCompileContext, options
|
|
10
|
+
export declare function compileAgentConfig(manifest: AgentSourceManifest, context: ManifestCompileContext, options: {
|
|
11
|
+
readonly binding: CompiledModuleBinding;
|
|
9
12
|
readonly definition?: unknown;
|
|
13
|
+
readonly source: ModuleSourceRef;
|
|
10
14
|
}): Promise<CompiledAgentDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isAbsolute,
|
|
1
|
+
import{isAbsolute,relative,resolve}from"node:path";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{serializeOutputSchema}from"#tools/schema.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{classifyModelRouting}from"#internal/classify-model-routing.js";import{isChatGptModelRouting}from"#shared/chatgpt-model.js";import{parseJsonObject}from"#shared/json.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileAgentConfig(e,t,n){let i=n.source,a=formatAgentConfigModulePath(e,i,n.binding),o=normalizeAgentDefinition(Object.hasOwn(n,`definition`)?n.definition:await loadModuleBackedDefinition({binding:n.binding,displayPath:a,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[i.sourceId]:n.binding},registries:t.registries}),source:i}),`Expected the agent config export "${i.exportName??`default`}" from "${a}" to match the public eve shape.`),s=isDynamicModelDefinition(o.model)?o.model:void 0,c=s===void 0?await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the primary compaction trigger model`,contextWindowTokens:o.modelContextWindowTokens,providerOptions:o.modelOptions?.providerOptions,source:i,sourcePath:a,value:o.model}):void 0,l={},u={compaction:l,name:e.agentId,source:{...i}};o.description!==void 0&&(u.description=o.description);let d;s!==void 0&&(d={eventNames:Object.keys(s.events),exportName:i.exportName,sourceKind:`module`,logicalPath:i.logicalPath,sourceId:i.sourceId});let f=normalizeExperimentalDefinition(o.experimental);if(f!==void 0&&(u.experimental=f),o.build!==void 0&&(u.build={externalDependencies:o.build.externalDependencies===void 0?void 0:[...o.build.externalDependencies]}),o.outputSchema!==void 0&&(u.outputSchema=serializeOutputSchema(o.outputSchema)),o.reasoning!==void 0&&(u.reasoning=o.reasoning),o.limits!==void 0&&(u.limits={maxInputTokensPerSession:o.limits.maxInputTokensPerSession,maxOutputTokensPerSession:o.limits.maxOutputTokensPerSession,sessionTimeoutMs:o.limits.sessionTimeoutMs}),o.compaction?.model!==void 0&&(l.model=await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the compaction summary model`,contextWindowTokens:o.compaction.modelContextWindowTokens,providerOptions:o.modelOptions?.providerOptions,source:i,sourcePath:a,value:o.compaction.model})),o.compaction?.thresholdPercent!==void 0&&(l.thresholdPercent=o.compaction.thresholdPercent),d!==void 0)return{...u,dynamicModel:d};if(c===void 0)throw Error(`Expected a static agent model to compile to a concrete model reference.`);return{...u,model:c}}function normalizeExperimentalDefinition(e){if(e===void 0)return;let t={};return e.instrumentationProviders!==void 0&&(t.instrumentationProviders=e.instrumentationProviders),e.tasks!==void 0&&(t.tasks=e.tasks),e.workflow!==void 0&&(t.workflow={world:e.workflow.world}),t}async function normalizeAuthoredModelReference(e){if(typeof e.value==`string`)return await withCompiledRuntimeModelLimits({id:formatLanguageModelGatewayId(e.value),providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(e.value,e.providerOptions)},e);let t=e.source;if(t===void 0)throw Error(`Expected ${e.purpose} to provide a valid AI SDK language model reference.`);let n=e.value,r=n.specificationVersion;if(r!==`v2`&&r!==`v3`&&r!==`v4`||typeof n.provider!=`string`||typeof n.modelId!=`string`||typeof n.doGenerate!=`function`||typeof n.doStream!=`function`)throw Error(`Expected the authored agent config export "${t.exportName??`default`}" from "${e.sourcePath??t.logicalPath}" to provide a valid AI SDK language model.`);let i={id:formatLanguageModelGatewayId(n),source:{exportName:t.exportName,sourceKind:`module`,logicalPath:t.logicalPath,sourceId:t.sourceId},providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(n,e.providerOptions)};if(e.contextWindowTokens===void 0){if(isChatGptModelRouting(i.routing))return{...i,contextWindowTokens:2e5};try{let t=await e.modelCatalog.getByProviderModelId(n.provider,n.modelId);if(t)return{...i,id:t.slug,contextWindowTokens:t.limits.contextWindowTokens,maxOutputTokens:t.limits.maxOutputTokens}}catch{}}return await withCompiledRuntimeModelLimits(i,e)}function formatAgentConfigModulePath(e,n,r){return r.backing.kind===`programmatic`?n.logicalPath:normalizeLogicalPath(relative(resolveTopLevelAgentRoot(e),r.backing.sourcePath))}function resolveTopLevelAgentRoot(e){let t=resolve(e.appRoot),r=resolve(t,`agent`);return isPathInsideOrEqual(r,resolve(e.agentRoot))?r:t}function isPathInsideOrEqual(n,r){let i=relative(n,r);return i===``||!i.startsWith(`..`)&&!isAbsolute(i)}async function withCompiledRuntimeModelLimits(e,t){if(t.contextWindowTokens!==void 0)return{...e,contextWindowTokens:t.contextWindowTokens};let n;try{n=await t.modelCatalog.getModelLimits(e.id)}catch(n){throw Error(`Failed to load AI Gateway model metadata for ${t.purpose} "${e.id}". ${toErrorMessage(n)}`)}if(n===null)throw Error(`Cannot compile agent compaction because ${t.purpose} "${e.id}" does not have known AI Gateway context window metadata.`);return{...e,contextWindowTokens:n.contextWindowTokens,maxOutputTokens:n.maxOutputTokens}}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{compileAgentConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChannelSourceRef } from "#discover/manifest.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CompiledChannelDefinition } from "#compiler/manifest.js";
|
|
3
3
|
import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-helpers.js";
|
|
4
4
|
/**
|
|
5
5
|
* Compiles one authored channel module into the normalized channel
|
|
@@ -14,4 +14,10 @@ import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-help
|
|
|
14
14
|
* a separate compiled channel entry. The channel name is derived from
|
|
15
15
|
* the filesystem path; the URL path comes from the route's `path` field.
|
|
16
16
|
*/
|
|
17
|
-
export declare function compileChannelDefinition(
|
|
17
|
+
export declare function compileChannelDefinition(_agentRoot: string, source: ChannelSourceRef, options: ModuleBackedDefinitionLoadOptions): Promise<{
|
|
18
|
+
readonly kind: "disabled";
|
|
19
|
+
readonly name: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly definitions: readonly CompiledChannelDefinition[];
|
|
22
|
+
readonly kind: "channel";
|
|
23
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";async function compileChannelDefinition(n,r,i
|
|
1
|
+
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";async function compileChannelDefinition(n,r,i){let a=await loadModuleBackedDefinition({binding:i.binding,kind:`channel`,loadNamespace:i.loadNamespace,source:r}),o=stripLogicalPathExtension(r.logicalPath).replace(/^channels\//,``);if(isDisabledRouteSentinel(a))return{kind:`disabled`,name:o};let s=normalizeChannelDefinition(a,`Expected the channel export "${r.exportName??`default`}" from "${r.logicalPath}" to match the public eve shape.`);return{definitions:s.routes.map(e=>({kind:`channel`,name:o,logicalPath:r.logicalPath,method:e.method.toUpperCase(),urlPath:e.path,sourceId:r.sourceId,sourceKind:`module`,exportName:r.exportName,adapterKind:extractAdapterKind(s.adapter),cors:s.cors})),kind:`channel`}}function extractAdapterKind(e){if(typeof e!=`object`||!e)return;let t=e.kind;return typeof t==`string`&&t.length>0?t:void 0}export{compileChannelDefinition};
|
|
@@ -19,4 +19,4 @@ import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-help
|
|
|
19
19
|
* of the connection pipeline (auth context, tool-result narrowing,
|
|
20
20
|
* runtime resolution) stays protocol-agnostic.
|
|
21
21
|
*/
|
|
22
|
-
export declare function compileConnectionDefinition(
|
|
22
|
+
export declare function compileConnectionDefinition(_agentRoot: string, source: ConnectionSourceRef, options: ModuleBackedDefinitionLoadOptions): Promise<CompiledConnectionDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeMcpClientConnectionDefinition,normalizeOpenApiConnectionDefinition}from"#internal/authored-definition/connection.js";import{readConnectionProtocol}from"#public/definitions/connections/protocol.js";async function compileConnectionDefinition(r,i,a
|
|
1
|
+
import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeMcpClientConnectionDefinition,normalizeOpenApiConnectionDefinition}from"#internal/authored-definition/connection.js";import{readConnectionProtocol}from"#public/definitions/connections/protocol.js";async function compileConnectionDefinition(r,i,a){let o=await loadModuleBackedDefinition({binding:a.binding,kind:`connection`,loadNamespace:a.loadNamespace,source:i}),s=readConnectionProtocol(o),c=`Expected the connection export "${i.exportName??`default`}" from "${i.logicalPath}" to match the public eve shape.`,l={connectionName:i.connectionName,exportName:i.exportName,logicalPath:i.logicalPath,sourceId:i.sourceId,sourceKind:`module`},u,d;if(s===`openapi`){let e=normalizeOpenApiConnectionDefinition(o,c);u={...l,description:e.description,protocol:`openapi`,url:e.baseUrl??``},d=e.auth}else{let e=normalizeMcpClientConnectionDefinition(o,c);u={...l,description:e.description,protocol:`mcp`,url:e.url},d=e.auth}let f=extractVercelConnectMarker(d);return f!==void 0&&(u.vercelConnect=f),u}function extractVercelConnectMarker(e){if(typeof e!=`object`||!e)return;let t=e.vercelConnect;if(typeof t!=`object`||!t)return;let n=t.connector;if(!(typeof n!=`string`||n.length===0))return{connector:n}}export{compileConnectionDefinition};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type AuthoredModuleLoadOptions } from "#internal/authored-module-loader.js";
|
|
2
1
|
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
3
2
|
import type { CompiledRuntimeModelCatalogLoader } from "#compiler/model-catalog.js";
|
|
3
|
+
import { type AgentSourceRegistry, type CompiledModuleBinding, type AgentSourceOwner } from "#compiler/source-graph.js";
|
|
4
|
+
import type { CompiledBindingNamespaceLoader } from "#compiler/load-binding-namespace.js";
|
|
4
5
|
/**
|
|
5
6
|
* Shared compile-time context threaded through every per-primitive
|
|
6
7
|
* normalize step.
|
|
@@ -11,10 +12,18 @@ import type { CompiledRuntimeModelCatalogLoader } from "#compiler/model-catalog.
|
|
|
11
12
|
*/
|
|
12
13
|
export interface ManifestCompileContext {
|
|
13
14
|
readonly modelCatalog: CompiledRuntimeModelCatalogLoader;
|
|
15
|
+
readonly registries: readonly AgentSourceRegistry[];
|
|
14
16
|
}
|
|
15
17
|
export interface ModuleBackedDefinitionLoadOptions {
|
|
16
|
-
readonly
|
|
18
|
+
readonly binding: CompiledModuleBinding;
|
|
19
|
+
readonly loadNamespace: CompiledBindingNamespaceLoader;
|
|
17
20
|
}
|
|
21
|
+
export interface SourceDefinitionCompileOptions {
|
|
22
|
+
readonly binding?: CompiledModuleBinding;
|
|
23
|
+
readonly loadNamespace?: CompiledBindingNamespaceLoader;
|
|
24
|
+
readonly owner: AgentSourceOwner;
|
|
25
|
+
}
|
|
26
|
+
export declare function requireModuleBackedDefinitionLoadOptions(options: SourceDefinitionCompileOptions, logicalPath: string): ModuleBackedDefinitionLoadOptions;
|
|
18
27
|
/**
|
|
19
28
|
* Loads one authored module's value for a given source reference and
|
|
20
29
|
* resolves any value-returning factory it may export.
|
|
@@ -25,9 +34,9 @@ export interface ModuleBackedDefinitionLoadOptions {
|
|
|
25
34
|
* authored file failed.
|
|
26
35
|
*/
|
|
27
36
|
export declare function loadModuleBackedDefinition(input: {
|
|
28
|
-
readonly
|
|
37
|
+
readonly binding: CompiledModuleBinding;
|
|
29
38
|
readonly displayPath?: string;
|
|
30
|
-
readonly externalDependencies?: ModuleBackedDefinitionLoadOptions["externalDependencies"];
|
|
31
39
|
readonly kind: string;
|
|
40
|
+
readonly loadNamespace: CompiledBindingNamespaceLoader;
|
|
32
41
|
readonly source: ModuleSourceRef;
|
|
33
42
|
}): Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{
|
|
1
|
+
import{getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import"#compiler/source-graph.js";const SANDBOX_PARENT_DEFINITION_MARKER=Symbol.for(`eve.sandbox-parent-definition`);function requireModuleBackedDefinitionLoadOptions(e,t){if(e.binding===void 0||e.loadNamespace===void 0)throw Error(`Module-backed source "${t}" requires a compiled binding.`);return{binding:e.binding,loadNamespace:e.loadNamespace}}async function loadModuleBackedDefinition(n){if(n.binding.logicalPath!==n.source.logicalPath)throw Error(`Compiled binding "${n.source.sourceId}" targets "${n.binding.logicalPath}", not "${n.source.logicalPath}".`);let r=getAuthoredModuleExport(await n.loadNamespace(n.source.sourceId),n.source);if(n.kind===`sandbox`&&typeof r==`function`&&Reflect.get(r,SANDBOX_PARENT_DEFINITION_MARKER)===!0)return r;try{return await materializeAuthoredModuleExport(r)}catch(e){throw n.kind===`sandbox`&&typeof r==`function`?Error(`Failed to execute the sandbox export "${n.source.exportName??`default`}" from "${n.displayPath??n.source.logicalPath}" as a zero-argument definition factory. Parent-sharing callbacks must be passed to defineSandbox(...): ${toErrorMessage(e)}`):Error(`Failed to execute the ${n.kind} export "${n.source.exportName??`default`}" from "${n.displayPath??n.source.logicalPath}": ${toErrorMessage(e)}`)}}export{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import type { HookSourceRef } from "#discover/manifest.js";
|
|
2
|
-
import type { CompiledHookDefinition } from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* Hook event handlers are arbitrary functions and cannot be statically
|
|
8
|
-
* validated at compile time — the normalization step only derives the
|
|
9
|
-
* path-relative slug used for diagnostics and ordering. Per-handler
|
|
10
|
-
* validation lives in the runtime resolver.
|
|
11
|
-
*/
|
|
12
|
-
export declare function compileHookEntry(source: HookSourceRef): CompiledHookDefinition;
|
|
2
|
+
import type { CompiledHookDefinition } from "#compiler/manifest.js";
|
|
3
|
+
import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-helpers.js";
|
|
4
|
+
/** Compiles and validates one selected hook while preserving its exact subscriptions. */
|
|
5
|
+
export declare function compileHookEntry(source: HookSourceRef, options: ModuleBackedDefinitionLoadOptions): Promise<CompiledHookDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stripLogicalPathExtension}from"
|
|
1
|
+
import{expectFunction,expectObjectRecord}from"#internal/authored-module.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileHookEntry(n,r){let i=expectObjectRecord(await loadModuleBackedDefinition({binding:r.binding,kind:`hook`,loadNamespace:r.loadNamespace,source:n}),`Expected the hook export "${n.exportName??`default`}" from "${n.logicalPath}" to return an object.`),a=i.events===void 0?{}:expectObjectRecord(i.events,`Expected the hook export "${n.exportName??`default`}" from "${n.logicalPath}" to expose events as an object.`);return{eventNames:Object.entries(a).flatMap(([e,t])=>t===void 0?[]:(expectFunction(t,`Expected the hook export "${n.exportName??`default`}" from "${n.logicalPath}" to provide a function for events.${e}.`),[e])),exportName:n.exportName,logicalPath:n.logicalPath,slug:stripLogicalPathExtension(n.logicalPath).replace(/^hooks\//,``),sourceId:n.sourceId,sourceKind:`module`}}export{compileHookEntry};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InstructionsSourceRef } from "#discover/manifest.js";
|
|
2
2
|
import type { CompiledDynamicInstructionsDefinition, CompiledInstructionsDefinition } from "#compiler/manifest.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type SourceDefinitionCompileOptions } from "#compiler/normalize-helpers.js";
|
|
4
4
|
/**
|
|
5
5
|
* Compiled instructions entry produced from one authored `instructions/*`
|
|
6
6
|
* file or flat `instructions.{md,ts,...}`.
|
|
@@ -28,9 +28,9 @@ export type CompiledInstructionsEntry = {
|
|
|
28
28
|
* classified and their event names recorded; the resolver runs at
|
|
29
29
|
* runtime.
|
|
30
30
|
*/
|
|
31
|
-
export declare function compileInstructionsEntry(
|
|
31
|
+
export declare function compileInstructionsEntry(_agentRoot: string, source: InstructionsSourceRef, options: SourceDefinitionCompileOptions): Promise<CompiledInstructionsEntry>;
|
|
32
32
|
/**
|
|
33
33
|
* @deprecated Use {@link compileInstructionsEntry} instead. Kept for
|
|
34
34
|
* backwards compatibility with callers that pass a single source.
|
|
35
35
|
*/
|
|
36
|
-
export declare function compileInstructions(agentRoot: string, source: InstructionsSourceRef, options
|
|
36
|
+
export declare function compileInstructions(agentRoot: string, source: InstructionsSourceRef, options: SourceDefinitionCompileOptions): Promise<CompiledInstructionsDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeInstructionsDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{ALLOWED_DYNAMIC_INSTRUCTION_EVENTS,assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#
|
|
1
|
+
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeInstructionsDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions}from"#compiler/normalize-helpers.js";import{ALLOWED_DYNAMIC_INSTRUCTION_EVENTS,assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#dynamic/definition.js";async function compileInstructionsEntry(i,a,o){if(a.sourceKind===`markdown`){let n=normalizeInstructionsDefinition(a.definition,`Expected the compiled instructions definition at "${a.logicalPath}" to match the public eve shape.`);return{kind:`instructions`,definition:{name:stripLogicalPathExtension(a.logicalPath),logicalPath:a.logicalPath,owner:o.owner,content:n.content,role:n.role,sourceId:a.sourceId,sourceKind:a.sourceKind}}}let s=requireModuleBackedDefinitionLoadOptions(o,a.logicalPath),c=await loadModuleBackedDefinition({binding:s.binding,kind:`instructions`,loadNamespace:s.loadNamespace,source:a});if(isDynamicSentinel(c)){assertResolverOnlyDynamicSentinel(c,`Expected the instructions export "${a.exportName??`default`}" from "${a.logicalPath}" to match the public eve shape.`);let t=Object.keys(c.events),n=t.find(e=>!ALLOWED_DYNAMIC_INSTRUCTION_EVENTS.has(e));if(n!==void 0)throw Error(`Expected the instructions export "${a.exportName??`default`}" from "${a.logicalPath}" to use only "session.started" or "turn.started" events. Unsupported event: "${n}".`);let r=stripLogicalPathExtension(a.logicalPath).replace(/^instructions\//,``);return{kind:`dynamic-instructions`,definition:{eventNames:t,exportName:a.exportName,logicalPath:a.logicalPath,slug:r,sourceId:a.sourceId,sourceKind:`module`}}}let l=normalizeInstructionsDefinition(c,`Expected the instructions export "${a.exportName??`default`}" from "${a.logicalPath}" to match the public eve shape.`);return{kind:`instructions`,definition:{name:stripLogicalPathExtension(a.logicalPath),logicalPath:a.logicalPath,content:l.content,role:l.role,sourceId:a.sourceId,sourceKind:a.sourceKind}}}async function compileInstructions(e,t,n){let r=await compileInstructionsEntry(e,t,n);if(r.kind===`dynamic-instructions`)throw Error(`Expected static instructions from "${t.logicalPath}" but got a dynamic resolver. Use compileInstructionsEntry instead.`);return r.definition}export{compileInstructions,compileInstructionsEntry};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AgentSourceManifest, LocalSubagentSourceRef } from "#discover/manifest.js";
|
|
2
|
+
import type { CompiledAgentDefinition, CompiledExtensionMount, CompiledRemoteAgentNode } from "#compiler/manifest.js";
|
|
3
|
+
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
4
|
+
import { normalizeSubagentConfig } from "#compiler/normalize-subagent.js";
|
|
5
|
+
import { type AgentModuleCandidate, type AgentSourceOwner, type AgentSourceRegistry, type ComposedAgentModuleCandidates, type CompiledModuleBinding } from "#compiler/source-graph.js";
|
|
6
|
+
export declare function collectSelectedSourceIds(composed: ComposedAgentModuleCandidates): Set<string>;
|
|
7
|
+
export declare function assertRootOnlyConfig(config: CompiledAgentDefinition, isRoot: boolean, agentId: string): void;
|
|
8
|
+
export declare function assertApplicationOverlayCanApplyToAllNodes(logicalPaths: readonly string[]): void;
|
|
9
|
+
export declare function assertUniqueRegistryIds(registries: readonly AgentSourceRegistry[]): void;
|
|
10
|
+
export declare function assertRootOwnedSpecialTool(candidate: AgentModuleCandidate, label: string): void;
|
|
11
|
+
export declare function assertNonExtensionSpecialTool(candidate: AgentModuleCandidate, label: string): void;
|
|
12
|
+
export declare function withExtensionNamespace<T extends {
|
|
13
|
+
readonly extensionNamespace?: string;
|
|
14
|
+
}>(definition: T, owner: AgentSourceOwner): T;
|
|
15
|
+
export declare function assertUniqueBy<T>(values: readonly T[], identity: (value: T) => string, label: string): void;
|
|
16
|
+
export declare function expectSubagentDescription(config: CompiledAgentDefinition, source: LocalSubagentSourceRef): string;
|
|
17
|
+
export declare function createCompiledRemoteAgent(input: {
|
|
18
|
+
readonly binding: CompiledModuleBinding;
|
|
19
|
+
readonly definition: Extract<ReturnType<typeof normalizeSubagentConfig>, {
|
|
20
|
+
readonly kind: "remote";
|
|
21
|
+
}>;
|
|
22
|
+
readonly nodeId: string;
|
|
23
|
+
readonly owner: AgentSourceOwner;
|
|
24
|
+
readonly parentNodeId: string;
|
|
25
|
+
readonly source: LocalSubagentSourceRef;
|
|
26
|
+
readonly sourceRef: ModuleSourceRef;
|
|
27
|
+
}): CompiledRemoteAgentNode;
|
|
28
|
+
export declare function compileExtensionMounts(manifest: AgentSourceManifest, composed: ComposedAgentModuleCandidates): CompiledExtensionMount[];
|
|
29
|
+
export declare function mergeExternalDependencies(...lists: ReadonlyArray<readonly string[] | undefined>): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{posix}from"node:path";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{canonicalSourceSlot}from"#compiler/source-graph.js";import{mountRefNamespace,packageStateNamespace}from"#discover/extensions.js";import"#compiler/normalize-subagent.js";function collectSelectedSourceIds(e){return new Set([...e.selected.values()].map(e=>e.sourceId))}function assertRootOnlyConfig(e,t,n){if(!t){if(e.experimental?.workflow!==void 0)throw Error(`Workflow runtime configuration is only supported on the root agent config. Remove "experimental.workflow" from "${n}".`);if(e.experimental?.tasks!==void 0)throw Error(`Background tasks are only supported on the root agent config. Remove "experimental.tasks" from "${n}".`)}}function assertApplicationOverlayCanApplyToAllNodes(e){let t=e.find(e=>{let t=canonicalSourceSlot(e);return t===`agent`||t.startsWith(`channels/`)||t.startsWith(`schedules/`)||t.startsWith(`subagents/`)||t.startsWith(`extensions/`)});if(t!==void 0)throw Error(`Application programmatic source registered for all local nodes cannot declare "${t}".`)}function assertUniqueRegistryIds(e){let t=new Set;for(let n of e)for(let e of n.sources.keys()){if(t.has(e))throw Error(`Programmatic agent source id "${e}" is registered more than once.`);t.add(e)}}function assertRootOwnedSpecialTool(e,n){if(e.nodeId!==ROOT_COMPILED_AGENT_NODE_ID)throw Error(`${n} can only be enabled on the root agent.`);assertNonExtensionSpecialTool(e,n)}function assertNonExtensionSpecialTool(e,t){if(e.owner.kind===`extension`)throw Error(`${t} cannot be configured by an extension source.`)}function withExtensionNamespace(e,t){return t.kind===`extension`?{...e,extensionNamespace:t.namespace}:e}function assertUniqueBy(e,t,n){let r=new Set;for(let i of e){let e=t(i);if(r.has(e))throw Error(`Compiled ${n} "${e}" is declared more than once.`);r.add(e)}}function expectSubagentDescription(e,t){if(e.description===void 0||e.description.trim().length===0)throw Error(`Subagent "${t.logicalPath}" must define a non-empty description.`);return e.description}function createCompiledRemoteAgent(t){let n=t.source.logicalPath.endsWith(`.ts`)||t.source.logicalPath.endsWith(`.js`)?t.source.logicalPath:posix.join(t.source.logicalPath,`agent.ts`),r=t.source.sourceId,i={backing:t.binding.backing,logicalPath:n,owner:t.owner},a={backing:{kind:`resource`,sourcePath:t.source.entryPath},binding:i,description:t.definition.description,entryPath:t.source.entryPath,logicalPath:n,name:t.source.subagentId,nodeId:t.nodeId,owner:t.owner,parentNodeId:t.parentNodeId,path:t.definition.path,rootPath:t.source.rootPath,sourceId:r,sourceKind:`module`};return t.sourceRef.exportName!==void 0&&Object.assign(a,{exportName:t.sourceRef.exportName}),t.definition.outputSchema!==void 0&&Object.assign(a,{outputSchema:t.definition.outputSchema}),t.definition.url!==void 0&&Object.assign(a,{url:t.definition.url}),a}function compileExtensionMounts(e,t){let n=collectSelectedSourceIds(t);return e.resolvedExtensions.flatMap(t=>{let a=e.extensions.find(e=>mountRefNamespace(e.logicalPath)===t.namespace);return a===void 0||!n.has(a.sourceId)?[]:[{externalDependencies:[...t.externalDependencies],mountLogicalPath:a.logicalPath,mountSourceId:a.sourceId,namespace:t.namespace,packageName:t.packageName,packageNamespace:packageStateNamespace(t.packageName),sourceRoot:t.sourceRoot}]})}function mergeExternalDependencies(...e){return[...new Set(e.flatMap(e=>e??[]))]}export{assertApplicationOverlayCanApplyToAllNodes,assertNonExtensionSpecialTool,assertRootOnlyConfig,assertRootOwnedSpecialTool,assertUniqueBy,assertUniqueRegistryIds,collectSelectedSourceIds,compileExtensionMounts,createCompiledRemoteAgent,expectSubagentDescription,mergeExternalDependencies,withExtensionNamespace};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { AgentSourceManifest } from "#discover/manifest.js";
|
|
2
2
|
import { type CompiledAgentManifest } from "#compiler/manifest.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { type CompilerDiagnostic } from "#compiler/diagnostics.js";
|
|
4
|
+
import { type AgentSourceRegistry } from "#compiler/source-graph.js";
|
|
5
|
+
export interface CompileAgentManifestOptions {
|
|
6
|
+
readonly diagnostics?: CompilerDiagnostic[];
|
|
7
|
+
readonly sourceRegistries?: readonly AgentSourceRegistry[];
|
|
8
|
+
}
|
|
9
|
+
/** Compiles one discovery graph through the canonical source composition pipeline. */
|
|
10
|
+
export declare function compileAgentManifest(manifest: AgentSourceManifest, options?: CompileAgentManifestOptions): Promise<CompiledAgentManifest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{ROOT_COMPILED_AGENT_NODE_ID,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources}from"#compiler/manifest.js";import{compileConnectionDefinition}from"#compiler/normalize-connection.js";import{compileHookEntry}from"#compiler/normalize-hook.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileScheduleDefinition}from"#compiler/normalize-schedule.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileToolEntry}from"#compiler/normalize-tool.js";import{mountRefNamespace,packageStateNamespace}from"#discover/extensions.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{compileAgentConfig}from"#compiler/normalize-agent-config.js";import{compileExtensionContributions,composeAgentSubagentSources}from"#compiler/normalize-extension.js";import{compileSandboxDefinition}from"#compiler/normalize-sandbox.js";import{compileSubagentGraph}from"#compiler/normalize-subagent.js";async function compileAgentManifest(e){let r={modelCatalog:createCompiledRuntimeModelCatalogLoader(e.appRoot)},i=await compileAgentNodeManifest(e,r),a=await compileSubagentGraph({appRoot:e.appRoot,compileAgentNodeManifest,compileAgentResources,context:r,externalDependencies:i.config.build?.externalDependencies??[],parentAgentRoot:e.agentRoot,parentNodeId:ROOT_COMPILED_AGENT_NODE_ID,subagents:composeAgentSubagentSources(e)}),o=[i,...a.nodes.map(e=>e.agent)].flatMap(e=>e.tools).find(e=>e.execution===`background`);if(o!==void 0&&i.config.experimental?.tasks!==!0)throw Error(`Background tool "${o.name}" requires experimental.tasks: true in the root agent config.`);return createCompiledAgentManifest({...i,extensionMounts:i.extensionMounts,remoteAgents:a.remoteAgents,subagentEdges:a.edges,subagents:a.nodes})}async function compileAgentNodeManifest(e,t,n={}){let i=Object.hasOwn(n,`agentConfigDefinition`)?await compileAgentConfig(e,t,{definition:n.agentConfigDefinition}):await compileAgentConfig(e,t);if(n.allowRootOnlyConfig===!1&&i.experimental?.workflow!==void 0)throw Error(`Workflow runtime configuration is only supported on the root agent config. Remove "experimental.workflow" from "${e.agentId}".`);if(n.allowRootOnlyConfig===!1&&i.experimental?.tasks!==void 0)throw Error(`Background tasks are only supported on the root agent config. Remove "experimental.tasks" from "${e.agentId}".`);let a=mergeExternalDependencies(n.externalDependencies,i.build?.externalDependencies,e.resolvedExtensions.flatMap(e=>e.externalDependencies)),o=a.length===0?i:{...i,build:{...i.build,externalDependencies:a}};return createCompiledAgentNodeManifest({...await compileAgentResources(e,t,{externalDependencies:a}),config:o})}async function compileAgentResources(t,n,r={}){let s=[...r.externalDependencies??[]],c=await Promise.all(t.tools.map(e=>compileToolEntry(t.agentRoot,e,{externalDependencies:s}))),l=[],u=[],d=[],f,p;for(let e of c)e.kind===`tool`?l.push(e.definition):e.kind===`dynamic-tool`?u.push(e.definition):e.kind===`workflow-tool`?f={maxSubagents:e.maxSubagents}:e.kind===`web-search-tool`?p=e.provider:d.push(e.name);let m=(await Promise.all(t.channels.map(n=>compileChannelDefinition(t.agentRoot,n,{externalDependencies:s})))).flat(),h=await Promise.all(t.skills.map(e=>compileSkillSource(t.agentRoot,e,{externalDependencies:s}))),g=[],_=[];for(let e of h)e.kind===`skill`?g.push(e.definition):_.push(e.definition);let v=await Promise.all(t.instructions.map(e=>compileInstructionsEntry(t.agentRoot,e,{externalDependencies:s}))),y=[],b=[];for(let e of v)e.kind===`instructions`?y.push(e.definition):b.push(e.definition);let x=await Promise.all(t.connections.map(e=>compileConnectionDefinition(t.agentRoot,e,{externalDependencies:s}))),S=t.hooks.map(e=>compileHookEntry(e)),C=await Promise.all(t.schedules.map(e=>compileScheduleDefinition(t.agentRoot,e,{externalDependencies:s}))),w=new Set(l.map(e=>e.name)),T=new Set(u.map(e=>e.slug)),E=new Set(x.map(e=>e.connectionName)),D=new Set(g.map(e=>e.name)),O=[];for(let e of[...t.resolvedExtensions].sort((e,t)=>e.namespace.localeCompare(t.namespace))){let r=await compileExtensionContributions({mount:e,context:n,consumerAgentRoot:t.agentRoot,externalDependencies:s});m.push(...r.channels);for(let e of r.tools)w.has(e.name)||(w.add(e.name),l.push(e));for(let e of r.dynamicTools)T.has(e.slug)||(T.add(e.slug),u.push(e));for(let e of r.connections)E.has(e.connectionName)||(E.add(e.connectionName),x.push(e));for(let e of r.skills)D.has(e.name)||(D.add(e.name),g.push(e));C.push(...r.schedules),S.push(...r.hooks),_.push(...r.dynamicSkills),b.push(...r.dynamicInstructions),O.push(...r.instructions)}let k=[...y,...O];return createCompiledAgentResources({agentRoot:t.agentRoot,appRoot:t.appRoot,channels:m,extensionMounts:compileExtensionMounts(t),connections:x,diagnosticsSummary:t.diagnosticsSummary,disabledFrameworkTools:d,workflowTool:f,webSearchProvider:p,dynamicSkills:_,dynamicTools:u,hooks:S,sandbox:t.sandbox===null?null:await compileSandboxDefinition(t.agentRoot,t.sandbox,{externalDependencies:s}),sandboxWorkspaces:t.sandboxWorkspaces.map(e=>({logicalPath:e.logicalPath,rootEntries:[...e.rootEntries],sourceId:e.sourceId,sourcePath:e.sourcePath})),schedules:C,dynamicInstructions:b,skills:g,instructions:k,tools:l})}function compileExtensionMounts(e){return e.resolvedExtensions.map(t=>{let n=e.extensions.find(e=>mountRefNamespace(e.logicalPath)===t.namespace);return{externalDependencies:[...t.externalDependencies],namespace:t.namespace,packageName:t.packageName,packageNamespace:packageStateNamespace(t.packageName),sourceRoot:t.sourceRoot,mountSourceId:n?.sourceId??`extensions/${t.namespace}`,mountLogicalPath:n?.logicalPath??`extensions/${t.namespace}`}})}function mergeExternalDependencies(...e){let t=new Set;for(let n of e)for(let e of n??[])t.add(e);return[...t]}export{compileAgentManifest};
|
|
1
|
+
import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{ROOT_COMPILED_AGENT_NODE_ID,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources,createCompiledSubagentNodeId}from"#compiler/manifest.js";import{summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{composeAgentModuleCandidates,createCompiledModuleBinding,createProgrammaticModuleCandidates,describeAgentSourceCandidate,disableComposedCandidate}from"#compiler/source-graph.js";import{frameworkAgentSourceRegistry}from"#framework/sources/registry.js";import{assertApplicationOverlayCanApplyToAllNodes,assertNonExtensionSpecialTool,assertRootOnlyConfig,assertRootOwnedSpecialTool,assertUniqueBy,assertUniqueRegistryIds,collectSelectedSourceIds,compileExtensionMounts,createCompiledRemoteAgent,expectSubagentDescription,mergeExternalDependencies,withExtensionNamespace}from"#compiler/normalize-manifest-helpers.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{assertRemoteAgentDefinitionHasNoLocalPackageEntries,normalizeSubagentConfig}from"#compiler/normalize-subagent.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{compileAgentConfig}from"#compiler/normalize-agent-config.js";import{compileConnectionDefinition}from"#compiler/normalize-connection.js";import{compileHookEntry}from"#compiler/normalize-hook.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileSandboxDefinition}from"#compiler/normalize-sandbox.js";import{compileScheduleDefinition}from"#compiler/normalize-schedule.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileToolEntry}from"#compiler/normalize-tool.js";import{createCompiledChannelRoutePlan}from"#compiler/channel-route-plan.js";import{finalizeNodeSourceState}from"#compiler/node-source-state.js";import{projectAgentSources,projectSelectedSources}from"#compiler/project-sources.js";async function compileAgentManifest(e,t={}){let i=[frameworkAgentSourceRegistry,...t.sourceRegistries??[]];assertUniqueRegistryIds(i);let a={modelCatalog:createCompiledRuntimeModelCatalogLoader(e.appRoot),registries:i},o=t.diagnostics??[],c=await new AgentGraphCompiler(a,i,o).compileStaticNode({inheritedExternalDependencies:[],isRoot:!0,layer:`application`,manifest:e,nodeId:ROOT_COMPILED_AGENT_NODE_ID,owner:{kind:`application`}}),l=[c.manifest,...c.descendants.map(e=>e.agent)].flatMap(e=>e.tools).find(e=>e.execution===`background`);if(l!==void 0&&c.manifest.config.experimental?.tasks!==!0)throw Error(`Background tool "${l.name}" requires experimental.tasks: true in the root agent config.`);let u=summarizeCompilerDiagnostics(o),d=c.descendants.map(e=>(e.configResolver,{...e,agent:{...e.agent,diagnosticsSummary:u}}));return createCompiledAgentManifest({...c.manifest,diagnosticsSummary:u,subagents:d})}var AgentGraphCompiler=class{context;registries;diagnostics;constructor(e,t,n){this.context=e,this.registries=t,this.diagnostics=n}async compileStaticNode(e){let t=await this.createPhaseOneNodeSourceState(e,e.inheritedExternalDependencies),n=await compileAgentConfig(e.manifest,this.context,{binding:t.selectedConfig.binding,definition:t.selectedConfig.definition,source:t.selectedConfig.source});assertRootOnlyConfig(n,e.isRoot,e.manifest.agentId);let r=mergeExternalDependencies(e.inheritedExternalDependencies,n.build?.externalDependencies,e.manifest.resolvedExtensions.flatMap(e=>e.externalDependencies));r.length>0&&(n={...n,build:{...n.build,externalDependencies:r}});let a=finalizeNodeSourceState(t,r);assertInstrumentationLayoutConfig(n,a);let o=await this.compileResources(e,a),s=await this.compileChildren(e,a,r),c=createCompiledAgentNodeManifest({...o,config:n,remoteAgents:s.remoteAgents});return{descendants:s.nodes,manifest:c}}async compileChildren(e,t,n){let r=[],s=[],c=collectSelectedSourceIds(t.composed),l=t.projected.subagents.filter(e=>c.has(e.candidate.sourceId));for(let t of l){let c=t.source,l=createCompiledSubagentNodeId(e.nodeId,c.sourceId),u={extensionScope:t.extensionScope??e.extensionScope,inheritedExternalDependencies:n,isRoot:!1,layer:t.candidate.layer,manifest:c.manifest,nodeId:l,owner:t.owner,parentNodeId:e.nodeId},d=await this.createPhaseOneNodeSourceState(u,n),f=normalizeSubagentConfig(d.selectedConfig.definition,`Expected the subagent config export "${d.selectedConfig.source.exportName??`default`}" from "${c.entryPath}" to match the public eve shape.`);if(f.kind===`remote`){assertRemoteAgentDefinitionHasNoLocalPackageEntries(c),s.push(createCompiledRemoteAgent({binding:d.selectedConfig.binding,definition:f,nodeId:l,owner:t.owner,parentNodeId:e.nodeId,source:c,sourceRef:d.selectedConfig.source}));continue}let p,m;f.kind===`local`?(p=await compileAgentConfig(c.manifest,this.context,{binding:d.selectedConfig.binding,definition:f.definition,source:d.selectedConfig.source}),assertRootOnlyConfig(p,!1,c.manifest.agentId)):m=f.build?.externalDependencies;let h=mergeExternalDependencies(n,p?.build?.externalDependencies,m,c.manifest.resolvedExtensions.flatMap(e=>e.externalDependencies));p!==void 0&&h.length>0&&(p={...p,build:{...p.build,externalDependencies:h}});let _=finalizeNodeSourceState(d,h);p!==void 0&&assertInstrumentationLayoutConfig(p,_);let v=await this.compileResources(u,_),y=await this.compileChildren(u,_,h),b={backing:t.candidate.backing,entryPath:c.entryPath,logicalPath:c.logicalPath,name:c.subagentId,nodeId:l,owner:t.owner,parentNodeId:e.nodeId,rootPath:c.rootPath,sourceId:c.sourceId,sourceKind:`module`},x;x=p===void 0?{...b,agent:createCompiledAgentResources({...v,remoteAgents:y.remoteAgents}),configResolver:{build:f.kind===`dynamic`?f.build:void 0,eventNames:f.kind===`dynamic`?f.eventNames:[],exportName:d.selectedConfig.source.exportName,logicalPath:d.selectedConfig.source.logicalPath,sourceId:d.selectedConfig.source.sourceId,sourceKind:`module`}}:{...b,agent:createCompiledAgentNodeManifest({...v,config:p,remoteAgents:y.remoteAgents}),description:expectSubagentDescription(p,c)},r.push(x,...y.nodes)}return{nodes:r,remoteAgents:s}}composeNodeSources(e,t){let n=projectAgentSources({externalDependencies:t,extensionScope:e.extensionScope,layer:e.layer,manifest:e.manifest,nodeId:e.nodeId,owner:e.owner}),r=[],i=[];for(let t of this.registries){let n=t===frameworkAgentSourceRegistry;for(let a of t.registrations){if(a.applyTo===`root`&&!e.isRoot)continue;!n&&a.applyTo===`all-local-nodes`&&assertApplicationOverlayCanApplyToAllNodes(a.source.modules.map(e=>e.logicalPath));let t=createProgrammaticModuleCandidates({layer:n?`framework-default`:`application`,nodeId:e.nodeId,owner:n?{feature:a.source.id,kind:`framework`}:{kind:`application`},registration:a});(n?r:i).push(...t)}}let a=[...r,...n.candidates,...i],o=composeAgentModuleCandidates(a),s=projectSelectedSources({candidates:o.selected.values(),resources:n.resources});return{composed:o,orderedCandidates:a,projected:n,sourcesBySourceId:new Map(s.map(e=>[e.candidate.sourceId,e])),subagentsBySourceId:new Map(n.subagents.map(e=>[e.candidate.sourceId,e]))}}async createPhaseOneNodeSourceState(e,t){let n=this.composeNodeSources(e,t);return{graph:n,selectedConfig:await this.loadSelectedConfig(n)}}async loadSelectedConfig(e){let n=e.composed.selected.get(`agent`);if(n===void 0||!isModuleCandidate(n))throw Error(`Every local agent node requires a selected module-backed agent.ts source.`);let r=createCompiledModuleBinding(n),i=e.sourcesBySourceId.get(n.sourceId);if(i?.source.sourceKind!==`module`)throw Error(`Selected agent config source "${n.sourceId}" was not projected.`);let a=i.source;return{binding:r,candidate:n,definition:await loadModuleBackedDefinition({binding:r,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[n.sourceId]:r},registries:this.registries}),source:a}),source:a}}async compileResources(n,r){let i=[],o=[],c=[],l=[],u=[],p=[],m=[],g=[],y=[],S=[],C,w,T,E,D=collectSelectedSourceIds(r.composed),O=createCompiledBindingNamespaceLoader({bindings:r.bindings,registries:this.registries});for(let t of r.orderedCandidates){if(!D.has(t.sourceId))continue;let a=r.sourcesBySourceId.get(t.sourceId);if(a===void 0)continue;let s=r.bindings[t.sourceId],d={binding:s,loadNamespace:O,owner:t.owner};switch(a.kind){case`config`:case`extension`:break;case`channel`:{let i=await compileChannelDefinition(n.manifest.agentRoot,a.source,{binding:s,loadNamespace:O});i.kind===`disabled`?(r.composed=disableComposedCandidate({candidate:t,composed:r.composed}),delete r.bindings[t.sourceId],D.delete(t.sourceId)):S.push(...i.definitions);break}case`connection`:m.push(await compileConnectionDefinition(n.manifest.agentRoot,a.source,{binding:s,loadNamespace:O}));break;case`hook`:g.push(await compileHookEntry(a.source,{binding:s,loadNamespace:O}));break;case`instructions`:{let e=await compileInstructionsEntry(n.manifest.agentRoot,a.source,d);e.kind===`instructions`?u.push(e.definition):p.push(e.definition);break}case`instrumentation`:w=a.source;break;case`sandbox`:C=await compileSandboxDefinition(n.manifest.agentRoot,a.source,{binding:s,loadNamespace:O});break;case`schedule`:y.push(await compileScheduleDefinition(n.manifest.agentRoot,a.source,d));break;case`skill`:{let e=await compileSkillSource(n.manifest.agentRoot,a.source,d);e.kind===`skill`?c.push(e.definition):l.push(withExtensionNamespace(e.definition,t.owner));break}case`tool`:{let e=await compileToolEntry(n.manifest.agentRoot,a.source,{binding:s,loadNamespace:O});e.kind===`disabled`?(r.composed=disableComposedCandidate({candidate:t,composed:r.composed}),delete r.bindings[t.sourceId],D.delete(t.sourceId)):e.kind===`tool`?i.push(e.definition):e.kind===`dynamic-tool`?o.push(withExtensionNamespace(e.definition,t.owner)):e.kind===`workflow-tool`?(assertRootOwnedSpecialTool(t,`Workflow`),T={...a.source,maxSubagents:e.maxSubagents}):(assertNonExtensionSpecialTool(t,`Web search`),i.push(e.definition),E=e.provider);break}}}if(C===void 0)throw Error(`Agent node "${n.nodeId}" has no selected sandbox source.`);assertUniqueBy(i,e=>e.name,`tool name`),assertUniqueBy(o,e=>e.slug,`dynamic tool slug`),assertUniqueBy(m,e=>e.connectionName,`connection name`),assertUniqueBy(c,e=>e.name,`skill name`);let k=createCompiledChannelRoutePlan({bindings:r.bindings,channels:S,diagnostics:this.diagnostics,nodeId:n.nodeId,sources:Object.fromEntries(r.orderedCandidates.map(e=>[e.sourceId,describeAgentSourceCandidate(e)]))});return createCompiledAgentResources({agentRoot:n.manifest.agentRoot,appRoot:n.manifest.appRoot,bindings:r.bindings,channelRoutes:k,connections:m,diagnosticsSummary:summarizeCompilerDiagnostics(this.diagnostics),dynamicInstructions:p,dynamicSkills:l,dynamicTools:o,extensionMounts:compileExtensionMounts(n.manifest,r.composed),hooks:g,instructions:u,instrumentation:w,sandbox:C,sandboxWorkspaces:n.manifest.sandboxWorkspaces.map(e=>({logicalPath:e.logicalPath,rootEntries:[...e.rootEntries],sourceId:e.sourceId,sourcePath:e.sourcePath})),schedules:y,skills:c,sourceComposition:r.composed.composition,tools:i,webSearchProvider:E,workflowTool:T})}};function isModuleCandidate(e){return e.backing.kind!==`resource`}function assertInstrumentationLayoutConfig(e,t){if(e.experimental?.instrumentationProviders===!0&&t.composed.selected.has(`instrumentation`))throw Error(`A selected instrumentation.ts source cannot be used with experimental.instrumentationProviders. Move the declaration into the instrumentation/ provider directory.`)}export{compileAgentManifest};
|
|
@@ -5,5 +5,5 @@ import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-help
|
|
|
5
5
|
* Compiles one authored sandbox module into the normalized sandbox
|
|
6
6
|
* definition stored on the compiled agent manifest.
|
|
7
7
|
*/
|
|
8
|
-
export declare function compileSandboxDefinition(
|
|
8
|
+
export declare function compileSandboxDefinition(_agentRoot: string, source: SandboxSourceRef, options: ModuleBackedDefinitionLoadOptions): Promise<CompiledSandboxDefinition>;
|
|
9
9
|
export declare function resolveParentSandboxSelector(value: unknown, message: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{
|
|
1
|
+
import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{toErrorMessage}from"#shared/errors.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeSandboxDefinition}from"#internal/authored-definition/sandbox.js";async function compileSandboxDefinition(e,t,n){let i=`Expected the sandbox export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`,a=await loadModuleBackedDefinition({binding:n.binding,kind:`sandbox`,loadNamespace:n.loadNamespace,source:t}),o=await resolveParentSandboxSelector(a,i),s=normalizeSandboxDefinition(o?{}:a,i),c=s.revalidationKey===void 0?void 0:await resolveSandboxRevalidationKey({message:i,revalidationKey:s.revalidationKey,source:t});return{backendName:resolveCompiledBackendName(s.backend),description:s.description,inheritsParent:o||void 0,exportName:t.exportName,logicalPath:t.logicalPath,revalidationKey:c,sourceHash:await resolveSandboxSourceHash(n.binding),sourceId:t.sourceId,sourceKind:`module`}}const PARENT_SANDBOX_VALUE=Object.freeze({__eveSandboxParentValue:Symbol(`parent`)});async function resolveParentSandboxSelector(e,t){if(typeof e!=`function`)return!1;let r;try{r=await e({parent:{sandbox:PARENT_SANDBOX_VALUE}})}catch(e){throw Error(`${t} The callback passed to defineSandbox(...) threw while selecting parent.sandbox: ${toErrorMessage(e)}`)}if(r!==PARENT_SANDBOX_VALUE)throw Error(`${t} The callback passed to defineSandbox(...) must return parent.sandbox. Export a sandbox definition object for an independent sandbox.`);return!0}function resolveCompiledBackendName(e){if(e!==void 0)try{return e.name}catch{return}}async function resolveSandboxRevalidationKey(e){let t;try{t=await e.revalidationKey()}catch(t){throw Error(`${e.message} Failed to execute the "revalidationKey" function from "${e.source.logicalPath}": ${toErrorMessage(t)}`)}if(typeof t!=`string`)throw Error(`${e.message} The "revalidationKey" function must return a string.`);if(t.trim().length===0)throw Error(`${e.message} The "revalidationKey" function must return a non-empty string.`);return t}async function resolveSandboxSourceHash(n){if(n.backing.kind===`programmatic`)return createHash(`sha256`).update(n.backing.semanticRevision??n.backing.revision).digest(`hex`);let r=await readFile(n.backing.sourcePath);return createHash(`sha256`).update(r).digest(`hex`)}export{compileSandboxDefinition,resolveParentSandboxSelector};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ScheduleSourceRef } from "#discover/manifest.js";
|
|
2
2
|
import type { CompiledScheduleDefinition } from "#compiler/manifest.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type SourceDefinitionCompileOptions } from "#compiler/normalize-helpers.js";
|
|
4
4
|
/**
|
|
5
5
|
* Compiles one authored schedule into the normalized shape consumed by
|
|
6
6
|
* the runtime scheduler.
|
|
@@ -12,4 +12,4 @@ import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-help
|
|
|
12
12
|
* path under `schedules/` minus the extension
|
|
13
13
|
* (`schedules/billing/invoice-sweep.ts` → `"billing/invoice-sweep"`).
|
|
14
14
|
*/
|
|
15
|
-
export declare function compileScheduleDefinition(
|
|
15
|
+
export declare function compileScheduleDefinition(_agentRoot: string, source: ScheduleSourceRef, options: SourceDefinitionCompileOptions): Promise<CompiledScheduleDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeScheduleDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileScheduleDefinition(e,n,r
|
|
1
|
+
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeScheduleDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions}from"#compiler/normalize-helpers.js";async function compileScheduleDefinition(e,n,r){let i=n.sourceKind===`markdown`?normalizeScheduleDefinition(n.definition,`Expected the compiled schedule definition at "${n.logicalPath}" to match the public eve shape.`):normalizeScheduleDefinition(await loadModuleBackedDefinition({...requireModuleBackedDefinitionLoadOptions(r,n.logicalPath),kind:`schedule`,source:n}),`Expected the schedule export "${n.exportName??`default`}" from "${n.logicalPath}" to match the public eve shape.`),a={cron:i.cron,hasRun:i.run!==void 0,logicalPath:n.logicalPath,name:deriveScheduleName(n.logicalPath),sourceId:n.sourceId,sourceKind:n.sourceKind},o=i.markdown===void 0?a:{...a,markdown:i.markdown.trim()};return n.sourceKind===`module`?{...o,sourceKind:`module`}:{...o,owner:r.owner,sourceKind:`markdown`}}function deriveScheduleName(t){return stripLogicalPathExtension(t).replace(/^schedules\//,``)}export{compileScheduleDefinition};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SkillSourceRef } from "#discover/manifest.js";
|
|
2
2
|
import type { CompiledDynamicSkillDefinition, CompiledSkillDefinition } from "#compiler/manifest.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type SourceDefinitionCompileOptions } from "#compiler/normalize-helpers.js";
|
|
4
4
|
/**
|
|
5
5
|
* Compiled skill entry produced from one authored `skills/*` file.
|
|
6
6
|
*
|
|
@@ -19,4 +19,4 @@ export type CompiledSkillEntry = {
|
|
|
19
19
|
* package directory) into the normalized shape stored on the compiled
|
|
20
20
|
* agent manifest.
|
|
21
21
|
*/
|
|
22
|
-
export declare function compileSkillSource(
|
|
22
|
+
export declare function compileSkillSource(_agentRoot: string, source: SkillSourceRef, options: SourceDefinitionCompileOptions): Promise<CompiledSkillEntry>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeSkillDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#
|
|
1
|
+
import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeSkillDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions}from"#compiler/normalize-helpers.js";import{assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#dynamic/definition.js";async function compileSkillSource(r,i,a){if(i.sourceKind===`skill-package`)return{kind:`skill`,definition:compileSkillPackageSource(i,a.owner)};if(i.sourceKind===`markdown`){let n=normalizeSkillDefinition(i.definition,`Expected the compiled skill definition at "${i.logicalPath}" to match the public eve shape.`);return{kind:`skill`,definition:{description:n.description,files:n.files,license:n.license,logicalPath:i.logicalPath,owner:a.owner,markdown:n.markdown,metadata:n.metadata===void 0?void 0:{...n.metadata},name:stripLogicalPathExtension(i.logicalPath).replace(/^skills\//,``),sourceId:i.sourceId,sourceKind:i.sourceKind}}}let o=requireModuleBackedDefinitionLoadOptions(a,i.logicalPath),s=await loadModuleBackedDefinition({binding:o.binding,kind:`skill`,loadNamespace:o.loadNamespace,source:i});if(isDynamicSentinel(s)){assertResolverOnlyDynamicSentinel(s,`Expected the skill export "${i.exportName??`default`}" from "${i.logicalPath}" to match the public eve shape.`);let t=stripLogicalPathExtension(i.logicalPath).replace(/^skills\//,``);return{kind:`dynamic-skill`,definition:{eventNames:Object.keys(s.events),exportName:i.exportName,logicalPath:i.logicalPath,slug:t,sourceId:i.sourceId,sourceKind:`module`}}}let c=normalizeSkillDefinition(s,`Expected the skill export "${i.exportName??`default`}" from "${i.logicalPath}" to match the public eve shape.`);return{kind:`skill`,definition:{description:c.description,files:c.files,license:c.license,logicalPath:i.logicalPath,markdown:c.markdown,metadata:c.metadata===void 0?void 0:{...c.metadata},name:stripLogicalPathExtension(i.logicalPath).replace(/^skills\//,``),sourceId:i.sourceId,sourceKind:i.sourceKind}}}function compileSkillPackageSource(e,t){return{assetsPath:e.assetsPath,description:e.description,license:e.license,logicalPath:e.logicalPath,owner:t,markdown:e.markdown,metadata:e.metadata===void 0?void 0:{...e.metadata},name:e.name,referencesPath:e.referencesPath,rootPath:e.rootPath,scriptsPath:e.scriptsPath,skillId:e.skillId,skillFilePath:e.skillFilePath,sourceId:e.sourceId,sourceKind:`skill-package`}}export{compileSkillSource};
|