eve 0.68.0 → 0.70.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 +132 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +30 -57
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-CJQeE7-t.js} +2058 -1331
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-DdemtY6C.js} +2061 -1331
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/console-records-preload.d.ts +1 -0
- package/dist/src/cli/dev/console-records-preload.js +1 -0
- package/dist/src/cli/dev/console-records.d.ts +17 -0
- package/dist/src/cli/dev/console-records.js +3 -0
- package/dist/src/cli/dev/diagnostic-sink.d.ts +1 -0
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +21 -19
- package/dist/src/cli/dev/tui/blocks.js +4 -4
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/conversation-view.d.ts +54 -0
- package/dist/src/cli/dev/tui/conversation-view.js +1 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +5 -2
- package/dist/src/cli/dev/tui/flow-drawer.js +1 -1
- package/dist/src/cli/dev/tui/log-display-mode.d.ts +4 -10
- package/dist/src/cli/dev/tui/log-display-mode.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +7 -63
- package/dist/src/cli/dev/tui/message-queue.js +3 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/question-panel.d.ts +3 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +60 -174
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +59 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +18 -57
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -13
- package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +2 -0
- package/dist/src/cli/dev/tui/terminal-tool-part.js +1 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +34 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -0
- package/dist/src/cli/dev/tui/test/index.d.ts +1 -0
- package/dist/src/cli/dev/tui/test/index.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +17 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/tool-rows.d.ts +1 -0
- package/dist/src/cli/dev/tui/tool-rows.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +73 -0
- package/dist/src/cli/dev/tui/transcript-parts.js +3 -0
- package/dist/src/cli/dev/tui/transcript.d.ts +47 -0
- package/dist/src/cli/dev/tui/transcript.js +1 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/turn-clock.d.ts +11 -26
- package/dist/src/cli/dev/tui/turn-clock.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +13 -9
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/dev/ui-options.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/agent-stream-follower.d.ts +26 -0
- package/dist/src/client/agent-stream-follower.js +1 -0
- package/dist/src/client/authorization-message-parts.js +1 -1
- package/dist/src/client/conversation-client.d.ts +40 -0
- package/dist/src/client/conversation-client.js +1 -0
- package/dist/src/client/conversation-reducer.d.ts +29 -0
- package/dist/src/client/conversation-reducer.js +1 -0
- package/dist/src/client/conversation-state.d.ts +110 -0
- package/dist/src/client/conversation-state.js +1 -0
- package/dist/src/client/eve-agent-projection.d.ts +24 -7
- package/dist/src/client/eve-agent-projection.js +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +20 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store-state.d.ts +15 -3
- package/dist/src/client/eve-agent-store.d.ts +10 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +5 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-primitives.d.ts +1 -2
- package/dist/src/client/message-reducer-primitives.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +9 -2
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/message-run-parts.d.ts +10 -6
- package/dist/src/client/message-run-parts.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.d.ts +6 -4
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/reducer.d.ts +5 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-turn-dispatch.d.ts +15 -0
- package/dist/src/client/session-turn-dispatch.js +1 -0
- package/dist/src/client/session-utils.d.ts +29 -2
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +4 -5
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/computer-use/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
- package/dist/src/context/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +12 -15
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +5 -11
- package/dist/src/context/run-step.d.ts +5 -6
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +34 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +62 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +12 -28
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +4 -3
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -5
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.d.ts +2 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/legacy-session/prepare-step.d.ts +1 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -1
- package/dist/src/execution/legacy-session/snapshot.d.ts +8 -4
- package/dist/src/execution/legacy-session/snapshot.js +1 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +150 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +97 -0
- package/dist/src/execution/session/active-turn.js +1 -0
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +21 -5
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +44 -39
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +7 -10
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.d.ts +2 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +26 -18
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +40 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +2 -2
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +37 -19
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +41 -3
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +5 -6
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +23 -10
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +18 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +7 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -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/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +17 -3
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/cancelled-turn-emission.d.ts +2 -1
- package/dist/src/harness/cancelled-turn-emission.js +1 -1
- package/dist/src/harness/coordination.d.ts +36 -30
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +11 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/held-requests.d.ts +18 -0
- package/dist/src/harness/held-requests.js +1 -0
- package/dist/src/harness/hitl/approval-input-requests.d.ts +16 -0
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.d.ts +0 -4
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +45 -40
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +8 -5
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +25 -21
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/channel-delivery.d.ts +1 -0
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +7 -0
- package/dist/src/instrumentation/memory.d.ts +2 -0
- package/dist/src/instrumentation/memory.js +1 -1
- package/dist/src/instrumentation/native-events.d.ts +1 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +5 -7
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +20 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-remote-agent-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +27 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +2 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +166 -69
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/approval-cards.d.ts +15 -0
- package/dist/src/public/channels/slack/approval-cards.js +2 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +5 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +20 -16
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -33
- package/dist/src/public/channels/slack/defaults.js +3 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +10 -2
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +6 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/limits.d.ts +5 -3
- package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/reply-delivery.d.ts +72 -0
- package/dist/src/public/channels/slack/reply-delivery.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/sign-in-cancel.d.ts +20 -0
- package/dist/src/public/channels/slack/sign-in-cancel.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +62 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +1 -1
- package/dist/src/public/channels/teams/defaults.js +2 -2
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +7 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +2 -0
- package/dist/src/public/next/server.js +1 -2
- package/dist/src/public/nuxt/module.d.ts +6 -0
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +7 -5
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -9
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +3 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/integrations/web/setup.js +6 -2
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +28 -9
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -8
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/display-name.d.ts +15 -0
- package/dist/src/shared/display-name.js +1 -0
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/framework-eve-server.d.ts +43 -0
- package/dist/src/shared/framework-eve-server.js +2 -0
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/token-usage.d.ts +2 -0
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/trace-root.d.ts +8 -0
- package/dist/src/shared/trace-root.js +1 -0
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +38 -20
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +4 -3
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.d.ts +3 -0
- package/dist/src/svelte/index.js +2 -2
- package/dist/src/svelte/use-eve-agent.d.ts +7 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +50 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-attributes.d.ts +6 -0
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- 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 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +5 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/conversation-context.d.ts +10 -0
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.d.ts +3 -0
- package/dist/src/vue/index.js +2 -2
- package/dist/src/vue/use-eve-agent.d.ts +7 -3
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +287 -45
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +37 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/sessions-runs-and-streaming.md +69 -49
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +11 -5
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +10 -4
- package/docs/extensions.md +22 -2
- package/docs/guides/client/streaming.mdx +33 -12
- package/docs/guides/deployment/vercel.mdx +2 -1
- package/docs/guides/dev-tui.md +26 -16
- package/docs/guides/dynamic-capabilities.md +6 -4
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/nuxt.mdx +24 -4
- package/docs/guides/frontend/overview.mdx +45 -41
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +4 -10
- package/docs/guides/frontend/use-eve-agent-vue.mdx +4 -10
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/instrumentation/otel.mdx +24 -6
- package/docs/guides/remote-agents.md +38 -22
- package/docs/guides/self-modification.md +10 -0
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +64 -11
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +50 -15
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +80 -60
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +18 -12
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +0 -15
- package/dist/src/cli/dev/tui/steering-stream.js +0 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +0 -142
- package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/nuxt/dev-server.d.ts +0 -25
- package/dist/src/public/nuxt/dev-server.js +0 -1
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";const owner=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string(),packageName:z.string()}).strict()]),moduleBacking=z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),z.object({dependencies:z.record(z.string(),z.string()).optional(),kind:z.literal(`programmatic`),moduleId:z.string(),parameters:z.record(z.string(),z.unknown()).optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict()]),binding=z.object({backing:moduleBacking,logicalPath:z.string(),owner}).strict(),source=z.object({binding:binding.optional(),exportName:z.string().optional(),logicalPath:z.string(),owner,sourceId:z.string(),sourceKind:z.enum([`markdown`,`module`,`skill-package`])}).strict(),entry=source.extend({name:z.string()}).strict(),dynamicResolver=source.extend({eventNames:z.array(z.string()),slug:z.string()}).strict(),modelRouting=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),modelEndpoint=z.union([z.object({kind:z.literal(`external`),provider:z.string()}).strict(),z.object({kind:z.literal(`chatgpt`),state:z.enum([`checking`,`ready`,`signed-out`,`reauth-required`,`unavailable`]),accountLabel:z.string().optional()}).strict(),z.object({kind:z.literal(`gateway`),connected:z.literal(!0),credential:z.enum([`api-key`,`oidc`,`oauth`]),team:z.optional(z.string())}).strict(),z.object({kind:z.literal(`gateway`),connected:z.literal(!1)}).strict()]),modelBaseFields={contextWindowTokens:z.number().optional(),providerOptions:z.unknown().optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional().catch(void 0),source:source.optional()},agentModel=z.union([z.object({...modelBaseFields,endpoint:modelEndpoint.optional(),id:z.string(),routing:modelRouting}).strict(),z.object({...modelBaseFields,endpoint:z.never().optional(),id:z.never().optional(),routing:z.object({kind:z.literal(`dynamic`),resolver:dynamicResolver}).strict()}).strict()]),tool=entry.extend({description:z.string(),hasAuth:z.boolean(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),hasOutputSchema:z.boolean(),inputSchema:z.unknown(),outputSchema:z.unknown().optional(),requiresApproval:z.boolean()}).strict(),skill=entry.extend({description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional()}).strict(),instructions=entry.extend({content:z.string(),role:z.enum([`system`,`user`])}).strict(),schedule=entry.extend({cron:z.string(),hasRun:z.boolean(),markdown:z.string().optional()}).strict(),channelMethod=z.enum([`GET`,`HEAD`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`WEBSOCKET`]),channelRoute=entry.extend({adapterKind:z.string().optional(),method:channelMethod,urlPath:z.string()}).strict(),sourceDescriptor=z.object({backing:z.union([moduleBacking,z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict()]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner,sourceId:z.string()}).strict(),shadowedChannelRoute=z.object({method:channelMethod,source:sourceDescriptor,urlPath:z.string(),winnerSourceId:z.string()}).strict(),connection=source.extend({connectionName:z.string(),description:z.string(),hasApproval:z.boolean(),hasAuthorization:z.boolean(),hasHeaders:z.boolean(),protocol:z.string(),toolFilter:z.unknown().optional(),url:z.string()}).strict(),hook=source.extend({eventNames:z.array(z.string()),slug:z.string()}).strict(),memory=source.extend({description:z.string().optional(),slot:z.string(),visibility:z.enum([`scope`,`session`])}).strict(),sandbox=source.extend({provider:z.string().optional(),environmentExportName:z.string().optional(),revisionHash:z.string()}).strict(),subagent=entry.extend({configResolver:dynamicResolver.optional(),description:z.string().optional(),entryPath:z.string(),nodeId:z.string(),parentNodeId:z.string(),rootPath:z.string(),summary:z.object({channels:z.number(),connections:z.number(),hooks:z.number(),instructions:z.number(),memories:z.number(),schedules:z.number(),skills:z.number(),tools:z.number()}).strict()}).strict(),remoteAgent=entry.extend({description:z.string(),nodeId:z.string(),parentNodeId:z.string(),url:z.string().optional()}).strict(),kernelEffect=z.object({action:z.enum([`subagent-call`,`task-cancel`,`workflow-tool-call`]).optional(),audience:z.array(z.enum([`root-session`,`delegated-task-child`])),kind:z.enum([`dispatch`,`provider-tool`]),sourceId:z.string()}).strict(),compositionDiagnostic=z.object({kind:z.enum([`disabled`,`shadowed`]),logicalPath:z.string(),owner,sourceId:z.string(),winnerSourceId:z.string().optional()}).strict(),AgentInfoResultSchema=z.object({agent:z.object({agentRoot:z.string(),appRoot:z.string(),config:source.extend({binding}).strict(),description:z.string().optional(),model:agentModel,name:z.string(),nodeId:z.string(),outputSchema:z.unknown().optional()}).strict(),capabilities:z.object({devRoutes:z.boolean()}).strict(),channels:z.object({routes:z.array(channelRoute),shadowed:z.array(shadowedChannelRoute)}).strict(),composition:z.object({disabled:z.array(compositionDiagnostic),shadowed:z.array(compositionDiagnostic)}).strict(),connections:z.array(connection),diagnostics:z.object({discoveryErrors:z.number(),discoveryWarnings:z.number()}).strict(),hooks:z.array(hook),instructions:z.object({dynamic:z.array(dynamicResolver),static:z.array(instructions)}).strict(),instrumentation:source.optional(),kernelEffects:z.array(kernelEffect),kind:z.literal(`eve-agent-info`),memories:z.array(memory),mode:z.enum([`development`,`production`]),remoteAgents:z.object({entries:z.array(remoteAgent),total:z.number()}).strict(),sandbox,schedules:z.array(schedule),skills:z.object({dynamic:z.array(dynamicResolver),static:z.array(skill)}).strict(),subagents:z.object({local:z.array(subagent),total:z.number()}).strict(),tools:z.object({dynamic:z.array(dynamicResolver),static:z.array(tool)}).strict(),version:z.literal(5),workspace:z.object({resourceRoot:z.unknown(),rootEntries:z.array(z.string())}).strict()}).strict().superRefine((e,t)=>{let assertUnique=(e,n,r)=>{let i=new Set;e.forEach((e,a)=>{let o=n(e);i.has(o)&&t.addIssue({code:`custom`,message:`Duplicate public identity "${o}".`,path:[...r,a]}),i.add(o)})},assertTotal=(e,n,r)=>{(!Number.isSafeInteger(e)||e<0||e!==n.length)&&t.addIssue({code:`custom`,message:`Expected total ${n.length}, received ${e}.`,path:[...r]})};assertUnique(e.tools.static,e=>e.name,[`tools`,`static`]),assertUnique(e.tools.dynamic,e=>e.slug,[`tools`,`dynamic`]),assertUnique(e.skills.static,e=>e.name,[`skills`,`static`]),assertUnique(e.skills.dynamic,e=>e.slug,[`skills`,`dynamic`]),assertUnique(e.instructions.static,e=>e.name,[`instructions`,`static`]),assertUnique(e.instructions.dynamic,e=>e.slug,[`instructions`,`dynamic`]),assertUnique(e.schedules,e=>e.name,[`schedules`]),assertUnique(e.connections,e=>e.connectionName,[`connections`]),assertUnique(e.hooks,e=>e.slug,[`hooks`]),assertUnique(e.memories,e=>e.slot,[`memories`]),assertUnique(e.channels.routes,e=>`${e.method} ${normalizeRoutePattern(e.urlPath)}`,[`channels`,`routes`]),assertUnique(e.subagents.local,e=>e.nodeId,[`subagents`,`local`]),assertUnique(e.remoteAgents.entries,e=>e.nodeId,[`remoteAgents`,`entries`]),assertTotal(e.subagents.total,e.subagents.local,[`subagents`,`total`]),assertTotal(e.remoteAgents.total,e.remoteAgents.entries,[`remoteAgents`,`total`]);let n=[[e.agent.config,[`agent`,`config`]],...e.agent.model.source===void 0?[]:[[e.agent.model.source,[`agent`,`model`,`source`]]],...e.agent.model.routing.kind===`dynamic`?[[e.agent.model.routing.resolver,[`agent`,`model`,`routing`,`resolver`]]]:[],...e.channels.routes.map((e,t)=>[e,[`channels`,`routes`,t]]),...e.connections.map((e,t)=>[e,[`connections`,t]]),...e.hooks.map((e,t)=>[e,[`hooks`,t]]),...e.instructions.dynamic.map((e,t)=>[e,[`instructions`,`dynamic`,t]]),...e.instructions.static.map((e,t)=>[e,[`instructions`,`static`,t]]),...e.memories.map((e,t)=>[e,[`memories`,t]]),...e.instrumentation===void 0?[]:[[e.instrumentation,[`instrumentation`]]],...e.remoteAgents.entries.map((e,t)=>[e,[`remoteAgents`,`entries`,t]]),...e.schedules.map((e,t)=>[e,[`schedules`,t]]),...e.skills.dynamic.map((e,t)=>[e,[`skills`,`dynamic`,t]]),...e.skills.static.map((e,t)=>[e,[`skills`,`static`,t]]),...e.subagents.local.flatMap((e,t)=>e.configResolver===void 0?[]:[[e.configResolver,[`subagents`,`local`,t,`configResolver`]]]),...e.tools.dynamic.map((e,t)=>[e,[`tools`,`dynamic`,t]]),...e.tools.static.map((e,t)=>[e,[`tools`,`static`,t]]),[e.sandbox,[`sandbox`]]];for(let[e,r]of n){if(e.sourceKind===`module`&&e.binding===void 0){t.addIssue({code:`custom`,message:`Module source is missing its compiled binding.`,path:[...r,`binding`]});continue}if(e.sourceKind!==`module`&&e.binding!==void 0){t.addIssue({code:`custom`,message:`${e.sourceKind} source cannot carry a module binding.`,path:[...r,`binding`]});continue}e.binding!==void 0&&(e.binding.logicalPath!==e.logicalPath&&t.addIssue({code:`custom`,message:`Source and binding logical paths do not match.`,path:[...r,`binding`,`logicalPath`]}),JSON.stringify(e.binding.owner)!==JSON.stringify(e.owner)&&t.addIssue({code:`custom`,message:`Source and binding owners do not match.`,path:[...r,`binding`,`owner`]}))}});function normalizeRoutePattern(e){return e.replace(/^\/+|\/+$/g,``).split(`/`).map(e=>e.startsWith(`:`)||/^\[[^\]]+\]$/.test(e)?`:`:e).join(`/`)}export{AgentInfoResultSchema};
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{mountIdSchema}from"#shared/extension-mount.js";const owner=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),mountId:mountIdSchema.optional(),namespace:z.string(),packageName:z.string()}).strict()]),moduleBacking=z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),mountId:z.string().optional(),sourcePath:z.string()}).strict(),z.object({dependencies:z.record(z.string(),z.string()).optional(),kind:z.literal(`programmatic`),mountId:z.string().optional(),moduleId:z.string(),parameters:z.record(z.string(),z.unknown()).optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict()]),binding=z.object({backing:moduleBacking,logicalPath:z.string(),owner}).strict(),source=z.object({binding:binding.optional(),exportName:z.string().optional(),logicalPath:z.string(),owner,sourceId:z.string(),sourceKind:z.enum([`markdown`,`module`,`skill-package`])}).strict(),entry=source.extend({name:z.string()}).strict(),dynamicResolver=source.extend({eventNames:z.array(z.string()),slug:z.string()}).strict(),modelRouting=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),modelEndpoint=z.union([z.object({kind:z.literal(`external`),provider:z.string()}).strict(),z.object({kind:z.literal(`chatgpt`),state:z.enum([`checking`,`ready`,`signed-out`,`reauth-required`,`unavailable`]),accountLabel:z.string().optional()}).strict(),z.object({kind:z.literal(`gateway`),connected:z.literal(!0),credential:z.enum([`api-key`,`oidc`,`oauth`]),team:z.optional(z.string())}).strict(),z.object({kind:z.literal(`gateway`),connected:z.literal(!1)}).strict()]),modelBaseFields={contextWindowTokens:z.number().optional(),providerOptions:z.unknown().optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional().catch(void 0),source:source.optional()},agentModel=z.union([z.object({...modelBaseFields,endpoint:modelEndpoint.optional(),id:z.string(),routing:modelRouting}).strict(),z.object({...modelBaseFields,endpoint:z.never().optional(),id:z.never().optional(),routing:z.object({kind:z.literal(`dynamic`),resolver:dynamicResolver}).strict()}).strict()]),tool=entry.extend({description:z.string(),hasAuth:z.boolean(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),hasOutputSchema:z.boolean(),inputSchema:z.unknown(),outputSchema:z.unknown().optional(),requiresApproval:z.boolean()}).strict(),skill=entry.extend({description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional()}).strict(),instructions=entry.extend({content:z.string(),role:z.enum([`system`,`user`])}).strict(),schedule=entry.extend({cron:z.string(),hasRun:z.boolean(),markdown:z.string().optional()}).strict(),channelMethod=z.enum([`GET`,`HEAD`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`WEBSOCKET`]),channelRoute=entry.extend({adapterKind:z.string().optional(),method:channelMethod,urlPath:z.string()}).strict(),sourceDescriptor=z.object({backing:z.union([moduleBacking,z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict()]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner,sourceId:z.string()}).strict(),shadowedChannelRoute=z.object({method:channelMethod,source:sourceDescriptor,urlPath:z.string(),winnerSourceId:z.string()}).strict(),connection=source.extend({connectionName:z.string(),description:z.string(),hasApproval:z.boolean(),hasAuthorization:z.boolean(),hasHeaders:z.boolean(),protocol:z.string(),toolFilter:z.unknown().optional(),url:z.string()}).strict(),hook=source.extend({eventNames:z.array(z.string()),slug:z.string()}).strict(),memory=source.extend({description:z.string().optional(),slot:z.string(),visibility:z.enum([`scope`,`session`])}).strict(),sandbox=source.extend({provider:z.string().optional(),environmentExportName:z.string().optional(),revisionHash:z.string()}).strict(),subagent=entry.extend({configResolver:dynamicResolver.optional(),description:z.string().optional(),entryPath:z.string(),nodeId:z.string(),parentNodeId:z.string(),rootPath:z.string(),summary:z.object({channels:z.number(),connections:z.number(),hooks:z.number(),instructions:z.number(),memories:z.number(),schedules:z.number(),skills:z.number(),tools:z.number()}).strict()}).strict(),remoteAgent=entry.extend({description:z.string(),nodeId:z.string(),parentNodeId:z.string(),url:z.string().optional()}).strict(),kernelEffect=z.object({action:z.union([z.enum([`subagent-call`,`workflow-tool-call`]),z.literal(`unrecognized`)]).catch(`unrecognized`).optional(),audience:z.array(z.union([z.literal(`root-session`),z.literal(`unrecognized`)]).catch(`unrecognized`)),kind:z.union([z.enum([`dispatch`,`provider-tool`]),z.literal(`unrecognized`)]).catch(`unrecognized`),sourceId:z.string()}).strict(),compositionDiagnostic=z.object({kind:z.enum([`disabled`,`shadowed`]),logicalPath:z.string(),owner,sourceId:z.string(),winnerSourceId:z.string().optional()}).strict(),AgentInfoResultSchema=z.object({agent:z.object({agentRoot:z.string(),appRoot:z.string(),config:source.extend({binding}).strict(),description:z.string().optional(),model:agentModel,name:z.string(),nodeId:z.string(),outputSchema:z.unknown().optional()}).strict(),capabilities:z.object({devRoutes:z.boolean()}).strict(),channels:z.object({routes:z.array(channelRoute),shadowed:z.array(shadowedChannelRoute)}).strict(),composition:z.object({disabled:z.array(compositionDiagnostic),shadowed:z.array(compositionDiagnostic)}).strict(),connections:z.array(connection),diagnostics:z.object({discoveryErrors:z.number(),discoveryWarnings:z.number()}).strict(),hooks:z.array(hook),instructions:z.object({dynamic:z.array(dynamicResolver),static:z.array(instructions)}).strict(),instrumentation:source.optional(),kernelEffects:z.array(kernelEffect),kind:z.literal(`eve-agent-info`),memories:z.array(memory),mode:z.enum([`development`,`production`]),remoteAgents:z.object({entries:z.array(remoteAgent),total:z.number()}).strict(),sandbox,schedules:z.array(schedule),skills:z.object({dynamic:z.array(dynamicResolver),static:z.array(skill)}).strict(),subagents:z.object({local:z.array(subagent),total:z.number()}).strict(),tools:z.object({dynamic:z.array(dynamicResolver),static:z.array(tool)}).strict(),version:z.literal(5),workspace:z.object({resourceRoot:z.unknown(),rootEntries:z.array(z.string())}).strict()}).strict().superRefine((e,t)=>{let assertUnique=(e,n,r)=>{let i=new Set;e.forEach((e,a)=>{let o=n(e);i.has(o)&&t.addIssue({code:`custom`,message:`Duplicate public identity "${o}".`,path:[...r,a]}),i.add(o)})},assertTotal=(e,n,r)=>{(!Number.isSafeInteger(e)||e<0||e!==n.length)&&t.addIssue({code:`custom`,message:`Expected total ${n.length}, received ${e}.`,path:[...r]})};assertUnique(e.tools.static,e=>e.name,[`tools`,`static`]),assertUnique(e.tools.dynamic,e=>e.slug,[`tools`,`dynamic`]),assertUnique(e.skills.static,e=>e.name,[`skills`,`static`]),assertUnique(e.skills.dynamic,e=>e.slug,[`skills`,`dynamic`]),assertUnique(e.instructions.static,e=>e.name,[`instructions`,`static`]),assertUnique(e.instructions.dynamic,e=>e.slug,[`instructions`,`dynamic`]),assertUnique(e.schedules,e=>e.name,[`schedules`]),assertUnique(e.connections,e=>e.connectionName,[`connections`]),assertUnique(e.hooks,e=>e.slug,[`hooks`]),assertUnique(e.memories,e=>e.slot,[`memories`]),assertUnique(e.channels.routes,e=>`${e.method} ${normalizeRoutePattern(e.urlPath)}`,[`channels`,`routes`]),assertUnique(e.subagents.local,e=>e.nodeId,[`subagents`,`local`]),assertUnique(e.remoteAgents.entries,e=>e.nodeId,[`remoteAgents`,`entries`]),assertTotal(e.subagents.total,e.subagents.local,[`subagents`,`total`]),assertTotal(e.remoteAgents.total,e.remoteAgents.entries,[`remoteAgents`,`total`]);let n=[[e.agent.config,[`agent`,`config`]],...e.agent.model.source===void 0?[]:[[e.agent.model.source,[`agent`,`model`,`source`]]],...e.agent.model.routing.kind===`dynamic`?[[e.agent.model.routing.resolver,[`agent`,`model`,`routing`,`resolver`]]]:[],...e.channels.routes.map((e,t)=>[e,[`channels`,`routes`,t]]),...e.connections.map((e,t)=>[e,[`connections`,t]]),...e.hooks.map((e,t)=>[e,[`hooks`,t]]),...e.instructions.dynamic.map((e,t)=>[e,[`instructions`,`dynamic`,t]]),...e.instructions.static.map((e,t)=>[e,[`instructions`,`static`,t]]),...e.memories.map((e,t)=>[e,[`memories`,t]]),...e.instrumentation===void 0?[]:[[e.instrumentation,[`instrumentation`]]],...e.remoteAgents.entries.map((e,t)=>[e,[`remoteAgents`,`entries`,t]]),...e.schedules.map((e,t)=>[e,[`schedules`,t]]),...e.skills.dynamic.map((e,t)=>[e,[`skills`,`dynamic`,t]]),...e.skills.static.map((e,t)=>[e,[`skills`,`static`,t]]),...e.subagents.local.flatMap((e,t)=>e.configResolver===void 0?[]:[[e.configResolver,[`subagents`,`local`,t,`configResolver`]]]),...e.tools.dynamic.map((e,t)=>[e,[`tools`,`dynamic`,t]]),...e.tools.static.map((e,t)=>[e,[`tools`,`static`,t]]),[e.sandbox,[`sandbox`]]];for(let[e,r]of n){if(e.sourceKind===`module`&&e.binding===void 0){t.addIssue({code:`custom`,message:`Module source is missing its compiled binding.`,path:[...r,`binding`]});continue}if(e.sourceKind!==`module`&&e.binding!==void 0){t.addIssue({code:`custom`,message:`${e.sourceKind} source cannot carry a module binding.`,path:[...r,`binding`]});continue}e.binding!==void 0&&(e.binding.logicalPath!==e.logicalPath&&t.addIssue({code:`custom`,message:`Source and binding logical paths do not match.`,path:[...r,`binding`,`logicalPath`]}),JSON.stringify(e.binding.owner)!==JSON.stringify(e.owner)&&t.addIssue({code:`custom`,message:`Source and binding owners do not match.`,path:[...r,`binding`,`owner`]}))}});function normalizeRoutePattern(e){return e.replace(/^\/+|\/+$/g,``).split(`/`).map(e=>e.startsWith(`:`)||/^\[[^\]]+\]$/.test(e)?`:`:e).join(`/`)}export{AgentInfoResultSchema};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ClientSessionContext } from "#client/session.js";
|
|
2
|
+
import type { StreamOptions } from "#client/types.js";
|
|
3
|
+
import type { AgentStartedStreamEvent, MessageStreamEvent } from "#protocol/message.js";
|
|
4
|
+
/**
|
|
5
|
+
* A session an agent run opened, reached through the parent session whose
|
|
6
|
+
* stream announced it with `agent.started`. Get one with
|
|
7
|
+
* `session.agent(started)`. Every read uses the parent's host and
|
|
8
|
+
* credentials: a local child's own route, or the parent-origin proxy for a
|
|
9
|
+
* remote child, which the parent deployment authenticates to the remote agent
|
|
10
|
+
* after checking that it recorded the child.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ClientAgentSession {
|
|
13
|
+
#private;
|
|
14
|
+
/** The agent's name, as `agent.started` reports it. */
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** The child session's id. */
|
|
17
|
+
readonly sessionId: string;
|
|
18
|
+
/** The task whose run opened the session; absent when an `execute` call opened it. */
|
|
19
|
+
readonly taskId: string | undefined;
|
|
20
|
+
/** @internal */
|
|
21
|
+
constructor(context: ClientSessionContext, started: AgentStartedStreamEvent);
|
|
22
|
+
/**
|
|
23
|
+
* Follows the child's durable event stream. Reading it never advances the
|
|
24
|
+
* parent session's cursor. The child cursor starts at `0`; pass `startIndex`
|
|
25
|
+
* to resume. Stop at a child turn boundary with `isCurrentTurnBoundaryEvent`.
|
|
26
|
+
*/
|
|
27
|
+
stream(options?: StreamOptions): AsyncIterable<MessageStreamEvent>;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{followStreamIterable}from"#client/open-stream.js";var ClientAgentSession=class{name;sessionId;taskId;#e;#t;constructor(e,t){this.#e=e,this.#t=t.data.streamPath,this.name=t.data.name,this.sessionId=t.data.sessionId,this.taskId=t.data.taskId}stream(e){let t=e?.startIndex??0;if(e?.follow===!1&&t<0)throw Error(`agent(started).stream({ follow: false }) requires a nonnegative startIndex; a tail-relative cursor cannot be bounded.`);return followStreamIterable({follow:e?.follow,host:this.#e.host,path:this.#t,redirect:this.#e.redirect,resolveHeaders:()=>this.#e.resolveHeaders(),signal:e?.signal,startIndex:t,streamReconnectPolicy:e?.streamReconnectPolicy})}};export{ClientAgentSession};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ConversationState } from "#client/conversation-state.js";
|
|
2
|
+
import type { ClientSession } from "#client/session.js";
|
|
3
|
+
import type { MessageStreamEvent } from "#protocol/message.js";
|
|
4
|
+
export interface AgentStreamFollowerOptions {
|
|
5
|
+
/** The session whose stream announced the agents; reads use its host and credentials. */
|
|
6
|
+
readonly session: ClientSession;
|
|
7
|
+
readonly getState: () => ConversationState;
|
|
8
|
+
readonly onFollowing: (sessionId: string) => void;
|
|
9
|
+
readonly onEvent: (sessionId: string, event: MessageStreamEvent) => void;
|
|
10
|
+
readonly onIdle: (sessionId: string) => void;
|
|
11
|
+
readonly onUnavailable: (sessionId: string) => void;
|
|
12
|
+
/** Retained by the transport owner across detach and reattach. */
|
|
13
|
+
readonly cursors: Map<string, number>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Follows each agent tool's session while its task has content the conversation has not shown.
|
|
17
|
+
* The conversation decides when a session is caught up; this class only owns transport.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AgentStreamFollower {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(options: AgentStreamFollowerOptions);
|
|
22
|
+
acceptParentEvent(event: MessageStreamEvent): void;
|
|
23
|
+
/** Starts, resumes, or pauses subscriptions to match the conversation. */
|
|
24
|
+
reconcile(): void;
|
|
25
|
+
abortAll(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{agentToolTask,isAgentSessionCaughtUp}from"#client/conversation-state.js";const agentStreamReconnectPolicy={streamIdleReconnectPolicy:{maxAttempts:1/0},streamOpenReconnectPolicy:{maxAttempts:1/0}};var AgentStreamFollower=class{#e;#t=new Map;#n=new Map;#r=new Set;#i=!1;constructor(e){this.#e=e}acceptParentEvent(e){e.type===`agent.started`&&this.#t.set(e.data.sessionId,e)}reconcile(){if(this.#i)return;let e=this.#e.getState();for(let t of Object.values(e.agents)){if(agentToolTask(e,t)===void 0)continue;let n=this.#n.get(t.sessionId),r=isAgentSessionCaughtUp(e,t);n!==void 0&&r?(this.#n.delete(t.sessionId),n.abort(),this.#e.onIdle(t.sessionId)):n===void 0&&!r&&!this.#r.has(t.sessionId)&&this.#a(t.sessionId)}}abortAll(){this.#i=!0;for(let e of this.#n.values())e.abort();this.#n.clear()}#a(e){let t=this.#t.get(e);if(t===void 0)return;let n=new AbortController;this.#n.set(e,n),this.#e.onFollowing(e);let{cursors:r}=this.#e;(async()=>{let i=r.get(e)??0;try{for await(let a of this.#e.session.agent(t).stream({signal:n.signal,startIndex:i,streamReconnectPolicy:agentStreamReconnectPolicy})){if(n.signal.aborted)return;r.set(e,++i),this.#e.onEvent(e,a),this.reconcile()}}catch{}n.signal.aborted||this.#n.get(e)!==n||(this.#n.delete(e),this.#r.add(e),this.#e.onUnavailable(e))})()}};export{AgentStreamFollower};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function createAuthorizationRequiredPart(e){let t=e.data.authorization?.displayName??formatAuthorizationDisplayName(e.data.name)
|
|
1
|
+
function createAuthorizationRequiredPart(e){let t=e.data.authorization?.displayName??formatAuthorizationDisplayName(e.data.name),n={authorization:e.data.authorization,description:normalizeAuthorizationDescription(e.data.description,e.data.name,t),displayName:t,name:e.data.name,state:`required`,stepIndex:e.data.stepIndex,turnId:e.data.turnId,type:`authorization`};return e.data.attemptId!==void 0&&(n.attemptId=e.data.attemptId),e.data.webhookUrl!==void 0&&(n.awaitsCallback=!0),n}function createAuthorizationCompletedPart(e,t){let n=e.data.authorization?.displayName??t?.displayName??formatAuthorizationDisplayName(e.data.name),r={authorization:t?.authorization||e.data.authorization?{...t?.authorization,...e.data.authorization}:void 0,description:t?.description??buildCompletedAuthorizationDescription(n,e.data.outcome,e.data.reason),displayName:n,name:e.data.name,outcome:e.data.outcome,state:`completed`,stepIndex:t?.stepIndex??e.data.stepIndex,turnId:t?.turnId??e.data.turnId,type:`authorization`},i=e.data.attemptId??t?.attemptId;return i!==void 0&&(r.attemptId=i),t?.awaitsCallback&&(r.awaitsCallback=!0),e.data.reason!==void 0&&(r.reason=e.data.reason),r}function buildCompletedAuthorizationDescription(e,t,n){return t===`authorized`?`${e} connected.`:`${e} authorization ${t}${n===void 0?``:` (${n})`}.`}function normalizeAuthorizationDescription(e,t,n){return e===`Authorization required for ${t}`?`Authorization required for ${n}`:e}function formatAuthorizationDisplayName(e){return e.length===0?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`}export{createAuthorizationCompletedPart,createAuthorizationRequiredPart};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ConversationState } from "#client/conversation-state.js";
|
|
2
|
+
import { EveAgentProjection, type EveAgentEventLog } from "#client/eve-agent-projection.js";
|
|
3
|
+
import type { SendTurnPayload } from "#client/types.js";
|
|
4
|
+
import type { EveAgentReducerEvent } from "#client/reducer.js";
|
|
5
|
+
import type { MessageStreamEvent } from "#protocol/message.js";
|
|
6
|
+
import type { InputResponse } from "#shared/input.js";
|
|
7
|
+
import { SessionEventStream, type SessionEventStreamOptions } from "#client/session-event-stream.js";
|
|
8
|
+
import type { ClientSession } from "#client/session.js";
|
|
9
|
+
/** Owns the canonical conversation and its root and agent-session transports for one client session. */
|
|
10
|
+
export declare class ConversationClient<TData = ConversationState> {
|
|
11
|
+
#private;
|
|
12
|
+
readonly projection: EveAgentProjection<TData>;
|
|
13
|
+
constructor(projection: EveAgentProjection<TData>, onChange: (data: TData, previous: TData) => void, onConversationChange?: (state: ConversationState, previous: ConversationState) => void);
|
|
14
|
+
get data(): TData;
|
|
15
|
+
get conversation(): ConversationState;
|
|
16
|
+
get projections(): readonly EveAgentEventLog[];
|
|
17
|
+
get following(): boolean;
|
|
18
|
+
append(event: EveAgentReducerEvent): void;
|
|
19
|
+
/** Projects submitted answers; the returned callback withdraws them if the server never accepts. */
|
|
20
|
+
projectResponses(responses: readonly InputResponse[] | undefined): (() => void) | undefined;
|
|
21
|
+
/** Swaps projected answers for a prepared payload's, which must still be answerable. */
|
|
22
|
+
replaceResponses(retract: (() => void) | undefined, input: SendTurnPayload): (() => void) | undefined;
|
|
23
|
+
/** Admit and project a root event before the agent sessions it announces are followed. */
|
|
24
|
+
observe(event: MessageStreamEvent, options?: {
|
|
25
|
+
/** The store reconciles optimistic messages instead of directly appending the event. */
|
|
26
|
+
project?: (event: MessageStreamEvent) => void;
|
|
27
|
+
/** Record the accepted event before projection or child notifications. */
|
|
28
|
+
onAccepted?: (event: MessageStreamEvent) => void;
|
|
29
|
+
/** The store publishes after updating its event log and status. */
|
|
30
|
+
notify?: boolean;
|
|
31
|
+
}): boolean;
|
|
32
|
+
/** Admit and project a hydrated root event without notifying subscribers. */
|
|
33
|
+
hydrate(event: MessageStreamEvent): boolean;
|
|
34
|
+
/** Start following the agent sessions the root stream has announced so far. */
|
|
35
|
+
follow(session: ClientSession, events?: readonly MessageStreamEvent[]): void;
|
|
36
|
+
/** Follows the root session continuously; operation readers subscribe to this one stream. */
|
|
37
|
+
stream(session: ClientSession, options: SessionEventStreamOptions): SessionEventStream;
|
|
38
|
+
stop(): void;
|
|
39
|
+
reset(): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{assertAnswerable}from"#client/eve-agent-store-helpers.js";import{AgentStreamFollower}from"#client/agent-stream-follower.js";import{canonicalConversationReducer,conversationReducer}from"#client/conversation-reducer.js";import{EveAgentProjection}from"#client/eve-agent-projection.js";import{createEventDeduper}from"#protocol/event-dedupe.js";import{SessionEventStream}from"#client/session-event-stream.js";var ConversationClient=class{projection;#e;#t=new Map;#n=createEventDeduper();#r;#i;#a;#o;constructor(e,t,n){this.projection=e,this.#e=e.reducer===conversationReducer?e:new EveAgentProjection(canonicalConversationReducer,[]),this.#a=t,this.#o=n}get data(){return this.projection.data}get conversation(){return this.#e.data}get projections(){return this.#e===this.projection?[this.projection]:[this.#e,this.projection]}get following(){return this.#r!==void 0}append(e){let t=this.data,n=this.conversation;this.#c(e),t===this.data?n!==this.conversation&&this.#o?.(this.conversation,n):this.#a(this.data,t)}projectResponses(e){if(!e?.length)return;let t={data:{createdAt:Date.now(),responses:e},type:`client.input.responded`};return this.append(t),()=>this.#s(t)}replaceResponses(e,t){return e?.(),assertAnswerable(t,this.conversation),this.projectResponses(t.inputResponses)}#s(e){let t=this.data,n=this.conversation;for(let t of this.projections)t.remove(t=>t===e);t===this.data?n!==this.conversation&&this.#o?.(this.conversation,n):this.#a(this.data,t)}observe(e,t={}){if(!this.#n.admit(e))return!1;t.onAccepted?.(e);let n=this.data,r=this.conversation;return t.project?t.project(e):this.#c(e),t.notify!==!1&&(n===this.data?r!==this.conversation&&this.#o?.(this.conversation,r):this.#a(this.data,n)),this.#r?.acceptParentEvent(e),this.#r?.reconcile(),!0}hydrate(e){return this.#n.admit(e)?(this.#c(e),!0):!1}follow(e,t=[]){this.#r?.abortAll();let n=new AgentStreamFollower({session:e,cursors:this.#t,getState:()=>this.conversation,onFollowing:e=>this.#l({type:`client.agent.following`,data:{sessionId:e}}),onEvent:(e,t)=>this.#l({type:`client.agent.observed`,data:{sessionId:e,event:t}}),onIdle:e=>this.#l({type:`client.agent.idle`,data:{sessionId:e}}),onUnavailable:e=>this.#l({type:`client.agent.unavailable`,data:{sessionId:e}})});this.#r=n;for(let e of t)n.acceptParentEvent(e);n.reconcile()}#c(e){for(let t of this.projections)t.append(e)}#l(e){let t=this.data,n=this.conversation;this.#e.append(e),t===this.data?n!==this.conversation&&this.#o?.(this.conversation,n):this.#a(this.data,t)}stream(e,t){return this.#i!==void 0&&!this.#i.ended?(this.#i.setOptions(t),this.#i):(this.#i=new SessionEventStream(e,t),this.#i)}stop(){this.#r?.abortAll(),this.#r=void 0,this.#i?.close(),this.#i=void 0}reset(){this.stop(),this.#t.clear(),this.#n=createEventDeduper();for(let e of this.projections)e.reset()}};export{ConversationClient};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ConversationState } from "#client/conversation-state.js";
|
|
2
|
+
import type { EveAgentReducer, EveAgentReducerEvent } from "#client/reducer.js";
|
|
3
|
+
import type { MessageStreamEvent } from "#protocol/message.js";
|
|
4
|
+
/**
|
|
5
|
+
* Transport facts about followed agent sessions. Only the canonical conversation receives them;
|
|
6
|
+
* custom reducers see their results in `conversation.agents`.
|
|
7
|
+
*/
|
|
8
|
+
export type ClientAgentEvent = {
|
|
9
|
+
readonly data: {
|
|
10
|
+
readonly sessionId: string;
|
|
11
|
+
};
|
|
12
|
+
readonly type: "client.agent.following" | "client.agent.idle" | "client.agent.unavailable";
|
|
13
|
+
} | {
|
|
14
|
+
readonly data: {
|
|
15
|
+
readonly event: MessageStreamEvent;
|
|
16
|
+
readonly sessionId: string;
|
|
17
|
+
};
|
|
18
|
+
readonly type: "client.agent.observed";
|
|
19
|
+
};
|
|
20
|
+
export type ConversationEvent = EveAgentReducerEvent | ClientAgentEvent;
|
|
21
|
+
export declare function initialConversationState(): ConversationState;
|
|
22
|
+
/** Pure reduction of accepted root and agent-session observations; followers own transport. */
|
|
23
|
+
export declare function reduceConversation(state: ConversationState, event: ConversationEvent): ConversationState;
|
|
24
|
+
/** The canonical conversation's reducer, which also folds in followed agent sessions. */
|
|
25
|
+
export declare const canonicalConversationReducer: {
|
|
26
|
+
initial: typeof initialConversationState;
|
|
27
|
+
reduce: typeof reduceConversation;
|
|
28
|
+
};
|
|
29
|
+
export declare const conversationReducer: EveAgentReducer<ConversationState>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultMessageReducer}from"#client/message-reducer.js";function initialConversationState(){return{messages:[],turns:{},inputs:{},tasks:{},agents:{}}}function updateTurn(e,t,n){let r=e.turns[t];if(r===void 0)return e;let i=n(r);return i===r?e:{...e,turns:{...e.turns,[t]:i}}}function updateTask(e,t,n){let r=e.tasks[t];if(r===void 0)return e;let i=n(r);return i===r?e:{...e,tasks:{...e.tasks,[t]:i}}}function updateObservation(e,t,n){let r=e.agents[t];if(r===void 0)return e;let i=n(r.observation);return i===r.observation?e:{...e,agents:{...e.agents,[t]:{...r,observation:i}}}}function observedConversation(e){return e.status===`not-followed`?void 0:e.conversation}function reduceConversationLifecycle(e,t){switch(t.type){case`turn.started`:return{...e,activeTurnId:t.data.turnId,turns:{...e.turns,[t.data.turnId]:{turnId:t.data.turnId,status:`active`}}};case`turn.waiting`:return updateTurn(e,t.data.turnId,e=>e.status===`active`&&!e.waiting?{...e,waiting:!0}:e);case`step.started`:return updateTurn(e,t.data.turnId,e=>e.waiting?{turnId:e.turnId,status:e.status}:e);case`turn.completed`:case`turn.cancelled`:case`turn.failed`:{let{turnId:n}=t.data;return{...e,activeTurnId:e.activeTurnId===n?void 0:e.activeTurnId,turns:{...e.turns,[n]:{turnId:n,status:t.type===`turn.completed`?`completed`:t.type===`turn.failed`?`failed`:`cancelled`}}}}case`session.waiting`:case`session.completed`:case`session.failed`:return e.activeTurnId===void 0?e:{...e,activeTurnId:void 0};case`task.started`:{let{callId:n,kind:r,name:i,taskId:a,turnId:o}=t.data,s=e.tasks[a]??{taskId:a,name:i,kind:r,calls:{}};return s.calls[n]===void 0?{...e,tasks:{...e.tasks,[a]:{...s,calls:{...s.calls,[n]:{callId:n,turnId:o,status:`working`}}}}}:e}case`task.settled`:{let{callId:n,error:r,output:i,status:a,taskId:o}=t.data;return updateTask(e,o,e=>{let t=e.calls[n];if(t===void 0||t.status!==`working`)return e;let o={callId:n,turnId:t.turnId,status:a};return{...e,calls:{...e.calls,[n]:a===`completed`&&i!==void 0?{...o,output:i}:a===`failed`&&r!==void 0?{...o,error:r}:o}}})}case`agent.started`:{let{callId:n,name:r,sessionId:i,taskId:a,turnId:o}=t.data;if(e.agents[i]!==void 0)return e;let s={sessionId:i,name:r,callId:n,turnId:o,observation:{status:`not-followed`}};return a!==void 0&&(s.taskId=a),{...e,agents:{...e.agents,[i]:s}}}case`input.requested`:{let n={...e.inputs};for(let e of t.data.requests){if(n[e.requestId]!==void 0)continue;let r={request:e,turnId:t.data.turnId,stepIndex:t.data.stepIndex,status:`open`};t.data.taskId!==void 0&&(r.taskId=t.data.taskId),n[e.requestId]=r}return{...e,inputs:n}}case`client.input.responded`:{let n={...e.inputs};for(let e of t.data.responses){let t=n[e.requestId];t?.status===`open`&&(n[e.requestId]={...t,response:e,status:`responded`})}return{...e,inputs:n}}case`approval.candidate`:{let n=e.inputs[t.data.requestId];return n===void 0||n.status===`settled`||t.data.outcome===`pending`?e:{...e,inputs:{...e.inputs,[t.data.requestId]:{...n,status:`open`,response:void 0}}}}case`approval.settled`:{let n=e.inputs[t.data.requestId];return n===void 0||n.status===`settled`?e:{...e,inputs:{...e.inputs,[t.data.requestId]:{...n,status:`settled`,outcome:t.data.outcome}}}}case`input.resolved`:{let n={...e.inputs};for(let e of t.data.resolutions){let t=n[e.requestId];t!==void 0&&t.status!==`settled`&&(n[e.requestId]={...t,status:`settled`,outcome:e.outcome,response:e.response??t.response})}return{...e,inputs:n}}default:return e}}const messageReducer=defaultMessageReducer();function reduceConversation(e,t){switch(t.type){case`client.agent.following`:return updateObservation(e,t.data.sessionId,e=>e.status===`following`?e:{status:`following`,conversation:observedConversation(e)??initialConversationState()});case`client.agent.observed`:return updateObservation(e,t.data.sessionId,e=>e.status===`following`?{status:`following`,conversation:reduceConversation(e.conversation,t.data.event)}:e);case`client.agent.idle`:return updateObservation(e,t.data.sessionId,e=>e.status===`following`?{status:`idle`,conversation:e.conversation}:e);case`client.agent.unavailable`:return updateObservation(e,t.data.sessionId,e=>{let t=observedConversation(e);return t===void 0?{status:`unavailable`}:{status:`unavailable`,conversation:t}});default:{let n=messageReducer.reduce(e,t);return reduceConversationLifecycle({...e,...n},t)}}}const canonicalConversationReducer={initial:initialConversationState,reduce:reduceConversation},conversationReducer=canonicalConversationReducer;export{canonicalConversationReducer,conversationReducer,initialConversationState,reduceConversation};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { EveAuthorizationPart, EveMessageData } from "#client/message-reducer-types.js";
|
|
2
|
+
import type { InputRequest, InputResponse } from "#shared/input.js";
|
|
3
|
+
import type { JsonValue } from "#shared/json.js";
|
|
4
|
+
export interface ConversationTurn {
|
|
5
|
+
readonly turnId: string;
|
|
6
|
+
readonly status: "active" | "completed" | "cancelled" | "failed";
|
|
7
|
+
/** The open turn is parked, holding on its tasks or on a question one of its calls asked. */
|
|
8
|
+
readonly waiting?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ConversationInput {
|
|
11
|
+
readonly request: InputRequest;
|
|
12
|
+
readonly turnId: string;
|
|
13
|
+
readonly stepIndex: number;
|
|
14
|
+
/** The task whose run asks, when a task asks. */
|
|
15
|
+
readonly taskId?: string;
|
|
16
|
+
readonly status: "open" | "responded" | "settled";
|
|
17
|
+
readonly response?: InputResponse;
|
|
18
|
+
readonly outcome?: string;
|
|
19
|
+
}
|
|
20
|
+
/** One call that started or reached a task, settled by its `task.settled`. */
|
|
21
|
+
export interface ConversationTaskCall {
|
|
22
|
+
readonly callId: string;
|
|
23
|
+
readonly turnId: string;
|
|
24
|
+
readonly status: "working" | "completed" | "failed" | "cancelled";
|
|
25
|
+
/** The call's result; present only when `status` is `"completed"`. */
|
|
26
|
+
readonly output?: JsonValue;
|
|
27
|
+
/** Why the call failed; present only when `status` is `"failed"`. */
|
|
28
|
+
readonly error?: {
|
|
29
|
+
readonly message: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface ConversationTask {
|
|
33
|
+
readonly taskId: string;
|
|
34
|
+
/** The tool whose call started the task. */
|
|
35
|
+
readonly name: string;
|
|
36
|
+
/**
|
|
37
|
+
* `"agent"` when a subagent's tool, local or remote, started the task; `"tool"` for an authored
|
|
38
|
+
* tool, including one that opens sessions with `ctx.agent`.
|
|
39
|
+
*/
|
|
40
|
+
readonly kind: "agent" | "tool";
|
|
41
|
+
/** Calls in the order they started or reached the task. */
|
|
42
|
+
readonly calls: Readonly<Record<string, ConversationTaskCall>>;
|
|
43
|
+
}
|
|
44
|
+
export type AgentObservation = {
|
|
45
|
+
readonly status: "not-followed";
|
|
46
|
+
} | {
|
|
47
|
+
readonly status: "following";
|
|
48
|
+
readonly conversation: ConversationState;
|
|
49
|
+
}
|
|
50
|
+
/** Every call so far has shown its content; a later call to the task resumes following. */
|
|
51
|
+
| {
|
|
52
|
+
readonly status: "idle";
|
|
53
|
+
readonly conversation: ConversationState;
|
|
54
|
+
} | {
|
|
55
|
+
/** The stream failed; this does not mean the agent failed. */
|
|
56
|
+
readonly status: "unavailable";
|
|
57
|
+
readonly conversation?: ConversationState;
|
|
58
|
+
};
|
|
59
|
+
/** A session a run opened with `ctx.agent`, as its `agent.started` announced it. */
|
|
60
|
+
export interface ConversationAgentSession {
|
|
61
|
+
readonly sessionId: string;
|
|
62
|
+
readonly name: string;
|
|
63
|
+
/** The call whose invocation opened the session. */
|
|
64
|
+
readonly callId: string;
|
|
65
|
+
readonly turnId: string;
|
|
66
|
+
/** The task whose run opened the session; absent when an `execute` call opened it. */
|
|
67
|
+
readonly taskId?: string;
|
|
68
|
+
readonly observation: AgentObservation;
|
|
69
|
+
}
|
|
70
|
+
/** Renderable conversation state. Root and agent-session input IDs occupy separate scopes. */
|
|
71
|
+
export interface ConversationState extends EveMessageData {
|
|
72
|
+
readonly activeTurnId?: string;
|
|
73
|
+
readonly turns: Readonly<Record<string, ConversationTurn>>;
|
|
74
|
+
readonly inputs: Readonly<Record<string, ConversationInput>>;
|
|
75
|
+
readonly tasks: Readonly<Record<string, ConversationTask>>;
|
|
76
|
+
/** Sessions opened by this session's runs, by session ID. */
|
|
77
|
+
readonly agents: Readonly<Record<string, ConversationAgentSession>>;
|
|
78
|
+
}
|
|
79
|
+
/** Inputs awaiting an answer, including requests introduced in earlier turns. */
|
|
80
|
+
export declare function openConversationInputs(state: ConversationState): readonly ConversationInput[];
|
|
81
|
+
/** Authorization attempts remain visible across turns, including parked callbacks. */
|
|
82
|
+
export declare function conversationAuthorizations(state: ConversationState): readonly EveAuthorizationPart[];
|
|
83
|
+
/** A sign-in the session still waits on, which resumes its work when the callback arrives. */
|
|
84
|
+
export declare function hasPendingAuthorizations(state: ConversationState): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The agent task whose calls a session receives, when the session is that agent's own. eve's agent
|
|
87
|
+
* tools send each call as one message, in call order, which is what lets a client attribute the
|
|
88
|
+
* session's turns to calls. A session an authored tool opens with `ctx.agent` has no such task.
|
|
89
|
+
*/
|
|
90
|
+
export declare function agentToolTask(state: ConversationState, agent: ConversationAgentSession): ConversationTask | undefined;
|
|
91
|
+
/** The session an agent tool forwards its task's calls to. */
|
|
92
|
+
export declare function agentToolSession(state: ConversationState, task: ConversationTask): ConversationAgentSession | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Whether a followed agent tool session has shown everything its task's calls produced so far:
|
|
95
|
+
* no call is working, the session has no open turn, question, or sign-in, and every completed call's
|
|
96
|
+
* message has arrived. The last check covers a child stream that lags the root stream.
|
|
97
|
+
*/
|
|
98
|
+
export declare function isAgentSessionCaughtUp(state: ConversationState, agent: ConversationAgentSession): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Attributes an agent tool session's turns to the calls that produced them. The k-th message the
|
|
101
|
+
* session received came from the task's k-th call; a turn without a message of its own, such as
|
|
102
|
+
* one resumed after an approval, continues the previous call. A call whose message joined a
|
|
103
|
+
* running turn owns no turn.
|
|
104
|
+
*/
|
|
105
|
+
export declare function agentCallTurns(task: ConversationTask, conversation: ConversationState): ReadonlyMap<string, readonly string[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Whether a call's content may still arrive on its agent tool session: one of the call's turns is
|
|
108
|
+
* still open there, or the call completed before its message reached the session.
|
|
109
|
+
*/
|
|
110
|
+
export declare function isAgentCallContentPending(task: ConversationTask, call: ConversationTaskCall, conversation: ConversationState): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function openConversationInputs(e){return Object.values(e.inputs).filter(e=>e.status===`open`)}function conversationAuthorizations(e){return e.messages.flatMap(e=>e.role===`assistant`?e.parts.filter(e=>e.type===`authorization`):[])}function hasPendingAuthorizations(e){return conversationAuthorizations(e).some(e=>e.state===`required`&&e.awaitsCallback===!0)}function agentToolTask(e,t){let n=t.taskId===void 0?void 0:e.tasks[t.taskId];return n?.kind===`agent`?n:void 0}function agentToolSession(e,t){return Object.values(e.agents).find(n=>agentToolTask(e,n)?.taskId===t.taskId)}function isAgentSessionCaughtUp(e,t){if(t.observation.status!==`following`&&t.observation.status!==`idle`)return!1;let n=agentToolTask(e,t);if(n===void 0)return!1;let r=Object.values(n.calls);if(r.some(e=>e.status===`working`))return!1;let i=t.observation.conversation;return i.activeTurnId!==void 0||Object.values(i.inputs).some(e=>e.status!==`settled`)||hasPendingAuthorizations(i)?!1:i.messages.filter(e=>e.role===`user`).length>=r.filter(e=>e.status===`completed`).length}function agentCallTurns(e,t){let n=Object.keys(e.calls),r=new Map,i=0;for(let e of t.messages){if(e.role!==`user`)continue;let t=n[i++],a=e.metadata?.turnId;t!==void 0&&a!==void 0&&!r.has(a)&&r.set(a,t)}let a=new Map(n.map(e=>[e,[]])),o;for(let e of Object.keys(t.turns))o=r.get(e)??o,o!==void 0&&a.get(o)?.push(e);return a}function isAgentCallContentPending(e,t,n){let r=agentCallTurns(e,n).get(t.callId)??[],{activeTurnId:i}=n;return i!==void 0&&r.includes(i)?!0:t.status===`completed`&&n.messages.filter(e=>e.role===`user`).length<=Object.keys(e.calls).indexOf(t.callId)}export{agentCallTurns,agentToolSession,agentToolTask,conversationAuthorizations,hasPendingAuthorizations,isAgentCallContentPending,isAgentSessionCaughtUp,openConversationInputs};
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ConversationEvent } from "#client/conversation-reducer.js";
|
|
2
|
+
import type { EveAgentReducerEvent } from "#client/reducer.js";
|
|
3
|
+
interface ProjectionReducer<TData, TEvent> {
|
|
4
|
+
initial(): TData;
|
|
5
|
+
reduce(data: TData, event: TEvent): TData;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The part of a projection that root-stream bookkeeping writes. Its entries can include the
|
|
9
|
+
* canonical conversation's agent-session events, so predicates see the wider event type.
|
|
10
|
+
*/
|
|
11
|
+
export interface EveAgentEventLog {
|
|
12
|
+
append(event: EveAgentReducerEvent): void;
|
|
13
|
+
remove(predicate: (event: ConversationEvent) => boolean): void;
|
|
14
|
+
replace(predicate: (event: ConversationEvent) => boolean, replacement: EveAgentReducerEvent): void;
|
|
15
|
+
reset(): void;
|
|
16
|
+
}
|
|
17
|
+
/** Owns chronological reducer replay when optimistic events are replaced by server events. */
|
|
18
|
+
export declare class EveAgentProjection<TData, TEvent = EveAgentReducerEvent> {
|
|
4
19
|
#private;
|
|
5
|
-
constructor(reducer:
|
|
20
|
+
constructor(reducer: ProjectionReducer<TData, TEvent>, events: readonly TEvent[]);
|
|
6
21
|
get data(): TData;
|
|
22
|
+
get reducer(): ProjectionReducer<TData, TEvent>;
|
|
7
23
|
reset(): void;
|
|
8
|
-
append(event:
|
|
9
|
-
remove(predicate: (event:
|
|
10
|
-
replace(predicate: (event:
|
|
24
|
+
append(event: TEvent): void;
|
|
25
|
+
remove(predicate: (event: TEvent) => boolean): void;
|
|
26
|
+
replace(predicate: (event: TEvent) => boolean, replacement: TEvent): void;
|
|
11
27
|
}
|
|
28
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var EveAgentProjection=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=t,this.#n=this.#r()}get data(){return this.#n}reset(){this.#t=[],this.#n=this.#e.initial()}append(e){this.#t
|
|
1
|
+
var EveAgentProjection=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=[...t],this.#n=this.#r()}get data(){return this.#n}get reducer(){return this.#e}reset(){this.#t=[],this.#n=this.#e.initial()}append(e){this.#t.push(e),this.#n=this.#e.reduce(this.#n,e)}remove(e){this.#t=this.#t.filter(t=>!e(t)),this.#n=this.#r()}replace(e,t){let n=this.#t.findIndex(e);n===-1?this.#t.push(t):this.#t[n]=t,this.#n=this.#r()}#r(){let e=this.#e.initial();for(let t of this.#t)e=this.#e.reduce(e,t);return e}};export{EveAgentProjection};
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
import { type ConversationState } from "#client/conversation-state.js";
|
|
1
2
|
import type { ActiveTurn } from "#client/eve-agent-store-state.js";
|
|
2
3
|
import type { CancelSessionResult, SendTurnPayload } from "#client/types.js";
|
|
3
4
|
import { type MessageStreamEvent } from "#protocol/message.js";
|
|
4
5
|
import type { UserContent } from "ai";
|
|
5
|
-
export declare function
|
|
6
|
+
export declare function activeTurnForOptimisticFollowUp(events: readonly MessageStreamEvent[]): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Where catch-up stops following and when an idle session counts as settled. These reads have no
|
|
9
|
+
* response to scope them, so the {@link endsTurnSegment} rule reads the whole conversation.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isResponseBoundary(event: MessageStreamEvent, conversation: ConversationState): boolean;
|
|
12
|
+
/** A turn parked on a question stays open, so its session is still streaming. */
|
|
13
|
+
export declare function settledStatus(error: Error | undefined, conversation: ConversationState): "error" | "ready" | "streaming";
|
|
14
|
+
export declare function isSettledSessionTail(events: readonly MessageStreamEvent[], conversation: ConversationState): boolean;
|
|
15
|
+
/** A server ignores answers to requests it already settled, so the store never sends them. */
|
|
16
|
+
export declare function assertAnswerable(input: SendTurnPayload, conversation: ConversationState): void;
|
|
17
|
+
export declare function assertInFlightFollowUp(input: SendTurnPayload): void;
|
|
18
|
+
export declare function validateFollowUp<T extends SendTurnPayload>(input: T): T;
|
|
6
19
|
export declare function assertExclusiveTurnInput(input: SendTurnPayload): void;
|
|
7
20
|
export declare function createSubmissionId(): string;
|
|
8
21
|
export declare function createAbortSignal(first: AbortSignal | undefined, second: AbortSignal): AbortSignal;
|
|
@@ -10,6 +23,12 @@ export declare function summarizeUserContent(message: string | UserContent): str
|
|
|
10
23
|
export declare function isAbortError(error: unknown): boolean;
|
|
11
24
|
export declare function toTerminalStreamFailureError(event: MessageStreamEvent): Error | undefined;
|
|
12
25
|
export declare function createActiveTurn(cancel: (turn: ActiveTurn) => Promise<CancelSessionResult>): ActiveTurn;
|
|
26
|
+
/** Counts confirmed steered messages toward the active turn's accepted follow-ups. */
|
|
27
|
+
export declare function countFollowUpDeliveries(turn: ActiveTurn, reconciliation: {
|
|
28
|
+
readonly alreadyProjected: boolean;
|
|
29
|
+
readonly event: MessageStreamEvent;
|
|
30
|
+
readonly ids: readonly string[];
|
|
31
|
+
}): void;
|
|
13
32
|
export declare function followSteeredTurns(turn: ActiveTurn, events: AsyncIterable<MessageStreamEvent>, isActive: () => boolean): Promise<void>;
|
|
14
33
|
/** Aborts a caller's wait without cancelling shared work owned by the store. */
|
|
15
34
|
export declare function waitWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}function isAbortError(e){return e instanceof Error&&e.name===`AbortError`}function toTerminalStreamFailureError(e){if(e.type!==`session.failed`)return;let t=Error(e.data.message);return t.name=e.data.code,t}function createActiveTurn(e){let t=Promise.withResolvers(),n=Promise.withResolvers(),r={abortController:new AbortController,acceptedFollowUps:0,cancel:()=>e(r),completion:n.promise,followUpDispatches:new Set,receivedFollowUps:0,receivedFollowUpEvents:new Map,followUpSubmissionIds:new Set,resolveCompletion:n.resolve,response:t.promise,resolveResponse:t.resolve};return r}async function followSteeredTurns(e,t,n){for(;e.followUpDispatches.size>0;)await Promise.allSettled(e.followUpDispatches);if(
|
|
1
|
+
import{hasPendingAuthorizations}from"#client/conversation-state.js";import{TurnSegment,endsTurnSegment}from"#client/session-utils.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";function activeTurnForOptimisticFollowUp(e){let t=e.findLast(e=>e.type===`turn.started`||e.type===`turn.completed`||e.type===`turn.failed`||e.type===`turn.cancelled`||isCurrentTurnBoundaryEvent(e));return t?.type===`turn.started`?t.data.turnId:void 0}function isResponseBoundary(e,t){return endsTurnSegment(e,{callbacks:hasPendingAuthorizations(t),requests:Object.values(t.inputs).some(e=>e.status!==`settled`)})}function settledStatus(e,t){return e===void 0?t.activeTurnId===void 0?`ready`:`streaming`:`error`}function isSettledSessionTail(e,t){let n=e.at(-1);return n!==void 0&&isResponseBoundary(n,t)}function assertAnswerable(e,t){for(let{requestId:n}of e.inputResponses??[]){let e=t.inputs[n]?.status;if(e!==void 0&&e!==`open`)throw Error(`Input request ${n} was already answered.`)}}function assertInFlightFollowUp(e){if(e.inputResponses===void 0&&(e.message===void 0||e.turnPolicy!==`steer`))throw Error(`eve session is already processing a turn. Send a message with turnPolicy: "steer" to guide it at the next boundary, or answer an open input request.`)}function validateFollowUp(e){return assertExclusiveTurnInput(e),assertInFlightFollowUp(e),e}function assertExclusiveTurnInput(e){if(e.message!==void 0==(e.inputResponses!==void 0))throw Error(`A turn requires exactly one of message or inputResponses.`)}let submissionSequence=0;function createSubmissionId(){let e=globalThis.crypto?.randomUUID;return e===void 0?(submissionSequence+=1,`submission_${submissionSequence.toString()}`):e.call(globalThis.crypto)}function createAbortSignal(e,t){return e?AbortSignal.any([e,t]):t}function summarizeUserContent(e){if(typeof e==`string`)return e;let t=[];for(let n of e)n.type===`text`?t.push(n.text):n.type===`file`&&t.push(n.filename?`[file: ${n.filename}]`:`[file]`);return t.join(`
|
|
2
|
+
`)}function isAbortError(e){return e instanceof Error&&e.name===`AbortError`}function toTerminalStreamFailureError(e){if(e.type!==`session.failed`)return;let t=Error(e.data.message);return t.name=e.data.code,t}function createActiveTurn(e){let t=Promise.withResolvers(),n=Promise.withResolvers(),r={abortController:new AbortController,acceptedFollowUps:0,cancel:()=>e(r),completion:n.promise,followUpDispatches:new Set,receivedFollowUps:0,receivedFollowUpEvents:new Map,followUpSubmissionIds:new Set,resolveCompletion:n.resolve,response:t.promise,resolveResponse:t.resolve};return r}function countFollowUpDeliveries(e,t){let n=0;for(let r of t.ids)e.followUpSubmissionIds.delete(r)&&(n+=1);if(n!==0){if(t.alreadyProjected)e.receivedFollowUps+=n;else{let r=e.receivedFollowUpEvents.get(t.event)??0;e.receivedFollowUpEvents.set(t.event,r+n)}}}async function followSteeredTurns(e,t,n){for(;e.followUpDispatches.size>0;)await Promise.allSettled(e.followUpDispatches);if(e.receivedFollowUps>=e.acceptedFollowUps)return;let r=new TurnSegment({followCallbacks:!0});for await(let i of t){if(!n())return;if(e.receivedFollowUps+=e.receivedFollowUpEvents.get(i)??0,e.receivedFollowUpEvents.delete(i),r.observe(i)){for(;e.followUpDispatches.size>0;)await Promise.allSettled(e.followUpDispatches);if(e.receivedFollowUps>=e.acceptedFollowUps)return}}}async function waitWithSignal(e,t){if(t===void 0)return await e;let n=Promise.withResolvers(),onAbort=()=>n.reject(t.reason);t.addEventListener(`abort`,onAbort,{once:!0}),t.aborted&&onAbort();try{return await Promise.race([n.promise,e])}finally{t.removeEventListener(`abort`,onAbort)}}export{activeTurnForOptimisticFollowUp,assertAnswerable,assertExclusiveTurnInput,assertInFlightFollowUp,countFollowUpDeliveries,createAbortSignal,createActiveTurn,createSubmissionId,followSteeredTurns,isAbortError,isResponseBoundary,isSettledSessionTail,settledStatus,summarizeUserContent,toTerminalStreamFailureError,validateFollowUp,waitWithSignal};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Client } from "#client/client.js";
|
|
1
2
|
import type { MessageResponse } from "#client/message-response.js";
|
|
2
3
|
import type { EveAgentReducer } from "#client/reducer.js";
|
|
4
|
+
import type { ConversationState } from "#client/conversation-state.js";
|
|
3
5
|
import type { ClientSession } from "#client/session.js";
|
|
4
6
|
import type { MessageStreamEvent } from "#protocol/message.js";
|
|
5
7
|
import type { CancelSessionResult, ClientAuth, ClientSessionState, HeadersValue, SendTurnPayload } from "#client/types.js";
|
|
@@ -18,6 +20,8 @@ export type PrepareSend = (input: SendTurnPayload) => SendTurnPayload | Promise<
|
|
|
18
20
|
/** Immutable projected state of an eve frontend session store. */
|
|
19
21
|
export interface EveAgentStoreSnapshot<TData> {
|
|
20
22
|
readonly data: TData;
|
|
23
|
+
/** Canonical session facts, independent of the caller's data projection. */
|
|
24
|
+
readonly conversation: ConversationState;
|
|
21
25
|
/** The latest session creation, stream, resume, or turn failure. */
|
|
22
26
|
readonly error: Error | undefined;
|
|
23
27
|
readonly events: readonly MessageStreamEvent[];
|
|
@@ -36,12 +40,14 @@ export interface EveAgentStoreCallbacks<TData> {
|
|
|
36
40
|
readonly prepareSend?: PrepareSend;
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
39
|
-
* Configuration for constructing an eve frontend session store. Pass
|
|
40
|
-
*
|
|
41
|
-
* Saved events must be an ordered prefix of the same session stream.
|
|
43
|
+
* Configuration for constructing an eve frontend session store. Pass connection
|
|
44
|
+
* options or a configured `Client` for store-owned sessions, or an existing
|
|
45
|
+
* `ClientSession`. Saved events must be an ordered prefix of the same session stream.
|
|
42
46
|
*/
|
|
43
47
|
export interface EveAgentStoreInit<TData> {
|
|
44
48
|
readonly prewarm?: boolean;
|
|
49
|
+
/** Configured client for store-owned sessions; replaces `host`, `auth`, and `headers`. */
|
|
50
|
+
readonly client?: Client;
|
|
45
51
|
readonly auth?: ClientAuth;
|
|
46
52
|
readonly headers?: HeadersValue;
|
|
47
53
|
readonly host?: string;
|
|
@@ -49,6 +55,11 @@ export interface EveAgentStoreInit<TData> {
|
|
|
49
55
|
readonly initialEvents?: readonly MessageStreamEvent[];
|
|
50
56
|
readonly initialSession?: ClientSessionState;
|
|
51
57
|
readonly optimistic?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Follow each agent tool's session into `conversation.agents`, regardless of the data reducer,
|
|
60
|
+
* while the store streams its session or a framework binding has it mounted.
|
|
61
|
+
*/
|
|
62
|
+
readonly followSubagents?: boolean;
|
|
52
63
|
readonly reducer: EveAgentReducer<TData>;
|
|
53
64
|
readonly session?: ClientSession;
|
|
54
65
|
}
|
|
@@ -57,6 +68,7 @@ export interface PendingMessageSubmission {
|
|
|
57
68
|
readonly eventStartIndex: number;
|
|
58
69
|
readonly id: string;
|
|
59
70
|
readonly message: string;
|
|
71
|
+
readonly turnId?: string;
|
|
60
72
|
readonly requiresDeliveryId: boolean;
|
|
61
73
|
readonly deliveryId?: string;
|
|
62
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot } from "#client/eve-agent-store-state.js";
|
|
2
|
-
import type { CancelSessionResult, SendTurnPayload } from "#client/types.js";
|
|
2
|
+
import type { CancelSessionResult, ClearResult, CompactResult, ResetResult, SendTurnPayload } from "#client/types.js";
|
|
3
3
|
export type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot, EveAgentStoreStatus, PrepareSend, } from "#client/eve-agent-store-state.js";
|
|
4
4
|
declare const detachStore: unique symbol;
|
|
5
5
|
declare const attachStore: unique symbol;
|
|
@@ -26,6 +26,15 @@ export declare class EveAgentStore<TData> {
|
|
|
26
26
|
* that turn ID. The event stream stays attached until the turn settles.
|
|
27
27
|
*/
|
|
28
28
|
cancel(): Promise<CancelSessionResult>;
|
|
29
|
+
/** Queues server-side compaction of the current session's context. */
|
|
30
|
+
compact(): Promise<CompactResult>;
|
|
31
|
+
/** Clears the current session's model-message history on the server. */
|
|
32
|
+
clear(): Promise<ClearResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Terminally retires the store-owned server session, then resets local state so the next
|
|
35
|
+
* send starts a fresh session. A failed request leaves both intact.
|
|
36
|
+
*/
|
|
37
|
+
retire(): Promise<ResetResult>;
|
|
29
38
|
[attachStore](): void;
|
|
30
39
|
[detachStore](): void;
|
|
31
40
|
reset(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toError}from"#shared/errors.js";import{createEventDeduper}from"#protocol/event-dedupe.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{updatePendingAuthorizations}from"#client/session-utils.js";import{Client}from"#client/client.js";import{consumeMessageResponse,getMessageResponseDeliveryId}from"#client/message-response.js";import{SessionEventStream}from"#client/session-event-stream.js";import{EveAgentProjection}from"#client/eve-agent-projection.js";import{OptimisticMessageSubmissions}from"#client/optimistic-message-submissions.js";import{assertExclusiveTurnInput,createAbortSignal,createActiveTurn,followSteeredTurns,isAbortError,isSettledSessionTail,toTerminalStreamFailureError,waitWithSignal}from"#client/eve-agent-store-helpers.js";const detachStore=Symbol(`detachEveAgentStore`),attachStore=Symbol(`attachEveAgentStore`);var EveAgentStore=class{#e;#t;#n=!1;#r;#i=new Set;#a;#o;#s;#c=new Set;#l=createEventDeduper();#u;#d={};#f;#p;#m;#h=0;#g;#_;#v;#y;#b;#x=`ready`;constructor(e){this.#t=e.prewarm??!1,this.#a=e.session!==void 0,this.#e=this.#a?void 0:new Client({auth:e.auth,headers:e.headers,host:e.host??``});let t=[];for(let n of e.initialEvents??[])this.#l.admit(n)&&t.push(n),updatePendingAuthorizations(this.#i,n);this.#p=t,this.#s=new EveAgentProjection(e.reducer,this.#p),this.#o=e.optimistic??!0,this.#m=new OptimisticMessageSubmissions(this.#s,this.#o),this.#y=e.session??(e.initialSession===void 0?void 0:this.#e?.sessions.attach(e.initialSession.sessionId,{streamIndex:e.initialSession.streamIndex})),this.#b=this.#P()}get snapshot(){return this.#b}setCallbacks(e){this.#d=e}subscribe(e){return this.#c.add(e),()=>{this.#c.delete(e)}}prewarm(){if(this.#g!==void 0)return this.#g;if(this.#y!==void 0||this.#a)return Promise.resolve();if(this.#u!==void 0)return this.#u.response.then(e=>{if(e===void 0)throw this.#f??new DOMException(`Session creation was aborted.`,`AbortError`)});let e=this.#e;if(e===void 0)return Promise.reject(Error(`This eve agent store does not own a session client.`));let t=this.#h,n=new AbortController;this.#_=n;let r=(async()=>{try{let r=await e.sessions.create({signal:n.signal});if(t!==this.#h)return;this.#y=r.session,this.#f=void 0,this.#x===`error`&&(this.#x=`ready`),this.#d.onSessionChange?.(r.session.state),this.#F(),this.#E()}catch(e){throw t===this.#h&&this.#u===void 0&&this.#f===void 0&&(this.#f=toError(e),this.#x=`error`,this.#d.onError?.(this.#f),this.#F()),e}})();this.#g=r;let clear=()=>{this.#g===r&&(this.#g=void 0,this.#_=void 0)};return r.then(clear,clear),r}async send(e){return await this.#S(e,this.#d.prepareSend)}async#S(e,t){if(this.#u!==void 0){if(this.#x===`resuming`)throw Error(`eve session is resuming.`);return await this.#w(this.#u,e,t)}let n=createActiveTurn(e=>e.acceptedFollowUps>0&&this.#y!==void 0?this.#y.cancel():e.response.then(e=>e===void 0?{status:`no_active_turn`}:e.cancel()));this.#u=n,this.#f=void 0,this.#x=`submitted`,this.#F();let r;try{let i=await(t===void 0?e:waitWithSignal(Promise.resolve(t(e)),createAbortSignal(e.signal,n.abortController.signal)));if(assertExclusiveTurnInput(i),!this.#k(n))return;let a=this.#m.submit(i,this.#p.length);this.#A(i),this.#F();let o={...i,signal:createAbortSignal(i.signal,n.abortController.signal)},s=await this.#T(o),c=s.response;if(r=s.reader,!this.#k(n))return;n.resolveResponse(c),this.#M(this.#m.correlate(a,getMessageResponseDeliveryId(c),this.#p))&&this.#F();for await(let e of consumeMessageResponse(c,r)){if(!this.#k(n))return;n.receivedFollowUps+=n.receivedFollowUpEvents.get(e)??0,n.receivedFollowUpEvents.delete(e)}if(!this.#k(n)||(await followSteeredTurns(n,r,()=>this.#k(n)),!this.#k(n)))return;this.#x=this.#f===void 0?`ready`:`error`}catch(e){if(!this.#k(n))return;if(isAbortError(e))this.#x=`ready`,this.#m.fail(toError(e));else{let t=this.#f!==void 0;this.#f??=toError(e),this.#x=`error`,this.#m.fail(this.#f),t||this.#d.onError?.(this.#f)}}finally{r?.[Symbol.dispose](),this.#O(n)}}resume(){if(this.#v!==void 0)return this.#v;let e=this.#C();this.#v=e;let clear=()=>{this.#v===e&&(this.#v=void 0)};return e.then(clear,clear),e}async#C(){if(this.#x===`resuming`||this.#x===`streaming`||this.#x===`submitted`)throw Error(`eve session is already processing a turn.`);if(this.#y===void 0)throw Error(`An eve session is required before resuming.`);let e=this.#y,t=createActiveTurn(()=>e.cancel());this.#u=t,t.resolveResponse(void 0),this.#f=void 0,this.#x=`resuming`,this.#F();let n;try{let r=this.#E({catchUp:!0,startIndex:this.#p.length===e.state.streamIndex?e.state.streamIndex:0});if(n=r.subscribe(t.abortController.signal),await r.caughtUp,!this.#k(t))return;n.discard();let i=this.#p.at(-1);if(i!==void 0&&this.#N(i),i!==void 0&&this.#f===void 0&&!isSettledSessionTail(this.#p)){this.#x=`streaming`,this.#F();for await(let e of n){if(!this.#k(t))return;if(t.receivedFollowUps+=t.receivedFollowUpEvents.get(e)??0,t.receivedFollowUpEvents.delete(e),isCurrentTurnBoundaryEvent(e)&&this.#i.size===0)break}}await followSteeredTurns(t,n,()=>this.#k(t)),this.#k(t)&&(this.#x=this.#f===void 0?`ready`:`error`)}catch(e){if(!this.#k(t))return;isAbortError(e)?this.#x=`ready`:(this.#f=toError(e),this.#x=`error`,this.#d.onError?.(this.#f))}finally{n?.[Symbol.dispose](),this.#O(t)}}cancel(){let e=this.#u;return e===void 0?this.#x===`streaming`&&this.#y!==void 0?this.#y.cancel():Promise.resolve({status:`no_active_turn`}):e.cancel()}[attachStore](){this.#n=!0,this.#t&&this.#y===void 0&&this.prewarm().catch(()=>{})}[detachStore](){this.#n=!1,this.#r?.close(),this.#r=void 0,this.#u?.abortController.abort(),this.#D(),this.#v=void 0}reset(){this.#r?.close(),this.#r=void 0,this.#i.clear();let e=this.#u;this.#u=void 0,e?.resolveResponse(void 0),e?.resolveCompletion(),e?.abortController.abort(),this.#D(),this.#v=void 0,this.#a||(this.#y=void 0),this.#p=[],this.#l=createEventDeduper(),this.#m.reset(),this.#s.reset(),this.#f=void 0,this.#x=`ready`,this.#d.onSessionChange?.(this.#y?.state),this.#F(),this.#t&&this.#n&&this.prewarm().catch(()=>{})}async#w(e,t,n){if(t.message===void 0||t.turnPolicy!==`steer`)throw Error(`eve session is already processing a turn. Send a message with turnPolicy: "steer" to guide it at the next boundary.`);let r=this.#h,i=createAbortSignal(t.signal,e.abortController.signal),a=await waitWithSignal(Promise.resolve(n?.(t)),i)??t;if(r!==this.#h)return;if(assertExclusiveTurnInput(a),a.message===void 0||a.turnPolicy!==`steer`)throw Error(`An in-flight follow-up requires a message with turnPolicy: "steer".`);if(!this.#k(e))return await this.#S(a);let o=this.#m.submit(a,this.#p.length);o!==void 0&&e.followUpSubmissionIds.add(o),this.#F(),this.#E({headers:a.headers,streamReconnectPolicy:a.streamReconnectPolicy});let s;s=(async()=>{try{let t=createAbortSignal(a.signal,e.abortController.signal);if(await waitWithSignal(e.response,t),!this.#k(e)||this.#y===void 0)throw Error(`The active eve turn ended before the follow-up could be sent.`);let{message:n,...r}=a,i=await this.#y.send(n,{...r,signal:t});e.acceptedFollowUps+=1,this.#M(this.#m.correlate(o,getMessageResponseDeliveryId(i),this.#p))&&this.#F()}catch(t){throw this.#k(e)&&(this.#m.fail(toError(t),o),this.#F()),t}finally{e.followUpDispatches.delete(s)}})(),e.followUpDispatches.add(s),await s,await e.completion}async#T(e){let t={headers:e.headers,streamReconnectPolicy:e.streamReconnectPolicy};if(this.#g!==void 0&&(await waitWithSignal(this.#g.catch(e=>{if(this.#y!==void 0)throw e}),e.signal),e.signal?.throwIfAborted()),this.#y===void 0){if(this.#e===void 0)throw Error(`An external eve session is required before sending.`);if(e.message===void 0)throw Error(`Cannot answer an input request before the session starts.`);let n=await this.#e.sessions.create({...e,message:e.message});return e.signal?.throwIfAborted(),this.#y=n.session,this.#d.onSessionChange?.(n.session.state),this.#F(),{response:n.response,reader:this.#E(t).subscribe(e.signal)}}let n=this.#E(t).subscribe(e.signal);try{if(e.inputResponses===void 0){let{message:t,...r}=e;return{response:await this.#y.send(t,r),reader:n}}let{inputResponses:t,...r}=e;return{response:await this.#y.respond(t,r),reader:n}}catch(e){throw n[Symbol.dispose](),e}}#E(e={}){if(this.#r!==void 0&&!this.#r.ended)return this.#r.setOptions(e),this.#r;if(this.#y===void 0)throw Error(`A session is required before opening its stream.`);let t=this.#y,n=this.#h;return this.#r=new SessionEventStream(t,{...e,onEvent:e=>{n===this.#h&&this.#j(e)},onError:e=>{n===this.#h&&(this.#r=void 0,this.#u===void 0&&(this.#f=toError(e),this.#x=`error`,this.#d.onError?.(this.#f),this.#F()))}}),this.#r}#D(){this.#h+=1,this.#_?.abort(),this.#_=void 0,this.#g=void 0}#O(e){if(this.#k(e)){e.resolveResponse(void 0),this.#u=void 0;try{this.#d.onSessionChange?.(this.#y?.state),this.#F(),this.#d.onFinish?.(this.#b)}finally{e.resolveCompletion()}}}#k(e){return this.#u===e}#A(e){e.inputResponses!==void 0&&e.inputResponses.length!==0&&this.#s.append({data:{createdAt:Date.now(),responses:e.inputResponses},type:`client.input.responded`})}#j(e){if(!this.#l.admit(e))return;let t=this.#x===`streaming`;updatePendingAuthorizations(this.#i,e),this.#p=[...this.#p,e],this.#M(this.#m.apply(e)),this.#d.onEvent?.(e),this.#N(e);let n=isCurrentTurnBoundaryEvent(e)&&this.#i.size===0;this.#x!==`resuming`&&this.#f===void 0&&(`data`in e&&`turnId`in e.data&&(this.#x=`streaming`),this.#u===void 0&&n&&(this.#x=`ready`)),this.#d.onSessionChange?.(this.#y?.state),this.#x!==`resuming`&&this.#F(),this.#u===void 0&&t&&n&&this.#d.onFinish?.(this.#b)}#M(e){if(e===void 0)return!1;let t=0;for(let n of e.ids)this.#u?.followUpSubmissionIds.delete(n)&&(t+=1);if(t>0&&this.#u!==void 0){if(e.alreadyProjected)this.#u.receivedFollowUps+=t;else{let n=this.#u.receivedFollowUpEvents.get(e.event)??0;this.#u.receivedFollowUpEvents.set(e.event,n+t)}}return!0}#N(e){let t=toTerminalStreamFailureError(e);t!==void 0&&(this.#x=`error`,this.#m.failAll(t),this.#f===void 0&&(this.#f=t,this.#d.onError?.(t)))}#P(){return{data:this.#s.data,error:this.#f,events:this.#p,session:this.#y?.state,status:this.#x}}#F(){this.#b=this.#P();for(let e of this.#c)e()}};function detachEveAgentStore(e){e[detachStore]()}function attachEveAgentStore(e){e[attachStore]()}export{EveAgentStore,attachEveAgentStore,detachEveAgentStore};
|
|
1
|
+
import{toError}from"#shared/errors.js";import{activeTurnForOptimisticFollowUp,assertAnswerable,assertExclusiveTurnInput,assertInFlightFollowUp,countFollowUpDeliveries,createAbortSignal,createActiveTurn,followSteeredTurns,isAbortError,isResponseBoundary,isSettledSessionTail,settledStatus,toTerminalStreamFailureError,validateFollowUp,waitWithSignal}from"#client/eve-agent-store-helpers.js";import{EveAgentProjection}from"#client/eve-agent-projection.js";import{Client}from"#client/client.js";import{consumeMessageResponse,getMessageResponseDeliveryId}from"#client/message-response.js";import{OptimisticMessageSubmissions}from"#client/optimistic-message-submissions.js";import{ConversationClient}from"#client/conversation-client.js";import{dispatchSessionTurn}from"#client/session-turn-dispatch.js";const detachStore=Symbol(`detachEveAgentStore`),attachStore=Symbol(`attachEveAgentStore`);var EveAgentStore=class{#e;#t;#n=!1;#r;#i;#a;#o=new Set;#s;#c={};#l;#u;#d;#f=0;#p;#m;#h;#g;#_;#v=`ready`;constructor(e){this.#t=e.prewarm??!1,this.#i=e.followSubagents??!1,this.#a=e.session!==void 0,this.#e=this.#a?void 0:e.client??new Client({auth:e.auth,headers:e.headers,host:e.host??``}),this.#r=new ConversationClient(new EveAgentProjection(e.reducer,[]),()=>this.#F(),()=>this.#F()),this.#u=(e.initialEvents??[]).filter(e=>this.#r.hydrate(e)),this.#d=new OptimisticMessageSubmissions(this.#r.projections,e.optimistic??!0),this.#g=e.session??(e.initialSession===void 0?void 0:this.#e?.sessions.attach(e.initialSession.sessionId,{streamIndex:e.initialSession.streamIndex})),this.#_=this.#P()}get snapshot(){return this.#_}setCallbacks(e){this.#c=e}subscribe(e){return this.#o.add(e),()=>void this.#o.delete(e)}prewarm(){if(this.#p!==void 0)return this.#p;if(this.#g!==void 0||this.#a)return Promise.resolve();if(this.#s!==void 0)return this.#s.response.then(e=>{if(e===void 0)throw this.#l??new DOMException(`Session creation was aborted.`,`AbortError`)});let e=this.#e;if(e===void 0)return Promise.reject(Error(`This eve agent store does not own a session client.`));let t=this.#f,n=new AbortController;this.#m=n;let r=(async()=>{try{let r=await e.sessions.create({signal:n.signal});if(t!==this.#f)return;this.#l=void 0,this.#v===`error`&&(this.#v=`ready`),this.#w(r.session),this.#C()}catch(e){throw t===this.#f&&this.#s===void 0&&this.#l===void 0&&this.#T(e),e}})();this.#p=r;let clear=()=>{this.#p===r&&(this.#p=void 0,this.#m=void 0)};return r.then(clear,clear),r}async send(e){return await this.#y(e,this.#c.prepareSend)}async#y(e,t){if(assertAnswerable(e,this.#r.conversation),this.#s!==void 0){if(this.#v===`resuming`)throw Error(`eve session is resuming.`);return await this.#x(this.#s,e,t)}let n=createActiveTurn(e=>e.acceptedFollowUps>0&&this.#g!==void 0?this.#g.cancel():e.response.then(e=>e===void 0?{status:`no_active_turn`}:e.cancel()));this.#s=n,this.#l=void 0,this.#v=`submitted`;let r,i,a;try{assertExclusiveTurnInput(e),i=this.#d.submit(e,this.#u.length),a=this.#r.projectResponses(e.inputResponses),this.#F();let o=await(t===void 0?e:waitWithSignal(Promise.resolve(t(e)),createAbortSignal(e.signal,n.abortController.signal)));if(assertExclusiveTurnInput(o),!this.#k(n))return;o!==e&&(i=this.#d.resubmit(i,o),a=this.#r.replaceResponses(a,o),this.#F());let s={...o,signal:createAbortSignal(o.signal,n.abortController.signal)},c=await this.#S(s);a=void 0;let l=c.response;if(r=c.reader,!this.#k(n))return;n.resolveResponse(l),this.#j(i,l);for await(let e of consumeMessageResponse(l,r)){if(!this.#k(n))return;n.receivedFollowUps+=n.receivedFollowUpEvents.get(e)??0,n.receivedFollowUpEvents.delete(e)}if(!this.#k(n)||(await followSteeredTurns(n,r,()=>this.#k(n)),!this.#k(n)))return;this.#v=settledStatus(this.#l,this.#r.conversation)}catch(e){if(!this.#k(n))return;if(a?.(),isAbortError(e))this.#v=`ready`,this.#d.fail(toError(e),i);else{let t=this.#l!==void 0;this.#l??=toError(e),this.#v=`error`,this.#d.fail(this.#l,i),t||this.#c.onError?.(this.#l)}}finally{r?.[Symbol.dispose](),this.#O(n)}}resume(){if(this.#h!==void 0)return this.#h;let e=this.#b();this.#h=e;let clear=()=>{this.#h===e&&(this.#h=void 0)};return e.then(clear,clear),e}async#b(){if(this.#v!==`ready`&&this.#v!==`error`)throw Error(`eve session is already processing a turn.`);if(this.#g===void 0)throw Error(`An eve session is required before resuming.`);let e=this.#g,t=createActiveTurn(()=>e.cancel());this.#s=t,t.resolveResponse(void 0),this.#l=void 0,this.#v=`resuming`,this.#F();let n;try{let r=this.#C({catchUp:!0,startIndex:this.#u.length===e.state.streamIndex?e.state.streamIndex:0});if(n=r.subscribe(t.abortController.signal),await r.caughtUp,!this.#k(t))return;n.discard();let i=this.#u.at(-1);if(i!==void 0&&this.#N(i),i&&!this.#l&&!isSettledSessionTail(this.#u,this.#r.conversation)){this.#v=`streaming`,this.#F();for await(let e of n){if(!this.#k(t))return;if(t.receivedFollowUps+=t.receivedFollowUpEvents.get(e)??0,t.receivedFollowUpEvents.delete(e),isResponseBoundary(e,this.#r.conversation))break}}await followSteeredTurns(t,n,()=>this.#k(t)),this.#k(t)&&(this.#v=settledStatus(this.#l,this.#r.conversation))}catch(e){if(!this.#k(t))return;isAbortError(e)?this.#v=`ready`:(this.#l=toError(e),this.#v=`error`,this.#c.onError?.(this.#l))}finally{n?.[Symbol.dispose](),this.#O(t)}}cancel(){let e=this.#s;return e===void 0?this.#v===`streaming`&&this.#g!==void 0?this.#g.cancel():Promise.resolve({status:`no_active_turn`}):e.cancel()}async compact(){return await this.#g?.compact()??{status:`no_active_session`}}async clear(){return await this.#g?.clear()??{status:`no_active_session`}}async retire(){if(this.#a)throw Error(`retire() needs a store-owned session. Call reset() on the session you supplied, then create a new store for the next session.`);let e=await this.#g?.reset()??{status:`no_active_session`};return this.reset(),e}[attachStore](){this.#n=!0,this.#i&&!this.#r.following&&this.#E(),this.#t&&this.#g===void 0&&this.prewarm().catch(()=>{})}[detachStore](){this.#n=!1,this.#r.stop(),this.#s?.abortController.abort(),this.#D(),this.#h=void 0}reset(){this.#r.stop();let e=this.#s;this.#s=void 0,e?.resolveResponse(void 0),e?.resolveCompletion(),e?.abortController.abort(),this.#D(),this.#h=void 0,this.#a||(this.#g=void 0),this.#u=[],this.#r.reset(),this.#d.reset(),this.#i&&this.#n&&this.#E(),this.#l=void 0,this.#v=`ready`,this.#c.onSessionChange?.(this.#g?.state),this.#F(),this.#t&&this.#n&&this.prewarm().catch(()=>{})}async#x(e,t,n){assertInFlightFollowUp(t);let r=this.#f,i=createAbortSignal(t.signal,e.abortController.signal),a=this.#r.projectResponses(t.inputResponses),o=await waitWithSignal(Promise.resolve(n?.(t)),i).then(e=>{let n=validateFollowUp(e??t);return n===t||(a=this.#r.replaceResponses(a,n)),n}).catch(e=>{throw a?.(),e});if(r!==this.#f)return;if(!this.#k(e))return a?.(),await this.#y(o);let s=this.#d.submit(o,this.#u.length,activeTurnForOptimisticFollowUp(this.#u));s!==void 0&&e.followUpSubmissionIds.add(s),this.#F();let c;c=(async()=>{try{let t=createAbortSignal(o.signal,e.abortController.signal);if(await waitWithSignal(e.response,t),!this.#k(e)||this.#g===void 0)throw Error(`The active eve turn ended before the follow-up could be sent.`);this.#C({headers:o.headers,streamReconnectPolicy:o.streamReconnectPolicy});let n=(await dispatchSessionTurn({session:this.#g,turn:{...o,signal:t}})).response;if(a=void 0,o.message===void 0)return;e.acceptedFollowUps+=1,this.#j(s,n)}catch(t){throw this.#k(e)&&(this.#d.fail(toError(t),s),a?.(),this.#F()),t}finally{e.followUpDispatches.delete(c)}})(),e.followUpDispatches.add(c),await c,await e.completion}async#S(e){let t={headers:e.headers,streamReconnectPolicy:e.streamReconnectPolicy};this.#p!==void 0&&(await waitWithSignal(this.#p.catch(e=>{if(this.#g!==void 0)throw e}),e.signal),e.signal?.throwIfAborted());let n=this.#g,r;try{let i=await dispatchSessionTurn({client:this.#e,session:n,turn:e,beforeSend:()=>{r=this.#C(t).subscribe(e.signal)}});return i.created&&(this.#w(i.session),r=this.#C(t).subscribe(e.signal)),{response:i.response,reader:r}}catch(e){throw r?.[Symbol.dispose](),e}}#C(e={}){if(this.#g===void 0)throw Error(`A session is required before opening its stream.`);let t=this.#f;return this.#i&&!this.#r.following&&this.#E(),this.#r.stream(this.#g,{...e,onEvent:e=>{t===this.#f&&this.#A(e)},onError:e=>{t===this.#f&&this.#s===void 0&&this.#T(e)}})}#w(e){this.#g=e,this.#i&&this.#n&&this.#E(),this.#c.onSessionChange?.(e.state),this.#F()}#T(e){this.#l=toError(e),this.#v=`error`,this.#c.onError?.(this.#l),this.#F()}#E(){this.#g&&this.#r.follow(this.#g,this.#u)}#D(){this.#f+=1,this.#m?.abort(),this.#m=void 0,this.#p=void 0}#O(e){if(this.#k(e)){e.resolveResponse(void 0),this.#s=void 0;try{this.#c.onSessionChange?.(this.#g?.state),this.#F(),this.#c.onFinish?.(this.#_)}finally{e.resolveCompletion()}}}#k(e){return this.#s===e}#A(e){let t=this.#v===`streaming`;if(!this.#r.observe(e,{onAccepted:()=>{this.#u=[...this.#u,e]},project:e=>{this.#M(this.#d.apply(e))},notify:!1}))return!1;this.#c.onEvent?.(e),this.#N(e);let{conversation:n}=this.#r,r=isSettledSessionTail(this.#u,n)&&n.activeTurnId===void 0;return this.#v!==`resuming`&&this.#l===void 0&&(`data`in e&&e.data!==void 0&&`turnId`in e.data&&(this.#v=`streaming`),this.#s===void 0&&r&&(this.#v=`ready`)),this.#c.onSessionChange?.(this.#g?.state),this.#v!==`resuming`&&this.#F(),this.#s===void 0&&t&&r&&this.#c.onFinish?.(this.#_),!0}#j(e,t){let n=getMessageResponseDeliveryId(t),r=this.#d.correlate(e,n,this.#u);this.#M(r)&&this.#F()}#M(e){return e!==void 0&&(this.#s!==void 0&&countFollowUpDeliveries(this.#s,e),!0)}#N(e){let t=toTerminalStreamFailureError(e);t!==void 0&&(this.#v=`error`,this.#d.failAll(t),this.#l===void 0&&(this.#l=t,this.#c.onError?.(t)))}#P(){return{data:this.#r.data,conversation:this.#r.conversation,error:this.#l,events:this.#u,session:this.#g?.state,status:this.#v}}#F(){this.#_=this.#P();for(let e of this.#o)e()}};function detachEveAgentStore(e){e[detachStore]()}function attachEveAgentStore(e){e[attachStore]()}export{EveAgentStore,attachEveAgentStore,detachEveAgentStore};
|
|
@@ -4,15 +4,19 @@ export { AgentInfoResponseError } from "#client/agent-info-error.js";
|
|
|
4
4
|
export { HealthResponseError } from "#client/health-response-error.js";
|
|
5
5
|
export { ClientError } from "#client/client-error.js";
|
|
6
6
|
export { defaultMessageReducer } from "#client/message-reducer.js";
|
|
7
|
+
export { conversationReducer } from "#client/conversation-reducer.js";
|
|
8
|
+
export { openConversationInputs } from "#client/conversation-state.js";
|
|
9
|
+
export type { AgentObservation, ConversationAgentSession, ConversationInput, ConversationState, ConversationTask, ConversationTaskCall, ConversationTurn, } from "#client/conversation-state.js";
|
|
7
10
|
export { createDataUrlFilePart, createTextWithFileContent } from "#client/file-parts.js";
|
|
8
11
|
export { MessageResponse } from "#client/message-response.js";
|
|
12
|
+
export { ClientAgentSession } from "#client/agent-session.js";
|
|
9
13
|
export { ClientSession } from "#client/session.js";
|
|
10
14
|
export { ClientSessions, type CreatedClientSession, type CreatedIdleClientSession, } from "#client/sessions.js";
|
|
11
15
|
export type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot, EveAgentStoreStatus, PrepareSend, } from "#client/eve-agent-store.js";
|
|
12
16
|
export type { AgentInfoEntry, AgentInfoChannelEntry, AgentInfoChannels, AgentInfoConnectionEntry, AgentInfoDynamicResolverEntry, AgentInfoHookEntry, AgentInfoInstructions, AgentInfoInstructionsEntry, AgentInfoResult, AgentInfoRemoteAgentEntry, AgentInfoSandboxEntry, AgentInfoScheduleEntry, AgentInfoSkillEntry, AgentInfoSource, AgentInfoSubagentEntry, AgentInfoToolEntry, AgentInfoTools, CancelSessionResult, ClearResult, CompactResult, ClientAuth, ClientOptions, ClientRedirectPolicy, CreateSessionOptions, HeadersValue, HealthResult, MessageResult, RespondTurnOptions, ResetResult, ResolvedStreamReconnectPolicy, SendTurnInput, SendTurnOptions, SessionSnapshot, ClientSessionState, StreamOptions, StreamReconnectPolicy, StreamReconnectRetryPolicy, TokenValue, } from "#client/types.js";
|
|
13
17
|
export type { EveAgentReducer, EveAgentReducerEvent, ClientInputRespondedEvent, ClientMessageFailedEvent, ClientMessageSubmittedEvent, } from "#client/reducer.js";
|
|
14
18
|
export type { EveAuthorizationChallenge, EveAuthorizationOutcome, EveAuthorizationPart, EveMessageData, EveDynamicToolPart, EveMessageInputRequest, EveMessage, EveMessageMetadata, EveMessagePart, EveMessageToolMetadata, } from "#client/message-reducer.js";
|
|
15
|
-
export type { ActionPartialStreamEvent, ActionResultStreamEvent, ActionsRequestedStreamEvent, AssistantStepFinishReason, AuthorizationOutcome, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, MessageStreamEventMeta, InputResolution, InputResolutionOutcome, InputResolvedStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedPart, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, ResultCompletedStreamEvent, RuntimeTraceContext, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, MessageStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent,
|
|
19
|
+
export type { ActionPartialStreamEvent, ActionResultStreamEvent, ActionsRequestedStreamEvent, AgentStartedStreamEvent, AssistantStepFinishReason, AuthorizationOutcome, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, MessageStreamEventMeta, InputResolution, InputResolutionOutcome, InputResolvedStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedPart, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, ResultCompletedStreamEvent, RuntimeTraceContext, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, MessageStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent, TaskSettledStreamEvent, TaskStartedStreamEvent, TurnCancelledStreamEvent, TurnCompletedStreamEvent, TurnFailedStreamEvent, TurnStartedStreamEvent, TurnFailureStreamEvent, TurnWaitingOn, TurnWaitingStreamEvent, } from "#protocol/message.js";
|
|
16
20
|
export { isCurrentTurnBoundaryEvent, isTurnFailureEvent } from "#protocol/message.js";
|
|
17
21
|
export type { InputOption, InputRequest, InputRequestKind, InputResponse } from "#shared/input.js";
|
|
18
22
|
export { isInputRequest, isInputResponse, parseInputResponse, parseInputResponses, } from "#shared/input.js";
|
package/dist/src/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isInputRequest,isInputResponse,parseInputResponse,parseInputResponses}from"#shared/input.js";import{isCurrentTurnBoundaryEvent,isTurnFailureEvent}from"#protocol/message.js";import{AgentInfoResponseError}from"#client/agent-info-error.js";import{HealthResponseError}from"#client/health-response-error.js";import{ClientError}from"#client/client-error.js";import{ClientSessions}from"#client/sessions.js";import{
|
|
1
|
+
import{isInputRequest,isInputResponse,parseInputResponse,parseInputResponses}from"#shared/input.js";import{openConversationInputs}from"#client/conversation-state.js";import{EveAgentStore}from"#client/eve-agent-store.js";import{isCurrentTurnBoundaryEvent,isTurnFailureEvent}from"#protocol/message.js";import{AgentInfoResponseError}from"#client/agent-info-error.js";import{HealthResponseError}from"#client/health-response-error.js";import{ClientError}from"#client/client-error.js";import{ClientSessions}from"#client/sessions.js";import{conversationReducer}from"#client/conversation-reducer.js";import{defaultMessageReducer}from"#client/message-reducer.js";import{Client}from"#client/client.js";import{MessageResponse}from"#client/message-response.js";import{createDataUrlFilePart,createTextWithFileContent}from"#client/file-parts.js";import{ClientAgentSession}from"#client/agent-session.js";import{ClientSession}from"#client/session.js";import{resolveTextToResponse,resolveTextToResponses}from"#channel/resolve-text.js";export{AgentInfoResponseError,Client,ClientAgentSession,ClientError,ClientSession,ClientSessions,EveAgentStore,HealthResponseError,MessageResponse,conversationReducer,createDataUrlFilePart,createTextWithFileContent,defaultMessageReducer,isCurrentTurnBoundaryEvent,isInputRequest,isInputResponse,isTurnFailureEvent,openConversationInputs,parseInputResponse,parseInputResponses,resolveTextToResponse,resolveTextToResponses};
|