eve 0.75.1 → 0.76.2
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 +63 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/channel/channel-address.d.ts +3 -1
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/session-stranded-error.d.ts +25 -0
- package/dist/src/channel/session-stranded-error.js +1 -0
- package/dist/src/channel/session.d.ts +13 -6
- package/dist/src/channel/task-card.js +1 -1
- package/dist/src/channel/tool-eligibility.d.ts +1 -2
- package/dist/src/channel/types.d.ts +29 -1
- package/dist/src/chunks/{use-eve-agent-DK_T88EP.js → use-eve-agent-BtKWTEpm.js} +99 -24
- package/dist/src/chunks/{use-eve-agent-B2Kne9z6.js → use-eve-agent-jI6EsYAu.js} +99 -24
- package/dist/src/cli/commands/registry-project.d.ts +10 -3
- package/dist/src/cli/commands/registry-project.js +2 -2
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +0 -6
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/tui/conversation-view.js +1 -1
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/stranded-session.d.ts +9 -0
- package/dist/src/cli/dev/tui/stranded-session.js +1 -0
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/transcript.js +1 -1
- package/dist/src/client/client-error.d.ts +16 -0
- package/dist/src/client/client-error.js +1 -1
- package/dist/src/client/client.js +1 -1
- package/dist/src/client/index.d.ts +3 -2
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +3 -0
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +6 -1
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/open-stream.d.ts +5 -3
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session-controls.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/transcript-reducer.d.ts +46 -0
- package/dist/src/client/transcript-reducer.js +2 -0
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/queue/index.d.ts +1066 -0
- package/dist/src/compiled/@vercel/queue/index.js +47 -0
- package/dist/src/compiler/connection-ownership.d.ts +6 -0
- package/dist/src/compiler/connection-ownership.js +1 -0
- package/dist/src/compiler/default-tool-policy.d.ts +0 -3
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +23 -22
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +9 -6
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +5 -0
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +2 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +2 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/connections/ownership.d.ts +18 -0
- package/dist/src/connections/ownership.js +1 -0
- package/dist/src/context/accessors.d.ts +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/build-dynamic-tools.d.ts +3 -9
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-connection-lifecycle.js +1 -1
- package/dist/src/context/dynamic-resolve-context.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -11
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
- package/dist/src/context/keys.d.ts +10 -4
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-tools.js +1 -1
- package/dist/src/context/providers/session.d.ts +1 -0
- package/dist/src/context/providers/session.js +1 -1
- package/dist/src/context/schedule-collection-tools.js +1 -1
- package/dist/src/context/session-context.d.ts +8 -2
- package/dist/src/discover/grammar.d.ts +11 -0
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +1 -0
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/discover/skills.d.ts +1 -0
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/dynamic/definition.d.ts +14 -6
- package/dist/src/evals/assertions/collector.d.ts +4 -0
- package/dist/src/evals/assertions/collector.js +1 -1
- package/dist/src/evals/assertions/run.d.ts +2 -3
- package/dist/src/evals/assertions/run.js +2 -2
- package/dist/src/evals/assertions/scoped.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +9 -6
- package/dist/src/evals/reported-tool-name.d.ts +9 -0
- package/dist/src/evals/reported-tool-name.js +1 -0
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.d.ts +11 -0
- package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.js +1 -0
- package/dist/src/evals/runner/reporters/datadog.js +2 -2
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/target.d.ts +7 -0
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +19 -2
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +2 -2
- package/dist/src/eve-channel/support.d.ts +2 -0
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/agent-sessions/remote.js +1 -1
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/catalog/connection-auth.d.ts +41 -0
- package/dist/src/execution/catalog/connection-auth.js +1 -0
- package/dist/src/execution/catalog/connection-entry.d.ts +16 -0
- package/dist/src/execution/catalog/connection-entry.js +1 -0
- package/dist/src/execution/catalog/listing.d.ts +9 -0
- package/dist/src/execution/catalog/listing.js +3 -0
- package/dist/src/execution/catalog/rank.d.ts +44 -0
- package/dist/src/execution/catalog/rank.js +1 -0
- package/dist/src/execution/catalog/search.d.ts +28 -0
- package/dist/src/execution/catalog/search.js +1 -0
- package/dist/src/execution/catalog/signatures.d.ts +11 -0
- package/dist/src/execution/catalog/signatures.js +1 -0
- package/dist/src/execution/catalog/skills.d.ts +24 -0
- package/dist/src/execution/catalog/skills.js +1 -0
- package/dist/src/execution/catalog/step-catalog.d.ts +51 -0
- package/dist/src/execution/catalog/step-catalog.js +1 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +15 -0
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/install-workflow-world.d.ts +7 -0
- package/dist/src/execution/install-workflow-world.js +1 -0
- package/dist/src/execution/invoke-tool.js +1 -1
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +1 -1
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +11 -0
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +5 -5
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +6 -0
- package/dist/src/execution/session-event-stream.js +1 -1
- package/dist/src/execution/session-inbox/address.d.ts +4 -0
- package/dist/src/execution/session-inbox/address.js +1 -1
- package/dist/src/execution/session-inbox/end-stranded-session.d.ts +22 -0
- package/dist/src/execution/session-inbox/end-stranded-session.js +1 -0
- package/dist/src/execution/session-inbox/hook-release.d.ts +4 -0
- package/dist/src/execution/session-inbox/hook-release.js +1 -0
- package/dist/src/execution/session-inbox/owner.d.ts +48 -0
- package/dist/src/execution/session-inbox/owner.js +1 -0
- package/dist/src/execution/session-inbox/resume.d.ts +12 -0
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-inbox/runnable-owner.d.ts +13 -0
- package/dist/src/execution/session-inbox/runnable-owner.js +1 -0
- package/dist/src/execution/session-inbox/stranded-replay-guard.d.ts +16 -0
- package/dist/src/execution/session-inbox/stranded-replay-guard.js +1 -0
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/skills/instructions.d.ts +20 -10
- package/dist/src/execution/skills/instructions.js +2 -2
- package/dist/src/execution/tasks/calls.d.ts +6 -5
- package/dist/src/execution/tasks/calls.js +1 -1
- package/dist/src/execution/tasks/model-step.d.ts +10 -10
- package/dist/src/execution/tasks/model-step.js +1 -1
- package/dist/src/execution/tasks/render.d.ts +3 -3
- package/dist/src/execution/tasks/render.js +3 -3
- package/dist/src/execution/tasks/session.d.ts +2 -1
- package/dist/src/execution/tasks/table.d.ts +1 -1
- package/dist/src/execution/tasks/tool-entry-point.d.ts +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +5 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/extensions/code/extension/extension.d.ts +4 -18
- package/dist/src/extensions/code/extension/instructions/github.d.ts +3 -0
- package/dist/src/extensions/code/extension/instructions/github.js +1 -0
- package/dist/src/extensions/code/extension/instructions.md +1 -13
- package/dist/src/extensions/code/extension/lib/diagnostics.d.ts +4 -2
- package/dist/src/extensions/code/extension/lib/diagnostics.js +3 -3
- package/dist/src/extensions/code/extension/lib/github-compat.d.ts +28 -0
- package/dist/src/extensions/code/extension/lib/github-compat.js +1 -0
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +3 -13
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/patch.d.ts +8 -2
- package/dist/src/extensions/code/extension/lib/patch.js +4 -4
- package/dist/src/extensions/code/extension/lib/repository-root.d.ts +3 -4
- package/dist/src/extensions/code/extension/lib/repository-root.js +1 -1
- package/dist/src/extensions/code/extension/lib/sandbox.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/sandbox.js +1 -1
- package/dist/src/extensions/code/extension/lib/tooling.d.ts +4 -4
- package/dist/src/extensions/code/extension/lib/tooling.js +7 -7
- package/dist/src/extensions/code/extension/lib/workspace-root.d.ts +31 -0
- package/dist/src/extensions/code/extension/lib/workspace-root.js +1 -0
- package/dist/src/extensions/code/extension/skills/pr.d.ts +6 -0
- package/dist/src/extensions/code/extension/skills/pr.js +1 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.d.ts +2 -2
- package/dist/src/extensions/code/extension/tools/apply_patch.js +2 -2
- package/dist/src/extensions/code/extension/tools/gh.d.ts +4 -3
- package/dist/src/extensions/code/extension/tools/gh.js +1 -1
- package/dist/src/extensions/code/extension/tools/grep.js +1 -1
- package/dist/src/extensions/code/tools.d.ts +2 -1
- package/dist/src/extensions/code/tools.js +1 -1
- package/dist/src/extensions/git/extension/extension.d.ts +12 -0
- package/dist/src/extensions/git/extension/extension.js +1 -0
- package/dist/src/extensions/git/extension/instructions/github.d.ts +2 -0
- package/dist/src/extensions/git/extension/instructions/github.js +1 -0
- package/dist/src/extensions/git/extension/lib/gh-tool.d.ts +29 -0
- package/dist/src/extensions/git/extension/lib/gh-tool.js +1 -0
- package/dist/src/extensions/git/extension/lib/github-guidance.d.ts +3 -0
- package/dist/src/extensions/git/extension/lib/github-guidance.js +49 -0
- package/dist/src/extensions/{code → git}/extension/lib/github-shell.d.ts +1 -1
- package/dist/src/extensions/git/extension/lib/github-shell.js +1 -0
- package/dist/src/extensions/git/extension/lib/repository-root.d.ts +5 -0
- package/dist/src/extensions/git/extension/lib/repository-root.js +1 -0
- package/dist/src/extensions/git/extension/lib/sandbox.d.ts +6 -0
- package/dist/src/extensions/git/extension/lib/sandbox.js +1 -0
- package/dist/src/extensions/git/extension/lib/shell.d.ts +1 -0
- package/dist/src/extensions/git/extension/lib/shell.js +1 -0
- package/dist/src/extensions/git/extension/lib/tooling.d.ts +4 -0
- package/dist/src/extensions/git/extension/lib/tooling.js +1 -0
- package/dist/src/extensions/git/extension/skills/pr.d.ts +5 -0
- package/dist/src/extensions/git/extension/skills/pr.js +1 -0
- package/dist/src/extensions/git/extension/tools/gh.d.ts +28 -0
- package/dist/src/extensions/git/extension/tools/gh.js +1 -0
- package/dist/src/extensions/git/tools.d.ts +27 -0
- package/dist/src/extensions/git/tools.js +1 -0
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.d.ts +2 -2
- package/dist/src/harness/action-result-helpers.d.ts +10 -2
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/announcements.d.ts +2 -8
- package/dist/src/harness/announcements.js +1 -1
- package/dist/src/harness/compaction/step.js +1 -1
- package/dist/src/harness/coordination.d.ts +11 -11
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +1 -5
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +2 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-call.d.ts +48 -0
- package/dist/src/harness/execute-call.js +1 -0
- package/dist/src/harness/execute-tool.d.ts +3 -1
- package/dist/src/harness/final-output.d.ts +2 -6
- package/dist/src/harness/final-output.js +1 -1
- package/dist/src/harness/hitl/approvals.d.ts +5 -0
- package/dist/src/harness/hitl/approvals.js +1 -1
- package/dist/src/harness/hitl/approved-calls.d.ts +3 -2
- package/dist/src/harness/hitl/approved-calls.js +1 -1
- package/dist/src/harness/hitl/candidates.d.ts +13 -2
- package/dist/src/harness/hitl/candidates.js +1 -1
- package/dist/src/harness/hitl/coordinator.d.ts +3 -3
- package/dist/src/harness/hitl/coordinator.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +6 -4
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/intake.d.ts +3 -3
- package/dist/src/harness/hitl/intake.js +1 -1
- package/dist/src/harness/input-extraction.d.ts +4 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +15 -0
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/model-call/call.d.ts +4 -6
- package/dist/src/harness/model-call/call.js +1 -1
- package/dist/src/harness/model-call/errors.d.ts +5 -6
- package/dist/src/harness/model-call/errors.js +1 -1
- package/dist/src/harness/model-call/recovery.d.ts +4 -3
- package/dist/src/harness/model-call/request.d.ts +5 -3
- package/dist/src/harness/model-call/request.js +1 -1
- package/dist/src/harness/model-call/response.d.ts +2 -1
- package/dist/src/harness/model-call/response.js +1 -1
- package/dist/src/harness/model-call/run.d.ts +5 -3
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/model-call/tools.d.ts +12 -21
- package/dist/src/harness/model-call/tools.js +1 -1
- package/dist/src/harness/model-profile.d.ts +15 -3
- package/dist/src/harness/model-profile.js +1 -1
- package/dist/src/harness/prompt-cache.d.ts +6 -3
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/provider-safety.d.ts +2 -1
- package/dist/src/harness/provider-safety.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +7 -6
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/session-machine/commit.js +1 -1
- package/dist/src/harness/session-machine/transitions.d.ts +8 -3
- package/dist/src/harness/session-machine/transitions.js +1 -1
- package/dist/src/harness/step/after-model.js +1 -1
- package/dist/src/harness/step/context.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +4 -6
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +2 -2
- package/dist/src/harness/tool-call-io.d.ts +3 -0
- package/dist/src/harness/tool-call-io.js +1 -1
- package/dist/src/harness/tools.d.ts +22 -19
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +14 -0
- package/dist/src/instrumentation/lifecycle.d.ts +0 -1
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +2 -1
- package/dist/src/internal/application/compiled-artifacts.js +4 -4
- package/dist/src/internal/application/package.d.ts +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/stamped-package-version.d.ts +5 -0
- package/dist/src/internal/application/stamped-package-version.js +1 -0
- package/dist/src/internal/authored-definition/core.d.ts +3 -0
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/schedule-collection.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +2 -2
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module.d.ts +2 -1
- package/dist/src/internal/authored-module.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/mcp/skills.js +1 -1
- package/dist/src/internal/model-auth/available-models.js +1 -1
- 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/local-schedules-runtime-plugin.d.ts +5 -0
- package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.js +1 -0
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.d.ts +6 -0
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
- package/dist/src/internal/schedules/consumer-route.d.ts +2 -0
- package/dist/src/internal/schedules/consumer-route.js +1 -1
- package/dist/src/internal/schedules/dev-environment.d.ts +2 -0
- package/dist/src/internal/schedules/dev-environment.js +1 -0
- package/dist/src/internal/vercel-agent-summary.d.ts +2 -2
- package/dist/src/internal/workflow/development-run-unavailable-error.d.ts +15 -0
- package/dist/src/internal/workflow/development-run-unavailable-error.js +1 -0
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/protocol/catalog-tools.d.ts +12 -0
- package/dist/src/protocol/catalog-tools.js +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +15 -1
- package/dist/src/protocol/message.js +1 -1
- package/dist/src/protocol/remote-agent-protocol.d.ts +2 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -1
- package/dist/src/protocol/reply-tool.d.ts +2 -0
- package/dist/src/protocol/reply-tool.js +1 -0
- package/dist/src/protocol/runtime-tools.d.ts +6 -0
- package/dist/src/protocol/runtime-tools.js +1 -0
- package/dist/src/protocol/session-projection.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +4 -4
- package/dist/src/protocol/task-tools.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.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/defaults.js +2 -2
- package/dist/src/public/channels/slack/action-status.d.ts +0 -9
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/defaults.js +2 -2
- package/dist/src/public/channels/slack/task-card.d.ts +1 -1
- package/dist/src/public/context/index.d.ts +1 -1
- package/dist/src/public/definitions/callback-context.d.ts +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -0
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -4
- package/dist/src/public/definitions/connections/openapi.d.ts +6 -7
- package/dist/src/public/definitions/remote-agent.d.ts +6 -3
- package/dist/src/public/definitions/workspace-agent.d.ts +6 -3
- package/dist/src/public/experimental/schedules/index.d.ts +1 -1
- package/dist/src/public/models/openai/chatgpt/model.js +1 -1
- package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
- package/dist/src/public/schedules/providers/in-memory.js +1 -1
- package/dist/src/public/schedules/providers/vercel.js +1 -1
- package/dist/src/public/schedules/subscription.d.ts +36 -16
- package/dist/src/public/tanstack/index.d.ts +40 -0
- package/dist/src/public/tanstack/index.js +1 -0
- package/dist/src/public/tools/web-search.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +2 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/agent/mock-model-skill-selection.d.ts +2 -0
- package/dist/src/runtime/agent/mock-model-skill-selection.js +2 -2
- package/dist/src/runtime/agent/mock-structured-output.d.ts +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/registry.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +2 -2
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/schedules/collection-client.d.ts +12 -3
- package/dist/src/runtime/schedules/collection-client.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +2 -2
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +2 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +2 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.d.ts +2 -0
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +3 -3
- package/dist/src/setup/connection-connector.js +1 -2
- package/dist/src/setup/flows/model-login.js +1 -1
- package/dist/src/setup/index.d.ts +1 -1
- package/dist/src/setup/index.js +1 -1
- package/dist/src/setup/integrations/slack/setup.d.ts +23 -3
- package/dist/src/setup/integrations/slack/setup.js +1 -1
- package/dist/src/setup/integrations/web/framework.d.ts +8 -0
- package/dist/src/setup/integrations/web/framework.js +1 -0
- package/dist/src/setup/integrations/web/hosting.d.ts +43 -0
- package/dist/src/setup/integrations/web/hosting.js +15 -0
- package/dist/src/setup/integrations/web/setup.d.ts +6 -10
- package/dist/src/setup/integrations/web/setup.js +23 -17
- package/dist/src/setup/primitives/process-output.d.ts +5 -0
- package/dist/src/setup/primitives/process-output.js +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +7 -3
- package/dist/src/setup/scaffold/create/web-template.js +40 -3
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/scaffold/update/update-slack-channel.d.ts +17 -0
- package/dist/src/setup/scaffold/update/update-slack-channel.js +1 -1
- package/dist/src/setup/slack-connect-create.d.ts +10 -2
- package/dist/src/setup/slack-connect-create.js +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +92 -44
- package/dist/src/setup/slack-connect-lifecycle.js +1 -1
- package/dist/src/setup/slack-connect.d.ts +30 -11
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slack-setup-plan.d.ts +72 -0
- package/dist/src/setup/slack-setup-plan.js +1 -0
- package/dist/src/setup/slackbot.d.ts +75 -35
- package/dist/src/setup/slackbot.js +2 -1
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/shared/action-label.d.ts +10 -0
- package/dist/src/shared/action-label.js +1 -0
- package/dist/src/shared/action-request-name.d.ts +3 -1
- package/dist/src/shared/action-request-name.js +1 -1
- package/dist/src/shared/action-types.d.ts +7 -8
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +36 -3
- package/dist/src/shared/agent-definition.js +1 -1
- package/dist/src/shared/chatgpt-model.d.ts +8 -0
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/development-env-files.d.ts +4 -0
- package/dist/src/shared/development-env-files.js +1 -0
- package/dist/src/shared/input.d.ts +0 -1
- package/dist/src/shared/map-with-concurrency.d.ts +2 -0
- package/dist/src/shared/map-with-concurrency.js +1 -0
- package/dist/src/shared/skill-definition.d.ts +6 -0
- package/dist/src/shared/skill-package.d.ts +1 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/web-search.d.ts +15 -2
- package/dist/src/shared/web-search.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tool-stubs/execute.d.ts +0 -3
- package/dist/src/tool-stubs/execute.js +1 -1
- package/dist/src/tool-stubs/rules.js +1 -1
- package/dist/src/tool-stubs/validate-targets.js +1 -1
- package/dist/src/tools/behavior.d.ts +3 -6
- package/dist/src/tools/definition.d.ts +5 -0
- package/dist/src/tools/dynamic.d.ts +5 -2
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +1 -1
- package/dist/src/tools/provided/task-wait.d.ts +1 -1
- package/dist/src/tools/provided/web-search.d.ts +20 -7
- package/dist/src/tools/provided/web-search.js +1 -1
- package/dist/src/tools/schema.d.ts +5 -0
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/{runtime/connections/tool-signature.d.ts → tools/signature.d.ts} +2 -2
- package/dist/src/tools/workflow-definition.d.ts +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +1 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-turn-state.d.ts +6 -0
- package/dist/src/tracing/agent-otel-turn-state.js +1 -0
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +39 -8
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/custom.mdx +26 -0
- package/docs/channels/eve.mdx +8 -5
- package/docs/channels/slack.mdx +32 -82
- package/docs/code-extension.mdx +28 -7
- package/docs/concepts/built-in-tools.md +60 -43
- package/docs/concepts/context-control.md +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +101 -1
- package/docs/concepts/project-structure.mdx +2 -2
- package/docs/concepts/sessions-runs-and-streaming.md +40 -38
- package/docs/connections/mcp.mdx +5 -5
- package/docs/connections/openapi.mdx +1 -1
- package/docs/connections/overview.mdx +4 -2
- package/docs/evals/assertions.mdx +5 -3
- package/docs/evals/reporters.mdx +3 -1
- package/docs/evals/tool-stubs.mdx +3 -1
- package/docs/extensions.md +2 -0
- package/docs/guides/client/messages.mdx +10 -1
- package/docs/guides/deployment/overview.md +2 -2
- package/docs/guides/dev-tui.md +4 -2
- package/docs/guides/dynamic-capabilities.md +14 -4
- package/docs/guides/frontend/meta.json +9 -1
- package/docs/guides/frontend/nextjs.mdx +1 -1
- package/docs/guides/frontend/overview.mdx +10 -9
- package/docs/guides/frontend/tanstack.mdx +201 -0
- package/docs/guides/remote-agents.md +10 -3
- package/docs/guides/session-context.md +1 -0
- package/docs/install-integrations.mdx +1 -1
- package/docs/instructions.mdx +6 -6
- package/docs/reference/cli.md +2 -2
- package/docs/reference/typescript-api.md +4 -4
- package/docs/skills.mdx +19 -4
- package/docs/subagents/index.mdx +5 -3
- package/docs/tools/human-in-the-loop.md +2 -0
- package/docs/tools/overview.mdx +22 -1
- package/docs/tools/tasks-upgrade.md +1 -1
- package/docs/tools/tasks.md +32 -32
- package/docs/tools/workflows.mdx +6 -6
- package/docs/tutorial/ship-it.mdx +1 -1
- package/docs/tutorial/team-playbooks.mdx +2 -2
- package/package.json +28 -6
- package/dist/src/execution/connection-announcement.d.ts +0 -7
- package/dist/src/execution/connection-announcement.js +0 -4
- package/dist/src/execution/tools/connection-approval.d.ts +0 -25
- package/dist/src/execution/tools/connection-approval.js +0 -1
- package/dist/src/execution/tools/connection-search-rank.d.ts +0 -21
- package/dist/src/execution/tools/connection-search-rank.js +0 -1
- package/dist/src/execution/tools/connection-target.d.ts +0 -18
- package/dist/src/execution/tools/connection-target.js +0 -1
- package/dist/src/execution/tools/connection-tools.d.ts +0 -4
- package/dist/src/execution/tools/connection-tools.js +0 -2
- package/dist/src/execution/tools/load-skill.d.ts +0 -10
- package/dist/src/execution/tools/load-skill.js +0 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +0 -1
- package/dist/src/extensions/code/extension/skills/pr/SKILL.md +0 -53
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.d.ts +0 -2
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.js +0 -1
- package/dist/src/harness/advertised-tools.d.ts +0 -26
- package/dist/src/harness/advertised-tools.js +0 -1
- package/dist/src/harness/nested-actions.d.ts +0 -23
- package/dist/src/harness/nested-actions.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cli-config.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cred-storage.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.zod.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/types.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_queue@0.5.1_@opentelemetry_api@1.9.1/node_modules/@vercel/queue/dist/index.js +0 -36
- package/dist/src/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js +0 -1
- package/dist/src/node_modules/.pnpm/mixpart@0.0.6/node_modules/mixpart/dist/index.js +0 -7
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/node_modules/.pnpm/xdg-app-paths@5.5.1/node_modules/xdg-app-paths/src/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js +0 -1
- package/dist/src/public/tools/load-skill.d.ts +0 -3
- package/dist/src/public/tools/load-skill.js +0 -1
- package/dist/src/runtime/skills/fragment-context.d.ts +0 -4
- package/dist/src/runtime/skills/fragment-context.js +0 -1
- package/dist/src/tools/framework/connection-tools.d.ts +0 -3
- package/dist/src/tools/framework/connection-tools.js +0 -1
- package/dist/src/tools/provided/load-skill.d.ts +0 -2
- package/dist/src/tools/provided/load-skill.js +0 -1
- /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.d.ts +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.js +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.d.ts +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.js +0 -0
- /package/dist/src/{runtime/connections/tool-signature.js → tools/signature.js} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { readProjectLink } from "#setup/project-resolution.js";
|
|
2
2
|
import { type ChannelSetupAwaitChoice, type ChannelSetupLog } from "#setup/cli/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SlackConnectorProject, SlackTriggerDestination } from "./slack-connect.js";
|
|
4
4
|
import { type SlackConnectorCreateDeps } from "./slack-connect-create.js";
|
|
5
|
-
import { type SlackConnectLifecycleDeps
|
|
5
|
+
import { type SlackConnectLifecycleDeps } from "./slack-connect-lifecycle.js";
|
|
6
|
+
import { type SlackConnectorInUse, type SlackConnectorCandidate } from "./slack-setup-plan.js";
|
|
7
|
+
export type { SlackConnectorCandidate } from "./slack-setup-plan.js";
|
|
6
8
|
/** Injected for tests; defaults to the real Vercel CLI subprocess primitives. */
|
|
7
9
|
interface SlackbotProvisionDeps extends SlackConnectLifecycleDeps, SlackConnectorCreateDeps {
|
|
8
10
|
/** Test seam for the linked Vercel project and team lookup. */
|
|
@@ -12,21 +14,32 @@ interface SlackbotProvisionDeps extends SlackConnectLifecycleDeps, SlackConnecto
|
|
|
12
14
|
/** Monotonic-enough clock for enforcing the workspace lookup deadline. */
|
|
13
15
|
now?: () => number;
|
|
14
16
|
}
|
|
17
|
+
/** A Slack connector that delivers this project's events to eve's Slack route. */
|
|
18
|
+
interface SlackbotConnection {
|
|
19
|
+
connectorUid: string;
|
|
20
|
+
/** Deep link that opens a DM compose with the bot ("chat with your agent"). */
|
|
21
|
+
chatUrl?: string;
|
|
22
|
+
workspaceName?: string;
|
|
23
|
+
}
|
|
15
24
|
/**
|
|
16
|
-
* Outcome of
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
+
* Outcome of Slackbot provisioning. `attached` means a connector exists, this
|
|
26
|
+
* project receives its events at eve's Slack route, and the app is installed
|
|
27
|
+
* into a Slack workspace. `already-configured` is the same state reached
|
|
28
|
+
* without changing anything. `not-installed` means the workspace-install
|
|
29
|
+
* deadline elapsed and any connector created by this attempt was removed.
|
|
30
|
+
* `cleanup-failed` means it may remain and callers must stop rather than
|
|
31
|
+
* create another connector. `trigger-limit-reached` changed nothing because
|
|
32
|
+
* the connector already has the maximum number of trigger destinations.
|
|
33
|
+
* `connector-in-use` changed nothing because another project now uses the
|
|
34
|
+
* chosen connector.
|
|
25
35
|
*/
|
|
26
36
|
export type ProvisionSlackbotResult = {
|
|
27
37
|
state: "connector-lookup-failed";
|
|
28
|
-
}
|
|
38
|
+
}
|
|
39
|
+
/** `detail` is the Vercel CLI's own error line, when it printed one. */
|
|
40
|
+
| {
|
|
29
41
|
state: "create-failed";
|
|
42
|
+
detail?: string;
|
|
30
43
|
} | {
|
|
31
44
|
state: "cancelled";
|
|
32
45
|
} | {
|
|
@@ -36,50 +49,77 @@ export type ProvisionSlackbotResult = {
|
|
|
36
49
|
state: "cleanup-failed";
|
|
37
50
|
connectorUids: readonly string[];
|
|
38
51
|
} | {
|
|
39
|
-
state: "
|
|
52
|
+
state: "attach-failed";
|
|
40
53
|
connectorUid: string;
|
|
41
54
|
} | {
|
|
42
|
-
state: "
|
|
55
|
+
state: "connector-in-use";
|
|
43
56
|
connectorUid: string;
|
|
57
|
+
projects: readonly SlackConnectorProject[];
|
|
58
|
+
} | {
|
|
59
|
+
state: "trigger-limit-reached";
|
|
60
|
+
connectorUid: string;
|
|
61
|
+
destinations: readonly SlackTriggerDestination[];
|
|
44
62
|
} | {
|
|
45
63
|
state: "not-installed";
|
|
46
64
|
} | {
|
|
47
65
|
state: "installation-check-failed";
|
|
48
66
|
connectorUid: string;
|
|
49
|
-
} | {
|
|
67
|
+
} | ({
|
|
50
68
|
state: "attached";
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
} & SlackbotConnection) | ({
|
|
70
|
+
state: "already-configured";
|
|
71
|
+
} & SlackbotConnection);
|
|
72
|
+
/** Explains why setup won't attach a connector another project uses. */
|
|
73
|
+
export declare function connectorInUseMessage(candidate: SlackConnectorInUse): string;
|
|
74
|
+
/** A reusable connector from {@link inspectSlackbotConnectors}, or a request to create one. */
|
|
75
|
+
export type SlackConnectorSelection = SlackConnectorCandidate | "create";
|
|
76
|
+
/**
|
|
77
|
+
* Read-only snapshot of the Slack connectors setup may reuse for the linked
|
|
78
|
+
* project. Setup takes it once, asks its questions from it, and hands it to
|
|
79
|
+
* {@link provisionSlackbot}.
|
|
80
|
+
*/
|
|
81
|
+
export interface SlackbotConnectorInspection {
|
|
82
|
+
projectId: string;
|
|
83
|
+
orgId: string | undefined;
|
|
84
|
+
/** Preferred short-name for `connect create slack --name`; suffixed when taken. */
|
|
85
|
+
slug: string;
|
|
86
|
+
/**
|
|
87
|
+
* Reusable connectors in question order: the suggestion first, then
|
|
88
|
+
* attached, then the rest. Connectors other projects use are excluded.
|
|
89
|
+
*/
|
|
90
|
+
candidates: readonly SlackConnectorCandidate[];
|
|
91
|
+
preferred?: SlackConnectorCandidate;
|
|
92
|
+
/** Connectors other projects use, which setup never attaches to this one. */
|
|
93
|
+
inUse: readonly SlackConnectorInUse[];
|
|
94
|
+
}
|
|
56
95
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
96
|
+
* Inspects the connectors attached to the linked project, plus
|
|
97
|
+
* `slack/<slug>` and the channel file's UID looked up by name. Throws when
|
|
98
|
+
* the project isn't linked or any connector can't be read, so setup never
|
|
99
|
+
* creates a connector on a guess.
|
|
61
100
|
*/
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}>>;
|
|
101
|
+
export declare function inspectSlackbotConnectors(log: ChannelSetupLog, projectRoot: string, slug: string, options?: {
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
channelConnectorUid?: string | undefined;
|
|
104
|
+
}, deps?: SlackbotProvisionDeps): Promise<SlackbotConnectorInspection>;
|
|
67
105
|
interface ProvisionSlackbotOptions {
|
|
68
106
|
/**
|
|
69
107
|
* Cancels the caller's whole operation. The promise rejects after attempting
|
|
70
108
|
* cleanup; only the explicit interactive Cancel action returns `cancelled`.
|
|
71
109
|
*/
|
|
72
110
|
signal?: AbortSignal;
|
|
73
|
-
/** Chooses a project-attached connector or requests a new one. */
|
|
74
|
-
selectConnector?: (connectors: readonly SlackConnectorRef[], preferred: SlackConnectorRef | undefined) => Promise<SlackConnectorSelection>;
|
|
75
111
|
/** Concurrent retry/cancel controls supplied by an interactive prompter. */
|
|
76
112
|
awaitChoice?: ChannelSetupAwaitChoice;
|
|
77
113
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Reuses the selected connector or creates a new one, then points its event
|
|
116
|
+
* destination at eve, running only the steps the connector still needs.
|
|
117
|
+
* Re-running it after a partial failure resumes where the previous run
|
|
118
|
+
* stopped; it never detaches a project. A successful `connect create` is the
|
|
119
|
+
* completion boundary for a new browser flow.
|
|
120
|
+
*/
|
|
121
|
+
export declare function provisionSlackbot(log: ChannelSetupLog, projectRoot: string, inspection: SlackbotConnectorInspection, selection: SlackConnectorSelection, deps?: SlackbotProvisionDeps, options?: ProvisionSlackbotOptions): Promise<ProvisionSlackbotResult>;
|
|
81
122
|
/**
|
|
82
123
|
* Patches a connector UID chosen by Connect before the caller deploys the channel definition.
|
|
83
124
|
*/
|
|
84
125
|
export declare function reconcileSlackUid(log: ChannelSetupLog, projectRoot: string, slackbot: ProvisionSlackbotResult, expectedUid: string): Promise<boolean>;
|
|
85
|
-
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{CONNECT_LOOKUP_TIMEOUT_MS,
|
|
1
|
+
import{CONNECT_LOOKUP_TIMEOUT_MS,applySlackRouting,cleanupCreatedAttempt,fetchSlackConnectorDetails,fetchSlackWorkspace,findFreeSlackConnectorName,inspectSlackConnectors,refreshSlackCandidate}from"./slack-connect-lifecycle.js";import{createSlackConnector}from"./slack-connect-create.js";import{describeSlackDestinations,isReusableSlackConnector,orderSlackConnectorCandidates,planSlackRouting}from"./slack-setup-plan.js";import{createHash,randomBytes}from"node:crypto";import{join}from"node:path";import{SLACK_CHANNEL_DEFAULT_ROUTE}from"#setup/scaffold/index.js";import{readProjectLink}from"#setup/project-resolution.js";import{performance}from"node:perf_hooks";import{captureVercel,runVercel,runVercelCaptureStdout}from"#setup/primitives/run-vercel.js";import{setTimeout}from"node:timers/promises";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{openUrl}from"#setup/primitives/open-url.js";import{updateSlackChannelConnectorUid}from"#setup/scaffold/update/update-slack-channel.js";const defaultDeps={captureVercel,runVercel,runVercelCaptureStdout},realDelay=(e,t)=>setTimeout(e,void 0,{signal:t}),monotonicNow=()=>performance.now();async function pollSlackWorkspace(e,t,n,r,i,a){let o=e.delay??realDelay,s=e.now??monotonicNow,c=s()+3e5;for(;;){a?.throwIfAborted();let l=c-s();if(l<=0)return{state:`timed-out`};let u=await fetchSlackWorkspace({deps:e,projectRoot:t,connectorId:n,orgId:r,onOutput:i,timeoutMs:Math.min(CONNECT_LOOKUP_TIMEOUT_MS,l),signal:a});if(a?.throwIfAborted(),u.state!==`pending`)return u;let d=c-s();if(d<=0)return{state:`timed-out`};await o(Math.min(3e3,d),a)}}function isAbortFromSignal(e,t){return t?.aborted===!0&&(e===t.reason||e instanceof Error&&e.name===`AbortError`)}function cleanupFailureResult(e){return{state:`cleanup-failed`,connectorUids:e.connectorUids}}function openSlackInstall(e,t,n){if(n===void 0){e.info(`Run \`vercel connect open ${t.uid}\` to install it in a Slack workspace.`);return}let r=randomBytes(37).toString(`base64url`),i=new URL(`https://vercel.com/api/v1/connect/install/${encodeURIComponent(t.id)}`);i.searchParams.set(`teamId`,n),i.searchParams.set(`request_code`,createHash(`sha256`).update(r).digest(`base64url`)),e.info(`Install \`${t.uid}\` in a Slack workspace: ${i.href}`),openUrl(i.href)}function renamedConnectorMessage(e,t,n){let r=n.find(t=>t.uid===`slack/${e}`);if(r===void 0)return`A Slack connector named \`slack/${e}\` already exists, so eve will name the new one \`slack/${t}\`.`;let i=r.otherProjects.map(e=>e.name??e.id);return`\`slack/${e}\` is already used by ${i.length===1?`another project`:`other projects`} (${i.join(`, `)}), so eve will create \`slack/${t}\` for this project.`}function connectorInUseMessage(e){let t=e.otherProjects.map(e=>e.name??e.id).join(`, `);return`\`${e.uid}\` is used by ${t}. eve does not add a second agent to one Slack app because both would respond to the same events. Create a new Slack app for this agent instead.`}async function runAttempt(e){let{log:t,deps:n,projectRoot:r,projectId:i,orgId:a,onOutput:o,signal:s,phase:c}=e,l,u,d,f,p=[],m=e.source.state===`new`;if(e.source.state===`existing`){let{candidate:h}=e.source;if(l={uid:h.uid,id:h.id},u=h.workspace,u===void 0){openSlackInstall(t,l,a);let e=await c(`Waiting for the Slack workspace install...`,()=>pollSlackWorkspace(n,r,l.id,a,o,s));if(e.state===`timed-out`)return{state:`timed-out`,ref:l};if(e.state===`failed`)return{state:`failed`,ref:l,message:e.message};u=e.workspace,m=!0}let g=await refreshSlackCandidate({deps:n,projectRoot:r,candidate:h,projectId:i,orgId:a,onOutput:o,signal:s});if(s?.throwIfAborted(),g.state===`failed`)return{state:`attach-failed`,ref:l,message:g.message};if(!isReusableSlackConnector(g.candidate))return{state:`in-use`,ref:l,projects:g.candidate.otherProjects};d=g.candidate.attached,f=g.candidate.triggerDestinations,p=g.candidate.otherProjects,u??=g.candidate.workspace}else{let i=await createSlackConnector({deps:n,projectRoot:r,orgId:a,slug:e.source.name,onOutput:o,signal:s,phase:c,onCreated:t=>{e.trace.createdRef=t},waitForWorkspace:async(e,t)=>{let i=await pollSlackWorkspace(n,r,e.id,a,o,t);return i.state===`connected`?i.workspace:void 0}});if(i.state===`failed`)return e.trace.rejected=i.rejected,i.detail===void 0?{state:`create-failed`}:{state:`create-failed`,detail:i.detail};if(i.state===`unresolved`)return t.warning(`Vercel did not return an exact Slack connector UID for this request, so eve cannot attach or remove it safely.`),{state:`unresolved`};l=i.ref,i.via===`workspace`&&(u=i.workspace),d=!0;let p=await fetchSlackConnectorDetails({deps:n,projectRoot:r,connectorId:l.id,orgId:a,onOutput:o,timeoutMs:CONNECT_LOOKUP_TIMEOUT_MS,signal:s});if(s?.throwIfAborted(),p.state===`failed`)return{state:`attach-failed`,ref:l,message:p.message};f=p.details.triggerDestinations,u??=p.details.workspace}let h=planSlackRouting({attached:d,destinations:f,projectId:i,route:SLACK_CHANNEL_DEFAULT_ROUTE});if(h.kind===`limit-reached`){let e=new Map(p.map(e=>[e.id,e.name??e.id]));return e.set(i,`this project`),{state:`limit-reached`,ref:l,destinations:h.destinations,description:describeSlackDestinations(h.destinations,e)}}if(h.attach||h.destinations!==void 0){let e=await c(`Configuring Slack event delivery for this agent...`,()=>applySlackRouting({deps:n,projectRoot:r,ref:l,plan:h,orgId:a,onOutput:o,signal:s}));if(s?.throwIfAborted(),e.state===`attach-failed`)return{state:`attach-failed`,ref:l,message:e.message};m=!0}return u===void 0?{state:`attached`,ref:l,changed:m}:{state:`attached`,ref:l,workspace:u,changed:m}}async function raceAttemptAgainstChoice(e){let t=new AbortController,n=e.outerSignal?AbortSignal.any([e.outerSignal,t.signal]):t.signal,r=e.run(n);try{let i=await Promise.race([r.then(e=>({via:`work`,outcome:e})),e.prompt.choice.then(e=>({via:`choice`,choice:e}))]);if(i.via===`work`)return i;t.abort();let a;try{a=await r}catch(e){if(!isAbortFromSignal(e,n))throw e}return{via:`choice`,choice:i.choice,settled:a}}catch(e){t.abort();try{await r}catch{}throw e}finally{e.prompt.close()}}async function inspectSlackbotConnectors(e,t,n,r={},i=defaultDeps){let a=await(i.readProjectLink??readProjectLink)(t);if(a?.projectId===void 0)throw Error("Slack setup with Vercel Connect needs a linked Vercel project to tell which Slack connectors belong to it, so eve did not create one. Run `vercel link`, then try again.");let{projectId:o,orgId:s}=a,{channelConnectorUid:c}=r,l=`slack/${n}`,u=new Set([l]);c!==void 0&&u.add(c);let d=await withPhase(e,`Checking existing Slack connectors...`,()=>inspectSlackConnectors({deps:i,projectRoot:t,projectId:o,orgId:s,namedUids:u,onOutput:createPromptCommandOutput(e),signal:r.signal}));if(d.state===`failed`)throw Error(`Could not inspect existing Slack connectors, so eve did not create another one. ${d.message}`);return{projectId:o,orgId:s,slug:n,...orderSlackConnectorCandidates(d.candidates.filter(isReusableSlackConnector),{expectedUid:l,channelConnectorUid:c}),inUse:d.candidates.filter(e=>!isReusableSlackConnector(e))}}async function provisionSlackbot(e,t,n,r,i=defaultDeps,a={}){a.signal?.throwIfAborted();let o=createPromptCommandOutput(e),{projectId:s,orgId:c,slug:l}=n,u={log:e,deps:i,projectRoot:t,orgId:c,onOutput:o},findFreeName=async()=>{let n=await findFreeSlackConnectorName({deps:i,projectRoot:t,orgId:c,slug:l,onOutput:o,signal:a.signal});return n.state===`failed`&&e.warning(`Could not pick a name for the new Slack connector. ${n.message}`),n},finishOutcome=async(t,n,r)=>{let i=n.state===`new`;switch(t.state){case`create-failed`:if(i){let e=await r();if(e.state===`failed`)return cleanupFailureResult(e)}return t.detail===void 0?{state:`create-failed`}:{state:`create-failed`,detail:t.detail};case`unresolved`:if(i){let e=await r();if(e.state===`failed`)return cleanupFailureResult(e)}return{state:`create-failed`};case`in-use`:return e.warning(connectorInUseMessage({uid:t.ref.uid,otherProjects:t.projects})),{state:`connector-in-use`,connectorUid:t.ref.uid,projects:t.projects};case`attach-failed`:return e.warning(`Could not register ${SLACK_CHANNEL_DEFAULT_ROUTE} on this project as a trigger destination for \`${t.ref.uid}\`.${t.message===void 0?``:` ${t.message}`} eve kept the connector; re-run \`eve add channel/slack\` to finish event delivery.`),{state:`attach-failed`,connectorUid:t.ref.uid};case`limit-reached`:return e.warning([`\`${t.ref.uid}\` already has ${t.destinations.length} trigger destinations, the most Vercel Connect allows, so eve changed nothing:`,...t.description.map(e=>` - ${e}`),"Remove one in the Connect dashboard, then re-run `eve add channel/slack`."].join(`
|
|
2
|
+
`)),{state:`trigger-limit-reached`,connectorUid:t.ref.uid,destinations:t.destinations};case`attached`:{let e=t.changed?`attached`:`already-configured`;return t.workspace===void 0?{state:e,connectorUid:t.ref.uid}:{state:e,connectorUid:t.ref.uid,chatUrl:t.workspace.workspaceUrl,workspaceName:t.workspace.workspaceName}}case`failed`:return e.warning(`Could not verify the Slack workspace connection. ${t.message}`),{state:`installation-check-failed`,connectorUid:t.ref.uid};case`timed-out`:if(e.warning(`The Slackbot did not connect to a Slack workspace in time.`),i){let e=await r();if(e.state===`failed`)return cleanupFailureResult(e)}return{state:`not-installed`}}},cleanupNewAttempt=async(e,t)=>cleanupCreatedAttempt(u,{expectedUid:`slack/${e.name}`,createdRef:t.createdRef,rejected:t.rejected});function attemptInput(n,r){return{log:e,deps:i,projectRoot:t,projectId:s,orgId:c,source:n,onOutput:o,trace:r}}async function runExistingConnector(t){let cleanupCurrentAttempt=async()=>({state:`clean`}),n=t.candidate.uid,notInstalled=()=>(e.warning(`The Slack connector \`${n}\` is not installed in a Slack workspace yet. Re-run \`eve add channel/slack\` to open its install page again, or choose "Create a new Slack app" instead.`),{state:`existing-not-installed`,connectorUid:n}),finishExistingOutcome=async e=>e.state===`timed-out`?notInstalled():finishOutcome(e,t,cleanupCurrentAttempt);if(a.awaitChoice!==void 0&&t.candidate.workspace===void 0)for(;;){let e=await raceAttemptAgainstChoice({prompt:a.awaitChoice({status:`Waiting for the Slack workspace install...`,context:`Install the Slack app in your browser, then wait while eve verifies it`,actions:[{value:`retry`,label:`Did your browser not open? Try again`},{value:`cancel`,label:`Stop waiting`}]}),outerSignal:a.signal,run:e=>runAttempt({...attemptInput(t,{rejected:!1}),signal:e,phase:(e,t)=>t()})});if(e.via===`work`)return finishExistingOutcome(e.outcome);if(e.settled?.state===`attached`)return finishExistingOutcome(e.settled);if(e.choice!==`retry`)return notInstalled()}return finishExistingOutcome(await runAttempt({...attemptInput(t,{rejected:!1}),signal:a.signal,phase:(t,n)=>withPhase(e,t,n)}))}async function runUncontrolledAttempt(t){let n={rejected:!1},cleanupCurrentAttempt=()=>cleanupNewAttempt(t,n),r=runAttempt({...attemptInput(t,n),signal:a.signal,phase:(t,n)=>withPhase(e,t,n)});try{return await finishOutcome(await r,t,cleanupCurrentAttempt)}catch(e){throw a.signal?.aborted===!0&&await cleanupCurrentAttempt(),e}}async function runInteractiveAttempt(t,n){let r={rejected:!1},cleanupCurrentAttempt=()=>cleanupNewAttempt(t,r),i=n({status:`Waiting for Slack setup to finish...`,context:`Complete setup in the browser, then wait while eve verifies the connection`,actions:[{value:`retry`,label:`Did your browser not open? Try again`},{value:`cancel`,label:`Cancel`}]}),o;try{o=await raceAttemptAgainstChoice({prompt:i,outerSignal:a.signal,run:n=>runAttempt({...attemptInput(t,r),signal:n,phase:e.spinner===void 0?(e,t)=>t():(t,n)=>withPhase(e,t,n)})})}catch(e){throw await cleanupCurrentAttempt(),e}if(o.via===`work`)return{state:`finished`,result:await finishOutcome(o.outcome,t,cleanupCurrentAttempt)};if(o.settled?.state===`attached`)return{state:`finished`,result:await finishOutcome(o.settled,t,cleanupCurrentAttempt)};let s=await cleanupCurrentAttempt();if(s.state===`failed`)return{state:`finished`,result:cleanupFailureResult(s)};if(o.choice===`retry`){let t=await withPhase(e,`Checking existing Slack connectors...`,()=>findFreeName());return a.signal?.throwIfAborted(),t.state===`failed`?{state:`finished`,result:{state:`connector-lookup-failed`}}:{state:`retry`,source:{state:`new`,name:t.name}}}return{state:`finished`,result:{state:`cancelled`}}}if(r!==`create`)return runExistingConnector({state:`existing`,candidate:r});let d=await findFreeName();if(a.signal?.throwIfAborted(),d.state===`failed`)return{state:`connector-lookup-failed`};d.name!==l&&e.info(renamedConnectorMessage(l,d.name,n.inUse));let f={state:`new`,name:d.name};if(a.awaitChoice===void 0)return runUncontrolledAttempt(f);for(;;){let e=await runInteractiveAttempt(f,a.awaitChoice);if(e.state===`finished`)return e.result;f=e.source}}async function reconcileSlackUid(e,t,n,r){if(n.state!==`attached`&&n.state!==`already-configured`||n.connectorUid===r)return!0;let i=join(t,`agent/channels/slack.ts`),{patched:a}=await updateSlackChannelConnectorUid(i,n.connectorUid);return a?!0:(e.warning(`Could not patch agent/channels/slack.ts automatically. Update \`connectSlackCredentials("...")\` to \`"${n.connectorUid}"\` and run \`vercel deploy --prod\`.`),!1)}export{connectorInUseMessage,inspectSlackbotConnectors,provisionSlackbot,reconcileSlackUid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readProjectLink}from"./project-resolution.js";import{resolveVercelHostFrameworkPreset}from"./scaffold/update/channels.js";import"./scaffold/index.js";import{isForbiddenApiFailure,normalizeVercelApiResult}from"./vercel-api-failure.js";import{VERCEL_PROJECT_REQUEST_TIMEOUT_MS,parseVercelJson,requireVercelTeamAccess}from"./vercel-project-api.js";import*as fs from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{extname,join}from"node:path";import{captureVercel}from"#setup/primitives/index.js";import"#setup/cli/index.js";const VercelProjectFrameworkSchema=z.object({framework:z.string().min(1).nullish()}),EVE_FRAMEWORK_INTEGRATIONS={nextjs:{label:`Next.js`,importSpecifier:`eve/next`},nuxt:{label:`Nuxt`,importSpecifier:`eve/nuxt`},nuxtjs:{label:`Nuxt`,importSpecifier:`eve/nuxt`},sveltekit:{label:`SvelteKit`,importSpecifier:`eve/sveltekit`}},FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS=new Set([`.cjs`,`.cts`,`.js`,`.json`,`.jsx`,`.mjs`,`.mts`,`.svelte`,`.ts`,`.tsx`,`.vue`]),FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES=new Set([`.eve`,`.git`,`.next`,`.nuxt`,`.output`,`.svelte-kit`,`.turbo`,`.vercel`,`build`,`coverage`,`dist`,`node_modules`]);function parseProjectFramework(e,t){let n=VercelProjectFrameworkSchema.safeParse(parseVercelJson(e,t));if(!n.success)throw Error(`Could not read Vercel project framework from ${t}.`);return n.data.framework??void 0}async function fetchProjectFramework(e,t,n,r){let i=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${n}`,`--scope`,t,`--raw`],{cwd:e,signal:r.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(i.ok)return parseProjectFramework(i.stdout,`project ${n}`);throw isForbiddenApiFailure(i.failure)&&requireVercelTeamAccess(i.failure),Error(`Could not inspect Vercel project "${n}". ${i.failure.message}`)}async function setProjectFramework(e,t,n,r,i,a){let o=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${n}`,`--scope`,t,`--method`,`PATCH`,`--raw-field`,`framework=${r}`,`--raw`],{cwd:e,onOutput:i,signal:a.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(!o.ok)throw isForbiddenApiFailure(o.failure)&&requireVercelTeamAccess(o.failure),Error(`Could not set Vercel project "${n}" framework to ${r}. ${o.failure.message}`)}async function confirmDetectedFramework(e,t,n){return await e.select({message:`Vercel detected ${n.label}. Is this project using ${n.importSpecifier}?`,options:[{value:!0,label:`Yes, keep ${t}`,hint:`Use this for a host app that integrates eve through ${n.importSpecifier}.`},{value:!1,label:`No, switch to eve`,hint:`Use this for a standalone eve agent.`}]})?`keep`:`switch-to-eve`}function sourceMentionsPackageSpecifier(e,t){return e.includes(`"${t}"`)||e.includes(`'${t}'`)||e.includes(`\`${t}\``)}async function directoryContainsPackageSpecifier(e,t){let n;try{n=await fs.readdir(e,{encoding:`utf8`,withFileTypes:!0})}catch{return!1}for(let r of n){let n=join(e,r.name);if(r.isDirectory()){if(FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES.has(r.name))continue;if(await directoryContainsPackageSpecifier(n,t))return!0;continue}if(r.isFile()&&FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS.has(extname(r.name)))try{if(sourceMentionsPackageSpecifier(await fs.readFile(n,`utf8`),t))return!0}catch{continue}}return!1}async function detectFrameworkIntegrationImport(e,t){return directoryContainsPackageSpecifier(e,t)}async function resolveDetectedFrameworkAction(e,t,n,r){let i=EVE_FRAMEWORK_INTEGRATIONS[n];return i===void 0?`switch-to-eve`:await(r.detectFrameworkIntegrationImport??detectFrameworkIntegrationImport)(t,i.importSpecifier)?`keep`:r.headless?`switch-to-eve`:confirmDetectedFramework(e,n,i)}function frameworkPresetLabel(e){return EVE_FRAMEWORK_INTEGRATIONS[e]?.label??e}function describeError(e){return e instanceof Error?e.message:String(e)}async function syncHostFrameworkPreset(e,t,n,r){let i=await resolveVercelHostFrameworkPreset(t);if(i===void 0)return;let a=await readProjectLink(t);if(a===void 0)return;let o=frameworkPresetLabel(i),s;try{s=await fetchProjectFramework(t,a.orgId,a.projectId,r)}catch(t){if(r.signal?.aborted)throw t;e.log.warning(`Could not check this Vercel project's Framework Preset (${describeError(t)}). If it is not already ${o}, set it under Project Settings → Build and Deployment → Framework Settings before deploying.`);return}if(s===i)return;let c=s===void 0?void 0:frameworkPresetLabel(s),l=c===void 0?`had no Framework Preset set`:`was set to "${c}"`;try{await setProjectFramework(t,a.orgId,a.projectId,i,n,r)}catch(t){if(r.signal?.aborted)throw t;e.log.warning(`${describeError(t)} Set this Vercel project's Framework Preset to ${o} (Project Settings → Build and Deployment → Framework Settings) before deploying, or the deployment will not build your ${o} app.`);return}e.log.info(`This project uses ${o}, but its Vercel Framework Preset ${l}; switched it to ${o} so the deployment builds your app.`)}async function ensureCreatedProjectFramework(e,t,n,r,i,a){let o=await fetchProjectFramework(t,n,r,a);if(await resolveVercelHostFrameworkPreset(t)===`services`){o!==`services`&&await setProjectFramework(t,n,r,`services`,i,a);return}o!==`eve`&&(o===void 0?`switch-to-eve`:await resolveDetectedFrameworkAction(e,t,o,a))===`switch-to-eve`&&await setProjectFramework(t,n,r,`eve`,i,a)}export{ensureCreatedProjectFramework,syncHostFrameworkPreset};
|
|
1
|
+
import{readProjectLink}from"./project-resolution.js";import{resolveVercelHostFrameworkPreset}from"./scaffold/update/channels.js";import"./scaffold/index.js";import{isForbiddenApiFailure,normalizeVercelApiResult}from"./vercel-api-failure.js";import{VERCEL_PROJECT_REQUEST_TIMEOUT_MS,parseVercelJson,requireVercelTeamAccess}from"./vercel-project-api.js";import*as fs from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{extname,join}from"node:path";import{captureVercel}from"#setup/primitives/index.js";import"#setup/cli/index.js";const VercelProjectFrameworkSchema=z.object({framework:z.string().min(1).nullish()}),EVE_FRAMEWORK_INTEGRATIONS={nextjs:{label:`Next.js`,importSpecifier:`eve/next`},nuxt:{label:`Nuxt`,importSpecifier:`eve/nuxt`},nuxtjs:{label:`Nuxt`,importSpecifier:`eve/nuxt`},sveltekit:{label:`SvelteKit`,importSpecifier:`eve/sveltekit`},"tanstack-start":{label:`TanStack Start`,importSpecifier:`eve/tanstack`}},FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS=new Set([`.cjs`,`.cts`,`.js`,`.json`,`.jsx`,`.mjs`,`.mts`,`.svelte`,`.ts`,`.tsx`,`.vue`]),FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES=new Set([`.eve`,`.git`,`.next`,`.nuxt`,`.output`,`.svelte-kit`,`.tanstack`,`.turbo`,`.vercel`,`build`,`coverage`,`dist`,`node_modules`]);function parseProjectFramework(e,t){let n=VercelProjectFrameworkSchema.safeParse(parseVercelJson(e,t));if(!n.success)throw Error(`Could not read Vercel project framework from ${t}.`);return n.data.framework??void 0}async function fetchProjectFramework(e,t,n,r){let i=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${n}`,`--scope`,t,`--raw`],{cwd:e,signal:r.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(i.ok)return parseProjectFramework(i.stdout,`project ${n}`);throw isForbiddenApiFailure(i.failure)&&requireVercelTeamAccess(i.failure),Error(`Could not inspect Vercel project "${n}". ${i.failure.message}`)}async function setProjectFramework(e,t,n,r,i,a){let o=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${n}`,`--scope`,t,`--method`,`PATCH`,`--raw-field`,`framework=${r}`,`--raw`],{cwd:e,onOutput:i,signal:a.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(!o.ok)throw isForbiddenApiFailure(o.failure)&&requireVercelTeamAccess(o.failure),Error(`Could not set Vercel project "${n}" framework to ${r}. ${o.failure.message}`)}async function confirmDetectedFramework(e,t,n){return await e.select({message:`Vercel detected ${n.label}. Is this project using ${n.importSpecifier}?`,options:[{value:!0,label:`Yes, keep ${t}`,hint:`Use this for a host app that integrates eve through ${n.importSpecifier}.`},{value:!1,label:`No, switch to eve`,hint:`Use this for a standalone eve agent.`}]})?`keep`:`switch-to-eve`}function sourceMentionsPackageSpecifier(e,t){return e.includes(`"${t}"`)||e.includes(`'${t}'`)||e.includes(`\`${t}\``)}async function directoryContainsPackageSpecifier(e,t){let n;try{n=await fs.readdir(e,{encoding:`utf8`,withFileTypes:!0})}catch{return!1}for(let r of n){let n=join(e,r.name);if(r.isDirectory()){if(FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES.has(r.name))continue;if(await directoryContainsPackageSpecifier(n,t))return!0;continue}if(r.isFile()&&FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS.has(extname(r.name)))try{if(sourceMentionsPackageSpecifier(await fs.readFile(n,`utf8`),t))return!0}catch{continue}}return!1}async function detectFrameworkIntegrationImport(e,t){return directoryContainsPackageSpecifier(e,t)}async function resolveDetectedFrameworkAction(e,t,n,r){let i=EVE_FRAMEWORK_INTEGRATIONS[n];return i===void 0?`switch-to-eve`:await(r.detectFrameworkIntegrationImport??detectFrameworkIntegrationImport)(t,i.importSpecifier)?`keep`:r.headless?`switch-to-eve`:confirmDetectedFramework(e,n,i)}function frameworkPresetLabel(e){return EVE_FRAMEWORK_INTEGRATIONS[e]?.label??e}function describeError(e){return e instanceof Error?e.message:String(e)}async function syncHostFrameworkPreset(e,t,n,r){let i=await resolveVercelHostFrameworkPreset(t);if(i===void 0)return;let a=await readProjectLink(t);if(a===void 0)return;let o=frameworkPresetLabel(i),s;try{s=await fetchProjectFramework(t,a.orgId,a.projectId,r)}catch(t){if(r.signal?.aborted)throw t;e.log.warning(`Could not check this Vercel project's Framework Preset (${describeError(t)}). If it is not already ${o}, set it under Project Settings → Build and Deployment → Framework Settings before deploying.`);return}if(s===i)return;let c=s===void 0?void 0:frameworkPresetLabel(s),l=c===void 0?`had no Framework Preset set`:`was set to "${c}"`;try{await setProjectFramework(t,a.orgId,a.projectId,i,n,r)}catch(t){if(r.signal?.aborted)throw t;e.log.warning(`${describeError(t)} Set this Vercel project's Framework Preset to ${o} (Project Settings → Build and Deployment → Framework Settings) before deploying, or the deployment will not build your ${o} app.`);return}e.log.info(`This project uses ${o}, but its Vercel Framework Preset ${l}; switched it to ${o} so the deployment builds your app.`)}async function ensureCreatedProjectFramework(e,t,n,r,i,a){let o=await fetchProjectFramework(t,n,r,a);if(await resolveVercelHostFrameworkPreset(t)===`services`){o!==`services`&&await setProjectFramework(t,n,r,`services`,i,a);return}o!==`eve`&&(o===void 0?`switch-to-eve`:await resolveDetectedFrameworkAction(e,t,o,a))===`switch-to-eve`&&await setProjectFramework(t,n,r,`eve`,i,a)}export{ensureCreatedProjectFramework,syncHostFrameworkPreset};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActionPresentationByCallId } from "#protocol/message.js";
|
|
2
|
+
import type { RuntimeActionRequest } from "#shared/action-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* How a call reads to people on every surface: the label its entry's definition
|
|
5
|
+
* gives it, or the entry's display title. A call made through `eve__tool` or
|
|
6
|
+
* `eve__skill` arrives as the call to its entry, so it reads like a direct call.
|
|
7
|
+
*/
|
|
8
|
+
export declare function actionLabel(action: RuntimeActionRequest, presentation: ActionPresentationByCallId | undefined): string;
|
|
9
|
+
/** The calls people see: the model waiting on or stopping its own tasks stays out of view. */
|
|
10
|
+
export declare function visibleActions<T extends RuntimeActionRequest>(actions: readonly T[]): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{actionRequestName}from"#shared/action-request-name.js";import{displayTitle}from"#shared/display-name.js";import{isTaskControlTool}from"#protocol/task-tools.js";function actionLabel(e,t){return t?.[e.callId]?.label??displayTitle(actionRequestName(e))}function visibleActions(e){return e.filter(e=>!(e.kind===`tool-call`&&isTaskControlTool(e.toolName)))}export{actionLabel,visibleActions};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { RuntimeActionRequest } from "#shared/action-types.js";
|
|
2
|
-
/** The tool, agent, or
|
|
2
|
+
/** The tool, agent, or skill a request targets. */
|
|
3
3
|
export declare function actionRequestName(action: RuntimeActionRequest): string;
|
|
4
|
+
/** The skill an `eve__skill` input names, if it names one. */
|
|
5
|
+
export declare function skillTarget(input: unknown): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function actionRequestName(e){switch(e.kind){case`load-skill`:return
|
|
1
|
+
import{isObject}from"#shared/guards.js";function actionRequestName(e){switch(e.kind){case`load-skill`:return e.name;case`subagent-call`:return e.subagentName;case`remote-agent-call`:return e.remoteAgentName;case`tool-call`:case`workflow-tool-call`:return e.toolName}}function skillTarget(e){return isObject(e)&&typeof e.name==`string`?e.name:void 0}export{actionRequestName,skillTarget};
|
|
@@ -13,7 +13,6 @@ export declare const runtimeToolCallActionRequestSchema: z.ZodObject<{
|
|
|
13
13
|
callId: z.ZodString;
|
|
14
14
|
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
15
15
|
kind: z.ZodLiteral<"tool-call">;
|
|
16
|
-
parentCallId: z.ZodOptional<z.ZodString>;
|
|
17
16
|
toolName: z.ZodString;
|
|
18
17
|
}, z.core.$strict>;
|
|
19
18
|
export type RuntimeSubagentCallActionRequest = z.infer<typeof runtimeSubagentCallActionRequestSchema>;
|
|
@@ -87,7 +86,7 @@ export type WorkflowToolRunEntry = Exclude<WorkflowToolCallEntry, {
|
|
|
87
86
|
readonly entryPoint: "receive";
|
|
88
87
|
}>;
|
|
89
88
|
/**
|
|
90
|
-
* How a
|
|
89
|
+
* How a workflow tool call enters its tool's workflow: through the entry point of
|
|
91
90
|
* a new run, or, for a call with `taskId` to a `serve` tool, through the
|
|
92
91
|
* `receive()` of the running task that id names.
|
|
93
92
|
*/
|
|
@@ -139,12 +138,14 @@ export declare const runtimeWorkflowTaskRequestSchema: z.ZodObject<{
|
|
|
139
138
|
*/
|
|
140
139
|
type RuntimeLoadSkillActionRequest = z.infer<typeof runtimeLoadSkillActionRequestSchema>;
|
|
141
140
|
/**
|
|
142
|
-
* Zod schema for one Eve-owned `load-skill` action request
|
|
141
|
+
* Zod schema for one Eve-owned `load-skill` action request: the model's
|
|
142
|
+
* `eve__skill` call, named for the skill it loads.
|
|
143
143
|
*/
|
|
144
144
|
declare const runtimeLoadSkillActionRequestSchema: z.ZodObject<{
|
|
145
145
|
callId: z.ZodString;
|
|
146
146
|
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
147
147
|
kind: z.ZodLiteral<"load-skill">;
|
|
148
|
+
name: z.ZodString;
|
|
148
149
|
}, z.core.$strict>;
|
|
149
150
|
/**
|
|
150
151
|
* Eve-owned action request surfaced by the harness.
|
|
@@ -234,17 +235,15 @@ export type RuntimeSubagentResult = RuntimeSubagentChildResult | RuntimeSubagent
|
|
|
234
235
|
*/
|
|
235
236
|
type RuntimeLoadSkillActionResult = z.infer<typeof runtimeLoadSkillActionResultSchema>;
|
|
236
237
|
/**
|
|
237
|
-
* Zod schema for one runtime-owned load-skill action result
|
|
238
|
-
*
|
|
239
|
-
* The result still reports whether a skill became active during the turn; the
|
|
240
|
-
* action name reflects how the model requests those instructions.
|
|
238
|
+
* Zod schema for one runtime-owned load-skill action result, named for the
|
|
239
|
+
* skill its `load-skill` request loads.
|
|
241
240
|
*/
|
|
242
241
|
declare const runtimeLoadSkillActionResultSchema: z.ZodObject<{
|
|
243
242
|
callId: z.ZodString;
|
|
244
243
|
isError: z.ZodOptional<z.ZodBoolean>;
|
|
245
244
|
kind: z.ZodLiteral<"load-skill-result">;
|
|
245
|
+
name: z.ZodString;
|
|
246
246
|
output: z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>;
|
|
247
|
-
name: z.ZodOptional<z.ZodString>;
|
|
248
247
|
}, z.core.$strict>;
|
|
249
248
|
/**
|
|
250
249
|
* Runtime-owned action result produced by framework-owned runtime code.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{jsonObjectSchema,jsonValueSchema}from"#shared/json-schemas.js";const runtimeToolCallActionRequestSchema=z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`tool-call`),
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{jsonObjectSchema,jsonValueSchema}from"#shared/json-schemas.js";const runtimeToolCallActionRequestSchema=z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`tool-call`),toolName:z.string()}).strict();z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`subagent-call`),name:z.string(),nodeId:z.string(),subagentName:z.string()}).strict(),z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`remote-agent-call`),name:z.string(),nodeId:z.string(),remoteAgentName:z.string()}).strict(),z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`workflow-tool-call`),toolName:z.string(),workflowId:z.string()}).strict(),z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`subagent-call`),name:z.string(),nodeId:z.string(),subagentName:z.string()}).strict();const runtimeRemoteAgentDispatchRequestSchema=z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`remote-agent-call`),name:z.string(),nodeId:z.string(),remoteAgentName:z.string()}).strict(),workflowToolCallEntrySchema=z.discriminatedUnion(`entryPoint`,[z.object({entryPoint:z.literal(`execute`)}).strict(),z.object({entryPoint:z.literal(`task`),taskId:z.string()}).strict(),z.object({entryPoint:z.literal(`serve`),taskId:z.string()}).strict(),z.object({entryPoint:z.literal(`receive`),taskId:z.string()}).strict()]),runtimeWorkflowTaskRequestSchema=z.object({callId:z.string(),entry:workflowToolCallEntrySchema,executeInput:jsonValueSchema.optional(),input:jsonObjectSchema,kind:z.literal(`workflow-task`),toolName:z.string(),workflowId:z.string()}).strict();z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`load-skill`),name:z.string()}).strict();const RUNTIME_WORKFLOW_TOOL_ACTION=Symbol.for(`eve:runtime-workflow-tool-action`);function markRuntimeWorkflowToolAction(e){return Object.defineProperty(e,RUNTIME_WORKFLOW_TOOL_ACTION,{value:!0}),e}function isRuntimeWorkflowToolAction(e){return e.kind===`workflow-tool-call`||e.kind===`tool-call`&&Reflect.get(e,RUNTIME_WORKFLOW_TOOL_ACTION)===!0}z.object({callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`tool-result`),output:jsonValueSchema,toolName:z.string()}).strict(),z.object({callId:z.string(),isError:z.literal(!0),kind:z.literal(`subagent-result`),origin:z.literal(`dispatch`),output:jsonValueSchema,subagentName:z.string()}).strict(),z.object({callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`load-skill-result`),name:z.string(),output:jsonValueSchema}).strict();export{isRuntimeWorkflowToolAction,markRuntimeWorkflowToolAction,runtimeRemoteAgentDispatchRequestSchema,runtimeToolCallActionRequestSchema,runtimeWorkflowTaskRequestSchema};
|
|
@@ -8,7 +8,31 @@ import { type DynamicResolveContext, type DynamicSentinel } from "#dynamic/defin
|
|
|
8
8
|
*/
|
|
9
9
|
export interface AgentModelOptionsDefinition {
|
|
10
10
|
readonly providerOptions?: Record<string, JsonObject>;
|
|
11
|
+
/** Prompt-cache breakpoints eve places for this model. */
|
|
12
|
+
readonly promptCache?: AgentPromptCacheDefinition;
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Prompt-cache breakpoints eve places for a model it calls directly. AI Gateway models cache
|
|
16
|
+
* through `providerOptions.gateway.caching` instead and reject this option.
|
|
17
|
+
*/
|
|
18
|
+
export interface AgentPromptCacheDefinition {
|
|
19
|
+
/**
|
|
20
|
+
* Places Anthropic cache breakpoints on every call. eve already does this for Anthropic models
|
|
21
|
+
* it recognizes by provider or model id; set it for one it can't, such as a Bedrock application
|
|
22
|
+
* inference profile, or to change the cache lifetime.
|
|
23
|
+
*/
|
|
24
|
+
readonly anthropic?: AgentAnthropicPromptCacheDefinition;
|
|
25
|
+
}
|
|
26
|
+
export interface AgentAnthropicPromptCacheDefinition {
|
|
27
|
+
/**
|
|
28
|
+
* How long each breakpoint's cache entry lives: `"5m"` (the default) or `"1h"`. A 1-hour write
|
|
29
|
+
* costs more than a 5-minute one, so `"1h"` pays off when turns often land between five minutes
|
|
30
|
+
* and an hour apart. Only some Claude models accept a 1-hour TTL.
|
|
31
|
+
*/
|
|
32
|
+
readonly ttl?: AnthropicPromptCacheTtl;
|
|
33
|
+
}
|
|
34
|
+
export type AnthropicPromptCacheTtl = "5m" | "1h";
|
|
35
|
+
export declare const ANTHROPIC_PROMPT_CACHE_TTLS: readonly AnthropicPromptCacheTtl[];
|
|
12
36
|
/**
|
|
13
37
|
* Provider-agnostic reasoning effort forwarded to the AI SDK model call.
|
|
14
38
|
*/
|
|
@@ -45,6 +69,7 @@ export type InternalAgentModelDefinition = {
|
|
|
45
69
|
maxOutputTokens?: number;
|
|
46
70
|
source?: ModuleSourceRef;
|
|
47
71
|
providerOptions?: Record<string, JsonObject>;
|
|
72
|
+
promptCache?: AgentPromptCacheDefinition;
|
|
48
73
|
};
|
|
49
74
|
/**
|
|
50
75
|
* A concrete model handle: an AI Gateway model id string or an AI SDK
|
|
@@ -263,6 +288,12 @@ export interface AgentWorkflowDefinition {
|
|
|
263
288
|
*/
|
|
264
289
|
readonly world?: AgentWorkflowWorldDefinition;
|
|
265
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* How eve exposes an agent to its parent model: `true` as a tool in the
|
|
293
|
+
* model's tool list, `"deferred"` as a catalog entry the model finds with
|
|
294
|
+
* `eve__search` and calls with `eve__tool`, and `false` not at all.
|
|
295
|
+
*/
|
|
296
|
+
export type AgentToolExposure = boolean | "deferred";
|
|
266
297
|
/**
|
|
267
298
|
* Compiled-side agent definition. Carries a `name` because the compiler
|
|
268
299
|
* stamps the path-derived `agentId` onto every compiled agent node.
|
|
@@ -277,7 +308,7 @@ export type InternalAgentDefinition = {
|
|
|
277
308
|
model: InternalAgentModelDefinition;
|
|
278
309
|
reasoning?: AgentReasoningDefinition;
|
|
279
310
|
source?: ModuleSourceRef;
|
|
280
|
-
tool?:
|
|
311
|
+
tool?: AgentToolExposure;
|
|
281
312
|
limits?: AgentLimitsDefinition;
|
|
282
313
|
};
|
|
283
314
|
/**
|
|
@@ -317,13 +348,15 @@ type PublicAgentDefinitionBase = {
|
|
|
317
348
|
*/
|
|
318
349
|
readonly limits?: AgentLimitsDefinition;
|
|
319
350
|
/**
|
|
320
|
-
*
|
|
351
|
+
* How eve exposes this agent to its parent model. `true` lists it as a
|
|
352
|
+
* tool, `"deferred"` makes it a catalog entry the model finds with `eve__search`
|
|
353
|
+
* and calls with `eve__tool`, and `false` hides it from the model. On the root
|
|
321
354
|
* agent, this controls the built-in `agent` tool. Defaults to `true`.
|
|
322
355
|
*
|
|
323
356
|
* A subagent with this set to `false` remains callable through `ctx.agent()`
|
|
324
357
|
* in workflow tools.
|
|
325
358
|
*/
|
|
326
|
-
readonly tool?:
|
|
359
|
+
readonly tool?: AgentToolExposure;
|
|
327
360
|
};
|
|
328
361
|
/**
|
|
329
362
|
* Shared public definition for an agent. Static models may carry definition-level
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isDynamicSentinel}from"#dynamic/definition.js";function isDynamicModelDefinition(e){return isDynamicSentinel(e)}const AGENT_WORKFLOW_RETENTION_VALUES=[0,`default`];export{AGENT_WORKFLOW_RETENTION_VALUES,isDynamicModelDefinition};
|
|
1
|
+
import{isDynamicSentinel}from"#dynamic/definition.js";const ANTHROPIC_PROMPT_CACHE_TTLS=[`5m`,`1h`];function isDynamicModelDefinition(e){return isDynamicSentinel(e)}const AGENT_WORKFLOW_RETENTION_VALUES=[0,`default`];export{AGENT_WORKFLOW_RETENTION_VALUES,ANTHROPIC_PROMPT_CACHE_TTLS,isDynamicModelDefinition};
|
|
@@ -6,3 +6,11 @@ export declare function parseChatGptModelSelection(selection: string): string |
|
|
|
6
6
|
export declare function isChatGptModelRouting(routing: ModelRouting | null | undefined): boolean;
|
|
7
7
|
/** Normalizes the model argument accepted by the public `chatgpt()` helper. */
|
|
8
8
|
export declare function normalizeChatGptModelId(model: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Codex has no `-fast` model slugs: it serves Fast mode as the `priority`
|
|
11
|
+
* service tier on the base model and rejects `gpt-6-luna-fast` outright.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseChatGptFastModelId(modelId: string): {
|
|
14
|
+
slug: string;
|
|
15
|
+
fast: boolean;
|
|
16
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MODEL_HELPERS}from"#shared/model-helper.js";const DEFAULT_CHATGPT_MODEL_ID=MODEL_HELPERS.chatgpt.defaultModel,CHATGPT_MODEL_SELECTION_PREFIX=`chatgpt/`;function parseChatGptModelSelection(e){if(!e.startsWith(`chatgpt/`))return;let t=e.slice(8);return isBareChatGptModelId(t)?t:void 0}function isChatGptModelRouting(e){return e?.kind===`external`&&e.provider===`codex`}function normalizeChatGptModelId(e){let t=e.trim(),n=t.startsWith(`openai/`)?t.slice(7):t;return isBareChatGptModelId(n)?n:void 0}function isBareChatGptModelId(e){return e.length>0&&e===e.trim()&&!e.includes(`/`)}export{CHATGPT_MODEL_SELECTION_PREFIX,DEFAULT_CHATGPT_MODEL_ID,isChatGptModelRouting,normalizeChatGptModelId,parseChatGptModelSelection};
|
|
1
|
+
import{MODEL_HELPERS}from"#shared/model-helper.js";const DEFAULT_CHATGPT_MODEL_ID=MODEL_HELPERS.chatgpt.defaultModel,CHATGPT_MODEL_SELECTION_PREFIX=`chatgpt/`;function parseChatGptModelSelection(e){if(!e.startsWith(`chatgpt/`))return;let t=e.slice(8);return isBareChatGptModelId(t)?t:void 0}function isChatGptModelRouting(e){return e?.kind===`external`&&e.provider===`codex`}function normalizeChatGptModelId(e){let t=e.trim(),n=t.startsWith(`openai/`)?t.slice(7):t;return isBareChatGptModelId(n)?n:void 0}function parseChatGptFastModelId(e){let t=e.replace(/-fast$/u,``);return{slug:t,fast:t!==e}}function isBareChatGptModelId(e){return e.length>0&&e===e.trim()&&!e.includes(`/`)}export{CHATGPT_MODEL_SELECTION_PREFIX,DEFAULT_CHATGPT_MODEL_ID,isChatGptModelRouting,normalizeChatGptModelId,parseChatGptFastModelId,parseChatGptModelSelection};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Development env files, from highest to lowest precedence. */
|
|
2
|
+
export declare const DEVELOPMENT_ENV_FILE_NAMES: readonly [".env.development.local", ".env.local", ".env.development", ".env"];
|
|
3
|
+
/** Merged values of the development env files in `environmentRoot`, by precedence. */
|
|
4
|
+
export declare function readDevelopmentEnvironmentValues(environmentRoot: string): Map<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{readFileSync}from"node:fs";import{join}from"node:path";import{parseEnv}from"node:util";const DEVELOPMENT_ENV_FILE_NAMES=[`.env.development.local`,`.env.local`,`.env.development`,`.env`];function isMissingEnvironmentFileError(e){return isObject(e)&&e.code===`ENOENT`}function readDevelopmentEnvironmentValues(e){let t=new Map;for(let n of[...DEVELOPMENT_ENV_FILE_NAMES].reverse())try{let r=parseEnv(readFileSync(join(e,n),`utf8`));for(let[e,n]of Object.entries(r))n!==void 0&&t.set(e,n)}catch(e){if(!isMissingEnvironmentFileError(e))throw e}return t}export{DEVELOPMENT_ENV_FILE_NAMES,readDevelopmentEnvironmentValues};
|
|
@@ -37,7 +37,6 @@ export declare const inputRequestSchema: z.ZodObject<{
|
|
|
37
37
|
callId: z.ZodString;
|
|
38
38
|
input: z.ZodType<import("./json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./json.ts").JsonObject, unknown>>;
|
|
39
39
|
kind: z.ZodLiteral<"tool-call">;
|
|
40
|
-
parentCallId: z.ZodOptional<z.ZodString>;
|
|
41
40
|
toolName: z.ZodString;
|
|
42
41
|
}, z.core.$strict>;
|
|
43
42
|
allowFreeform: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function mapWithConcurrency(e,t,n){let r=Array.from({length:e.length}),i=0;return await Promise.all(Array.from({length:Math.min(t,e.length)},async()=>{for(;i<e.length;){let t=i;i+=1,r[t]=await n(e[t])}})),r}export{mapWithConcurrency};
|
|
@@ -8,6 +8,12 @@ export type SkillFileContent = string | Uint8Array;
|
|
|
8
8
|
* resolvers.
|
|
9
9
|
*/
|
|
10
10
|
export interface SkillPackageDefinition {
|
|
11
|
+
/**
|
|
12
|
+
* Keeps this skill out of the system prompt and the dynamic skill
|
|
13
|
+
* announcement. The model finds it with `eve__search` and loads it with
|
|
14
|
+
* `eve__skill({ name })`. Defaults to `false`.
|
|
15
|
+
*/
|
|
16
|
+
readonly deferred?: boolean;
|
|
11
17
|
readonly description: string;
|
|
12
18
|
readonly license?: string;
|
|
13
19
|
readonly markdown: string;
|
|
@@ -6,6 +6,7 @@ export interface NormalizedSkillPackageFile {
|
|
|
6
6
|
readonly relativePath: string;
|
|
7
7
|
}
|
|
8
8
|
export interface MaterializableSkillPackage {
|
|
9
|
+
readonly deferred?: boolean;
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly files: readonly NormalizedSkillPackageFile[];
|
|
11
12
|
readonly license?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{dirname,join}from"node:path";import{resolveSandboxSkillRoot,resolveSandboxSkillWritePath}from"#shared/skill-paths.js";import{Buffer}from"node:buffer";function stripSkillFrontmatter(e){return e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,``)}function skillPackageRevision(e){let t=createHash(`sha256`);for(let n of e.files)t.update(`${n.relativePath}\0${n.content.byteLength}\0`).update(n.content);return t.digest(`hex`)}function normalizeSkillPackage(e){assertSafeSkillPackageName(e.name);let t=[{content:Buffer.from(e.markdown,`utf8`),relativePath:`SKILL.md`}];for(let[n,r]of Object.entries(e.files??{}))assertSafeSkillPackageFilePath(n),t.push({content:contentToBuffer(r),relativePath:n});return t.sort((e,t)=>comparePaths(e.relativePath,t.relativePath)),{description:e.description,files:t,license:e.license,markdown:e.markdown,metadata:e.metadata===void 0?void 0:{...e.metadata},name:e.name}}async function writeSkillPackageDirectory(e){for(let t of e.skill.files){let n=join(e.rootPath,`skills`,e.skill.name,t.relativePath);await mkdir(dirname(n),{recursive:!0}),await writeFile(n,t.content)}}async function writeSkillPackageToSandbox(e){for(let t of e.skill.files)await e.sandbox.writeBinaryFile({content:t.content,path:await resolveSandboxSkillWritePath({name:e.skill.name,relativePath:t.relativePath,sandbox:e.sandbox})})}async function removeSkillPackageFromSandbox(e){assertSafeSkillPackageName(e.name);let t=await resolveSandboxSkillRoot({sandbox:e.sandbox});await e.sandbox.removePath({force:!0,path:`${t}/${e.name}`,recursive:!0})}function assertSafeSkillPackageName(e){if(e.length===0||e.startsWith(`.`)||e.includes(`/`)||e.includes(`\\`)||e.includes(`..`)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)||/^[A-Za-z]:/.test(e))throw Error(`Expected skill name to be a non-empty shell-safe path segment starting with an alphanumeric character and containing only alphanumerics, ".", "_", or "-".`)}function assertSafeSkillPackageFilePath(e){if(e===`SKILL.md`)throw Error(`Skill package files must not include "SKILL.md"; eve generates it.`);if(e.length===0||e.startsWith(`/`)||e.includes(`\\`)||/^[A-Za-z]:/.test(e)||e.split(`/`).some(e=>e.length===0||e===`.`||e===`..`))throw Error(`Expected skill package file paths to be relative POSIX paths.`)}function contentToBuffer(e){return typeof e==`string`?Buffer.from(e,`utf8`):Buffer.from(e)}function comparePaths(e,t){return e<t?-1:+(e>t)}export{normalizeSkillPackage,removeSkillPackageFromSandbox,skillPackageRevision,stripSkillFrontmatter,writeSkillPackageDirectory,writeSkillPackageToSandbox};
|
|
1
|
+
import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{dirname,join}from"node:path";import{resolveSandboxSkillRoot,resolveSandboxSkillWritePath}from"#shared/skill-paths.js";import{Buffer}from"node:buffer";function stripSkillFrontmatter(e){return e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,``)}function skillPackageRevision(e){let t=createHash(`sha256`);for(let n of e.files)t.update(`${n.relativePath}\0${n.content.byteLength}\0`).update(n.content);return t.digest(`hex`)}function normalizeSkillPackage(e){assertSafeSkillPackageName(e.name);let t=[{content:Buffer.from(e.markdown,`utf8`),relativePath:`SKILL.md`}];for(let[n,r]of Object.entries(e.files??{}))assertSafeSkillPackageFilePath(n),t.push({content:contentToBuffer(r),relativePath:n});return t.sort((e,t)=>comparePaths(e.relativePath,t.relativePath)),{deferred:e.deferred,description:e.description,files:t,license:e.license,markdown:e.markdown,metadata:e.metadata===void 0?void 0:{...e.metadata},name:e.name}}async function writeSkillPackageDirectory(e){for(let t of e.skill.files){let n=join(e.rootPath,`skills`,e.skill.name,t.relativePath);await mkdir(dirname(n),{recursive:!0}),await writeFile(n,t.content)}}async function writeSkillPackageToSandbox(e){for(let t of e.skill.files)await e.sandbox.writeBinaryFile({content:t.content,path:await resolveSandboxSkillWritePath({name:e.skill.name,relativePath:t.relativePath,sandbox:e.sandbox})})}async function removeSkillPackageFromSandbox(e){assertSafeSkillPackageName(e.name);let t=await resolveSandboxSkillRoot({sandbox:e.sandbox});await e.sandbox.removePath({force:!0,path:`${t}/${e.name}`,recursive:!0})}function assertSafeSkillPackageName(e){if(e.length===0||e.startsWith(`.`)||e.includes(`/`)||e.includes(`\\`)||e.includes(`..`)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)||/^[A-Za-z]:/.test(e))throw Error(`Expected skill name to be a non-empty shell-safe path segment starting with an alphanumeric character and containing only alphanumerics, ".", "_", or "-".`)}function assertSafeSkillPackageFilePath(e){if(e===`SKILL.md`)throw Error(`Skill package files must not include "SKILL.md"; eve generates it.`);if(e.length===0||e.startsWith(`/`)||e.includes(`\\`)||/^[A-Za-z]:/.test(e)||e.split(`/`).some(e=>e.length===0||e===`.`||e===`..`))throw Error(`Expected skill package file paths to be relative POSIX paths.`)}function contentToBuffer(e){return typeof e==`string`?Buffer.from(e,`utf8`):Buffer.from(e)}function comparePaths(e,t){return e<t?-1:+(e>t)}export{normalizeSkillPackage,removeSkillPackageFromSandbox,skillPackageRevision,stripSkillFrontmatter,writeSkillPackageDirectory,writeSkillPackageToSandbox};
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
/** Web search providers
|
|
2
|
-
export
|
|
1
|
+
/** Web search providers that AI Gateway runs for any Gateway model. */
|
|
2
|
+
export declare const WEB_SEARCH_FALLBACK_PROVIDERS: readonly ["exa", "parallel", "browserbase"];
|
|
3
|
+
/**
|
|
4
|
+
* Web search providers available through Vercel AI Gateway. `native` is the model vendor's own
|
|
5
|
+
* hosted search, which only some vendors' models have.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WEB_SEARCH_PROVIDERS: readonly ["exa", "parallel", "browserbase", "native"];
|
|
8
|
+
export type WebSearchProvider = (typeof WEB_SEARCH_PROVIDERS)[number];
|
|
9
|
+
export type WebSearchFallbackProvider = (typeof WEB_SEARCH_FALLBACK_PROVIDERS)[number];
|
|
10
|
+
/** The Gateway search an agent selected, and what a model the provider can't serve uses instead. */
|
|
11
|
+
export interface WebSearchSelection {
|
|
12
|
+
readonly provider: WebSearchProvider;
|
|
13
|
+
/** Used when `provider` can't serve the model; without it, that model gets no `web_search`. */
|
|
14
|
+
readonly fallback?: WebSearchFallbackProvider;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
const WEB_SEARCH_FALLBACK_PROVIDERS=[`exa`,`parallel`,`browserbase`],WEB_SEARCH_PROVIDERS=[...WEB_SEARCH_FALLBACK_PROVIDERS,`native`];export{WEB_SEARCH_FALLBACK_PROVIDERS,WEB_SEARCH_PROVIDERS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{inputRequestSchema,inputResponseSchema}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{inputRequestSchema,inputResponseSchema}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{renameLegacyTaskCallback}from"#execution/legacy-remote-agent/protocol.js";import{resumeRunnableHook}from"#execution/session-inbox/owner.js";import{agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";const sessionInputCallbackSchema=z.object({callId:z.string().min(1),childContinuationToken:z.string().min(1),childSessionId:z.string().min(1),childSessionInbox:z.object({sessionId:z.string().min(1)}).strict().optional(),inputSource:z.string().min(1).optional(),remote:z.object({name:z.string().min(1),url:z.string().url(),forwardPrincipal:z.boolean().optional(),sessionId:z.string().min(1),resolverId:z.string().min(1).optional()}).strict().optional(),kind:z.literal(`subagent-input-request`),subagentName:z.string().min(1),event:z.object({requests:z.array(inputRequestSchema).min(1),sequence:z.number(),stepIndex:z.number(),taskId:z.string().optional(),turnId:z.string()})}),sessionAuthorizationCallbackSchema=z.object({callId:z.string().min(1),childSessionId:z.string().min(1),kind:z.literal(`subagent-authorization-event`),subagentName:z.string().min(1),event:z.discriminatedUnion(`type`,[z.object({type:z.literal(`approval.candidate`),data:z.object({candidateId:z.string(),outcome:z.enum([`pending`,`rejected`,`failed`,`timed-out`,`stale`]),requestId:z.string(),responderPrincipalId:z.string(),reason:z.string().optional(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`approval.settled`),data:z.object({outcome:z.enum([`approved`,`cancelled`]),requestId:z.string(),responderPrincipalId:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`input.resolved`),data:z.object({resolutions:z.array(z.object({kind:z.enum([`question`,`session-limit`,`tool-approval`]),outcome:z.enum([`answered`,`approved`,`cancelled`,`denied`,`ignored`,`invalid`]),requestId:z.string(),response:inputResponseSchema.optional()}).passthrough()),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`authorization.required`),data:z.object({description:z.string(),name:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),webhookUrl:z.string().optional(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()}),z.object({type:z.literal(`authorization.completed`),data:z.object({name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()})])}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeWithCostSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeWithCostSchema,subagentName:z.string().min(1)})]);async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let r;try{r=renameLegacyTaskCallback(await e.json())}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=callbackKind(r),a=i===`subagent-input-request`?sessionInputCallbackSchema.safeParse(r):i===`subagent-authorization-event`?sessionAuthorizationCallbackSchema.safeParse(r):void 0;if(a!==void 0&&!a.success)return Response.json({error:`Invalid session input callback.`,ok:!1},{status:400});let o=a===void 0?projectSessionCallbackResult(r):void 0;if(o instanceof Response)return o;try{await resumeRunnableHook(n,a?.success?a.data:{kind:`runtime-action-result`,results:[o]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(typeof e==`object`&&e)return Reflect.get(e,`kind`)}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}export{handleSessionCallbackRequest};
|
package/dist/src/svelte/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as conversationProjection, i as openConversationInputs, n as conversationReducer, o as callStatus, r as defaultMessageReducer, t as useEveAgent } from "../chunks/use-eve-agent-
|
|
1
|
+
import { a as conversationProjection, i as openConversationInputs, n as conversationReducer, o as callStatus, r as defaultMessageReducer, t as useEveAgent } from "../chunks/use-eve-agent-jI6EsYAu.js";
|
|
2
2
|
|
|
3
3
|
//#region src/client/tool-call-state.ts
|
|
4
4
|
function toolCallState(conversation, callId, options = {}) {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { StubResult } from "#tool-stubs/types.js";
|
|
2
1
|
import type { ToolExecuteOptions } from "#tools/definition.js";
|
|
3
2
|
/** Tool inputs and approvals have already been checked before a stub can replace execution. */
|
|
4
3
|
export declare function executeWithToolStub(tool: string, input: unknown, options: ToolExecuteOptions, execute: () => unknown): unknown;
|
|
5
|
-
/** The connection wrapper checks operation inputs and approvals before requesting a stub. */
|
|
6
|
-
export declare function connectionToolStub(tool: string, input: unknown, callId: string): Promise<StubResult>;
|
|
7
4
|
/** Record errors converting stub responses so eval verification can detect them. */
|
|
8
5
|
export declare function recordToolStubFailure(tool: string, callId: string | undefined, turnId?: string): Promise<void>;
|
|
9
6
|
/** Record stub failures even when the caller recovers with fallback output. */
|