eve 0.55.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/src/channel/adapter-context.d.ts +1 -1
- package/dist/src/channel/adapter.d.ts +2 -2
- package/dist/src/channel/audience.d.ts +3 -3
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/conversation-context.d.ts +4 -2
- package/dist/src/channel/conversation-context.js +1 -1
- package/dist/src/channel/session.d.ts +4 -3
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +7 -4
- package/dist/src/chunks/{use-eve-agent-D-KQzzyW.js → use-eve-agent-C2APNCdP.js} +45 -22
- package/dist/src/chunks/{use-eve-agent-CxPlg0KL.js → use-eve-agent-D0YnDLi_.js} +45 -22
- package/dist/src/cli/commands/init.d.ts +2 -6
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-metadata.d.ts +0 -18
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/trace-detail.js +1 -1
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +3 -6
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- package/dist/src/cli/dev/tui/command-typeahead.js +1 -1
- package/dist/src/cli/dev/tui/markdown.d.ts +8 -1
- package/dist/src/cli/dev/tui/markdown.js +7 -7
- package/dist/src/cli/dev/tui/message-queue.d.ts +11 -7
- package/dist/src/cli/dev/tui/message-queue.js +1 -1
- package/dist/src/cli/dev/tui/model-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/model-editor.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +0 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth-result.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth.js +1 -1
- package/dist/src/cli/dev/tui/remote-startup.d.ts +10 -0
- package/dist/src/cli/dev/tui/remote-startup.js +1 -0
- package/dist/src/cli/dev/tui/runner.d.ts +16 -19
- package/dist/src/cli/dev/tui/runner.js +3 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +7 -13
- package/dist/src/cli/dev/tui/setup-commands.js +2 -2
- package/dist/src/cli/dev/tui/setup-issues.d.ts +1 -1
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -17
- package/dist/src/cli/dev/tui/setup-panel.js +5 -6
- package/dist/src/cli/dev/tui/status-line.d.ts +1 -8
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +15 -0
- package/dist/src/cli/dev/tui/steering-stream.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +8 -3
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +2 -2
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +0 -2
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +4 -1
- package/dist/src/cli/dev/tui/vercel-status.d.ts +4 -2
- package/dist/src/cli/dev/tui/vercel-status.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/telemetry/index.d.ts +1 -1
- package/dist/src/cli/telemetry/index.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +2 -57
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/eve-agent-store-state.d.ts +19 -0
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/ndjson.d.ts +2 -0
- package/dist/src/client/ndjson.js +3 -3
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -0
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +2 -2
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DTFAjP0J.js +6 -0
- package/dist/src/compiled/_chunks/workflow/{dist-PLkAQ-U7.js → dist-C5KCXSdI.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{frames-BvATzM2t.js → frames-DJw9L4rO.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/global-DFW-hO6M.js +1 -0
- package/dist/src/compiled/_chunks/workflow/helpers-ClCA9Lmc.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D6vwIEf9.js +13 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-_baK8jaT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-CRdL17z4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CWYPL4Eq.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BL0kgJnT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-DyIt9lEx.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-CVezyWwZ.js → ws-transport-Dl5FG4Sw.js} +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +27 -8
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +12 -11
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +0 -3
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/validate-artifact.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +5 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/eve-channel/audience.d.ts +2 -2
- package/dist/src/eve-channel/audience.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +4 -3
- package/dist/src/eve-channel/types.d.ts +5 -5
- package/dist/src/execution/activity-cohort.js +1 -1
- package/dist/src/execution/activity-collector.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +2 -1
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.d.ts +1 -1
- package/dist/src/execution/connections/callback-route.d.ts +1 -11
- package/dist/src/execution/connections/callback-route.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +0 -1
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +1 -1
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +2 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +1 -1
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -49
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.d.ts +21 -0
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -0
- package/dist/src/execution/dynamic-workflow/schema.d.ts +36 -0
- package/dist/src/execution/dynamic-workflow/schema.js +1 -0
- package/dist/src/execution/dynamic-workflow/security-step.d.ts +3 -0
- package/dist/src/execution/dynamic-workflow/security-step.js +1 -0
- package/dist/src/execution/dynamic-workflow/tool.d.ts +8 -0
- package/dist/src/execution/dynamic-workflow/tool.js +1 -0
- package/dist/src/execution/dynamic-workflow/workflow.d.ts +10 -0
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -0
- package/dist/src/execution/eve-workflow-attributes.d.ts +2 -17
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/hook-ownership.d.ts +2 -4
- package/dist/src/execution/hook-ownership.js +1 -1
- package/dist/src/execution/legacy-session/authorization.d.ts +9 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -0
- package/dist/src/execution/legacy-session/completion-step.d.ts +10 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -0
- package/dist/src/execution/legacy-session/inbox.d.ts +24 -0
- package/dist/src/execution/legacy-session/inbox.js +1 -0
- package/dist/src/execution/legacy-session/input.d.ts +19 -0
- package/dist/src/execution/legacy-session/input.js +1 -0
- package/dist/src/execution/legacy-session/interrupt-step.d.ts +3 -0
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -0
- package/dist/src/execution/legacy-session/prepare-step.d.ts +24 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -0
- package/dist/src/execution/legacy-session/snapshot.d.ts +12 -0
- package/dist/src/execution/legacy-session/snapshot.js +1 -0
- package/dist/src/execution/legacy-session/turn-workflow.d.ts +8 -0
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -0
- package/dist/src/execution/model-call-batching.d.ts +1 -0
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -5
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +2 -20
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +1 -1
- package/dist/src/execution/report-dropped-wire-payload-step.d.ts +1 -1
- package/dist/src/execution/route-child-delivery.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/bindings/eve-image.js +1 -1
- package/dist/src/execution/session/accepted-deployment.d.ts +3 -0
- package/dist/src/execution/session/accepted-deployment.js +1 -0
- package/dist/src/execution/session/admission.d.ts +38 -0
- package/dist/src/execution/session/admission.js +1 -0
- package/dist/src/execution/session/entry-input.d.ts +42 -0
- package/dist/src/execution/session/entry-input.js +1 -0
- package/dist/src/execution/session/entry.d.ts +13 -0
- package/dist/src/execution/session/entry.js +1 -0
- package/dist/src/execution/session/event-sink.d.ts +31 -0
- package/dist/src/execution/session/event-sink.js +1 -0
- package/dist/src/execution/session/finalization.d.ts +33 -0
- package/dist/src/execution/session/finalization.js +1 -0
- package/dist/src/execution/session/handoff-steps.d.ts +22 -0
- package/dist/src/execution/session/handoff-steps.js +1 -0
- package/dist/src/execution/session/handoff.d.ts +69 -0
- package/dist/src/execution/session/handoff.js +1 -0
- package/dist/src/execution/session/hook-tokens.d.ts +11 -0
- package/dist/src/execution/session/hook-tokens.js +1 -0
- package/dist/src/execution/session/input-queue.d.ts +72 -0
- package/dist/src/execution/session/input-queue.js +1 -0
- package/dist/src/execution/session/next-input.d.ts +32 -0
- package/dist/src/execution/session/next-input.js +1 -0
- package/dist/src/execution/{pending-turn-state.d.ts → session/pending-turn-state.d.ts} +0 -1
- package/dist/src/execution/{pending-turn-state.js → session/pending-turn-state.js} +1 -1
- package/dist/src/execution/session/program.d.ts +47 -0
- package/dist/src/execution/session/program.js +1 -0
- package/dist/src/execution/session/route-selected-delivery.d.ts +9 -0
- package/dist/src/execution/session/route-selected-delivery.js +1 -0
- package/dist/src/execution/session/state-cursor.d.ts +31 -0
- package/dist/src/execution/session/state-cursor.js +1 -0
- package/dist/src/execution/{session-timeout-control.d.ts → session/timeout-control.d.ts} +1 -1
- package/dist/src/execution/session/timeout-control.js +1 -0
- package/dist/src/execution/{session-timeout-steps.d.ts → session/timeout-steps.d.ts} +3 -2
- package/dist/src/execution/session/timeout-steps.js +1 -0
- package/dist/src/execution/{session-timeout-workflow.d.ts → session/timeout-workflow.d.ts} +3 -1
- package/dist/src/execution/session/timeout-workflow.js +1 -0
- package/dist/src/execution/session/timeout.d.ts +3 -0
- package/dist/src/execution/session/timeout.js +1 -0
- package/dist/src/execution/session/turn-step-result.d.ts +4 -0
- package/dist/src/execution/session/turn-step-result.js +1 -0
- package/dist/src/execution/session/turn-step-types.d.ts +68 -0
- package/dist/src/execution/session/turn-step-types.js +1 -0
- package/dist/src/execution/{workflow-steps.d.ts → session/turn-step.d.ts} +1 -2
- package/dist/src/execution/session/turn-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +31 -0
- package/dist/src/execution/session/turn.js +1 -0
- package/dist/src/execution/session-inbox/address.d.ts +21 -0
- package/dist/src/execution/session-inbox/address.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +54 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -0
- package/dist/src/execution/session-inbox/protocol.d.ts +10 -0
- package/dist/src/execution/session-inbox/protocol.js +1 -0
- package/dist/src/execution/session-inbox/release-step.d.ts +5 -0
- package/dist/src/execution/session-inbox/release-step.js +1 -0
- package/dist/src/execution/session-inbox/resume.d.ts +21 -0
- package/dist/src/execution/session-inbox/resume.js +1 -0
- package/dist/src/execution/{turn-workflow-tool-run.d.ts → session-workflow-tool-run.d.ts} +2 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -0
- package/dist/src/execution/session.d.ts +0 -1
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +1 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/task-input-response-route.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +1 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +7 -0
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.d.ts +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +6 -0
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +2 -0
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +13 -0
- package/dist/src/execution/tools/subagent/steer.js +1 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +0 -9
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +0 -2
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/messages.d.ts +0 -1
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +3 -1
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/resume-hook-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/step-context.d.ts +0 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +15 -18
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +0 -3
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/authorization.d.ts +5 -37
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/emission-state.d.ts +1 -0
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/generation-steering.d.ts +22 -0
- package/dist/src/harness/generation-steering.js +1 -0
- package/dist/src/harness/messages.d.ts +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +1 -1
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/semantic-errors/rules/gateway.js +1 -1
- package/dist/src/harness/semantic-errors/signals.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/types.d.ts +2 -21
- package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/content.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +6 -7
- package/dist/src/instrumentation/native-events.d.ts +2 -0
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-context.d.ts +2 -0
- package/dist/src/instrumentation/session-context.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +3 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -4
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/gateway.d.ts +1 -0
- package/dist/src/internal/gateway.js +1 -1
- package/dist/src/internal/model-auth/api-key.d.ts +7 -0
- package/dist/src/internal/model-auth/api-key.js +1 -0
- package/dist/src/internal/model-auth/available-models.d.ts +2 -0
- package/dist/src/internal/model-auth/available-models.js +1 -0
- package/dist/src/internal/model-auth/development-broker-client.d.ts +3 -0
- package/dist/src/internal/model-auth/development-broker-client.js +1 -0
- package/dist/src/internal/model-auth/development-broker-protocol.d.ts +12 -0
- package/dist/src/internal/model-auth/development-broker-protocol.js +1 -0
- package/dist/src/internal/model-auth/development-broker-server.d.ts +4 -0
- package/dist/src/internal/model-auth/development-broker-server.js +1 -0
- package/dist/src/internal/model-auth/gateway-credential.d.ts +2 -0
- package/dist/src/internal/model-auth/gateway-credential.js +1 -0
- package/dist/src/internal/model-auth/store.d.ts +16 -0
- package/dist/src/internal/model-auth/store.js +1 -0
- package/dist/src/internal/model-auth/transport.d.ts +6 -0
- package/dist/src/internal/model-auth/transport.js +1 -0
- package/dist/src/internal/model-auth/vercel-cli.d.ts +7 -0
- package/dist/src/internal/model-auth/vercel-cli.js +1 -0
- package/dist/src/internal/model-auth/vercel-team.d.ts +3 -0
- package/dist/src/internal/model-auth/vercel-team.js +1 -0
- package/dist/src/internal/model-auth/vercel.d.ts +13 -0
- package/dist/src/internal/model-auth/vercel.js +1 -0
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/workflow-sandbox-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -0
- package/dist/src/internal/resolve-model-endpoint-status.js +1 -1
- package/dist/src/internal/vercel/api-resource.d.ts +4 -0
- package/dist/src/internal/vercel/api-resource.js +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/vercel-services-config.d.ts +2 -0
- package/dist/src/internal/vercel/vercel-services-config.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/local-world-delivery-timeouts.d.ts +1 -1
- package/dist/src/internal/workflow/runtime.d.ts +1 -6
- package/dist/src/internal/workflow/runtime.js +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +4 -0
- package/dist/src/internal/workflow/vercel-world-defaults.js +1 -0
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/message.d.ts +8 -0
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/routes.d.ts +0 -2
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -2
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -2
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/connections/index.d.ts +1 -1
- package/dist/src/public/definitions/channel.d.ts +2 -2
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
- package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
- package/dist/src/public/models/anthropic/index.d.ts +3 -0
- package/dist/src/public/models/anthropic/index.js +1 -0
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +1 -1
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -1
- package/dist/src/public/models/openai/chatgpt/oauth.js +1 -1
- package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
- package/dist/src/public/models/openai/index.d.ts +4 -2
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +1 -1
- package/dist/src/public/tools/workflow.d.ts +1 -4
- package/dist/src/public/tools/workflow.js +1 -1
- package/dist/src/public/vercel/index.d.ts +2 -1
- package/dist/src/public/vercel/index.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/authorization-tokens.d.ts +2 -4
- package/dist/src/runtime/connections/principal.d.ts +6 -6
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +3 -9
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -3
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/tools/search_registry.d.ts +1 -7
- package/dist/src/self-modification/extension/tools/search_registry.js +1 -1
- package/dist/src/self-modification/setup.d.ts +9 -3
- package/dist/src/self-modification/setup.js +2 -2
- package/dist/src/setup/cli/option-row.d.ts +2 -1
- package/dist/src/setup/cli/option-row.js +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +2 -0
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/select-state.d.ts +1 -1
- package/dist/src/setup/cli/select-state.js +1 -1
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/deploy.d.ts +4 -9
- package/dist/src/setup/flows/deploy.js +1 -1
- package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
- package/dist/src/setup/flows/install-vercel-cli.d.ts +2 -3
- package/dist/src/setup/flows/login.d.ts +3 -1
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model-login-connection.d.ts +36 -0
- package/dist/src/setup/flows/model-login-connection.js +1 -0
- package/dist/src/setup/flows/model-login-progress.d.ts +7 -0
- package/dist/src/setup/flows/model-login-progress.js +1 -0
- package/dist/src/setup/flows/model-login.d.ts +22 -0
- package/dist/src/setup/flows/model-login.js +1 -0
- package/dist/src/setup/flows/model-source-change.d.ts +7 -0
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/model.d.ts +6 -24
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +3 -19
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/flows/vercel-model-login.d.ts +5 -0
- package/dist/src/setup/flows/vercel-model-login.js +1 -0
- package/dist/src/setup/integrations/self-modification/setup.d.ts +2 -0
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/prompter.d.ts +3 -1
- package/dist/src/setup/provider-settings.d.ts +19 -6
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +6 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/setup/with-spinner.d.ts +1 -1
- package/dist/src/setup/with-spinner.js +1 -1
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +6 -4
- package/dist/src/shared/channel-definition.d.ts +2 -2
- package/dist/src/shared/chatgpt-model.d.ts +2 -2
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +20 -7
- package/dist/src/shared/conversation-context.d.ts +15 -0
- package/dist/src/shared/model-connection.d.ts +17 -0
- package/dist/src/shared/model-connection.js +1 -0
- package/dist/src/shared/model-endpoint-status.d.ts +2 -1
- package/dist/src/shared/model-helper.d.ts +26 -0
- package/dist/src/shared/model-helper.js +1 -0
- package/dist/src/shared/package-version.d.ts +2 -0
- package/dist/src/shared/package-version.js +1 -0
- package/dist/src/shared/validate-authorization.js +1 -1
- package/dist/src/shared/vercel-services.d.ts +1 -0
- package/dist/src/shared/vercel-services.js +1 -1
- package/dist/src/shared/workflow-sandbox.d.ts +18 -12
- package/dist/src/shared/workflow-sandbox.js +1 -1
- package/dist/src/source-change/agent-config-ast.d.ts +6 -0
- package/dist/src/source-change/agent-config-ast.js +1 -1
- package/dist/src/source-change/apply-model-selection.d.ts +3 -1
- package/dist/src/source-change/apply-model-selection.js +1 -2
- package/dist/src/source-change/static-source-change.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +3 -3
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/handle-dispatch.d.ts +12 -2
- package/dist/src/subagents/handle-dispatch.js +1 -1
- package/dist/src/subagents/handles/operation-id.d.ts +1 -1
- package/dist/src/subagents/handles/query.d.ts +0 -6
- package/dist/src/subagents/handles/query.js +1 -1
- package/dist/src/subagents/handles/state-key.d.ts +1 -1
- package/dist/src/subagents/handles/store.d.ts +1 -1
- package/dist/src/subagents/handles/store.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +1 -1
- package/dist/src/subagents/parent-notification.d.ts +2 -2
- package/dist/src/subagents/parent-result.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/subagents/start-local.js +1 -1
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/session-index.d.ts +11 -0
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tasks/types.d.ts +1 -1
- package/dist/src/tools/auth.d.ts +5 -6
- package/dist/src/tools/provided/workflow.d.ts +12 -0
- package/dist/src/tools/provided/workflow.js +1 -0
- package/dist/src/tools/workflow-program-input.d.ts +6 -0
- package/dist/src/tools/workflow-program-input.js +1 -0
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +2 -1
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -0
- package/dist/src/tracing/agent-span-contract.js +1 -1
- 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 +2 -0
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.d.ts +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +23 -23
- package/docs/channels/chat-sdk.mdx +11 -2
- package/docs/channels/custom.mdx +32 -16
- package/docs/channels/eve.mdx +21 -19
- package/docs/channels/linear.mdx +7 -3
- package/docs/channels/linq.mdx +1 -1
- package/docs/channels/overview.mdx +17 -2
- package/docs/channels/photon.mdx +4 -1
- package/docs/channels/slack.mdx +12 -2
- package/docs/concepts/execution-model-and-durability.mdx +62 -13
- package/docs/concepts/sessions-runs-and-streaming.md +14 -5
- package/docs/connections/mcp.mdx +4 -1
- package/docs/connections/openapi.mdx +8 -2
- package/docs/connections/overview.mdx +16 -13
- package/docs/getting-started.mdx +8 -4
- package/docs/guides/deployment/self-hosting.md +1 -1
- package/docs/guides/deployment/vercel.mdx +3 -3
- package/docs/guides/dev-tui.md +58 -31
- package/docs/guides/dynamic-capabilities.md +4 -4
- package/docs/guides/frontend/overview.mdx +3 -1
- package/docs/guides/hooks.md +1 -1
- package/docs/guides/instrumentation/meta.json +5 -0
- package/docs/guides/instrumentation/otel.mdx +149 -0
- package/docs/guides/instrumentation/overview.md +199 -0
- package/docs/guides/instrumentation/providers.mdx +169 -0
- package/docs/guides/meta.json +0 -1
- package/docs/guides/remote-agents.md +19 -21
- package/docs/install-integrations.mdx +2 -4
- package/docs/memory/custom-provider.md +1 -1
- package/docs/patterns/multi-tenant-auth.md +3 -3
- package/docs/protocols/acp.md +1 -1
- package/docs/reference/cli.md +16 -16
- package/docs/reference/telemetry.md +1 -1
- package/docs/reference/typescript-api.md +21 -14
- package/docs/sandbox.mdx +3 -3
- package/docs/subagents/index.mdx +4 -4
- package/docs/tools/workflows.mdx +57 -2
- package/docs/tutorial/how-it-runs.mdx +1 -1
- package/package.json +6 -1
- package/dist/src/cli/commands/init-repl.d.ts +0 -80
- package/dist/src/cli/commands/init-repl.js +0 -1
- package/dist/src/cli/commands/init-self-modification.d.ts +0 -7
- package/dist/src/cli/commands/init-self-modification.js +0 -1
- package/dist/src/cli/commands/registry-package.d.ts +0 -52
- package/dist/src/cli/commands/registry-package.js +0 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +0 -12
- package/dist/src/cli/dev/tui/prompt-placeholder.js +0 -1
- package/dist/src/cli/dev/tui/remote-auth-command.d.ts +0 -11
- package/dist/src/cli/dev/tui/remote-auth-command.js +0 -3
- package/dist/src/compiled/_chunks/workflow/attribute-changes-BAcgmlXp.js +0 -20
- package/dist/src/compiled/_chunks/workflow/private-CFJkQA7R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BEHe0Uut.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-ChHLjaCt.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-BB2HuVie.js +0 -1
- package/dist/src/execution/accepted-delivery-deployment.d.ts +0 -7
- package/dist/src/execution/accepted-delivery-deployment.js +0 -1
- package/dist/src/execution/dispatch-turn-step.d.ts +0 -5
- package/dist/src/execution/dispatch-turn-step.js +0 -1
- package/dist/src/execution/durable-session-migrations/chain.d.ts +0 -38
- package/dist/src/execution/durable-session-migrations/chain.js +0 -1
- package/dist/src/execution/durable-session-migrations/snapshot.d.ts +0 -6
- package/dist/src/execution/durable-session-migrations/snapshot.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.d.ts +0 -12
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +0 -2
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +0 -88
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +0 -1
- package/dist/src/execution/forward-turn-cancellation-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-cancellation-step.js +0 -1
- package/dist/src/execution/forward-turn-delivery-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-delivery-step.js +0 -1
- package/dist/src/execution/inline-turn.d.ts +0 -31
- package/dist/src/execution/inline-turn.js +0 -1
- package/dist/src/execution/next-driver-action.d.ts +0 -93
- package/dist/src/execution/parked-delivery-wait.d.ts +0 -54
- package/dist/src/execution/parked-delivery-wait.js +0 -1
- package/dist/src/execution/session-command-inbox.d.ts +0 -52
- package/dist/src/execution/session-command-inbox.js +0 -1
- package/dist/src/execution/session-command-token.d.ts +0 -6
- package/dist/src/execution/session-command-token.js +0 -1
- package/dist/src/execution/session-state-cursor.d.ts +0 -25
- package/dist/src/execution/session-state-cursor.js +0 -1
- package/dist/src/execution/session-timeout-control.js +0 -1
- package/dist/src/execution/session-timeout-steps.js +0 -1
- package/dist/src/execution/session-timeout-workflow.js +0 -1
- package/dist/src/execution/session-timeout.d.ts +0 -2
- package/dist/src/execution/session-timeout.js +0 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +0 -30
- package/dist/src/execution/turn-cancellation-control.js +0 -1
- package/dist/src/execution/turn-cancellation-token.d.ts +0 -10
- package/dist/src/execution/turn-cancellation-token.js +0 -1
- package/dist/src/execution/turn-control-protocol.d.ts +0 -36
- package/dist/src/execution/turn-control-protocol.js +0 -1
- package/dist/src/execution/turn-control-receiver.d.ts +0 -54
- package/dist/src/execution/turn-control-receiver.js +0 -1
- package/dist/src/execution/turn-dispatch.d.ts +0 -39
- package/dist/src/execution/turn-dispatch.js +0 -1
- package/dist/src/execution/turn-execution-cursor.d.ts +0 -49
- package/dist/src/execution/turn-execution-cursor.js +0 -1
- package/dist/src/execution/turn-workflow-tool-run.js +0 -1
- package/dist/src/execution/turn-workflow.d.ts +0 -13
- package/dist/src/execution/turn-workflow.js +0 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +0 -38
- package/dist/src/execution/wire/session-inbox-contract.js +0 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +0 -47
- package/dist/src/execution/wire/session-inbox-encoder.js +0 -1
- package/dist/src/execution/wire/session-inbox-resume.d.ts +0 -12
- package/dist/src/execution/wire/session-inbox-resume.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.d.ts +0 -29
- package/dist/src/execution/wire/session-inbox-wire.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v0.d.ts +0 -5
- package/dist/src/execution/wire/session-inbox-wire.v0.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.d.ts +0 -237
- package/dist/src/execution/wire/session-inbox-wire.v1.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.d.ts +0 -478
- package/dist/src/execution/wire/session-inbox-wire.v2.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +0 -480
- package/dist/src/execution/wire/session-inbox-wire.v3.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.d.ts +0 -267
- package/dist/src/execution/wire/session-inbox-wire.v4.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v5.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v6.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v6.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v7.d.ts +0 -342
- package/dist/src/execution/wire/session-inbox-wire.v7.js +0 -1
- package/dist/src/execution/workflow-entry-crash.d.ts +0 -39
- package/dist/src/execution/workflow-entry-crash.js +0 -1
- package/dist/src/execution/workflow-entry-finalization.d.ts +0 -28
- package/dist/src/execution/workflow-entry-finalization.js +0 -1
- package/dist/src/execution/workflow-entry.d.ts +0 -37
- package/dist/src/execution/workflow-entry.js +0 -1
- package/dist/src/execution/workflow-steps.js +0 -1
- package/dist/src/harness/workflow-continuation-security.d.ts +0 -5
- package/dist/src/harness/workflow-continuation-security.js +0 -1
- package/dist/src/harness/workflow-interrupt-state.d.ts +0 -20
- package/dist/src/harness/workflow-interrupt-state.js +0 -1
- package/dist/src/harness/workflow-lifecycle.d.ts +0 -32
- package/dist/src/harness/workflow-lifecycle.js +0 -1
- package/dist/src/harness/workflow-sandbox.d.ts +0 -28
- package/dist/src/harness/workflow-sandbox.js +0 -2
- package/dist/src/harness/workflow-subagent-limit.d.ts +0 -28
- package/dist/src/harness/workflow-subagent-limit.js +0 -1
- package/dist/src/harness/workflow-task-state.d.ts +0 -9
- package/dist/src/harness/workflow-task-state.js +0 -1
- package/dist/src/harness/workflow-tool-description.d.ts +0 -22
- package/dist/src/harness/workflow-tool-description.js +0 -37
- package/dist/src/subagents/handles/rebase.d.ts +0 -4
- package/dist/src/subagents/handles/rebase.js +0 -1
- package/dist/src/tools/workflow.d.ts +0 -37
- package/dist/src/tools/workflow.js +0 -1
- package/docs/guides/instrumentation-providers.md +0 -249
- package/docs/guides/instrumentation.md +0 -453
- /package/dist/src/{execution/next-driver-action.js → client/eve-agent-store-state.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# eve
|
|
2
2
|
|
|
3
|
+
## 0.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 61d4097: Run every conversational turn directly inside the session's owning workflow instead of dispatching a child turn run per message. An idle session hands its settled state to the exact deployment that accepted a new delivery, whether the delivery arrives through the session ID or any channel continuation address, keeping the original session ID and event stream and renewing the session's configured timeout. Deliveries that land while a handoff is in progress wait for the successor instead of starting a replacement session.
|
|
8
|
+
|
|
9
|
+
Steering a running turn applies at the next committed step boundary without cancelling in-flight model or tool work and preserves the turn's identity and usage; input that arrives after the model has answered starts the next turn. `continuation.rekey()` is replaced by `continuation.alias()`: every claimed address stays active, and the most recently selected alias is exposed as `continuation.token`.
|
|
10
|
+
|
|
11
|
+
Sessions from the former driver/turn execution model are imported on their next turn, preserving identity, history, and the original stream while interrupting pending work; drivers started before eve 0.45 are reported inactive and their channel starts a fresh session. Retain the original deployment until imported sessions end, and retire sessions before rolling back across this boundary.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 32aca9b: Restored `agent` tools now dispatch through the shared subagent workflow when framework defaults are disabled.
|
|
16
|
+
- 7b17b27: Simplify the TUI footer by removing the local port and separating the model and connection with dots. Vercel account connections show the resolved team slug instead of a team ID.
|
|
17
|
+
- f21e63f: Declare `.vercel/output` for generated eve services so Vercel consumes the Build Output API directory that their build commands produce instead of looking for the framework preset's `.output` default.
|
|
18
|
+
- 7b17b27: Model login shares resolved credentials with the running agent, avoids rebuilds for account, team, and key changes, and refreshes agent information without delaying chat. Clear status messages show when to finish browser sign-in and what eve is waiting for, without flashing indicators for quick steps.
|
|
19
|
+
- e1ae8eb: Flush the final activity snapshot when an activity stream closes during the render debounce window.
|
|
20
|
+
- f21e63f: Make `withEve` discover a containing workspace when Vercel evaluates `vercel.ts` from its temporary `.vercel` directory.
|
|
21
|
+
- fe6451c: Keep automatic prompt caching enabled when local model authentication resolves an AI Gateway model to a provider object. Anthropic models retain cache reuse after signing in through `eve dev`.
|
|
22
|
+
- 032860c: Bound negotiated session stream responses with renewable leases so abandoned serverless invocations release their durable stream readers. The eve client renews these responses from its cursor without exposing transport heartbeats or lease records as session events; tail-relative reads and streams with reconnection disabled remain unleased.
|
|
23
|
+
- 7b17b27: Fix a local workflow health-check failure after model or source changes. Capability probes no longer look up a run before it exists, avoiding a spurious queue error and startup delay.
|
|
24
|
+
- 7b17b27: Allow switching Vercel teams through `/login` by always showing the team picker when multiple teams are available. The current team is highlighted rather than silently selected; automatic startup still reuses the saved connection.
|
|
25
|
+
- 7b17b27: Match the Vercel label's color to the surrounding model and team text in the TUI footer.
|
|
26
|
+
- ba0b866: When a self-modified tool or capability later fails or behaves incorrectly, the agent now offers to delegate a repair. It waits for your confirmation before sending the observed and expected behavior back to self-modification.
|
|
27
|
+
- 7b17b27: Use the same full-size arrow for empty and populated TUI prompts, with the empty arrow in the terminal's default foreground color for better visibility.
|
|
28
|
+
- 7b17b27: Open the TUI directly after init, connect models through `/login` without requiring a Vercel project, and store local credentials securely. Add direct OpenAI and Anthropic model helpers, apply model selections immediately, and simplify menus and `/add` to get to chat sooner. Vercel CLI installation and login now run during deployment instead of separate `/vc:install` and `/vc:login` commands.
|
|
29
|
+
- 8bb62e2: Recognize AI Gateway credit-balance and project-budget refusals in semantic error summaries.
|
|
30
|
+
- 7b17b27: Restore guided Trusted Sources setup when Deployment Protection blocks `eve dev --url`. eve reuses the existing Vercel CLI session, asks before changing project access, and verifies the connection before returning to chat.
|
|
31
|
+
- 7b17b27: Use the base release version for default sandbox images when running commit or git-ref tarballs. Build metadata such as `+git.<sha>` no longer produces invalid image tags for Docker, microsandbox, or Vercel Sandbox.
|
|
32
|
+
- 7b17b27: Search `/add` by capabilities such as iMessage or SMS, as well as item names and addresses. The picker now searches catalog titles and descriptions without adding extra text to menu rows.
|
|
33
|
+
- a08e4bb: Prompt for and resolve the target Vercel project before configuring production self-modification, and scope GitHub connector creation and attachment to that project's owner.
|
|
34
|
+
- 7b17b27: Keep the composer available while startup connects your model and prepares chat, with animated progress and prompts only when input is needed. Preserve drafts and queued messages through setup, and announce readiness only after the runtime refresh succeeds.
|
|
35
|
+
- 61d4097: Batch closely spaced stream events on Vercel within a 10 ms window to reduce network writes. Explicit Workflow stream-flush overrides remain supported.
|
|
36
|
+
- 53fad6c: Emits canonical GenAI cache-write tokens, reports the provider-confirmed response model, and adds the executing agent name to tool spans.
|
|
37
|
+
- 7b17b27: Replace rotating TUI prompt suggestions with a stable “Send a message…” placeholder that does not assume agent capabilities.
|
|
38
|
+
- fe6451c: Apply steering in the core runtime before a pending model request produces an answer, continuing the same turn with the correction across clients and channels. Preserve executing tools and their results, prevent duplicate in-process model execution on background wakeups, and keep boundary steering after assistant output begins.
|
|
39
|
+
- 7b17b27: Pressing Enter during a TUI response now steers the active agent immediately instead of queuing the message until the turn finishes. Startup messages and sessions without steering support continue to queue.
|
|
40
|
+
- 7b17b27: Distinguish steered TUI messages with a yellow left gutter instead of an extra arrow row. Queued messages also render without an arrow row.
|
|
41
|
+
- 1e6437b: Announce when dynamic skills are withdrawn completely so agents do not retain stale skill lists.
|
|
42
|
+
|
|
43
|
+
## 0.56.0
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- 8bc931f: Add the `workflow` factory from `eve/tools/workflow` for running model-supplied JavaScript through durable `ctx.agent` calls. Remove the experimental uppercase `Workflow` tool and `experimental_workflow`; migrate its tool file to the new lowercase factory.
|
|
48
|
+
- 6ce61cd: Remove aggregate registry packages and their component-selection flow. Install Linear integrations separately with `eve add channel/linear` and `eve add connection/linear`.
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 57d6be5: Add queryable metadata to activation spans, including run type, title when input capture permits, provenance, audience, schedule, and directional trace-content policy.
|
|
53
|
+
- a63fb18: Keep background subagents bound to the authentication context of the turn that created their task, even when another caller starts a later turn first.
|
|
54
|
+
- 51998ab: Automatically ignore the self-modification integration's known optional compression packages instead of prompting for its recommended pnpm build policy.
|
|
55
|
+
- 56cde32: Include conversations classified as private in local `eve dev` traces, including sessions authenticated with the developer's Vercel OIDC token.
|
|
56
|
+
- 7ea3b7a: Classify anonymous eve channel sessions as `unknown` by default, so their content is not recorded in preview or production traces unless you mark the audience public explicitly. Also add `credentialOwner` for raw getToken-only auth and `caller` for audience callbacks while preserving existing `principalType` APIs, and fix token cache keys so user identifiers containing separators or percent sequences cannot collide.
|
|
57
|
+
- 23e2e7c: Allow submitting the initial TUI message while eve is still building the agent. The message is queued and sent automatically as soon as the agent is ready.
|
|
58
|
+
- bca1b4a: Self-modification registry setup now asks whether to enable deployed draft pull requests or keep source editing local before collecting deployment configuration.
|
|
59
|
+
- a7f2387: Improve development TUI Markdown with clearer headings, block spacing, clickable links, responsive bordered tables, and code panels. Set `EVE_TUI_RENDER_MARKDOWN=0` to show assistant and subagent responses without Markdown parsing or styling.
|
|
60
|
+
|
|
3
61
|
## 0.55.0
|
|
4
62
|
|
|
5
63
|
### Minor Changes
|
|
@@ -6,6 +6,6 @@ import type { ChannelAdapter, ChannelAdapterContext } from "#channel/adapter.js"
|
|
|
6
6
|
*
|
|
7
7
|
* Populates `session` with a live {@link SessionHandle} backed by the
|
|
8
8
|
* supplied accessor so handlers can read identity / auth and call
|
|
9
|
-
* `session.continuation.
|
|
9
|
+
* `session.continuation.alias(...)` to add an address for the parked session.
|
|
10
10
|
*/
|
|
11
11
|
export declare function buildAdapterContext<TCtx extends ChannelAdapterContext<any> = ChannelAdapterContext>(adapter: ChannelAdapter<TCtx>, accessor: ContextAccessor): TCtx;
|
|
@@ -15,8 +15,8 @@ import type { ChannelAudienceProjector } from "#channel/audience.js";
|
|
|
15
15
|
* {@link ContextAccessor} that tools and providers use).
|
|
16
16
|
*
|
|
17
17
|
* `session` is a live handle to the current session — id, auth,
|
|
18
|
-
* optional channel continuation address, including an imperative `
|
|
19
|
-
* for channels that need to
|
|
18
|
+
* optional channel continuation address, including an imperative `alias()`
|
|
19
|
+
* for channels that need to add an alias for the session mid-turn (e.g. Slack's
|
|
20
20
|
* auto-anchor on first post).
|
|
21
21
|
*/
|
|
22
22
|
export interface ChannelAdapterContext<TState = Record<string, unknown>> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AudienceContext } from "#shared/conversation-context.js";
|
|
3
3
|
type ChannelAudienceSource = {
|
|
4
4
|
readonly kind: string;
|
|
5
5
|
readonly state?: Record<string, unknown> | undefined;
|
|
@@ -8,8 +8,8 @@ type ChannelAudienceSource = {
|
|
|
8
8
|
readonly metadata?: (state: Record<string, unknown> | undefined) => unknown;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
export type ChannelAudienceProjector = (input:
|
|
12
|
-
export declare function resolveAudience(adapter: ChannelAudienceSource, input:
|
|
11
|
+
export type ChannelAudienceProjector = (input: AudienceContext<Record<string, unknown> | undefined>) => ChannelAudience;
|
|
12
|
+
export declare function resolveAudience(adapter: ChannelAudienceSource, input: AudienceContext<Record<string, unknown> | undefined>): ChannelAudience;
|
|
13
13
|
export declare function createMetadataAudienceProjector(source: {
|
|
14
14
|
readonly kind: string;
|
|
15
15
|
}, metadata: (state: Record<string, unknown> | undefined) => unknown): ChannelAudienceProjector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{copyChannelActivityPresentation}from"#channel/activity-renderer.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{isReservedSessionCommandToken}from"#execution/session-
|
|
1
|
+
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{copyChannelActivityPresentation}from"#channel/activity-renderer.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{isReservedSessionCommandToken}from"#execution/session-inbox/address.js";function createChannelAddress(e){let t=e.metadata??{},n=`${e.channelName}:${e.continuationToken}`;if(isReservedSessionCommandToken(n))throw Error(`Channel address "${n}" uses eve's reserved session namespace.`);return{continuationToken:e.continuationToken,async deliver(r,i){let a=t.channelKind!==void 0&&t.channelName!==void 0?createChannelDeliveryMetadata(t):void 0,o=normalizeSendInput(r),s=sessionCallbackToTurnCaller(i.callback),c={auth:i.auth,delivery:a,kind:`send`,payload:{...o,message:serializeUrlFilePartsInMessage(o.message)},requestId:t.requestId,turnPolicy:o.message===void 0?void 0:i.turnPolicy??e.turnPolicy??DEFAULT_TURN_POLICY},l=s===void 0?c:{...c,caller:s},u=await(async()=>{let r=await e.runtime.dispatchContinuation({command:l,continuationToken:n});return r.status===`accepted`?createSession(r.sessionId,e.runtime,{...t,turnPolicy:e.turnPolicy}):void 0})();if(u!==void 0)return u;if(o.inputResponses&&o.inputResponses.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);let d=i.state,f=d===void 0?e.adapter:{...e.adapter,state:{...e.adapter.state,...d}};f!==e.adapter&©ChannelActivityPresentation(e.adapter,f);let p=i.mode===`task`?void 0:{requestInput:!0},m={adapter:f,auth:i.auth,capabilities:p,callback:i.callback,channelName:e.channelName,continuationConflictCommand:l,continuationToken:n,delivery:a,initiatorAuth:i.initiatorAuth,input:{context:o.context,message:serializeUrlFilePartsInMessage(o.message)??``,outputSchema:o.outputSchema},mode:i.mode??`conversation`,requestId:t.requestId,title:i.title},h=await e.runtime.createSession(m);return createSession(h.sessionId,e.runtime,{...t,turnPolicy:e.turnPolicy})},async send(e,t){return await this.deliver({message:e},t)},async respond(e,t){if(e===void 0||e.length===0)throw Error(`respond() requires at least one input response.`);return await this.deliver({inputResponses:e},t)},async cancel(t){return await e.runtime.dispatchContinuation({command:{kind:`cancel`,turnId:t?.turnId},continuationToken:n})},async compact(){return await e.runtime.dispatchContinuation({command:{kind:`compact`},continuationToken:n})},async clear(){return await e.runtime.dispatchContinuation({command:{kind:`clear`},continuationToken:n})},async reset(t){return await e.runtime.dispatchContinuation({command:{kind:`reset`,reason:t?.reason},continuationToken:n})},async resolveSession(){let r=await e.runtime.resolveContinuation(n);return r===void 0?void 0:createSession(r.sessionId,e.runtime,{...t,turnPolicy:e.turnPolicy})}}}function createChannelAddressFn(e){return t=>createChannelAddress({...e,continuationToken:t})}export{createChannelAddress,createChannelAddressFn};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type { RunInput } from "#channel/types.js";
|
|
2
|
-
import { type ConversationContext, type ConversationEnvironment } from "#shared/conversation-context.js";
|
|
1
|
+
import type { RunInput, SessionAuthContext } from "#channel/types.js";
|
|
2
|
+
import { type AudienceCaller, type ConversationContext, type ConversationEnvironment } from "#shared/conversation-context.js";
|
|
3
3
|
export declare function buildConversationContext(run: RunInput, environment: ConversationEnvironment): ConversationContext;
|
|
4
|
+
/** Projects route auth into the minimal identity audience classifiers need. */
|
|
5
|
+
export declare function toAudienceCaller(auth: SessionAuthContext | null | undefined): AudienceCaller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveAudience}from"#channel/audience.js";import{buildChannelInstrumentationProjection}from"#channel/instrumentation.js";import{normalizeInstrumentationChannelKind}from"#shared/instrumentation-channel-kind.js";import{resolveConversationContext}from"#shared/conversation-context.js";import{readForwardedTraceAssertion}from"#shared/forwarded-trace-policy.js";function buildConversationContext(e,t){let n=Object.hasOwn(e,`audienceAuth`)?e.audienceAuth??null:e.auth,r=buildChannelInstrumentationProjection({adapter:e.adapter,channelName:e.channelName}),i={kind:normalizeInstrumentationChannelKind(r.kind),name:e.channelName},a=e.inheritedConversation,o=readForwardedTraceAssertion(e.parentTraceContext?.forwardedTracePolicy),s=o?.originAudience??a?.audience??resolveAudience(e.adapter,{state:e.adapter.state,auth:n,channel:i,mode:e.mode,environment:t});return{...resolveConversationContext(void 0,{channelKind:r.kind,environment:t,forwardedTracePolicy:o,mode:e.mode,principalType:n?.principalType}),audience:s,channel:i}}export{buildConversationContext};
|
|
1
|
+
import{resolveAudience}from"#channel/audience.js";import{buildChannelInstrumentationProjection}from"#channel/instrumentation.js";import{normalizeInstrumentationChannelKind}from"#shared/instrumentation-channel-kind.js";import{resolveConversationContext}from"#shared/conversation-context.js";import{readForwardedTraceAssertion}from"#shared/forwarded-trace-policy.js";function buildConversationContext(e,t){let n=Object.hasOwn(e,`audienceAuth`)?e.audienceAuth??null:e.auth,r=buildChannelInstrumentationProjection({adapter:e.adapter,channelName:e.channelName}),i={kind:normalizeInstrumentationChannelKind(r.kind),name:e.channelName},a=e.inheritedConversation,o=readForwardedTraceAssertion(e.parentTraceContext?.forwardedTracePolicy),s=o?.originAudience??a?.audience??resolveAudience(e.adapter,{state:e.adapter.state,auth:n,caller:toAudienceCaller(n),channel:i,mode:e.mode,environment:t});return{...resolveConversationContext(void 0,{channelKind:r.kind,environment:t,forwardedTracePolicy:o,mode:e.mode,principalType:n?.principalType}),audience:s,channel:i}}function toAudienceCaller(e){return e==null||e.principalType===`anonymous`?{type:`anonymous`}:{type:`principal`,principal:{attributes:e.attributes,authenticator:e.authenticator,kind:e.principalType}}}export{buildConversationContext,toAudienceCaller};
|
|
@@ -50,15 +50,16 @@ export type SessionRespondOptions = SessionDeliveryOptions;
|
|
|
50
50
|
* Live handle to the current session, exposed on `ctx.session` to
|
|
51
51
|
* `deliver` and event handlers. The framework hydrates the read-only
|
|
52
52
|
* fields from the active context at step start. A write through
|
|
53
|
-
* `continuation.
|
|
54
|
-
* runtime can
|
|
53
|
+
* `continuation.alias()` selects a new current address and records it so the
|
|
54
|
+
* runtime can add its hook to the session inbox at the next step boundary.
|
|
55
|
+
* Previously claimed addresses remain active.
|
|
55
56
|
*/
|
|
56
57
|
export interface SessionHandle {
|
|
57
58
|
readonly id: string;
|
|
58
59
|
readonly auth: SessionAuth;
|
|
59
60
|
readonly continuation?: {
|
|
60
61
|
readonly token: string;
|
|
61
|
-
|
|
62
|
+
alias(rawToken: string): void;
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
export declare function createSession(id: string, runtime: Runtime, metadata?: Partial<ChannelDeliverySource> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{parseInputResponses}from"#shared/input.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(e,t,n={}){return{id:e,async send(r,i){let a=createDelivery(n),o=sessionCallbackToTurnCaller(i.callback,i.activityObserver),s=attachClientContext({message:serializeUrlFilePartsInMessage(r)},readClientContext(i));i.context!==void 0&&(s.context=i.context),i.outputSchema!==void 0&&(s.outputSchema=i.outputSchema);let c={auth:i.auth,delivery:a,kind:`send`,payload:s,requestId:n.requestId,turnPolicy:i.turnPolicy??n.turnPolicy??DEFAULT_TURN_POLICY};return await t.dispatchSession({command:o===void 0?c:{...c,caller:o},sessionId:e})},async respond(r,i){if(r.length===0)throw Error(`respond() requires at least one input response.`);let a=parseInputResponses(r),o=sessionCallbackToTurnCaller(i.callback,i.activityObserver),s=createDelivery(n),c=attachClientContext({inputResponses:a},readClientContext(i));i.context!==void 0&&(c.context=i.context),i.outputSchema!==void 0&&(c.outputSchema=i.outputSchema);let l={auth:i.auth,delivery:s,kind:`send`,payload:c,requestId:n.requestId};return await t.dispatchSession({command:o===void 0?l:{...l,caller:o},sessionId:e})},async cancel(n){let r={kind:`cancel`};return n?.taskId!==void 0&&(r.taskId=n.taskId),n?.tasks!==void 0&&(r.tasks=n.tasks),n?.turnId!==void 0&&(r.turnId=n.turnId),await t.dispatchSession({command:r,sessionId:e})},async compact(){return await t.dispatchSession({command:{kind:`compact`},sessionId:e})},async clear(){return await t.dispatchSession({command:{kind:`clear`},sessionId:e})},async reset(n){return await t.dispatchSession({command:{kind:`reset`,reason:n?.reason},sessionId:e})},async getEventStream(n){return t.getEventStream(e,n)},async getStreamTailIndex(){return t.getStreamTailIndex(e)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(e){return e.channelKind!==void 0&&e.channelName!==void 0?createChannelDeliveryMetadata(e):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(t!==void 0&&t.length!==0)return{token:toChannelLocalContinuationToken(t),
|
|
1
|
+
import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{parseInputResponses}from"#shared/input.js";import{AuthKey,ContinuationHookTokensKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(e,t,n={}){return{id:e,async send(r,i){let a=createDelivery(n),o=sessionCallbackToTurnCaller(i.callback,i.activityObserver),s=attachClientContext({message:serializeUrlFilePartsInMessage(r)},readClientContext(i));i.context!==void 0&&(s.context=i.context),i.outputSchema!==void 0&&(s.outputSchema=i.outputSchema);let c={auth:i.auth,delivery:a,kind:`send`,payload:s,requestId:n.requestId,turnPolicy:i.turnPolicy??n.turnPolicy??DEFAULT_TURN_POLICY};return await t.dispatchSession({command:o===void 0?c:{...c,caller:o},sessionId:e})},async respond(r,i){if(r.length===0)throw Error(`respond() requires at least one input response.`);let a=parseInputResponses(r),o=sessionCallbackToTurnCaller(i.callback,i.activityObserver),s=createDelivery(n),c=attachClientContext({inputResponses:a},readClientContext(i));i.context!==void 0&&(c.context=i.context),i.outputSchema!==void 0&&(c.outputSchema=i.outputSchema);let l={auth:i.auth,delivery:s,kind:`send`,payload:c,requestId:n.requestId};return await t.dispatchSession({command:o===void 0?l:{...l,caller:o},sessionId:e})},async cancel(n){let r={kind:`cancel`};return n?.taskId!==void 0&&(r.taskId=n.taskId),n?.tasks!==void 0&&(r.tasks=n.tasks),n?.turnId!==void 0&&(r.turnId=n.turnId),await t.dispatchSession({command:r,sessionId:e})},async compact(){return await t.dispatchSession({command:{kind:`compact`},sessionId:e})},async clear(){return await t.dispatchSession({command:{kind:`clear`},sessionId:e})},async reset(n){return await t.dispatchSession({command:{kind:`reset`,reason:n?.reason},sessionId:e})},async getEventStream(n){return t.getEventStream(e,n)},async getStreamTailIndex(){return t.getStreamTailIndex(e)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(e){return e.channelKind!==void 0&&e.channelName!==void 0?createChannelDeliveryMetadata(e):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(t!==void 0&&t.length!==0)return{token:toChannelLocalContinuationToken(t),alias(n){if(n.length===0)throw Error(`A session alias requires a nonempty token.`);let r=namespaceContinuationToken(t,n);t!==r&&(e.set(ContinuationHookTokensKey,e=>{let n=e??[t];return n.includes(r)?n:[...n,r]}),e.set(ContinuationTokenKey,r))}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e,t){return e===void 0?void 0:{activityObserver:t,callId:e.callId,replyTo:{kind:`callback`,token:e.token,url:e.url},subagentName:e.subagentName,taskId:e.taskId}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UserContent } from "ai";
|
|
2
|
-
import type { SessionInboxAddress } from "#execution/
|
|
2
|
+
import type { SessionInboxAddress } from "#execution/session-inbox/address.js";
|
|
3
3
|
import type { MessageStreamEvent, UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
4
4
|
import type { CancelTurnResult as ProtocolCancelTurnResult } from "#protocol/cancel-turn.js";
|
|
5
5
|
import type { RunMode } from "#shared/run-mode.js";
|
|
@@ -255,6 +255,8 @@ export interface DeliverHookPayload {
|
|
|
255
255
|
/** Internal deadline signal sent through the stable session command inbox. */
|
|
256
256
|
export interface SessionTimeoutHookPayload {
|
|
257
257
|
readonly kind: "session-timeout";
|
|
258
|
+
/** The owner run that armed this timer; a later owner ignores a predecessor's deadline. */
|
|
259
|
+
readonly ownerRunId: string;
|
|
258
260
|
}
|
|
259
261
|
/** Requests a context compaction without delivering model input. */
|
|
260
262
|
export interface CompactSessionHookPayload {
|
|
@@ -428,10 +430,11 @@ export interface RunInput {
|
|
|
428
430
|
readonly activityObserver?: ActivityObserverConfig;
|
|
429
431
|
/**
|
|
430
432
|
* Session continuation token for delivery and hook creation. Channels can
|
|
431
|
-
*
|
|
432
|
-
* `ctx.session.continuation.
|
|
433
|
+
* add a continuation address during the first turn via
|
|
434
|
+
* `ctx.session.continuation.alias(...)` (e.g. Slack adopts its first
|
|
433
435
|
* post's `ts` as the thread root), so an initial placeholder token is
|
|
434
|
-
* acceptable when full identity isn't known until the first message.
|
|
436
|
+
* acceptable when full identity isn't known until the first message. Earlier
|
|
437
|
+
* addresses remain valid after an alias. ID-only
|
|
435
438
|
* transports omit this field.
|
|
436
439
|
*/
|
|
437
440
|
readonly continuationToken?: string;
|
|
@@ -21,7 +21,6 @@ const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACT
|
|
|
21
21
|
const EVE_DEV_RUNTIME_ARTIFACTS_SUSPEND_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/suspend`;
|
|
22
22
|
const EVE_DEV_RUNTIME_ARTIFACTS_RESUME_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/resume`;
|
|
23
23
|
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:attemptId/:token`;
|
|
24
|
-
const EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
25
24
|
const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`;
|
|
26
25
|
const EVE_TASK_INPUT_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/task-input/:token`;
|
|
27
26
|
const EVE_ACTIVITY_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/activity/:token`;
|
|
@@ -164,7 +163,12 @@ const modelEndpoint = z.union([
|
|
|
164
163
|
z.object({
|
|
165
164
|
kind: z.literal("gateway"),
|
|
166
165
|
connected: z.literal(true),
|
|
167
|
-
credential: z.enum([
|
|
166
|
+
credential: z.enum([
|
|
167
|
+
"api-key",
|
|
168
|
+
"oidc",
|
|
169
|
+
"oauth"
|
|
170
|
+
]),
|
|
171
|
+
team: z.optional(z.string())
|
|
168
172
|
}).strict(),
|
|
169
173
|
z.object({
|
|
170
174
|
kind: z.literal("gateway"),
|
|
@@ -337,14 +341,6 @@ const compositionDiagnostic = z.object({
|
|
|
337
341
|
sourceId: z.string(),
|
|
338
342
|
winnerSourceId: z.string().optional()
|
|
339
343
|
}).strict();
|
|
340
|
-
const workflow = z.discriminatedUnion("enabled", [z.object({
|
|
341
|
-
enabled: z.literal(false),
|
|
342
|
-
toolName: z.string()
|
|
343
|
-
}).strict(), z.object({
|
|
344
|
-
enabled: z.literal(true),
|
|
345
|
-
source,
|
|
346
|
-
toolName: z.string()
|
|
347
|
-
}).strict()]);
|
|
348
344
|
const AgentInfoResultSchema = z.object({
|
|
349
345
|
agent: z.object({
|
|
350
346
|
agentRoot: z.string(),
|
|
@@ -399,7 +395,6 @@ const AgentInfoResultSchema = z.object({
|
|
|
399
395
|
static: z.array(tool)
|
|
400
396
|
}).strict(),
|
|
401
397
|
version: z.literal(4),
|
|
402
|
-
workflow,
|
|
403
398
|
workspace: z.object({
|
|
404
399
|
resourceRoot: z.unknown(),
|
|
405
400
|
rootEntries: z.array(z.string())
|
|
@@ -503,7 +498,6 @@ const AgentInfoResultSchema = z.object({
|
|
|
503
498
|
"static",
|
|
504
499
|
index
|
|
505
500
|
]]),
|
|
506
|
-
...value.workflow.enabled ? [[value.workflow.source, ["workflow", "source"]]] : [],
|
|
507
501
|
[value.sandbox, ["sandbox"]]
|
|
508
502
|
];
|
|
509
503
|
for (const [entry, path] of boundSources) {
|
|
@@ -679,6 +673,11 @@ function incrementRandom(bytes) {
|
|
|
679
673
|
const EVE_SESSION_ID_HEADER = "x-eve-session-id";
|
|
680
674
|
const EVE_STREAM_TAIL_INDEX_HEADER = "x-eve-stream-tail-index";
|
|
681
675
|
const EVE_STREAM_VERSION_HEADER = "x-eve-stream-version";
|
|
676
|
+
const EVE_STREAM_CONTROL_VERSION_QUERY = "streamControlVersion";
|
|
677
|
+
const EVE_STREAM_LEASE_ENDED_CONTROL = {
|
|
678
|
+
$eve: "stream.lease-ended",
|
|
679
|
+
version: 1
|
|
680
|
+
};
|
|
682
681
|
const textEncoder = new TextEncoder();
|
|
683
682
|
function isCurrentTurnBoundaryEvent(event) {
|
|
684
683
|
return event.type === "session.completed" || event.type === "session.failed" || event.type === "session.waiting";
|
|
@@ -907,20 +906,32 @@ async function* readNdjsonStream(body, options) {
|
|
|
907
906
|
while (newlineIndex !== -1) {
|
|
908
907
|
const line = buffer.slice(0, newlineIndex).trim();
|
|
909
908
|
buffer = buffer.slice(newlineIndex + 1);
|
|
910
|
-
if (line.length > 0)
|
|
909
|
+
if (line.length > 0) {
|
|
910
|
+
const value = JSON.parse(line);
|
|
911
|
+
if (options.controlVersion === "1" && isLeaseEndedControl(value)) options.onLeaseEnded?.();
|
|
912
|
+
else yield parseMessageStreamEvent(value, options.streamVersion);
|
|
913
|
+
}
|
|
911
914
|
newlineIndex = buffer.indexOf("\n");
|
|
912
915
|
}
|
|
913
916
|
}
|
|
914
917
|
const trailing = buffer.trim();
|
|
915
|
-
if (trailing.length > 0)
|
|
918
|
+
if (trailing.length > 0) {
|
|
919
|
+
const value = JSON.parse(trailing);
|
|
920
|
+
if (options.controlVersion === "1" && isLeaseEndedControl(value)) options.onLeaseEnded?.();
|
|
921
|
+
else yield parseMessageStreamEvent(value, options.streamVersion);
|
|
922
|
+
}
|
|
916
923
|
} finally {
|
|
917
924
|
if (!reachedEof) reader.cancel().catch(() => {});
|
|
918
925
|
reader.releaseLock();
|
|
919
926
|
}
|
|
920
927
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
923
|
-
|
|
928
|
+
function isLeaseEndedControl(value) {
|
|
929
|
+
if (value === null || typeof value !== "object") return false;
|
|
930
|
+
const record = value;
|
|
931
|
+
return record.$eve === EVE_STREAM_LEASE_ENDED_CONTROL.$eve && record.version === EVE_STREAM_LEASE_ENDED_CONTROL.version;
|
|
932
|
+
}
|
|
933
|
+
function parseMessageStreamEvent(value, version) {
|
|
934
|
+
return normalizeMessageStreamEvent(version, value);
|
|
924
935
|
}
|
|
925
936
|
async function readWithIdleTimeout(reader, idleTimeoutMs) {
|
|
926
937
|
let timeout;
|
|
@@ -1078,9 +1089,14 @@ async function* followStreamIterable(input) {
|
|
|
1078
1089
|
return;
|
|
1079
1090
|
}
|
|
1080
1091
|
let deliveredEvent = false;
|
|
1092
|
+
let leaseEnded = false;
|
|
1081
1093
|
try {
|
|
1082
1094
|
for await (const event of readNdjsonStream(connection.body, {
|
|
1095
|
+
controlVersion: connection.controlVersion,
|
|
1083
1096
|
idleTimeoutMs: input.streamReadIdleTimeoutMs ?? DEFAULT_STREAM_READ_IDLE_TIMEOUT_MS,
|
|
1097
|
+
onLeaseEnded: () => {
|
|
1098
|
+
leaseEnded = true;
|
|
1099
|
+
},
|
|
1084
1100
|
streamVersion: connection.streamVersion
|
|
1085
1101
|
})) {
|
|
1086
1102
|
startIndex += 1;
|
|
@@ -1096,6 +1112,7 @@ async function* followStreamIterable(input) {
|
|
|
1096
1112
|
connection.close();
|
|
1097
1113
|
}
|
|
1098
1114
|
if (input.signal?.aborted || input.startIndex < 0 || idleRetryPolicy.maxAttempts === 0) return;
|
|
1115
|
+
if (leaseEnded) continue;
|
|
1099
1116
|
if (input.keepAlive !== true && !deliveredEvent && !initialConnection && (idleReconnects += 1) >= idleRetryPolicy.maxAttempts) return;
|
|
1100
1117
|
initialConnection = false;
|
|
1101
1118
|
await sleep(reconnectDelayMs, input.signal);
|
|
@@ -1104,13 +1121,15 @@ async function* followStreamIterable(input) {
|
|
|
1104
1121
|
}
|
|
1105
1122
|
}
|
|
1106
1123
|
async function openStreamBody(input) {
|
|
1107
|
-
const retryPolicy = input.retryPolicy ??
|
|
1124
|
+
const retryPolicy = input.retryPolicy ?? resolveStreamReconnectPolicy(input.streamReconnectPolicy);
|
|
1108
1125
|
const openRetryPolicy = retryPolicy.streamOpenReconnectPolicy;
|
|
1109
1126
|
let lastStatus;
|
|
1110
1127
|
let lastBody;
|
|
1111
1128
|
let lastHeaders;
|
|
1112
1129
|
let retryDelayMs = openRetryPolicy.baseDelayMs;
|
|
1130
|
+
const controlVersion = input.startIndex >= 0 && retryPolicy.streamIdleReconnectPolicy.maxAttempts > 0 ? "1" : void 0;
|
|
1113
1131
|
const searchParams = {};
|
|
1132
|
+
if (controlVersion !== void 0) searchParams[EVE_STREAM_CONTROL_VERSION_QUERY] = controlVersion;
|
|
1114
1133
|
if (input.startIndex !== 0) searchParams.startIndex = String(input.startIndex);
|
|
1115
1134
|
if (input.requestTailIndex === true) searchParams.includeTailIndex = "1";
|
|
1116
1135
|
for (let attempt = 0; attempt < openRetryPolicy.maxAttempts; attempt += 1) {
|
|
@@ -1143,6 +1162,7 @@ async function openStreamBody(input) {
|
|
|
1143
1162
|
response.body?.cancel().catch(() => {});
|
|
1144
1163
|
connectionController.abort();
|
|
1145
1164
|
},
|
|
1165
|
+
controlVersion,
|
|
1146
1166
|
streamVersion: readMessageStreamVersion(response.headers),
|
|
1147
1167
|
tailIndex: parseTailIndexHeader(response.headers)
|
|
1148
1168
|
};
|
|
@@ -1891,6 +1911,7 @@ var EveAgentStore = class {
|
|
|
1891
1911
|
completion: completion.promise,
|
|
1892
1912
|
followUpDispatches: /* @__PURE__ */ new Set(),
|
|
1893
1913
|
receivedFollowUps: 0,
|
|
1914
|
+
followUpSubmissionIds: /* @__PURE__ */ new Set(),
|
|
1894
1915
|
resolveCompletion: completion.resolve,
|
|
1895
1916
|
response: response.promise,
|
|
1896
1917
|
resolveResponse: response.resolve
|
|
@@ -1966,6 +1987,7 @@ var EveAgentStore = class {
|
|
|
1966
1987
|
completion: completion.promise,
|
|
1967
1988
|
followUpDispatches: /* @__PURE__ */ new Set(),
|
|
1968
1989
|
receivedFollowUps: 0,
|
|
1990
|
+
followUpSubmissionIds: /* @__PURE__ */ new Set(),
|
|
1969
1991
|
resolveCompletion: completion.resolve,
|
|
1970
1992
|
response: response.promise,
|
|
1971
1993
|
resolveResponse: response.resolve
|
|
@@ -2065,12 +2087,13 @@ var EveAgentStore = class {
|
|
|
2065
2087
|
this.#publish();
|
|
2066
2088
|
}
|
|
2067
2089
|
async #sendFollowUp(turn, input) {
|
|
2068
|
-
if (input.message === void 0 || input.turnPolicy !== "steer") throw new Error("eve session is already processing a turn. Send a message with turnPolicy: \"steer\" to
|
|
2090
|
+
if (input.message === void 0 || input.turnPolicy !== "steer") throw new Error("eve session is already processing a turn. Send a message with turnPolicy: \"steer\" to guide it at the next boundary.");
|
|
2069
2091
|
const preparedInput = await this.#callbacks.prepareSend?.(input) ?? input;
|
|
2070
2092
|
assertExclusiveTurnInput(preparedInput);
|
|
2071
2093
|
if (preparedInput.message === void 0 || preparedInput.turnPolicy !== "steer") throw new Error("An in-flight follow-up requires a message with turnPolicy: \"steer\".");
|
|
2072
2094
|
if (!this.#isActiveTurn(turn)) return await this.send(preparedInput);
|
|
2073
2095
|
const submissionId = this.#projectOptimisticMessage(preparedInput);
|
|
2096
|
+
if (submissionId !== void 0) turn.followUpSubmissionIds.add(submissionId);
|
|
2074
2097
|
this.#publish();
|
|
2075
2098
|
let dispatch;
|
|
2076
2099
|
dispatch = (async () => {
|
|
@@ -2097,7 +2120,6 @@ var EveAgentStore = class {
|
|
|
2097
2120
|
if (turn.receivedFollowUps >= turn.acceptedFollowUps || this.#session === void 0) return;
|
|
2098
2121
|
for await (const event of this.#session.stream({ signal: turn.abortController.signal })) {
|
|
2099
2122
|
if (!this.#isActiveTurn(turn)) return;
|
|
2100
|
-
if (event.type === "message.received") turn.receivedFollowUps += 1;
|
|
2101
2123
|
this.#acceptServerEvent(event);
|
|
2102
2124
|
if (isCurrentTurnBoundaryEvent(event)) {
|
|
2103
2125
|
while (turn.followUpDispatches.size > 0) await Promise.allSettled(turn.followUpDispatches);
|
|
@@ -2130,7 +2152,7 @@ var EveAgentStore = class {
|
|
|
2130
2152
|
return this.#activeTurn === turn;
|
|
2131
2153
|
}
|
|
2132
2154
|
#projectOptimisticMessage(input) {
|
|
2133
|
-
if (
|
|
2155
|
+
if (input.message === void 0) return;
|
|
2134
2156
|
const id = createSubmissionId();
|
|
2135
2157
|
const pending = {
|
|
2136
2158
|
createdAt: Date.now(),
|
|
@@ -2138,7 +2160,7 @@ var EveAgentStore = class {
|
|
|
2138
2160
|
message: summarizeUserContent(input.message)
|
|
2139
2161
|
};
|
|
2140
2162
|
this.#pendingMessageSubmissions = [...this.#pendingMessageSubmissions, pending];
|
|
2141
|
-
this.#appendProjectionEvent({
|
|
2163
|
+
if (this.#optimistic) this.#appendProjectionEvent({
|
|
2142
2164
|
data: {
|
|
2143
2165
|
createdAt: pending.createdAt,
|
|
2144
2166
|
message: pending.message,
|
|
@@ -2171,6 +2193,7 @@ var EveAgentStore = class {
|
|
|
2171
2193
|
const pendingSubmission = this.#pendingMessageSubmissions[0];
|
|
2172
2194
|
if (event.type === "message.received" && pendingSubmission !== void 0) {
|
|
2173
2195
|
const submissionId = pendingSubmission.id;
|
|
2196
|
+
if (this.#activeTurn?.followUpSubmissionIds.delete(submissionId)) this.#activeTurn.receivedFollowUps += 1;
|
|
2174
2197
|
this.#pendingMessageSubmissions = this.#pendingMessageSubmissions.slice(1);
|
|
2175
2198
|
this.#replaceProjectionEvent((candidate) => candidate.type === "client.message.submitted" && candidate.data.submissionId === submissionId, event);
|
|
2176
2199
|
return;
|
|
@@ -21,7 +21,6 @@ const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACT
|
|
|
21
21
|
const EVE_DEV_RUNTIME_ARTIFACTS_SUSPEND_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/suspend`;
|
|
22
22
|
const EVE_DEV_RUNTIME_ARTIFACTS_RESUME_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/resume`;
|
|
23
23
|
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:attemptId/:token`;
|
|
24
|
-
const EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
25
24
|
const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`;
|
|
26
25
|
const EVE_TASK_INPUT_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/task-input/:token`;
|
|
27
26
|
const EVE_ACTIVITY_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/activity/:token`;
|
|
@@ -164,7 +163,12 @@ const modelEndpoint = z.union([
|
|
|
164
163
|
z.object({
|
|
165
164
|
kind: z.literal("gateway"),
|
|
166
165
|
connected: z.literal(true),
|
|
167
|
-
credential: z.enum([
|
|
166
|
+
credential: z.enum([
|
|
167
|
+
"api-key",
|
|
168
|
+
"oidc",
|
|
169
|
+
"oauth"
|
|
170
|
+
]),
|
|
171
|
+
team: z.optional(z.string())
|
|
168
172
|
}).strict(),
|
|
169
173
|
z.object({
|
|
170
174
|
kind: z.literal("gateway"),
|
|
@@ -337,14 +341,6 @@ const compositionDiagnostic = z.object({
|
|
|
337
341
|
sourceId: z.string(),
|
|
338
342
|
winnerSourceId: z.string().optional()
|
|
339
343
|
}).strict();
|
|
340
|
-
const workflow = z.discriminatedUnion("enabled", [z.object({
|
|
341
|
-
enabled: z.literal(false),
|
|
342
|
-
toolName: z.string()
|
|
343
|
-
}).strict(), z.object({
|
|
344
|
-
enabled: z.literal(true),
|
|
345
|
-
source,
|
|
346
|
-
toolName: z.string()
|
|
347
|
-
}).strict()]);
|
|
348
344
|
const AgentInfoResultSchema = z.object({
|
|
349
345
|
agent: z.object({
|
|
350
346
|
agentRoot: z.string(),
|
|
@@ -399,7 +395,6 @@ const AgentInfoResultSchema = z.object({
|
|
|
399
395
|
static: z.array(tool)
|
|
400
396
|
}).strict(),
|
|
401
397
|
version: z.literal(4),
|
|
402
|
-
workflow,
|
|
403
398
|
workspace: z.object({
|
|
404
399
|
resourceRoot: z.unknown(),
|
|
405
400
|
rootEntries: z.array(z.string())
|
|
@@ -503,7 +498,6 @@ const AgentInfoResultSchema = z.object({
|
|
|
503
498
|
"static",
|
|
504
499
|
index
|
|
505
500
|
]]),
|
|
506
|
-
...value.workflow.enabled ? [[value.workflow.source, ["workflow", "source"]]] : [],
|
|
507
501
|
[value.sandbox, ["sandbox"]]
|
|
508
502
|
];
|
|
509
503
|
for (const [entry, path] of boundSources) {
|
|
@@ -679,6 +673,11 @@ function incrementRandom(bytes) {
|
|
|
679
673
|
const EVE_SESSION_ID_HEADER = "x-eve-session-id";
|
|
680
674
|
const EVE_STREAM_TAIL_INDEX_HEADER = "x-eve-stream-tail-index";
|
|
681
675
|
const EVE_STREAM_VERSION_HEADER = "x-eve-stream-version";
|
|
676
|
+
const EVE_STREAM_CONTROL_VERSION_QUERY = "streamControlVersion";
|
|
677
|
+
const EVE_STREAM_LEASE_ENDED_CONTROL = {
|
|
678
|
+
$eve: "stream.lease-ended",
|
|
679
|
+
version: 1
|
|
680
|
+
};
|
|
682
681
|
const textEncoder = new TextEncoder();
|
|
683
682
|
function isCurrentTurnBoundaryEvent(event) {
|
|
684
683
|
return event.type === "session.completed" || event.type === "session.failed" || event.type === "session.waiting";
|
|
@@ -907,20 +906,32 @@ async function* readNdjsonStream(body, options) {
|
|
|
907
906
|
while (newlineIndex !== -1) {
|
|
908
907
|
const line = buffer.slice(0, newlineIndex).trim();
|
|
909
908
|
buffer = buffer.slice(newlineIndex + 1);
|
|
910
|
-
if (line.length > 0)
|
|
909
|
+
if (line.length > 0) {
|
|
910
|
+
const value = JSON.parse(line);
|
|
911
|
+
if (options.controlVersion === "1" && isLeaseEndedControl(value)) options.onLeaseEnded?.();
|
|
912
|
+
else yield parseMessageStreamEvent(value, options.streamVersion);
|
|
913
|
+
}
|
|
911
914
|
newlineIndex = buffer.indexOf("\n");
|
|
912
915
|
}
|
|
913
916
|
}
|
|
914
917
|
const trailing = buffer.trim();
|
|
915
|
-
if (trailing.length > 0)
|
|
918
|
+
if (trailing.length > 0) {
|
|
919
|
+
const value = JSON.parse(trailing);
|
|
920
|
+
if (options.controlVersion === "1" && isLeaseEndedControl(value)) options.onLeaseEnded?.();
|
|
921
|
+
else yield parseMessageStreamEvent(value, options.streamVersion);
|
|
922
|
+
}
|
|
916
923
|
} finally {
|
|
917
924
|
if (!reachedEof) reader.cancel().catch(() => {});
|
|
918
925
|
reader.releaseLock();
|
|
919
926
|
}
|
|
920
927
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
923
|
-
|
|
928
|
+
function isLeaseEndedControl(value) {
|
|
929
|
+
if (value === null || typeof value !== "object") return false;
|
|
930
|
+
const record = value;
|
|
931
|
+
return record.$eve === EVE_STREAM_LEASE_ENDED_CONTROL.$eve && record.version === EVE_STREAM_LEASE_ENDED_CONTROL.version;
|
|
932
|
+
}
|
|
933
|
+
function parseMessageStreamEvent(value, version) {
|
|
934
|
+
return normalizeMessageStreamEvent(version, value);
|
|
924
935
|
}
|
|
925
936
|
async function readWithIdleTimeout(reader, idleTimeoutMs) {
|
|
926
937
|
let timeout;
|
|
@@ -1078,9 +1089,14 @@ async function* followStreamIterable(input) {
|
|
|
1078
1089
|
return;
|
|
1079
1090
|
}
|
|
1080
1091
|
let deliveredEvent = false;
|
|
1092
|
+
let leaseEnded = false;
|
|
1081
1093
|
try {
|
|
1082
1094
|
for await (const event of readNdjsonStream(connection.body, {
|
|
1095
|
+
controlVersion: connection.controlVersion,
|
|
1083
1096
|
idleTimeoutMs: input.streamReadIdleTimeoutMs ?? DEFAULT_STREAM_READ_IDLE_TIMEOUT_MS,
|
|
1097
|
+
onLeaseEnded: () => {
|
|
1098
|
+
leaseEnded = true;
|
|
1099
|
+
},
|
|
1084
1100
|
streamVersion: connection.streamVersion
|
|
1085
1101
|
})) {
|
|
1086
1102
|
startIndex += 1;
|
|
@@ -1096,6 +1112,7 @@ async function* followStreamIterable(input) {
|
|
|
1096
1112
|
connection.close();
|
|
1097
1113
|
}
|
|
1098
1114
|
if (input.signal?.aborted || input.startIndex < 0 || idleRetryPolicy.maxAttempts === 0) return;
|
|
1115
|
+
if (leaseEnded) continue;
|
|
1099
1116
|
if (input.keepAlive !== true && !deliveredEvent && !initialConnection && (idleReconnects += 1) >= idleRetryPolicy.maxAttempts) return;
|
|
1100
1117
|
initialConnection = false;
|
|
1101
1118
|
await sleep(reconnectDelayMs, input.signal);
|
|
@@ -1104,13 +1121,15 @@ async function* followStreamIterable(input) {
|
|
|
1104
1121
|
}
|
|
1105
1122
|
}
|
|
1106
1123
|
async function openStreamBody(input) {
|
|
1107
|
-
const retryPolicy = input.retryPolicy ??
|
|
1124
|
+
const retryPolicy = input.retryPolicy ?? resolveStreamReconnectPolicy(input.streamReconnectPolicy);
|
|
1108
1125
|
const openRetryPolicy = retryPolicy.streamOpenReconnectPolicy;
|
|
1109
1126
|
let lastStatus;
|
|
1110
1127
|
let lastBody;
|
|
1111
1128
|
let lastHeaders;
|
|
1112
1129
|
let retryDelayMs = openRetryPolicy.baseDelayMs;
|
|
1130
|
+
const controlVersion = input.startIndex >= 0 && retryPolicy.streamIdleReconnectPolicy.maxAttempts > 0 ? "1" : void 0;
|
|
1113
1131
|
const searchParams = {};
|
|
1132
|
+
if (controlVersion !== void 0) searchParams[EVE_STREAM_CONTROL_VERSION_QUERY] = controlVersion;
|
|
1114
1133
|
if (input.startIndex !== 0) searchParams.startIndex = String(input.startIndex);
|
|
1115
1134
|
if (input.requestTailIndex === true) searchParams.includeTailIndex = "1";
|
|
1116
1135
|
for (let attempt = 0; attempt < openRetryPolicy.maxAttempts; attempt += 1) {
|
|
@@ -1143,6 +1162,7 @@ async function openStreamBody(input) {
|
|
|
1143
1162
|
response.body?.cancel().catch(() => {});
|
|
1144
1163
|
connectionController.abort();
|
|
1145
1164
|
},
|
|
1165
|
+
controlVersion,
|
|
1146
1166
|
streamVersion: readMessageStreamVersion(response.headers),
|
|
1147
1167
|
tailIndex: parseTailIndexHeader(response.headers)
|
|
1148
1168
|
};
|
|
@@ -1891,6 +1911,7 @@ var EveAgentStore = class {
|
|
|
1891
1911
|
completion: completion.promise,
|
|
1892
1912
|
followUpDispatches: /* @__PURE__ */ new Set(),
|
|
1893
1913
|
receivedFollowUps: 0,
|
|
1914
|
+
followUpSubmissionIds: /* @__PURE__ */ new Set(),
|
|
1894
1915
|
resolveCompletion: completion.resolve,
|
|
1895
1916
|
response: response.promise,
|
|
1896
1917
|
resolveResponse: response.resolve
|
|
@@ -1966,6 +1987,7 @@ var EveAgentStore = class {
|
|
|
1966
1987
|
completion: completion.promise,
|
|
1967
1988
|
followUpDispatches: /* @__PURE__ */ new Set(),
|
|
1968
1989
|
receivedFollowUps: 0,
|
|
1990
|
+
followUpSubmissionIds: /* @__PURE__ */ new Set(),
|
|
1969
1991
|
resolveCompletion: completion.resolve,
|
|
1970
1992
|
response: response.promise,
|
|
1971
1993
|
resolveResponse: response.resolve
|
|
@@ -2065,12 +2087,13 @@ var EveAgentStore = class {
|
|
|
2065
2087
|
this.#publish();
|
|
2066
2088
|
}
|
|
2067
2089
|
async #sendFollowUp(turn, input) {
|
|
2068
|
-
if (input.message === void 0 || input.turnPolicy !== "steer") throw new Error("eve session is already processing a turn. Send a message with turnPolicy: \"steer\" to
|
|
2090
|
+
if (input.message === void 0 || input.turnPolicy !== "steer") throw new Error("eve session is already processing a turn. Send a message with turnPolicy: \"steer\" to guide it at the next boundary.");
|
|
2069
2091
|
const preparedInput = await this.#callbacks.prepareSend?.(input) ?? input;
|
|
2070
2092
|
assertExclusiveTurnInput(preparedInput);
|
|
2071
2093
|
if (preparedInput.message === void 0 || preparedInput.turnPolicy !== "steer") throw new Error("An in-flight follow-up requires a message with turnPolicy: \"steer\".");
|
|
2072
2094
|
if (!this.#isActiveTurn(turn)) return await this.send(preparedInput);
|
|
2073
2095
|
const submissionId = this.#projectOptimisticMessage(preparedInput);
|
|
2096
|
+
if (submissionId !== void 0) turn.followUpSubmissionIds.add(submissionId);
|
|
2074
2097
|
this.#publish();
|
|
2075
2098
|
let dispatch;
|
|
2076
2099
|
dispatch = (async () => {
|
|
@@ -2097,7 +2120,6 @@ var EveAgentStore = class {
|
|
|
2097
2120
|
if (turn.receivedFollowUps >= turn.acceptedFollowUps || this.#session === void 0) return;
|
|
2098
2121
|
for await (const event of this.#session.stream({ signal: turn.abortController.signal })) {
|
|
2099
2122
|
if (!this.#isActiveTurn(turn)) return;
|
|
2100
|
-
if (event.type === "message.received") turn.receivedFollowUps += 1;
|
|
2101
2123
|
this.#acceptServerEvent(event);
|
|
2102
2124
|
if (isCurrentTurnBoundaryEvent(event)) {
|
|
2103
2125
|
while (turn.followUpDispatches.size > 0) await Promise.allSettled(turn.followUpDispatches);
|
|
@@ -2130,7 +2152,7 @@ var EveAgentStore = class {
|
|
|
2130
2152
|
return this.#activeTurn === turn;
|
|
2131
2153
|
}
|
|
2132
2154
|
#projectOptimisticMessage(input) {
|
|
2133
|
-
if (
|
|
2155
|
+
if (input.message === void 0) return;
|
|
2134
2156
|
const id = createSubmissionId();
|
|
2135
2157
|
const pending = {
|
|
2136
2158
|
createdAt: Date.now(),
|
|
@@ -2138,7 +2160,7 @@ var EveAgentStore = class {
|
|
|
2138
2160
|
message: summarizeUserContent(input.message)
|
|
2139
2161
|
};
|
|
2140
2162
|
this.#pendingMessageSubmissions = [...this.#pendingMessageSubmissions, pending];
|
|
2141
|
-
this.#appendProjectionEvent({
|
|
2163
|
+
if (this.#optimistic) this.#appendProjectionEvent({
|
|
2142
2164
|
data: {
|
|
2143
2165
|
createdAt: pending.createdAt,
|
|
2144
2166
|
message: pending.message,
|
|
@@ -2171,6 +2193,7 @@ var EveAgentStore = class {
|
|
|
2171
2193
|
const pendingSubmission = this.#pendingMessageSubmissions[0];
|
|
2172
2194
|
if (event.type === "message.received" && pendingSubmission !== void 0) {
|
|
2173
2195
|
const submissionId = pendingSubmission.id;
|
|
2196
|
+
if (this.#activeTurn?.followUpSubmissionIds.delete(submissionId)) this.#activeTurn.receivedFollowUps += 1;
|
|
2174
2197
|
this.#pendingMessageSubmissions = this.#pendingMessageSubmissions.slice(1);
|
|
2175
2198
|
this.#replaceProjectionEvent((candidate) => candidate.type === "client.message.submitted" && candidate.data.submissionId === submissionId, event);
|
|
2176
2199
|
return;
|