eve 0.69.0 → 0.70.1
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 +49 -0
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/channel/task-card.d.ts +3 -3
- package/dist/src/channel/task-card.js +1 -1
- package/dist/src/channel/types.d.ts +18 -0
- package/dist/src/chunks/{use-eve-agent-Dab2MnT2.js → use-eve-agent-CJQeE7-t.js} +1873 -1236
- package/dist/src/chunks/{use-eve-agent-D_5129A9.js → use-eve-agent-DdemtY6C.js} +1874 -1234
- 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 +2 -1
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- 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/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.d.ts +7 -7
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- 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/runner.d.ts +58 -195
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/task-activity.d.ts +11 -24
- package/dist/src/cli/dev/tui/task-activity.js +1 -1
- package/dist/src/cli/dev/tui/task-records.d.ts +17 -0
- package/dist/src/cli/dev/tui/task-records.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +15 -37
- 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/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +1 -0
- 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/transcript-parts.d.ts +81 -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 +2 -4
- package/dist/src/cli/dev/ui-options.js +1 -1
- 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 +21 -2
- 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 +4 -1
- package/dist/src/client/index.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/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-turn-dispatch.d.ts +15 -0
- package/dist/src/client/session-turn-dispatch.js +1 -0
- package/dist/src/client/session-utils.d.ts +27 -10
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +2 -1
- package/dist/src/compiled/.vendor-stamp.json +2 -2
- package/dist/src/compiled/{gray-matter → js-yaml}/LICENSE +2 -2
- package/dist/src/compiled/js-yaml/index.d.ts +12 -0
- package/dist/src/compiled/js-yaml/index.js +34 -0
- package/dist/src/compiler/extension-compatibility.d.ts +18 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/context/keys.d.ts +5 -2
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/provider.d.ts +5 -9
- package/dist/src/context/run-step.d.ts +4 -4
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.d.ts +5 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- 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/session.js +2 -2
- package/dist/src/evals/types.d.ts +16 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/execution/agent-sessions/context.d.ts +4 -2
- package/dist/src/execution/agent-sessions/context.js +1 -1
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +6 -4
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +4 -2
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -4
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +8 -0
- package/dist/src/execution/legacy-remote-agent/protocol.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/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/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +27 -7
- package/dist/src/execution/publish-session-events.js +1 -1
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
- package/dist/src/execution/runtime-context.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/checkpoint-migrations.d.ts +23 -0
- package/dist/src/execution/session/checkpoint-migrations.js +1 -0
- 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 +24 -5
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +10 -6
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +19 -13
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +2 -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/program.d.ts +2 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +22 -16
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +8 -1
- package/dist/src/execution/session/state-delta.js +1 -1
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +20 -4
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +22 -3
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session.d.ts +5 -5
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +5 -4
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/tasks/start.d.ts +2 -2
- package/dist/src/execution/tasks/task-id-input.d.ts +1 -1
- package/dist/src/execution/tasks/task-id-input.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/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/connection-target.d.ts +5 -0
- package/dist/src/execution/tools/connection-target.js +1 -1
- package/dist/src/execution/tools/connection-tools.js +2 -2
- package/dist/src/execution/tools/workflow/start.d.ts +3 -3
- package/dist/src/harness/authorization.d.ts +15 -2
- 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 +5 -3
- package/dist/src/harness/emission.d.ts +5 -2
- package/dist/src/harness/emission.js +1 -1
- 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/input-extraction.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/model-call-error.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +4 -4
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/turn-tag-state.d.ts +2 -0
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +23 -11
- 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 +4 -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 -0
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +4 -3
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +14 -6
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +1 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -1
- package/dist/src/internal/helpers/frontmatter.d.ts +24 -0
- package/dist/src/internal/helpers/frontmatter.js +1 -0
- package/dist/src/internal/helpers/markdown.js +1 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.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/protocol/message.d.ts +41 -3
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/slack/action-status.d.ts +2 -2
- package/dist/src/public/channels/slack/action-status.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/auth.d.ts +2 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +15 -11
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +1 -15
- package/dist/src/public/channels/slack/defaults.js +3 -4
- package/dist/src/public/channels/slack/hitl.js +1 -1
- 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 +2 -0
- package/dist/src/public/channels/slack/index.js +1 -1
- 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 +1 -1
- package/dist/src/public/channels/slack/renderers.js +1 -1
- 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/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 +15 -0
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.js +1 -1
- 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/definitions/channel.d.ts +1 -0
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/state.d.ts +2 -0
- package/dist/src/public/definitions/state.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/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/connections/openapi-spec.d.ts +1 -4
- package/dist/src/runtime/connections/openapi-spec.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -0
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/integrations/web/setup.js +6 -2
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +5 -5
- package/dist/src/setup/scaffold/create/web-template.js +61 -35
- package/dist/src/setup/vercel-project-framework.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/framework-eve-server.d.ts +43 -0
- package/dist/src/shared/framework-eve-server.js +2 -0
- 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/subagents/callback-route.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +3 -3
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +3 -1
- package/dist/src/subagents/parent-notification.d.ts +7 -7
- package/dist/src/subagents/parent-notification.js +1 -1
- 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/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- 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-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-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +1 -1
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +4 -0
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +3 -0
- package/dist/src/tracing/conversation-context.d.ts +10 -0
- package/dist/src/tracing/conversation-context.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/channels/slack.mdx +60 -13
- package/docs/concepts/built-in-tools.md +3 -2
- package/docs/concepts/execution-model-and-durability.mdx +3 -1
- package/docs/concepts/sessions-runs-and-streaming.md +4 -4
- package/docs/connections/overview.mdx +9 -3
- package/docs/evals/reporters.mdx +4 -0
- package/docs/extensions.md +15 -3
- package/docs/guides/client/streaming.mdx +7 -6
- package/docs/guides/deployment/vercel.mdx +2 -1
- package/docs/guides/dev-tui.md +17 -17
- package/docs/guides/dynamic-capabilities.md +1 -1
- package/docs/guides/frontend/nuxt.mdx +24 -4
- package/docs/guides/frontend/overview.mdx +44 -38
- 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/instrumentation/otel.mdx +24 -6
- package/docs/guides/remote-agents.md +26 -8
- package/docs/reference/cli.md +4 -4
- package/docs/tools/human-in-the-loop.md +4 -4
- package/docs/tools/overview.mdx +1 -1
- package/docs/tools/tasks.md +8 -8
- package/package.json +2 -2
- 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 -134
- package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
- package/dist/src/compiled/gray-matter/index.d.ts +0 -62
- package/dist/src/compiled/gray-matter/index.js +0 -48
- package/dist/src/internal/helpers/gray-matter.d.ts +0 -25
- package/dist/src/internal/helpers/gray-matter.js +0 -1
- package/dist/src/public/nuxt/dev-server.d.ts +0 -25
- package/dist/src/public/nuxt/dev-server.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# eve
|
|
2
2
|
|
|
3
|
+
## 0.70.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dc50f62: Hosted builds bundle faster: eve no longer re-parses its largest output chunk while adding the Node ESM compatibility banner, and Nitro no longer gzips every output file just to annotate the build log. The repeated `MISSING_CODE_SPLITTING_GROUP_DEBUG_NAME` warning also no longer appears in build logs.
|
|
8
|
+
|
|
9
|
+
eve no longer depends on `gray-matter`. Frontmatter and YAML files (skills, schedules, instructions, OpenAPI specs, and `loadYaml`) now parse with js-yaml 4, whose schema cannot evaluate code, and each deployed function is about 180 kB smaller. Frontmatter fences must be `---` or `---yaml`; other languages such as `---json` or `---js` now fail with an error instead of being parsed.
|
|
10
|
+
- 528483f: Session turns, cancellations, and session endings run fewer durable workflow steps, so replies arrive sooner, especially for subagent sessions and sessions that do not start background work.
|
|
11
|
+
- a53f280: Long-lived sessions now move to newer deployments after an eve upgrade: a deployment upgrades handoff checkpoints written by eve 0.66.0 and later instead of leaving the session on its old deployment, and stops idle subagent sessions those releases kept for reuse. Refused handoffs now log why on both deployments. Callbacks from remote agents to sessions created by eve 0.66–0.68 no longer fail with `Unsupported callback kind`.
|
|
12
|
+
- 73242f0: In the dev TUI, `/new` now starts a fresh session, and `/reset` is an alias of `/new`. `/clear` still clears the session's model-message history in place, and now confirms with "Session context cleared" instead of disappearing without feedback.
|
|
13
|
+
- 6ed6253: The dev TUI no longer shows a follow-up message to a working subagent as a second subagent: it reads `Message subagent` in the transcript, the task panel keeps one entry, and the task ends with a single line. Parallel `agent` tasks are now named `subagent:2` instead of `subagent(subagent:2)`, and sibling tasks in the panel get a blank row between them when there is room.
|
|
14
|
+
- dd50d12: Fix three scaffolded web chat issues: links in user messages no longer blend into the chat bubble, approve/deny buttons for tool calls now show below the tool row instead of hiding inside its collapsed details, and typing in the composer or a question answer no longer zooms the page on iOS.
|
|
15
|
+
|
|
16
|
+
## 0.70.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- ddc8e12: A connection sign-in or tool approval now holds the turn open, like a question or task: the stream emits `turn.waiting` instead of `turn.completed` and `session.waiting`, and the same turn resumes once the person acts. Every `turn.waiting` now carries `on`: `"input"` when a person must act, `"tasks"` when the turn waits on its own work. A message from that person steers the turn and cancels the pending sign-in or approval, messages from anyone else wait for the turn to end, and cancelling the turn withdraws both, so an approval no longer stays answerable after a cancel. A message sent while a session-limit prompt holds the turn waits in that turn and runs once the budget is granted. Slack's sign-in prompt gains a Cancel button.
|
|
21
|
+
- 9553b51: The first local subagent turn now uses its caller's trace; remote turns remain separate roots with dispatch links, and later child turns start new traces. Queries that followed local `eve.link.type=agent.dispatch` links must use `parentSpanId` or `agent.parent_run.id` and `agent.parent_call.id`; third-party spans receive the conversation ID only when they do not set one.
|
|
22
|
+
- 63f86de: The TUI's `--logs` and `/loglevel` modes are now `none`, `error` (default), `warn`, `debug`, and `all`, replacing the `stderr` and `sandbox` filters. Console warnings retain their severity across local server workers, stay hidden by default, and render yellow when enabled; unclassified output is shown only with `all`, in neutral styling. Complete log records now commit immediately instead of holding completed turns in the clipped live region.
|
|
23
|
+
- 8aca3d8: Frontend hooks and `EveAgentStore` now share one conversation client: default hooks return `ConversationState` (messages plus root turns, input requests, tasks, and agent sessions) instead of `EveMessageData`, and every snapshot exposes canonical `conversation` alongside a custom reducer's `data`. Answers to open input requests are accepted while a turn runs, `followSubagents: true` follows each agent tool's session into `conversation.agents`, a held turn stays `streaming` with `turns[turnId].waiting` set, and `EveAgentStore` adds a `client` option plus `compact()`, `clear()`, and `retire()`.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 8aca3d8: A sign-in prompt that eve raises while checking who may answer an approval now includes its `attemptId`, so clients match the completion to that prompt instead of leaving it open.
|
|
28
|
+
- ddc8e12: A plain `connection_search` no longer asks the user to sign in: connections they have not authorized appear under `unavailable` with `requiresSignIn: true`, and the model signs in to one connection at a time with `connection_search({ connection, signIn: true })`. A turn waiting on several sign-ins resumes once all of them are done.
|
|
29
|
+
- ac77188: The build now fails when a dynamic remote agent's `auth` or `headers` uses a value declared inside the event handler. Before, eve moved the credentials to module scope anyway, so they threw at request time or silently read a same-named module value. Dynamic remote agents imported through an alias or `import * as eve` now compile their credentials too.
|
|
30
|
+
- 1094e52: Eval results now list the models their steps started with: `derived.models` on each session holds the distinct model ids in first-use order, and the eval result's `derived.models` merges them in session order. Only the sessions an eval created or attached are covered.
|
|
31
|
+
- 8aca3d8: The `eve dev` terminal UI now runs on the shared agent store: the prompt stays open while the agent works, including turns the agent starts on its own, approvals and questions open as soon as they arrive, and slash commands run immediately. `Esc` or `Ctrl+C` cancels the running turn instead of steering with queued messages, and an approval or question names the task that asked. While a sign-in is open, the turn bar names the connection it waits for, and a turn cancelled from another client puts its message back in the prompt.
|
|
32
|
+
- 001cc00: Tool, agent, and connection names now read as plain words in activity labels, approval prompts, and the Slack status and task card. An extension or memory namespace before `__` is dropped, and `sync_accounts` or `syncAccounts` shows as `Sync accounts`. A connection call shows as `Linear: List issues`, and its approval asks `Approve Linear: List issues?` instead of naming `connection_execute`. Agent calls read as `Researcher: Find the March incidents`. Labels set with `label.start` are unchanged.
|
|
33
|
+
- 8aca3d8: Keep a tool's completed result visible when an approval decision arrives after that result. The TUI no longer shows a finished workflow call as interrupted during subsequent turns.
|
|
34
|
+
- 4361876: Extensions mounted inside a contributed subagent can now read the enclosing extension's configuration. Previously the nested mount saw an unbound handle, so deriving its configuration from the parent extension failed with `Invalid extension config`.
|
|
35
|
+
- 3f6d9cf: `eve/nuxt` now shares the Next.js dev-server startup: it waits up to 180 seconds by default (configurable with the new `devServerTimeoutMs` option), ignores non-local URLs in eve's startup output, and prefixes eve's logs with `[eve:dev]`. Restarting `nuxt dev` no longer leaves eve requests proxied to a stopped dev server.
|
|
36
|
+
- ddc8e12: Tools and connections that share one Vercel Connect connector now ask the user to sign in once. Before, each tool that called `ctx.getToken(connect(...))` and each connection using the same connector posted its own sign-in prompt for the same grant.
|
|
37
|
+
- a79fca4: Task starts in the terminal UI now use ordinary tool-call styling. A bounded activity drawer above the prompt shows readable subagent labels, nested work, and the parent's current state and elapsed time. Activity remains visible above questions and approvals when screen space permits.
|
|
38
|
+
- 4403122: On Vercel, a remote agent's spans now carry its own session ID as `vercel.session_id` instead of the calling deployment's root session, and its local subagents carry the same ID. Agent Runs in the receiving project lists the remote agent as its own session, with its turns, subagents, and token usage. `gen_ai.conversation.id` still names the caller's conversation.
|
|
39
|
+
- 384af57: Session workflow steps that only publish events or update session state, such as a workflow tool's progress report, no longer store the conversation history in their Workflow step input, so their stored size stops growing with the conversation. The session handoff checkpoint changed shape, so an idle session does not move between deployments on either side of this release; its current owner keeps running it.
|
|
40
|
+
- ff12e85: `session.waiting`, `turn.waiting`, `session.failed`, and `session.completed` now carry `usage`, the session's running token usage and cost including what the agents it delegated to spent. Eval results expose it as `derived.usage`, per session and summed for the eval, so a delegating eval no longer reports only its own model calls.
|
|
41
|
+
- ddc8e12: A completed sign-in now resumes the turn as the user who started it. Before, when someone else posted in a shared thread while the sign-in was pending, the resumed turn ran as that last speaker and failed with "the service rejected the token immediately after authorization".
|
|
42
|
+
- ddc8e12: Slack now cleans up after a tool approval. Once it resolves, the separate tool-input post is deleted, a direct-message approval's `Waiting on approval` note in the thread shows the outcome, and the card loses its buttons even when the approval ends without a click. The `Checking whether you can respond to this approval…` notice is no longer posted, since Slack cannot remove it afterwards.
|
|
43
|
+
- 490ac0d: Slack no longer drops a final reply without a trace. When Slack refuses eve's default reply as too large or malformed, eve uploads it as a Markdown snippet. When a reply still isn't delivered, including when a custom renderer throws, eve posts a short notice with an error id, without the reply, and tells the model on the next message that the user never saw it. Custom renderers can opt in to the same fallbacks by posting through `postCompletedSlackReply` from `eve/channels/slack`, which tries their blocks, then native Markdown, then a snippet, using only the content they pass.
|
|
44
|
+
- ddc8e12: Slack now identifies a person by the app installation workspace on both messages and button clicks, as `slack:<installation team>:<user>`. Before, a Slack Connect or Enterprise Grid user could get one principal from their messages and another from approval clicks, so they were asked to sign in to the same connection again. Their principal changes once with this release, so they sign in to user-scoped connections one more time.
|
|
45
|
+
- 19a2b4f: Slack `onMessage` now receives only newly posted messages. Edits, deletions, and other system message events go to `onEvent`, so updating the agent's own HITL card in a DM no longer starts a stray session.
|
|
46
|
+
- 001cc00: Channels can now handle `step.started`, which fires before each model call in a turn. The default Slack channel uses it to replace a stale thread status when the model starts another step. The status shows `Reviewing results...` after a task finishes and `Thinking...` after a tool call. Before, `Waiting on 3 tasks...` or a finished tool's label lingered until the model streamed its next output.
|
|
47
|
+
- ddc8e12: Slack sign-in prompts now say which service they are for and why. The private message reads `Connect Linear: To continue, I need access to your Linear account` with a `Connect Linear` button, and a device code, when the provider issues one, appears as a short hint below the button instead of leading with `Use code … when prompted`. The thread status names who it is waiting on, as in `Waiting for @alice to connect Linear…`.
|
|
48
|
+
- 8aca3d8: The default message reducer gives assistant text and reasoning parts a stable `id` across streaming, completion, and replay, and keeps late-arriving participant messages ahead of their turn's response. Authorization parts match completions by `attemptId` and mark callback-backed sign-ins with `awaitsCallback`; replayed tool events no longer reopen a settled approval, and rejected tool results render as denied.
|
|
49
|
+
- b3fc842: Pressing a Telegram inline button for an `ask_question` question now answers it. Since `eve@0.65.0` the press was dropped and the agent kept waiting for an answer.
|
|
50
|
+
- e1130dd: Fix generated Web Chat service builds with root-installed pnpm dependencies, and honor Vercel services configuration during project creation instead of prompting to switch to Next.js or eve. Deployment now shows Vercel build logs in the CLI and TUI and provides a command to retrieve them after a failure.
|
|
51
|
+
|
|
3
52
|
## 0.69.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
package/dist/src/acp/adapter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{realpath}from"node:fs/promises";import{PROTOCOL_VERSION,RequestError,methods}from"#compiled/@agentclientprotocol/sdk/index.js";import{Client,ClientError}from"#client/index.js";const ANSWER_FIELD=`answer`,ERROR_CODE_EVE=-32002;var EveAcpAdapter=class{#e;#t;#n;#r=!1;#i=new Map;constructor(e){this.#t=e.eveVersion,this.#n=e.workspaceRoot,this.#e=e.client??new Client({auth:e.auth,headers:e.headers,host:e.serverUrl,redirect:`manual`})}initialize(e){return this.#r=e.clientCapabilities?.elicitation?.form!==void 0,{protocolVersion:PROTOCOL_VERSION,agentCapabilities:{loadSession:!1,promptCapabilities:{},sessionCapabilities:{close:{}}},agentInfo:{name:`eve`,title:`eve`,version:this.#t},authMethods:[]}}async newSession(e){if(e.mcpServers.length>0)throw unsupported(`Client-provided MCP servers are not supported by eve ACP mode.`);if((e.additionalDirectories?.length??0)>0)throw unsupported(`Additional workspace directories are not supported by eve ACP mode.`);if(this.#n!==void 0){let t=await normalizedRealpath(e.cwd,`session/new.cwd`),n=await normalizedRealpath(this.#n,`the eve application root`);if(t!==n)throw RequestError.invalidParams({cwd:e.cwd,workspaceRoot:n},`ACP cwd must be the eve application root`)}let t=randomUUID();return this.#i.set(t,{tools:new Map}),{sessionId:t}}async prompt(e,t,n){let r=this.#s(e.sessionId);if(r.active!==void 0)throw new RequestError(-32001,`ACP session ${e.sessionId} already has an active prompt.`);let i=promptContent(e);r.tools.clear();let a=Promise.withResolvers(),o={cancelRequested:!1,protocolCancelled:!1,outboundController:new AbortController,settled:a.promise,resolveSettled:a.resolve};r.active=o;let onProtocolCancel=()=>{o.protocolCancelled=!0,this.#o(r).catch(()=>void 0)};n.aborted?onProtocolCancel():n.addEventListener(`abort`,onProtocolCancel,{once:!0});try{if(o.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});let a={message:i};for(;;){let i;if(r.client===void 0){if(a.message===void 0)throw Error(`ACP session has not started.`);let e=await this.#e.sessions.create({...a,message:a.message});r.client=e.session,i=e.response}else i=a.inputResponses===void 0?await r.client.send(a.message):await r.client.respond(a.inputResponses);(o.cancelRequested||o.protocolCancelled)&&await this.#o(r);let s=[],c=!1,l,u;for await(let n of i){let i=`data`in n&&`turnId`in
|
|
1
|
+
import{randomUUID}from"node:crypto";import{realpath}from"node:fs/promises";import{PROTOCOL_VERSION,RequestError,methods}from"#compiled/@agentclientprotocol/sdk/index.js";import{Client,ClientError}from"#client/index.js";const ANSWER_FIELD=`answer`,ERROR_CODE_EVE=-32002;var EveAcpAdapter=class{#e;#t;#n;#r=!1;#i=new Map;constructor(e){this.#t=e.eveVersion,this.#n=e.workspaceRoot,this.#e=e.client??new Client({auth:e.auth,headers:e.headers,host:e.serverUrl,redirect:`manual`})}initialize(e){return this.#r=e.clientCapabilities?.elicitation?.form!==void 0,{protocolVersion:PROTOCOL_VERSION,agentCapabilities:{loadSession:!1,promptCapabilities:{},sessionCapabilities:{close:{}}},agentInfo:{name:`eve`,title:`eve`,version:this.#t},authMethods:[]}}async newSession(e){if(e.mcpServers.length>0)throw unsupported(`Client-provided MCP servers are not supported by eve ACP mode.`);if((e.additionalDirectories?.length??0)>0)throw unsupported(`Additional workspace directories are not supported by eve ACP mode.`);if(this.#n!==void 0){let t=await normalizedRealpath(e.cwd,`session/new.cwd`),n=await normalizedRealpath(this.#n,`the eve application root`);if(t!==n)throw RequestError.invalidParams({cwd:e.cwd,workspaceRoot:n},`ACP cwd must be the eve application root`)}let t=randomUUID();return this.#i.set(t,{tools:new Map}),{sessionId:t}}async prompt(e,t,n){let r=this.#s(e.sessionId);if(r.active!==void 0)throw new RequestError(-32001,`ACP session ${e.sessionId} already has an active prompt.`);let i=promptContent(e);r.tools.clear();let a=Promise.withResolvers(),o={cancelRequested:!1,protocolCancelled:!1,outboundController:new AbortController,settled:a.promise,resolveSettled:a.resolve};r.active=o;let onProtocolCancel=()=>{o.protocolCancelled=!0,this.#o(r).catch(()=>void 0)};n.aborted?onProtocolCancel():n.addEventListener(`abort`,onProtocolCancel,{once:!0});try{if(o.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});let a={message:i};for(;;){let i;if(r.client===void 0){if(a.message===void 0)throw Error(`ACP session has not started.`);let e=await this.#e.sessions.create({...a,message:a.message});r.client=e.session,i=e.response}else i=a.inputResponses===void 0?await r.client.send(a.message):await r.client.respond(a.inputResponses);(o.cancelRequested||o.protocolCancelled)&&await this.#o(r);let s=[],c=!1,l,u;for await(let n of i){let i=`data`in n?n.data:void 0,a=i!==void 0&&`turnId`in i?i.turnId:void 0;typeof a==`string`&&(o.turnId=a),n.type===`input.requested`&&s.push(...n.data.requests),n.type===`authorization.required`&&(u=unsupported(`Connection authorization cannot be completed through eve ACP mode.`)),n.type===`turn.cancelled`&&(c=!0),(n.type===`turn.failed`||n.type===`session.failed`)&&(l=n),await this.#c(e.sessionId,r,n,t)}if(o.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(c||o.cancelRequested)return{stopReason:`cancelled`};if(l!==void 0)throw eveFailure(l);if(u!==void 0)throw u;if(s.length===0)return{stopReason:`end_turn`};let d;try{d=await Promise.all(s.map(i=>this.#l(e.sessionId,r,i,t,n)))}catch(t){if(o.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(o.cancelRequested)return{stopReason:`cancelled`};throw t}if(o.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(o.cancelRequested)return{stopReason:`cancelled`};a={inputResponses:d}}}catch(e){throw acpRequestError(e)}finally{n.removeEventListener(`abort`,onProtocolCancel),r.tools.clear(),o.resolveSettled(),r.active===o&&(r.active=void 0)}}async cancel(e){let t=this.#i.get(e);t!==void 0&&t.active!==void 0&&(t.active.cancelRequested=!0,await this.#o(t))}async closeSession(e){let t=this.#s(e);this.#i.delete(e),await this.#a(t)}async close(){let e=[...this.#i.values()];this.#i.clear(),await Promise.allSettled(e.map(e=>this.#a(e)))}async#a(e){let t;if(e.active!==void 0){let n=e.active;n.cancelRequested=!0;try{await this.#o(e)}catch(e){t=e}await n.settled}try{await e.client?.reset()}catch(e){throw t===void 0?e:AggregateError([t,e],`Could not cancel or reset the eve session`)}if(t!==void 0)throw t}async#o(e){e.active?.outboundController.abort(),e.client!==void 0&&await e.client.cancel(e.active?.turnId===void 0?void 0:{turnId:e.active.turnId})}#s(e){let t=this.#i.get(e);if(t===void 0)throw RequestError.invalidParams({sessionId:e},`Unknown or closed ACP session`);return t}async#c(e,t,n,r){switch(n.type){case`message.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:n.data.messageDelta},messageId:`${n.data.turnId}:message:${n.data.stepIndex}`});return;case`reasoning.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_thought_chunk`,content:{type:`text`,text:n.data.reasoningDelta},messageId:`${n.data.turnId}:thought:${n.data.stepIndex}`});return;case`actions.requested`:for(let i of n.data.actions){let n=toolCallForAction(i);t.tools.set(i.callId,n),await notifyUpdate(r,e,{sessionUpdate:`tool_call`,...n})}return;case`action.result`:{let t=n.data.result,i=n.data.status!==`completed`||t.isError?`failed`:`completed`;await notifyUpdate(r,e,{sessionUpdate:`tool_call_update`,toolCallId:t.callId,status:i,content:[{type:`content`,content:{type:`text`,text:stringifyOutput(t.output)}}],rawOutput:t.output});return}default:return}}async#l(e,t,n,r,i){let a=AbortSignal.any([i,t.active.outboundController.signal]);if(n.display===`confirmation`){let i=`${n.requestId}:approve`,o=`${n.requestId}:deny`,s=t.tools.get(n.action.callId)??toolCallForAction(n.action),c=await r.request(methods.client.session.requestPermission,{sessionId:e,toolCall:s,options:[{kind:`allow_once`,name:`Approve`,optionId:i},{kind:`reject_once`,name:`Deny`,optionId:o}]},{cancellationSignal:a});if(c.outcome.outcome===`cancelled`)return this.#u(t),{requestId:n.requestId};if(c.outcome.optionId===i)return{requestId:n.requestId,optionId:`approve`};if(c.outcome.optionId===o)return{requestId:n.requestId,optionId:`deny`};throw RequestError.invalidParams({optionId:c.outcome.optionId},`Unknown ACP permission option`)}if(!this.#r)throw unsupported(`The ACP client does not support form elicitation required by this eve question.`);let o=elicitationProperty(n),s=await r.request(methods.client.elicitation.create,{mode:`form`,sessionId:e,message:n.prompt,requestedSchema:{type:`object`,properties:{[ANSWER_FIELD]:o},required:[ANSWER_FIELD]}},{cancellationSignal:a});if(s.action!==`accept`)return this.#u(t),{requestId:n.requestId};let c=s.content?.[ANSWER_FIELD];if(typeof c!=`string`)throw RequestError.invalidParams(s.content,`ACP elicitation response must contain a string answer`);if(n.display===`select`){if(!n.options?.some(e=>e.id===c))throw RequestError.invalidParams({answer:c},`Unknown eve question option`);return{requestId:n.requestId,optionId:c}}return{requestId:n.requestId,text:c}}#u(e){let t=e.active;t.cancelRequested=!0,t.outboundController.abort()}};async function normalizedRealpath(e,t){try{return await realpath(e)}catch(n){throw RequestError.invalidParams({path:e},`Could not resolve ${t}: ${errorMessage(n)}`)}}function promptContent(e){let t=e.prompt.map(e=>{if(e.type!==`text`)throw unsupported(`ACP prompt content type ${JSON.stringify(e.type)} is not supported.`);return{type:`text`,text:e.text}});if(t.every(e=>e.text.length===0))throw RequestError.invalidParams(e.prompt,`ACP prompt must contain at least one non-empty text block`);return t}function toolCallForAction(e){let t=e.kind===`tool-call`||e.kind===`workflow-tool-call`?e.toolName:e.kind===`load-skill`?`Load skill`:e.name;return{toolCallId:e.callId,title:t,kind:`other`,status:`pending`,rawInput:e.input}}function elicitationProperty(e){if(e.display===`select`&&e.allowFreeform!==!0&&e.options?.length)return{type:`string`,title:e.prompt,oneOf:e.options.map(e=>({const:e.id,title:e.label,description:e.description}))};if(e.display===`text`&&e.allowFreeform!==!1)return{type:`string`,title:e.prompt,minLength:1};throw unsupported(`This eve question shape cannot be represented by ACP form elicitation.`)}async function notifyUpdate(e,t,n){await e.notify(methods.client.session.update,{sessionId:t,update:n})}function stringifyOutput(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function unsupported(e){return new RequestError(-32003,e)}function eveFailure(e){return new RequestError(ERROR_CODE_EVE,e.data.message,{code:e.data.code,details:e.data.details})}function acpRequestError(e){return e instanceof RequestError?e:e instanceof ClientError?new RequestError(ERROR_CODE_EVE,e.message,{httpStatus:e.status}):new RequestError(ERROR_CODE_EVE,errorMessage(e))}function errorMessage(e){return e instanceof Error?e.message:String(e)}export{EveAcpAdapter};
|
|
@@ -21,8 +21,8 @@ export interface TaskCardTask {
|
|
|
21
21
|
/** The tool or agent name. */
|
|
22
22
|
readonly name: string;
|
|
23
23
|
/**
|
|
24
|
-
* The tool's start label, or the name. An agent's is
|
|
25
|
-
* or the brief alone for a call to the agent's own copy.
|
|
24
|
+
* The tool's start label, or the name's display title. An agent's is
|
|
25
|
+
* `Researcher: brief`, or the brief alone for a call to the agent's own copy.
|
|
26
26
|
*/
|
|
27
27
|
readonly title: string;
|
|
28
28
|
/** `blocked` while the task waits on a person; see {@link TaskCardTask.blockedOn}. */
|
|
@@ -50,7 +50,7 @@ export interface TaskCardAction {
|
|
|
50
50
|
readonly id: string;
|
|
51
51
|
/** The tool name. */
|
|
52
52
|
readonly name: string;
|
|
53
|
-
/** The tool's start label, or the name. */
|
|
53
|
+
/** The tool's start label, or the name's display title. */
|
|
54
54
|
readonly title: string;
|
|
55
55
|
readonly status: TaskCardStatus;
|
|
56
56
|
/** The call's input, when its JSON is at most 4,096 characters. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isTaskControlTool}from"#protocol/task-tools.js";import{actionRequestName}from"#shared/action-request-name.js";import{firstSentence,normalizePresentationText}from"#shared/presentation-text.js";function trackTaskCardEvent(e,t,n){switch(t.type){case`input.requested`:{let{requests:n,taskId:r}=t.data;if(r===void 0)return{};let i=n.map(e=>blocker(e.requestId,e.kind===`question`?`input`:`approval`,e.prompt));return updateBlockers(e,r,e=>[...e,...i])}case`input.resolved`:{let n=new Set(t.data.resolutions.map(e=>e.requestId));return updateBlockers(e,void 0,e=>e.filter(e=>!n.has(e.id)))}case`authorization.required`:{let{taskId:n}=t.data;if(n===void 0)return{};let r=authorizationId(t.data),i=t.data.authorization?.displayName??t.data.name;return updateBlockers(e,n,e=>[...e.filter(e=>e.id!==r),blocker(r,`authorization`,i)])}case`authorization.completed`:{let n=authorizationId(t.data);return updateBlockers(e,t.data.taskId,e=>e.filter(e=>e.id!==n))}default:{let r=trackTurnEvent(e,t,n);return r===void 0?{}:{[r.turnId]:r.turn}}}}function blocker(e,t,n){let r=presentationText(n)?.slice(0,200);return r===void 0?{id:e,kind:t}:{id:e,kind:t,label:r}}function authorizationId(e){return e.attemptId??e.candidateId??e.name}function updateBlockers(e,t,n){let r={};for(let[i,a]of Object.entries(e))for(let e of a.calls){if(e.task===void 0||e.status!==`working`||t!==void 0&&e.task.id!==t)continue;let o=e.task.blockers??[],s=n(o);if(s.length===o.length&&s.every((e,t)=>e.id===o[t].id))continue;let c={...e.task,blockers:s};r[i]=replaceCall(r[i]??a,{...e,task:c})}return r}function trackTurnEvent(e,t,n){switch(t.type){case`actions.requested`:{let{turnId:r}=t.data,i=e[r]??{calls:[],ended:!1},a=new Set(i.calls.map(e=>e.callId)),o=t.data.actions.filter(e=>!a.has(e.callId)&&(e.kind!==`tool-call`||!isTaskControlTool(e.toolName)&&e.parentCallId===void 0));if(o.length===0)return;let s=o.map(e=>requestedCall(e,t.data.presentation?.[e.callId]?.label,n));return{turn:{...i,calls:bounded([...i.calls,...s])},turnId:r}}case`action.result`:{let{turnId:r}=t.data,i=e[r],a=i?.calls.find(e=>e.callId===t.data.result.callId);if(i===void 0||a===void 0||a.task!==void 0)return;let o=actionStatus(t.data.status);return{turn:replaceCall(i,{...a,settledAt:n,status:o}),turnId:r}}case`task.started`:{let{callId:r,kind:i,name:a,taskId:o,turnId:s}=t.data,c=e[s]??{calls:[],ended:!1},l=c.calls.find(e=>e.callId===r)??{callId:r,name:a,startedAt:n,status:`working`,title:a};return{turn:replaceCall(c,{callId:l.callId,name:l.name,startedAt:l.startedAt,status:`working`,task:{id:o,kind:i},title:l.title}),turnId:s}}case`task.settled`:{let{callId:r,status:i,turnId:a}=t.data,o=e[a],s=o?.calls.find(e=>e.callId===r);if(o===void 0||s?.task===void 0)return;let c={id:s.task.id,kind:s.task.kind},l=taskSummary(t.data);l!==void 0&&(c.summary=l);let u=t.data.cancel?.reason;return u!==void 0&&(c.cancelReason=u),{turn:replaceCall(o,{...s,settledAt:n,status:i,task:c}),turnId:a}}case`turn.completed`:case`turn.failed`:case`turn.cancelled`:{let n=e[t.data.turnId];return n===void 0||n.ended?void 0:{turn:{...n,ended:!0},turnId:t.data.turnId}}default:return}}function closeSettledTasks(e,t){let n=e.calls.filter(e=>e.task!==void 0&&e.callId!==t);if(!(n.length===0||n.some(e=>e.status===`working`)))return{closed:{calls:e.calls.filter(e=>e.status!==`working`),ended:!0},open:{calls:e.calls.filter(e=>e.status===`working`),ended:!1}}}function taskCardView(e,t,n){let r=[],i=[];for(let e of t.calls)e.task===void 0?i.push(toAction(e)):r.push(toTask(e,e.task,n.audience));return{actions:i,state:r.some(e=>e.status===`blocked`)?`blocked`:!t.ended||r.some(e=>e.status===`working`)?`working`:`finished`,tasks:r,turnId:e}}function workingTaskNames(e){return(e?.calls??[]).filter(e=>e.task!==void 0&&e.status===`working`).map(e=>e.name)}function requestedCall(e,t,n){let r=actionRequestName(e),i={callId:e.callId,name:r,startedAt:n,status:`working`,title:presentationText(t)??r},a=boundedInput(e.input);return a!==void 0&&(i.input=a),i}function toAction(e){let t={id:e.callId,name:e.name,startedAt:e.startedAt,status:e.status,title:e.title};return e.input!==void 0&&(t.input=e.input),e.settledAt!==void 0&&(t.settledAt=e.settledAt),t}function toTask(e,t,n){let r={id:e.callId,kind:t.kind,name:e.name,startedAt:e.startedAt,status:e.status,taskId:t.id,title:e.title},i=n===`private`,a=e.status===`working`?t.blockers?.at(-1):void 0;a!==void 0&&(r.status=`blocked`,r.blockedOn=i&&a.label!==void 0?{kind:a.kind,label:a.label}:{kind:a.kind});let o=e.status!==`failed`||i;return t.summary!==void 0&&o&&(r.summary=t.summary),t.cancelReason!==void 0&&(r.cancelReason=t.cancelReason),e.settledAt!==void 0&&(r.settledAt=e.settledAt),r}function replaceCall(e,t){let n=e.calls.some(e=>e.callId===t.callId)?e.calls.map(e=>e.callId===t.callId?t:e):[...e.calls,t];return{...e,calls:bounded(n)}}function bounded(e){let t=e.length-100;return t<=0?e:e.filter(e=>t>0&&e.status!==`working`?(--t,!1):!0)}function actionStatus(e){switch(e){case`completed`:case`cancelled`:return e;default:return`failed`}}function boundedInput(e){if(typeof e==`object`&&e&&!Array.isArray(e))return JSON.stringify(e).length<=4096?e:void 0}function taskSummary(e){switch(e.status){case`completed`:return brief(resultText(e.output));case`failed`:return brief(e.error?.message);default:return}}function resultText(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e;return t.message??t.text??t.summary}function brief(e){return typeof e==`string`?firstSentence(e):void 0}function presentationText(e){if(e===void 0)return;let t=normalizePresentationText(e);return t===``?void 0:t}export{closeSettledTasks,taskCardView,trackTaskCardEvent,workingTaskNames};
|
|
1
|
+
import{isTaskControlTool}from"#protocol/task-tools.js";import{actionRequestName}from"#shared/action-request-name.js";import{displayTitle}from"#shared/display-name.js";import{firstSentence,normalizePresentationText}from"#shared/presentation-text.js";function trackTaskCardEvent(e,t,n){switch(t.type){case`input.requested`:{let{requests:n,taskId:r}=t.data;if(r===void 0)return{};let i=n.map(e=>blocker(e.requestId,e.kind===`question`?`input`:`approval`,e.prompt));return updateBlockers(e,r,e=>[...e,...i])}case`input.resolved`:{let n=new Set(t.data.resolutions.map(e=>e.requestId));return updateBlockers(e,void 0,e=>e.filter(e=>!n.has(e.id)))}case`authorization.required`:{let{taskId:n}=t.data;if(n===void 0)return{};let r=authorizationId(t.data),i=t.data.authorization?.displayName??t.data.name;return updateBlockers(e,n,e=>[...e.filter(e=>e.id!==r),blocker(r,`authorization`,i)])}case`authorization.completed`:{let n=authorizationId(t.data);return updateBlockers(e,t.data.taskId,e=>e.filter(e=>e.id!==n))}default:{let r=trackTurnEvent(e,t,n);return r===void 0?{}:{[r.turnId]:r.turn}}}}function blocker(e,t,n){let r=presentationText(n)?.slice(0,200);return r===void 0?{id:e,kind:t}:{id:e,kind:t,label:r}}function authorizationId(e){return e.attemptId??e.candidateId??e.name}function updateBlockers(e,t,n){let r={};for(let[i,a]of Object.entries(e))for(let e of a.calls){if(e.task===void 0||e.status!==`working`||t!==void 0&&e.task.id!==t)continue;let o=e.task.blockers??[],s=n(o);if(s.length===o.length&&s.every((e,t)=>e.id===o[t].id))continue;let c={...e.task,blockers:s};r[i]=replaceCall(r[i]??a,{...e,task:c})}return r}function trackTurnEvent(e,t,n){switch(t.type){case`actions.requested`:{let{turnId:r}=t.data,i=e[r]??{calls:[],ended:!1},a=new Set(i.calls.map(e=>e.callId)),o=t.data.actions.filter(e=>!a.has(e.callId)&&(e.kind!==`tool-call`||!isTaskControlTool(e.toolName)&&e.parentCallId===void 0));if(o.length===0)return;let s=o.map(e=>requestedCall(e,t.data.presentation?.[e.callId]?.label,n));return{turn:{...i,calls:bounded([...i.calls,...s])},turnId:r}}case`action.result`:{let{turnId:r}=t.data,i=e[r],a=i?.calls.find(e=>e.callId===t.data.result.callId);if(i===void 0||a===void 0||a.task!==void 0)return;let o=actionStatus(t.data.status);return{turn:replaceCall(i,{...a,settledAt:n,status:o}),turnId:r}}case`task.started`:{let{callId:r,kind:i,name:a,taskId:o,turnId:s}=t.data,c=e[s]??{calls:[],ended:!1},l=c.calls.find(e=>e.callId===r)??{callId:r,name:a,startedAt:n,status:`working`,title:displayTitle(a)};return{turn:replaceCall(c,{callId:l.callId,name:l.name,startedAt:l.startedAt,status:`working`,task:{id:o,kind:i},title:l.title}),turnId:s}}case`task.settled`:{let{callId:r,status:i,turnId:a}=t.data,o=e[a],s=o?.calls.find(e=>e.callId===r);if(o===void 0||s?.task===void 0)return;let c={id:s.task.id,kind:s.task.kind},l=taskSummary(t.data);l!==void 0&&(c.summary=l);let u=t.data.cancel?.reason;return u!==void 0&&(c.cancelReason=u),{turn:replaceCall(o,{...s,settledAt:n,status:i,task:c}),turnId:a}}case`turn.completed`:case`turn.failed`:case`turn.cancelled`:{let n=e[t.data.turnId];return n===void 0||n.ended?void 0:{turn:{...n,ended:!0},turnId:t.data.turnId}}default:return}}function closeSettledTasks(e,t){let n=e.calls.filter(e=>e.task!==void 0&&e.callId!==t);if(!(n.length===0||n.some(e=>e.status===`working`)))return{closed:{calls:e.calls.filter(e=>e.status!==`working`),ended:!0},open:{calls:e.calls.filter(e=>e.status===`working`),ended:!1}}}function taskCardView(e,t,n){let r=[],i=[];for(let e of t.calls)e.task===void 0?i.push(toAction(e)):r.push(toTask(e,e.task,n.audience));return{actions:i,state:r.some(e=>e.status===`blocked`)?`blocked`:!t.ended||r.some(e=>e.status===`working`)?`working`:`finished`,tasks:r,turnId:e}}function workingTaskNames(e){return(e?.calls??[]).filter(e=>e.task!==void 0&&e.status===`working`).map(e=>e.name)}function requestedCall(e,t,n){let r=actionRequestName(e),i={callId:e.callId,name:r,startedAt:n,status:`working`,title:presentationText(t)??displayTitle(r)},a=boundedInput(e.input);return a!==void 0&&(i.input=a),i}function toAction(e){let t={id:e.callId,name:e.name,startedAt:e.startedAt,status:e.status,title:e.title};return e.input!==void 0&&(t.input=e.input),e.settledAt!==void 0&&(t.settledAt=e.settledAt),t}function toTask(e,t,n){let r={id:e.callId,kind:t.kind,name:e.name,startedAt:e.startedAt,status:e.status,taskId:t.id,title:e.title},i=n===`private`,a=e.status===`working`?t.blockers?.at(-1):void 0;a!==void 0&&(r.status=`blocked`,r.blockedOn=i&&a.label!==void 0?{kind:a.kind,label:a.label}:{kind:a.kind});let o=e.status!==`failed`||i;return t.summary!==void 0&&o&&(r.summary=t.summary),t.cancelReason!==void 0&&(r.cancelReason=t.cancelReason),e.settledAt!==void 0&&(r.settledAt=e.settledAt),r}function replaceCall(e,t){let n=e.calls.some(e=>e.callId===t.callId)?e.calls.map(e=>e.callId===t.callId?t:e):[...e.calls,t];return{...e,calls:bounded(n)}}function bounded(e){let t=e.length-100;return t<=0?e:e.filter(e=>t>0&&e.status!==`working`?(--t,!1):!0)}function actionStatus(e){switch(e){case`completed`:case`cancelled`:return e;default:return`failed`}}function boundedInput(e){if(typeof e==`object`&&e&&!Array.isArray(e))return JSON.stringify(e).length<=4096?e:void 0}function taskSummary(e){switch(e.status){case`completed`:return brief(resultText(e.output));case`failed`:return brief(e.error?.message);default:return}}function resultText(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e;return t.message??t.text??t.summary}function brief(e){return typeof e==`string`?firstSentence(e):void 0}function presentationText(e){if(e===void 0)return;let t=normalizePresentationText(e);return t===``?void 0:t}export{closeSettledTasks,taskCardView,trackTaskCardEvent,workingTaskNames};
|
|
@@ -66,6 +66,22 @@ export interface SessionParent {
|
|
|
66
66
|
readonly sessionId: string;
|
|
67
67
|
readonly turn: SessionTurn;
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Session whose id a run's spans carry as their trace session.
|
|
71
|
+
*
|
|
72
|
+
* Lineage and tracing usually share a root: every span in a conversation
|
|
73
|
+
* carries `parent.rootSessionId`. A remote agent runs in another deployment,
|
|
74
|
+
* so its spans start their own trace session (`own`) while its lineage still
|
|
75
|
+
* names the caller's root. Its local subagents then carry that session
|
|
76
|
+
* (`inherited`). Conversation correlation across deployments stays on
|
|
77
|
+
* `gen_ai.conversation.id`.
|
|
78
|
+
*/
|
|
79
|
+
export type SessionTraceRoot = {
|
|
80
|
+
readonly kind: "own";
|
|
81
|
+
} | {
|
|
82
|
+
readonly kind: "inherited";
|
|
83
|
+
readonly sessionId: string;
|
|
84
|
+
};
|
|
69
85
|
/**
|
|
70
86
|
* Serializable W3C span context identifying a parent's open trace window.
|
|
71
87
|
* Structural rather than an OTel `SpanContext` so the channel surface stays
|
|
@@ -423,6 +439,8 @@ export interface RunInput {
|
|
|
423
439
|
/** Observability correlation only; never grants delegated-session privileges. */
|
|
424
440
|
readonly conversationId?: string;
|
|
425
441
|
readonly parent?: SessionParent;
|
|
442
|
+
/** Trace session for this run when it differs from `parent.rootSessionId`. */
|
|
443
|
+
readonly traceRoot?: SessionTraceRoot;
|
|
426
444
|
/**
|
|
427
445
|
* Dispatching parent's open trace window. Handed down rather than looked up
|
|
428
446
|
* because trace state is scoped to one session's context.
|