eve 0.44.4 → 0.45.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 +39 -0
- package/README.md +13 -12
- package/dist/src/acp/adapter.d.ts +1 -1
- package/dist/src/approval/definition.d.ts +84 -0
- package/dist/src/approval/definition.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/http-basic.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/jwt-ecdsa.d.ts +1 -1
- package/dist/src/channel/auth/jwt-ecdsa.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/jwt-hmac.d.ts +1 -1
- package/dist/src/channel/auth/jwt-hmac.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/oidc.d.ts +1 -1
- package/dist/src/channel/auth/oidc.js +1 -0
- package/dist/src/{runtime/governance → channel}/auth/token-claims.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/types.d.ts +1 -1
- package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.d.ts +1 -1
- package/dist/src/channel/channel-operations.d.ts +1 -1
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/instrumentation.d.ts +1 -0
- package/dist/src/channel/instrumentation.js +1 -1
- package/dist/src/channel/resolve-text.d.ts +1 -1
- package/dist/src/channel/routes.d.ts +1 -1
- package/dist/src/channel/session.d.ts +1 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +2 -2
- package/dist/src/chunks/{use-eve-agent-BtsOXv3s.js → use-eve-agent-BH7Z6SDu.js} +397 -106
- package/dist/src/chunks/{use-eve-agent-BJwaMe5k.js → use-eve-agent-DI2j5XK8.js} +397 -106
- package/dist/src/cli/banner.js +1 -1
- package/dist/src/cli/commands/agent-instructions.js +2 -2
- package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
- package/dist/src/cli/commands/extension-build.js +1 -1
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +2 -0
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/trace.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth.js +1 -1
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +3 -1
- package/dist/src/cli/dev/tui/setup-selection-input.js +2 -2
- package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/ui/live-row.js +1 -1
- package/dist/src/cli/ui/output.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +1946 -302
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/client.js +1 -1
- package/dist/src/client/eve-agent-store.d.ts +6 -5
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/health-response-error.d.ts +5 -0
- package/dist/src/client/health-response-error.js +1 -0
- package/dist/src/client/health-schema.d.ts +7 -0
- package/dist/src/client/health-schema.js +1 -0
- package/dist/src/client/index.d.ts +6 -3
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -2
- package/dist/src/client/message-reducer-types.d.ts +1 -1
- package/dist/src/client/reducer.d.ts +1 -1
- package/dist/src/client/session-utils.d.ts +1 -1
- package/dist/src/client/session.d.ts +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +3 -7
- package/dist/src/compiler/artifacts.d.ts +37 -11
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/channel-route-plan.d.ts +10 -0
- package/dist/src/compiler/channel-route-plan.js +1 -0
- package/dist/src/compiler/compile-agent.d.ts +2 -2
- package/dist/src/compiler/compile-agent.js +2 -2
- package/dist/src/compiler/compile-from-memory.d.ts +13 -52
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +38 -0
- package/dist/src/compiler/diagnostics.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +14 -11
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/load-binding-namespace.d.ts +9 -0
- package/dist/src/compiler/load-binding-namespace.js +1 -0
- package/dist/src/compiler/manifest.d.ts +182 -51
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-map.d.ts +12 -30
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/node-source-state.d.ts +24 -0
- package/dist/src/compiler/node-source-state.js +1 -0
- package/dist/src/compiler/normalize-agent-config.d.ts +5 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.d.ts +8 -2
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-helpers.d.ts +14 -4
- package/dist/src/compiler/normalize-helpers.js +1 -1
- package/dist/src/compiler/normalize-hook.d.ts +4 -11
- package/dist/src/compiler/normalize-hook.js +1 -1
- package/dist/src/compiler/normalize-instructions.d.ts +3 -3
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +29 -0
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -0
- package/dist/src/compiler/normalize-manifest.d.ts +8 -4
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-memory.d.ts +5 -0
- package/dist/src/compiler/normalize-memory.js +1 -0
- package/dist/src/compiler/normalize-sandbox.d.ts +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/normalize-schedule.d.ts +2 -2
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -2
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +21 -39
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +2 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +70 -0
- package/dist/src/compiler/project-sources.js +1 -0
- package/dist/src/compiler/remote-agent-node.d.ts +8 -0
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +155 -0
- package/dist/src/compiler/source-graph.js +1 -0
- package/dist/src/compiler/validate-artifact.d.ts +17 -0
- package/dist/src/compiler/validate-artifact.js +1 -0
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/connections/errors.d.ts +125 -0
- package/dist/src/connections/errors.js +1 -0
- package/dist/src/context/build-base-tool-context.d.ts +2 -2
- package/dist/src/context/build-callback-context.d.ts +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
- package/dist/src/context/dynamic-resolve-context.d.ts +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +0 -2
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +10 -3
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/key-names.d.ts +12 -0
- package/dist/src/context/key-names.js +1 -0
- package/dist/src/context/keys.d.ts +33 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-event-lifecycle.d.ts +13 -0
- package/dist/src/context/memory-event-lifecycle.js +1 -0
- package/dist/src/context/memory-lifecycle.d.ts +52 -0
- package/dist/src/context/memory-lifecycle.js +1 -0
- package/dist/src/context/memory-tools.d.ts +12 -0
- package/dist/src/context/memory-tools.js +1 -0
- package/dist/src/context/providers/connection-key.d.ts +1 -1
- package/dist/src/context/providers/connection.d.ts +1 -1
- package/dist/src/context/session-context.d.ts +32 -0
- package/dist/src/discover/discover-agent.d.ts +0 -13
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +6 -6
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +2 -2
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/manifest.d.ts +9 -1
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/discover/memory.d.ts +14 -0
- package/dist/src/discover/memory.js +1 -0
- package/dist/src/discover/project.js +1 -1
- package/dist/src/dynamic/definition.d.ts +117 -0
- package/dist/src/dynamic/definition.js +1 -0
- package/dist/src/evals/autoevals-client.js +1 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/session.d.ts +1 -1
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/index.d.ts +12 -0
- package/dist/src/eve-channel/index.js +1 -0
- package/dist/src/eve-channel/request.d.ts +49 -0
- package/dist/src/eve-channel/request.js +3 -0
- package/dist/src/eve-channel/support.d.ts +34 -0
- package/dist/src/eve-channel/support.js +1 -0
- package/dist/src/eve-channel/types.d.ts +128 -0
- package/dist/src/eve-channel/types.js +1 -0
- package/dist/src/execution/agent-handle-dispatch.d.ts +1 -1
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/compaction.js +1 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +1 -1
- package/dist/src/{runtime → execution}/connections/callback-route.d.ts +2 -20
- package/dist/src/execution/connections/callback-route.js +1 -0
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/delegated-parent-notification.d.ts +2 -2
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/delegated-parent-result.d.ts +1 -1
- package/dist/src/execution/delegated-parent-result.js +1 -1
- package/dist/src/execution/delegation-tool.d.ts +1 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +1 -2
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +1 -1
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/effective-output-schema.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +6 -0
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/forward-turn-cancellation-step.js +1 -1
- package/dist/src/execution/history-view.d.ts +2 -2
- package/dist/src/execution/history-view.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +10 -8
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/{bash-tool.d.ts → bash.d.ts} +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +1 -1
- package/dist/src/execution/sandbox/grep-tool.js +1 -1
- package/dist/src/execution/sandbox/{read-file-tool.d.ts → read-file.d.ts} +2 -2
- package/dist/src/execution/sandbox/{read-file-tool.js → read-file.js} +1 -1
- package/dist/src/execution/sandbox/{write-file-tool.d.ts → write-file.d.ts} +2 -2
- package/dist/src/execution/sandbox/write-file.js +1 -0
- package/dist/src/execution/session-callback-route.d.ts +2 -0
- package/dist/src/execution/session-callback-route.js +1 -0
- package/dist/src/execution/session-callback-step.js +1 -1
- package/dist/src/execution/session-timeout-steps.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/subagent-adapter.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
- package/dist/src/execution/subagent-invocation.d.ts +0 -3
- package/dist/src/execution/subagent-invocation.js +1 -1
- package/dist/src/execution/subagent-start-local.d.ts +1 -2
- package/dist/src/execution/subagent-start-local.js +1 -1
- package/dist/src/execution/subagent-start-remote.d.ts +1 -2
- package/dist/src/execution/subagent-start-remote.js +1 -1
- package/dist/src/execution/subagent-tool.d.ts +4 -8
- package/dist/src/execution/subagent-tool.js +1 -1
- package/dist/src/execution/subagent-usage-span.d.ts +1 -1
- package/dist/src/execution/task-input-response-route.d.ts +2 -0
- package/dist/src/execution/task-input-response-route.js +1 -0
- package/dist/src/execution/tasks/child/instructions.js +1 -1
- package/dist/src/execution/tasks/child/update.d.ts +1 -1
- package/dist/src/execution/tasks/child/update.js +1 -1
- package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +1 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +2 -2
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +4 -5
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.d.ts +5 -6
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/connection-search.d.ts +1 -0
- package/dist/src/execution/tools/connection-search.js +2 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/file-state.d.ts +2 -2
- package/dist/src/execution/tools/load-skill.d.ts +6 -0
- package/dist/src/execution/tools/load-skill.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/subagent/local.d.ts +7 -7
- package/dist/src/execution/tools/subagent/local.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/subagent/remote.d.ts +5 -5
- package/dist/src/execution/tools/subagent/remote.js +1 -0
- package/dist/src/execution/tools/tasks.d.ts +18 -0
- package/dist/src/execution/tools/tasks.js +1 -0
- package/dist/src/{runtime/framework-tools → execution/tools}/todo.d.ts +0 -2
- package/dist/src/{runtime/framework-tools → execution/tools}/todo.js +1 -2
- package/dist/src/execution/turn-control-protocol.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +1 -3
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-trace-context.js +1 -1
- package/dist/src/framework/host-inventory.d.ts +8 -0
- package/dist/src/framework/host-inventory.js +1 -0
- package/dist/src/framework/sources/modules/agent.d.ts +4 -0
- package/dist/src/framework/sources/modules/agent.js +1 -0
- package/dist/src/framework/sources/modules/eve-channel.d.ts +1 -0
- package/dist/src/framework/sources/modules/eve-channel.js +1 -0
- package/dist/src/framework/sources/modules/home-channel.d.ts +2 -0
- package/dist/src/framework/sources/modules/home-channel.js +1 -0
- package/dist/src/framework/sources/modules/memory-wrapper.d.ts +2 -0
- package/dist/src/framework/sources/modules/memory-wrapper.js +1 -0
- package/dist/src/framework/sources/modules/sandbox.d.ts +2 -0
- package/dist/src/framework/sources/modules/sandbox.js +1 -0
- package/dist/src/framework/sources/registry.d.ts +6 -0
- package/dist/src/framework/sources/registry.js +1 -0
- package/dist/src/harness/action-result-helpers.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/authorization.d.ts +3 -3
- package/dist/src/harness/background-tools.d.ts +2 -2
- package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +3 -3
- package/dist/src/{runtime/framework-tools → harness}/final-output.d.ts +1 -1
- package/dist/src/harness/final-output.js +1 -0
- package/dist/src/harness/handles/query.d.ts +1 -1
- package/dist/src/harness/handles/store.d.ts +8 -0
- package/dist/src/harness/handles/store.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
- package/dist/src/harness/hitl/approval-prompt.d.ts +1 -1
- package/dist/src/harness/hitl/pending-input-resolution.d.ts +2 -2
- package/dist/src/harness/hitl/question-input-requests.d.ts +1 -1
- package/dist/src/harness/input-extraction.d.ts +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-class.d.ts +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +1 -1
- package/dist/src/harness/input-requests.d.ts +2 -2
- package/dist/src/harness/instrumentation/lifecycle.d.ts +3 -0
- package/dist/src/harness/instrumentation/providers.js +1 -1
- package/dist/src/harness/instrumentation/runtime.d.ts +2 -1
- package/dist/src/harness/pending-input-batches.d.ts +1 -1
- package/dist/src/harness/prepare-trace-context.d.ts +3 -0
- package/dist/src/harness/prepare-trace-context.js +1 -1
- package/dist/src/harness/provider-safety.d.ts +7 -0
- package/dist/src/harness/provider-safety.js +1 -0
- package/dist/src/{runtime/framework-tools/web-search.d.ts → harness/provider-tool-schemas.d.ts} +1 -9
- package/dist/src/harness/provider-tool-schemas.js +1 -0
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +1 -1
- package/dist/src/harness/request-input-tool.d.ts +4 -0
- package/dist/src/harness/request-input-tool.js +1 -0
- package/dist/src/harness/runtime-actions.d.ts +1 -1
- package/dist/src/harness/session-limit-continuation.d.ts +1 -1
- package/dist/src/harness/step-hooks.d.ts +2 -0
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/stream-actions.d.ts +1 -1
- package/dist/src/harness/subagent-depth.d.ts +1 -1
- package/dist/src/harness/tool-call-action.d.ts +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.d.ts +1 -1
- package/dist/src/harness/tools.d.ts +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +3 -9
- package/dist/src/harness/workflow-runtime-action-state.d.ts +1 -1
- package/dist/src/harness/workflow-subagent-limit.d.ts +1 -1
- package/dist/src/instrumentation/provider.d.ts +117 -0
- package/dist/src/instrumentation/provider.js +1 -0
- package/dist/src/internal/application/compiled-artifacts.js +5 -4
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/approval.d.ts +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/memory.d.ts +2 -0
- package/dist/src/internal/authored-definition/memory.js +1 -0
- package/dist/src/internal/authored-definition/schema-backed.d.ts +7 -3
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +17 -0
- package/dist/src/internal/authored-definition/source-identity.js +1 -0
- package/dist/src/internal/authored-module-map-loader.d.ts +1 -5
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/dynamic-tool-rebind.d.ts +3 -0
- package/dist/src/internal/dynamic-tool-rebind.js +1 -0
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/invocation/agent-invocation.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.d.ts +1 -1
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/host/application-route-registry.d.ts +2 -41
- package/dist/src/internal/nitro/host/application-route-registry.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.js +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -4
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +2 -0
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +3 -3
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +9 -215
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +2 -13
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +5 -0
- package/dist/src/internal/nitro/routes/channel-route-context.js +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +0 -9
- package/dist/src/internal/nitro/routes/index.js +2 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +5 -5
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/programmatic-source-loader.d.ts +2 -0
- package/dist/src/internal/programmatic-source-loader.js +1 -0
- package/dist/src/internal/runtime-registry.d.ts +3 -4
- package/dist/src/protocol/message.d.ts +3 -3
- package/dist/src/protocol/routes.d.ts +2 -0
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/agents/auth.d.ts +10 -6
- package/dist/src/public/agents/auth.js +1 -1
- package/dist/src/public/channels/auth.d.ts +1 -1
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/hitl.d.ts +1 -1
- package/dist/src/public/channels/discord/hitl.js +1 -1
- package/dist/src/public/channels/discord/inbound.d.ts +1 -0
- package/dist/src/public/channels/discord/inbound.js +1 -1
- package/dist/src/public/channels/eve.d.ts +1 -139
- package/dist/src/public/channels/eve.js +1 -3
- package/dist/src/public/channels/github/dispatch.d.ts +5 -0
- package/dist/src/public/channels/github/dispatch.js +1 -1
- package/dist/src/public/channels/github/githubChannel.js +1 -1
- package/dist/src/public/channels/github/inbound.d.ts +2 -0
- package/dist/src/public/channels/github/inbound.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/index.js +1 -1
- package/dist/src/public/channels/linear/hitl.d.ts +1 -1
- package/dist/src/public/channels/linear/inbound.js +1 -1
- package/dist/src/public/channels/mcp.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +1 -1
- package/dist/src/public/channels/slack/hitl.js +1 -1
- package/dist/src/public/channels/slack/inbound.d.ts +9 -0
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/model-context.d.ts +3 -1
- package/dist/src/public/channels/slack/model-context.js +2 -2
- package/dist/src/public/channels/slack/session-operations.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/hitl.d.ts +1 -1
- package/dist/src/public/channels/teams/hitl.js +1 -1
- package/dist/src/public/channels/teams/inbound.d.ts +2 -0
- package/dist/src/public/channels/teams/inbound.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/teams/verify.js +1 -1
- package/dist/src/public/channels/telegram/api.d.ts +15 -0
- package/dist/src/public/channels/telegram/api.js +2 -2
- package/dist/src/public/channels/telegram/authorization-callback.d.ts +10 -0
- package/dist/src/public/channels/telegram/authorization-callback.js +1 -0
- package/dist/src/public/channels/telegram/authorization.d.ts +19 -0
- package/dist/src/public/channels/telegram/authorization.js +3 -0
- package/dist/src/public/channels/telegram/defaults.d.ts +1 -0
- package/dist/src/public/channels/telegram/defaults.js +3 -3
- package/dist/src/public/channels/telegram/hitl.d.ts +1 -1
- package/dist/src/public/channels/telegram/hitl.js +1 -1
- package/dist/src/public/channels/telegram/inbound.d.ts +1 -0
- package/dist/src/public/channels/telegram/inbound.js +1 -1
- package/dist/src/public/channels/telegram/index.d.ts +1 -1
- package/dist/src/public/channels/telegram/index.js +1 -1
- package/dist/src/public/channels/telegram/state.d.ts +6 -0
- package/dist/src/public/channels/telegram/state.js +1 -0
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +11 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/connections/errors.d.ts +1 -125
- package/dist/src/public/connections/errors.js +1 -1
- package/dist/src/public/connections/index.d.ts +2 -2
- package/dist/src/public/connections/index.js +1 -1
- package/dist/src/public/definitions/agent.d.ts +1 -1
- package/dist/src/public/definitions/agent.js +1 -1
- package/dist/src/public/definitions/approval.d.ts +2 -84
- package/dist/src/public/definitions/approval.js +1 -1
- package/dist/src/public/definitions/callback-context.d.ts +1 -32
- package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
- package/dist/src/public/definitions/connections/mcp.js +1 -1
- package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
- package/dist/src/public/definitions/connections/openapi.js +1 -1
- package/dist/src/public/definitions/connections/protocol.d.ts +1 -1
- package/dist/src/public/definitions/instructions.d.ts +2 -2
- package/dist/src/public/definitions/instructions.js +1 -1
- package/dist/src/public/definitions/skill.js +1 -1
- package/dist/src/public/index.d.ts +1 -1
- package/dist/src/public/instructions/index.d.ts +1 -1
- package/dist/src/public/instrumentation/provider.d.ts +1 -117
- package/dist/src/public/instrumentation/provider.js +1 -1
- package/dist/src/public/memory/index.d.ts +117 -0
- package/dist/src/public/memory/index.js +1 -0
- package/dist/src/public/memory/scope.d.ts +2 -0
- package/dist/src/public/memory/scope.js +1 -0
- package/dist/src/public/models/openai/chatgpt/auth.js +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/sandbox/backends/default.d.ts +1 -49
- package/dist/src/public/sandbox/backends/default.js +1 -1
- package/dist/src/public/sandbox/backends/docker.d.ts +1 -14
- package/dist/src/public/sandbox/backends/docker.js +1 -1
- package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -17
- package/dist/src/public/sandbox/backends/just-bash.js +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -17
- package/dist/src/public/sandbox/backends/microsandbox.js +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +1 -30
- package/dist/src/public/sandbox/backends/vercel.js +1 -1
- package/dist/src/public/skills/index.d.ts +3 -3
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/tools/approval/index.d.ts +2 -2
- package/dist/src/public/tools/approval/index.js +1 -1
- package/dist/src/public/tools/bash.d.ts +3 -0
- package/dist/src/public/tools/bash.js +1 -0
- package/dist/src/public/tools/glob.d.ts +3 -0
- package/dist/src/public/tools/glob.js +1 -0
- package/dist/src/public/tools/grep.d.ts +3 -0
- package/dist/src/public/tools/grep.js +1 -0
- package/dist/src/public/tools/index.d.ts +6 -11
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/load-skill.d.ts +3 -0
- package/dist/src/public/tools/load-skill.js +1 -0
- package/dist/src/public/tools/read-file.d.ts +3 -0
- package/dist/src/public/tools/read-file.js +1 -0
- package/dist/src/public/{tool-result-narrowing.d.ts → tools/result.d.ts} +2 -28
- package/dist/src/public/tools/result.js +1 -0
- package/dist/src/public/tools/sleep.d.ts +1 -0
- package/dist/src/public/tools/sleep.js +1 -0
- package/dist/src/public/tools/todo.d.ts +3 -0
- package/dist/src/public/tools/todo.js +1 -0
- package/dist/src/public/tools/web-fetch.d.ts +3 -0
- package/dist/src/public/tools/web-fetch.js +1 -0
- package/dist/src/public/tools/web-search.d.ts +3 -36
- package/dist/src/public/tools/web-search.js +1 -1
- package/dist/src/public/tools/workflow.d.ts +4 -0
- package/dist/src/public/tools/workflow.js +1 -0
- package/dist/src/public/tools/write-file.d.ts +3 -0
- package/dist/src/public/tools/write-file.js +1 -0
- package/dist/src/public/types/json.d.ts +1 -28
- package/dist/src/react/use-eve-agent.d.ts +1 -0
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/actions/keys.d.ts +1 -1
- package/dist/src/runtime/actions/results.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/principal.d.ts +1 -1
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/connections/registry-types.d.ts +11 -0
- package/dist/src/runtime/connections/registry.d.ts +3 -2
- package/dist/src/runtime/connections/resolve-authorization.d.ts +2 -2
- package/dist/src/runtime/connections/resolve-authorization.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -2
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +0 -6
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-connection.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +1 -0
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/resolve-memory.d.ts +4 -0
- package/dist/src/runtime/resolve-memory.js +1 -0
- package/dist/src/runtime/resolve-tool.d.ts +2 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sandbox/keys.js +1 -1
- package/dist/src/runtime/sandbox/registry.d.ts +4 -20
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +3 -1
- package/dist/src/runtime/skills/sandbox-access.d.ts +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +0 -27
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +18 -27
- package/dist/src/sandbox/backends/default.d.ts +49 -0
- package/dist/src/sandbox/backends/default.js +1 -0
- package/dist/src/sandbox/backends/docker.d.ts +14 -0
- package/dist/src/sandbox/backends/docker.js +1 -0
- package/dist/src/sandbox/backends/just-bash.d.ts +17 -0
- package/dist/src/sandbox/backends/just-bash.js +1 -0
- package/dist/src/sandbox/backends/microsandbox.d.ts +17 -0
- package/dist/src/sandbox/backends/microsandbox.js +1 -0
- package/dist/src/sandbox/backends/vercel.d.ts +30 -0
- package/dist/src/sandbox/backends/vercel.js +1 -0
- package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
- package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
- package/dist/src/services/dev-client.d.ts +1 -1
- package/dist/src/setup/channel-add-conflicts.js +1 -1
- package/dist/src/setup/cli/select-component.js +1 -1
- package/dist/src/setup/connection-connector.d.ts +2 -0
- package/dist/src/setup/connection-connector.js +1 -1
- package/dist/src/setup/flows/link.js +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/integrations/runner.js +1 -1
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/create/web-template.d.ts +10 -8
- package/dist/src/setup/scaffold/create/web-template.js +364 -120
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/scaffold/update/connections.js +1 -1
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/{runtime/actions/types.d.ts → shared/action-types.d.ts} +12 -12
- package/dist/src/{runtime/actions/types.js → shared/action-types.js} +1 -1
- package/dist/src/shared/agent-definition.d.ts +3 -10
- package/dist/src/shared/agent-definition.js +1 -1
- package/dist/src/{runtime/connections/types.d.ts → shared/connection-types.d.ts} +3 -13
- package/dist/src/{runtime/input/types.d.ts → shared/input.d.ts} +1 -1
- package/dist/src/shared/input.js +1 -0
- package/dist/src/shared/instructions-definition.d.ts +2 -0
- package/dist/src/shared/instructions-definition.js +1 -1
- package/dist/src/shared/memory-definition.d.ts +2 -0
- package/dist/src/shared/memory-definition.js +1 -0
- package/dist/src/shared/memory-state.d.ts +55 -0
- package/dist/src/shared/memory-state.js +1 -0
- package/dist/src/shared/objects.d.ts +5 -0
- package/dist/src/shared/objects.js +1 -0
- package/dist/src/shared/sandbox-definition.d.ts +1 -1
- package/dist/src/shared/skill-definition.d.ts +2 -0
- package/dist/src/shared/skill-definition.js +1 -1
- package/dist/src/{execution/skills/types.d.ts → shared/skill-types.d.ts} +1 -1
- package/dist/src/shared/skill-types.js +1 -0
- package/dist/src/{runtime/connections → shared}/validate-authorization.d.ts +1 -1
- package/dist/src/shared/vercel-project.d.ts +1 -0
- package/dist/src/shared/vercel-project.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +8 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/json.d.ts +4 -89
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tasks/session-index.d.ts +1 -1
- package/dist/src/tasks/task-id.d.ts +0 -1
- package/dist/src/tasks/task-id.js +1 -1
- package/dist/src/tasks/types.d.ts +1 -1
- package/dist/src/tasks/types.js +1 -1
- package/dist/src/{public/tools/approval/approval-helpers.d.ts → tools/approval/policies.d.ts} +1 -1
- package/dist/src/tools/approval/policies.js +1 -0
- package/dist/src/tools/auth.d.ts +35 -0
- package/dist/src/tools/auth.js +1 -0
- package/dist/src/{public/definitions/tool.d.ts → tools/definition.d.ts} +42 -138
- package/dist/src/tools/definition.js +1 -0
- package/dist/src/{shared/durable-dynamic-tool-callbacks.d.ts → tools/durable-callbacks.d.ts} +1 -1
- package/dist/src/tools/durable-callbacks.js +1 -0
- package/dist/src/tools/dynamic.d.ts +68 -0
- package/dist/src/tools/dynamic.js +1 -0
- package/dist/src/tools/framework/agent-contract.d.ts +8 -0
- package/dist/src/tools/framework/agent-contract.js +1 -0
- package/dist/src/tools/framework/agent.d.ts +17 -0
- package/dist/src/tools/framework/agent.js +1 -0
- package/dist/src/tools/framework/ask-question.d.ts +50 -0
- package/dist/src/tools/framework/ask-question.js +1 -0
- package/dist/src/tools/framework/connection-search.d.ts +3 -0
- package/dist/src/tools/framework/connection-search.js +1 -0
- package/dist/src/tools/framework/task-cancel.d.ts +29 -0
- package/dist/src/tools/framework/task-cancel.js +1 -0
- package/dist/src/tools/framework/task-contract.d.ts +167 -0
- package/dist/src/tools/framework/task-contract.js +1 -0
- package/dist/src/tools/framework/task-update.d.ts +9 -0
- package/dist/src/tools/framework/task-update.js +1 -0
- package/dist/src/{public/tools/output-builders.d.ts → tools/model-output.d.ts} +41 -1
- package/dist/src/tools/provided/bash.d.ts +29 -0
- package/dist/src/tools/provided/bash.js +1 -0
- package/dist/src/tools/provided/glob.d.ts +26 -0
- package/dist/src/tools/provided/glob.js +2 -0
- package/dist/src/{runtime/framework-tools → tools/provided}/grep.d.ts +10 -10
- package/dist/src/tools/provided/grep.js +2 -0
- package/dist/src/tools/provided/load-skill.d.ts +2 -0
- package/dist/src/tools/provided/load-skill.js +1 -0
- package/dist/src/tools/provided/read-file.d.ts +27 -0
- package/dist/src/tools/provided/read-file.js +2 -0
- package/dist/src/{public/tools/sleep/index.d.ts → tools/provided/sleep.d.ts} +3 -3
- package/dist/src/tools/provided/sleep.js +1 -0
- package/dist/src/tools/provided/todo.d.ts +8 -0
- package/dist/src/tools/provided/todo.js +2 -0
- package/dist/src/{runtime/framework-tools → tools/provided}/web-fetch.d.ts +5 -2
- package/dist/src/tools/provided/web-fetch.js +2 -0
- package/dist/src/tools/provided/web-search.d.ts +39 -0
- package/dist/src/tools/provided/web-search.js +1 -0
- package/dist/src/tools/provided/write-file.d.ts +23 -0
- package/dist/src/tools/provided/write-file.js +2 -0
- package/dist/src/tools/workflow.d.ts +37 -0
- package/dist/src/tools/workflow.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.d.ts +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +1 -0
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +2 -6
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-trace-reader.d.ts +1 -3
- package/dist/src/tracing/local-trace-reader.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +1 -2
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/tracing/sampled-trace.d.ts +10 -2
- package/dist/src/tracing/sampled-trace.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +8 -4
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +16 -4
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/discord.mdx +5 -1
- package/docs/channels/eve.mdx +19 -3
- package/docs/channels/github.mdx +2 -0
- package/docs/channels/linear.mdx +1 -1
- package/docs/channels/overview.mdx +1 -1
- package/docs/channels/slack.mdx +2 -0
- package/docs/channels/teams.mdx +1 -1
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +30 -21
- package/docs/concepts/context-control.md +7 -0
- package/docs/concepts/default-harness.md +8 -0
- package/docs/concepts/sessions-runs-and-streaming.md +5 -3
- package/docs/concepts/state.md +8 -1
- package/docs/connections/overview.mdx +1 -1
- package/docs/extensions.md +8 -4
- package/docs/getting-started.mdx +9 -9
- package/docs/guides/auth-and-route-protection.md +3 -3
- package/docs/guides/client/output-schema.mdx +2 -2
- package/docs/guides/client/overview.mdx +4 -2
- package/docs/guides/dynamic-capabilities.md +3 -2
- package/docs/guides/frontend/nuxt.mdx +4 -3
- package/docs/guides/frontend/overview.mdx +21 -18
- package/docs/guides/frontend/sveltekit.mdx +4 -3
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +5 -4
- package/docs/guides/frontend/use-eve-agent-vue.mdx +5 -4
- package/docs/guides/instrumentation.md +1 -0
- package/docs/guides/remote-agents.md +37 -18
- package/docs/memory.md +255 -0
- package/docs/meta.json +1 -0
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/patterns/multi-tenant-memory.md +108 -136
- package/docs/reference/cli.md +2 -4
- package/docs/reference/typescript-api.md +35 -31
- package/docs/sandbox.mdx +1 -1
- package/docs/subagents/index.mdx +11 -28
- package/docs/tools/human-in-the-loop.md +43 -2
- package/docs/tools/overview.mdx +1 -1
- package/package.json +68 -8
- package/dist/src/compiler/normalize-extension.d.ts +0 -80
- package/dist/src/compiler/normalize-extension.js +0 -1
- package/dist/src/execution/sandbox/write-file-tool.js +0 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +0 -9
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +0 -1
- package/dist/src/internal/nitro/routes/health.d.ts +0 -14
- package/dist/src/internal/nitro/routes/health.js +0 -1
- package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
- package/dist/src/public/definitions/tool.js +0 -1
- package/dist/src/public/tool-result-narrowing.js +0 -1
- package/dist/src/public/tools/approval/approval-helpers.js +0 -1
- package/dist/src/public/tools/defaults.d.ts +0 -46
- package/dist/src/public/tools/defaults.js +0 -1
- package/dist/src/public/tools/define-bash-tool.d.ts +0 -21
- package/dist/src/public/tools/define-bash-tool.js +0 -1
- package/dist/src/public/tools/define-glob-tool.d.ts +0 -22
- package/dist/src/public/tools/define-glob-tool.js +0 -1
- package/dist/src/public/tools/define-grep-tool.d.ts +0 -22
- package/dist/src/public/tools/define-grep-tool.js +0 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts +0 -21
- package/dist/src/public/tools/define-read-file-tool.js +0 -1
- package/dist/src/public/tools/define-write-file-tool.d.ts +0 -22
- package/dist/src/public/tools/define-write-file-tool.js +0 -1
- package/dist/src/public/tools/internal.d.ts +0 -13
- package/dist/src/public/tools/internal.js +0 -1
- package/dist/src/public/tools/sleep/index.js +0 -1
- package/dist/src/runtime/connections/callback-route.js +0 -1
- package/dist/src/runtime/framework-channels/index.d.ts +0 -6
- package/dist/src/runtime/framework-channels/index.js +0 -1
- package/dist/src/runtime/framework-tools/agent.d.ts +0 -29
- package/dist/src/runtime/framework-tools/agent.js +0 -1
- package/dist/src/runtime/framework-tools/ask-question.d.ts +0 -35
- package/dist/src/runtime/framework-tools/ask-question.js +0 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +0 -24
- package/dist/src/runtime/framework-tools/bash.js +0 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +0 -19
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +0 -2
- package/dist/src/runtime/framework-tools/final-output.js +0 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +0 -26
- package/dist/src/runtime/framework-tools/glob.js +0 -2
- package/dist/src/runtime/framework-tools/grep.js +0 -2
- package/dist/src/runtime/framework-tools/index.d.ts +0 -39
- package/dist/src/runtime/framework-tools/index.js +0 -1
- package/dist/src/runtime/framework-tools/read-file.d.ts +0 -27
- package/dist/src/runtime/framework-tools/read-file.js +0 -2
- package/dist/src/runtime/framework-tools/skill.d.ts +0 -12
- package/dist/src/runtime/framework-tools/skill.js +0 -1
- package/dist/src/runtime/framework-tools/subagent/local.js +0 -1
- package/dist/src/runtime/framework-tools/subagent/remote.js +0 -1
- package/dist/src/runtime/framework-tools/tasks.d.ts +0 -91
- package/dist/src/runtime/framework-tools/tasks.js +0 -1
- package/dist/src/runtime/framework-tools/web-fetch.js +0 -2
- package/dist/src/runtime/framework-tools/web-search.js +0 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +0 -23
- package/dist/src/runtime/framework-tools/write-file.js +0 -2
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +0 -1
- package/dist/src/runtime/governance/auth/jwt-hmac.js +0 -1
- package/dist/src/runtime/governance/auth/oidc.js +0 -1
- package/dist/src/runtime/input/types.js +0 -1
- package/dist/src/runtime/session-callback-route.d.ts +0 -6
- package/dist/src/runtime/session-callback-route.js +0 -1
- package/dist/src/runtime/task-input-response-route.d.ts +0 -5
- package/dist/src/runtime/task-input-response-route.js +0 -1
- package/dist/src/shared/durable-dynamic-tool-callbacks.js +0 -1
- package/dist/src/shared/dynamic-tool-definition.d.ts +0 -154
- package/dist/src/shared/dynamic-tool-definition.js +0 -1
- package/dist/src/shared/eve-server-health.d.ts +0 -5
- package/dist/src/shared/eve-server-health.js +0 -1
- package/dist/src/shared/tool-definition.d.ts +0 -89
- /package/dist/src/{runtime/governance → channel}/auth/http-basic.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/token-claims.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/types.js +0 -0
- /package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.js +0 -0
- /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.d.ts +0 -0
- /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.js +0 -0
- /package/dist/src/{execution/skills/types.js → context/session-context.js} +0 -0
- /package/dist/src/execution/sandbox/{bash-tool.js → bash.js} +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/file-state.js +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.d.ts +0 -0
- /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.js +0 -0
- /package/dist/src/execution/web-fetch/{tool.d.ts → execute.d.ts} +0 -0
- /package/dist/src/execution/web-fetch/{tool.js → execute.js} +0 -0
- /package/dist/src/{shared/tool-definition.js → runtime/connections/registry-types.js} +0 -0
- /package/dist/src/{runtime/connections/types.js → shared/connection-types.js} +0 -0
- /package/dist/src/{runtime/sessions/auth.d.ts → shared/session-auth.d.ts} +0 -0
- /package/dist/src/{runtime/sessions/auth.js → shared/session-auth.js} +0 -0
- /package/dist/src/{runtime/connections → shared}/validate-authorization.js +0 -0
- /package/dist/src/{public/tools/output-builders.js → tools/model-output.js} +0 -0
- /package/dist/src/{shared/tool-schema.d.ts → tools/schema.d.ts} +0 -0
- /package/dist/src/{shared/tool-schema.js → tools/schema.js} +0 -0
- /package/dist/src/{shared/tool-task.d.ts → tools/task.d.ts} +0 -0
- /package/dist/src/{shared/tool-task.js → tools/task.js} +0 -0
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
Conversation,
|
|
24
24
|
ConversationContent,
|
|
25
25
|
ConversationScrollButton,
|
|
26
|
+
ConversationTopFade,
|
|
26
27
|
} from "@/components/ai-elements/conversation";
|
|
27
28
|
import { Message, MessageContent } from "@/components/ai-elements/message";
|
|
28
29
|
import {
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
type PromptInputMessage,
|
|
32
33
|
PromptInputSubmit,
|
|
33
34
|
PromptInputTextarea,
|
|
35
|
+
usePromptInputAttachments,
|
|
34
36
|
} from "@/components/ai-elements/prompt-input";
|
|
35
37
|
import { Shimmer } from "@/components/ai-elements/shimmer";
|
|
36
38
|
import { Button } from "@/components/ui/button";
|
|
@@ -47,6 +49,7 @@ export function AgentChat({
|
|
|
47
49
|
readonly sessionless?: boolean;
|
|
48
50
|
}) {
|
|
49
51
|
const [cancellationError, setCancellationError] = useState<string>();
|
|
52
|
+
const [hasInputText, setHasInputText] = useState(false);
|
|
50
53
|
const agent = useEveAgent({
|
|
51
54
|
initialSession:
|
|
52
55
|
sessionId === undefined
|
|
@@ -70,7 +73,7 @@ export function AgentChat({
|
|
|
70
73
|
});
|
|
71
74
|
|
|
72
75
|
const isBusy = agent.status === "submitted" || agent.status === "streaming";
|
|
73
|
-
const
|
|
76
|
+
const isResuming = agent.status === "resuming";
|
|
74
77
|
const isEmpty = agent.data.messages.length === 0;
|
|
75
78
|
const lastMessage = agent.data.messages.at(-1);
|
|
76
79
|
const isPendingAssistantShell =
|
|
@@ -79,10 +82,10 @@ export function AgentChat({
|
|
|
79
82
|
const showPendingThinking =
|
|
80
83
|
isBusy &&
|
|
81
84
|
(agent.status === "submitted" || lastMessage?.role !== "assistant" || isPendingAssistantShell);
|
|
82
|
-
const turnFailure = isBusy ? undefined : getLatestTurnFailure(agent.events);
|
|
85
|
+
const turnFailure = isBusy || isResuming ? undefined : getLatestTurnFailure(agent.events);
|
|
83
86
|
const errorMessage = cancellationError ?? agent.error?.message ?? turnFailure;
|
|
84
87
|
const hasConversationContent = sessionless || !isEmpty || errorMessage !== undefined;
|
|
85
|
-
const showConversationLayout =
|
|
88
|
+
const showConversationLayout = isResuming || hasConversationContent;
|
|
86
89
|
const activeSessionId = sessionId ?? agent.session?.sessionId;
|
|
87
90
|
|
|
88
91
|
const requestCancellation = () => {
|
|
@@ -94,8 +97,9 @@ export function AgentChat({
|
|
|
94
97
|
|
|
95
98
|
const handleSubmit = async (message: PromptInputMessage) => {
|
|
96
99
|
const text = message.text.trim();
|
|
97
|
-
if ((text.length === 0 && message.files.length === 0) ||
|
|
100
|
+
if ((text.length === 0 && message.files.length === 0) || isResuming) return;
|
|
98
101
|
|
|
102
|
+
setHasInputText(false);
|
|
99
103
|
setCancellationError(undefined);
|
|
100
104
|
const options = isBusy ? { turnPolicy: "steer" as const } : undefined;
|
|
101
105
|
|
|
@@ -122,18 +126,17 @@ export function AgentChat({
|
|
|
122
126
|
|
|
123
127
|
const composer = (
|
|
124
128
|
<PromptInput onSubmit={handleSubmit}>
|
|
125
|
-
<PromptInputTextarea
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<PromptInputSubmit disabled={isRestoring} status={isBusy ? undefined : agent.status} />
|
|
129
|
+
<PromptInputTextarea
|
|
130
|
+
disabled={isResuming}
|
|
131
|
+
onChange={(event) => setHasInputText(event.currentTarget.value.trim().length > 0)}
|
|
132
|
+
placeholder="Send a message…"
|
|
133
|
+
/>
|
|
134
|
+
<ComposerAction
|
|
135
|
+
hasInputText={hasInputText}
|
|
136
|
+
isBusy={isBusy}
|
|
137
|
+
isResuming={isResuming}
|
|
138
|
+
onCancel={requestCancellation}
|
|
139
|
+
/>
|
|
137
140
|
</PromptInput>
|
|
138
141
|
);
|
|
139
142
|
|
|
@@ -154,13 +157,14 @@ export function AgentChat({
|
|
|
154
157
|
: \`eve:web-chat-scroll:\${activeSessionId}\`
|
|
155
158
|
}
|
|
156
159
|
>
|
|
160
|
+
<ConversationTopFade className="top-14" />
|
|
157
161
|
<ConversationContent className="mx-auto w-full max-w-3xl gap-6 px-4 pt-20 pb-36 sm:px-6">
|
|
158
162
|
{agent.data.messages.map((message, index) =>
|
|
159
163
|
showPendingThinking &&
|
|
160
164
|
isPendingAssistantShell &&
|
|
161
165
|
message.id === lastMessage.id ? null : (
|
|
162
166
|
<AgentMessage
|
|
163
|
-
canRespond={!isBusy}
|
|
167
|
+
canRespond={!isBusy && !isResuming}
|
|
164
168
|
isStreaming={
|
|
165
169
|
agent.status === "streaming" && index === agent.data.messages.length - 1
|
|
166
170
|
}
|
|
@@ -199,6 +203,36 @@ export function AgentChat({
|
|
|
199
203
|
);
|
|
200
204
|
}
|
|
201
205
|
|
|
206
|
+
function ComposerAction({
|
|
207
|
+
hasInputText,
|
|
208
|
+
isBusy,
|
|
209
|
+
isResuming,
|
|
210
|
+
onCancel,
|
|
211
|
+
}: {
|
|
212
|
+
readonly hasInputText: boolean;
|
|
213
|
+
readonly isBusy: boolean;
|
|
214
|
+
readonly isResuming: boolean;
|
|
215
|
+
readonly onCancel: () => void;
|
|
216
|
+
}) {
|
|
217
|
+
const attachments = usePromptInputAttachments();
|
|
218
|
+
const canSubmit = hasInputText || attachments.files.length > 0;
|
|
219
|
+
|
|
220
|
+
if (!isBusy || canSubmit) {
|
|
221
|
+
return <PromptInputSubmit disabled={isResuming} />;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<PromptInputButton
|
|
226
|
+
aria-label="Stop"
|
|
227
|
+
className="absolute right-2.5 bottom-2.5"
|
|
228
|
+
onClick={onCancel}
|
|
229
|
+
variant="outline"
|
|
230
|
+
>
|
|
231
|
+
<SquareIcon className="size-3 fill-current" />
|
|
232
|
+
</PromptInputButton>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
202
236
|
function ErrorMessage({ message }: { readonly message: string }) {
|
|
203
237
|
return (
|
|
204
238
|
<Message className="max-w-full" from="assistant">
|
|
@@ -226,14 +260,14 @@ function ChatHeader({ canStartNewChat }: { readonly canStartNewChat: boolean })
|
|
|
226
260
|
{canStartNewChat ? (
|
|
227
261
|
<Button
|
|
228
262
|
aria-label="Start a new chat"
|
|
229
|
-
className="pointer-events-auto fixed top-
|
|
263
|
+
className="pointer-events-auto fixed top-3 right-6 pr-4"
|
|
230
264
|
onClick={() => window.location.assign("/s")}
|
|
231
265
|
size="sm"
|
|
232
266
|
type="button"
|
|
233
267
|
variant="ghost"
|
|
234
268
|
>
|
|
235
269
|
<PlusIcon className="size-4" />
|
|
236
|
-
<span className="hidden sm:inline">New chat</span>
|
|
270
|
+
<span className="hidden font-normal text-sm sm:inline">New chat</span>
|
|
237
271
|
</Button>
|
|
238
272
|
) : null}
|
|
239
273
|
</div>
|
|
@@ -290,8 +324,11 @@ import type {
|
|
|
290
324
|
EveMessageInputRequest,
|
|
291
325
|
EveMessagePart,
|
|
292
326
|
} from "eve/react";
|
|
327
|
+
import { useState } from "react";
|
|
293
328
|
import {
|
|
329
|
+
ArrowRightIcon,
|
|
294
330
|
CheckCircleIcon,
|
|
331
|
+
CheckIcon,
|
|
295
332
|
ExternalLinkIcon,
|
|
296
333
|
FileIcon,
|
|
297
334
|
ImageIcon,
|
|
@@ -301,17 +338,17 @@ import {
|
|
|
301
338
|
import { Message, MessageContent, MessageResponse } from "@/components/ai-elements/message";
|
|
302
339
|
import {
|
|
303
340
|
Question,
|
|
304
|
-
QuestionActions,
|
|
305
|
-
QuestionDescription,
|
|
306
341
|
QuestionInput,
|
|
307
342
|
QuestionOption,
|
|
308
343
|
QuestionOptions,
|
|
309
344
|
QuestionPrompt,
|
|
310
345
|
type QuestionResponse,
|
|
311
346
|
QuestionSubmit,
|
|
347
|
+
type QuestionValue,
|
|
312
348
|
} from "@/components/ai-elements/question";
|
|
313
349
|
import { Reasoning, ReasoningContent, ReasoningTrigger } from "@/components/ai-elements/reasoning";
|
|
314
350
|
import {
|
|
351
|
+
BashToolContent,
|
|
315
352
|
Tool,
|
|
316
353
|
ToolContent,
|
|
317
354
|
ToolHeader,
|
|
@@ -425,13 +462,19 @@ function AgentMessagePart({
|
|
|
425
462
|
type="dynamic-tool"
|
|
426
463
|
/>
|
|
427
464
|
<ToolContent>
|
|
428
|
-
|
|
465
|
+
{part.toolName === "bash" ? (
|
|
466
|
+
<BashToolContent errorText={part.errorText} input={part.input} output={part.output} />
|
|
467
|
+
) : (
|
|
468
|
+
<ToolInput input={part.input} />
|
|
469
|
+
)}
|
|
429
470
|
<InputRequestActions
|
|
430
471
|
canRespond={canRespond}
|
|
431
472
|
part={part}
|
|
432
473
|
onInputResponses={onInputResponses}
|
|
433
474
|
/>
|
|
434
|
-
|
|
475
|
+
{part.toolName === "bash" ? null : (
|
|
476
|
+
<ToolOutput errorText={part.errorText} output={part.output} />
|
|
477
|
+
)}
|
|
435
478
|
</ToolContent>
|
|
436
479
|
</Tool>
|
|
437
480
|
);
|
|
@@ -450,11 +493,22 @@ function QuestionRequest({
|
|
|
450
493
|
readonly inputResponse?: AgentInputResponse;
|
|
451
494
|
readonly onInputResponses: (responses: readonly AgentInputResponse[]) => void | Promise<void>;
|
|
452
495
|
}) {
|
|
453
|
-
const selectedOption = inputRequest.options?.find(
|
|
454
|
-
(option) => option.id === inputResponse?.optionId,
|
|
455
|
-
);
|
|
456
496
|
const hasOptions = (inputRequest.options?.length ?? 0) > 0;
|
|
457
497
|
const acceptsFreeform = inputRequest.allowFreeform === true || !hasOptions;
|
|
498
|
+
const [questionValue, setQuestionValue] = useState<QuestionValue>({
|
|
499
|
+
selectedValues: inputResponse?.optionId ? [inputResponse.optionId] : [],
|
|
500
|
+
text: inputResponse?.text ?? "",
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
const submitOption = (optionId: string) => {
|
|
504
|
+
setQuestionValue((value) => ({ ...value, selectedValues: [optionId] }));
|
|
505
|
+
return onInputResponses([
|
|
506
|
+
{
|
|
507
|
+
optionId,
|
|
508
|
+
requestId: inputRequest.requestId,
|
|
509
|
+
},
|
|
510
|
+
]);
|
|
511
|
+
};
|
|
458
512
|
|
|
459
513
|
const submitResponse = ({ selectedValues, text }: QuestionResponse) =>
|
|
460
514
|
onInputResponses([
|
|
@@ -467,40 +521,61 @@ function QuestionRequest({
|
|
|
467
521
|
|
|
468
522
|
return (
|
|
469
523
|
<Question
|
|
470
|
-
defaultValue={{
|
|
471
|
-
selectedValues: inputResponse?.optionId ? [inputResponse.optionId] : [],
|
|
472
|
-
text: inputResponse?.text ?? "",
|
|
473
|
-
}}
|
|
474
524
|
disabled={!canRespond || inputResponse !== undefined}
|
|
475
525
|
onSubmit={submitResponse}
|
|
526
|
+
onValueChange={setQuestionValue}
|
|
527
|
+
value={questionValue}
|
|
476
528
|
>
|
|
477
529
|
<QuestionPrompt>{inputRequest.prompt}</QuestionPrompt>
|
|
478
530
|
{hasOptions ? (
|
|
479
531
|
<QuestionOptions className="flex-col items-stretch" aria-label={inputRequest.prompt}>
|
|
480
|
-
{inputRequest.options?.map((option) => (
|
|
481
|
-
<QuestionOption
|
|
482
|
-
|
|
483
|
-
|
|
532
|
+
{inputRequest.options?.map((option, index) => (
|
|
533
|
+
<QuestionOption
|
|
534
|
+
className="justify-start px-3 py-2 text-left"
|
|
535
|
+
key={option.id}
|
|
536
|
+
onClick={() => void submitOption(option.id)}
|
|
537
|
+
value={option.id}
|
|
538
|
+
>
|
|
539
|
+
<span className="min-w-0 flex-1">
|
|
540
|
+
<span className="block text-foreground text-sm leading-tight">{option.label}</span>
|
|
484
541
|
{option.description ? (
|
|
485
|
-
<span className="block
|
|
542
|
+
<span className="block text-sm text-muted-foreground leading-tight">
|
|
543
|
+
{option.description}
|
|
544
|
+
</span>
|
|
486
545
|
) : null}
|
|
487
546
|
</span>
|
|
547
|
+
{inputResponse === undefined ? (
|
|
548
|
+
<span aria-hidden="true" className="relative size-6 shrink-0">
|
|
549
|
+
<span className="absolute inset-0 flex items-center justify-center rounded-full bg-foreground/8 text-xs text-muted-foreground transition-opacity group-hover/option:opacity-0 group-focus-visible/option:opacity-0">
|
|
550
|
+
{index + 1}
|
|
551
|
+
</span>
|
|
552
|
+
<ArrowRightIcon className="absolute top-1/2 left-1/2 size-4 -translate-x-1/2 -translate-y-1/2 text-muted-foreground opacity-0 transition-[color,opacity] group-hover/option:text-foreground group-hover/option:opacity-100 group-focus-visible/option:opacity-100" />
|
|
553
|
+
</span>
|
|
554
|
+
) : (
|
|
555
|
+
<CheckIcon className="size-4 shrink-0 opacity-0 transition-opacity group-data-[state=checked]/option:opacity-100" />
|
|
556
|
+
)}
|
|
488
557
|
</QuestionOption>
|
|
489
558
|
))}
|
|
490
559
|
</QuestionOptions>
|
|
491
560
|
) : null}
|
|
492
561
|
{acceptsFreeform ? (
|
|
493
|
-
<
|
|
562
|
+
<div className="relative">
|
|
563
|
+
<QuestionInput
|
|
564
|
+
aria-label="Answer"
|
|
565
|
+
className={inputResponse === undefined ? "pr-12 pb-12" : undefined}
|
|
566
|
+
placeholder="Type your answer…"
|
|
567
|
+
/>
|
|
568
|
+
{inputResponse === undefined && questionValue.text.trim().length > 0 ? (
|
|
569
|
+
<QuestionSubmit
|
|
570
|
+
aria-label="Answer"
|
|
571
|
+
className="absolute right-2 bottom-2"
|
|
572
|
+
size="icon-sm"
|
|
573
|
+
>
|
|
574
|
+
<ArrowRightIcon />
|
|
575
|
+
</QuestionSubmit>
|
|
576
|
+
) : null}
|
|
577
|
+
</div>
|
|
494
578
|
) : null}
|
|
495
|
-
{inputResponse ? (
|
|
496
|
-
<QuestionDescription>
|
|
497
|
-
Responded: {selectedOption?.label ?? inputResponse.text ?? inputResponse.optionId}
|
|
498
|
-
</QuestionDescription>
|
|
499
|
-
) : (
|
|
500
|
-
<QuestionActions>
|
|
501
|
-
<QuestionSubmit>Answer</QuestionSubmit>
|
|
502
|
-
</QuestionActions>
|
|
503
|
-
)}
|
|
504
579
|
</Question>
|
|
505
580
|
);
|
|
506
581
|
}
|
|
@@ -705,6 +780,27 @@ function partKey(part: EveMessagePart, index: number): string {
|
|
|
705
780
|
return \`\${part.type}:\${index}\`;
|
|
706
781
|
}
|
|
707
782
|
}
|
|
783
|
+
`,"app/apple-icon.tsx":`import { ImageResponse } from "next/og";
|
|
784
|
+
|
|
785
|
+
export const size = {
|
|
786
|
+
width: 180,
|
|
787
|
+
height: 180,
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
export const contentType = "image/png";
|
|
791
|
+
|
|
792
|
+
export default function AppleIcon() {
|
|
793
|
+
return new ImageResponse(
|
|
794
|
+
<svg fill="none" viewBox="0 0 102 102" xmlns="http://www.w3.org/2000/svg">
|
|
795
|
+
<path d="M0 0h102v102H0z" fill="#000" />
|
|
796
|
+
<path
|
|
797
|
+
d="M49.28 66.94 75.03 34.96h-6.89L47.91 60.11l-5.49 6.83h6.86ZM0 34.96h42.4v5.11H0zm0 13.32h27.66v5.11H0zm0 13.54h27.66v5.11H0zm69.63-26.86H102v5.11H69.63zm4.71 13.32H102v5.11H74.34zm0 13.54H102v5.11H74.34z"
|
|
798
|
+
fill="#fff"
|
|
799
|
+
/>
|
|
800
|
+
</svg>,
|
|
801
|
+
size,
|
|
802
|
+
);
|
|
803
|
+
}
|
|
708
804
|
`,"app/globals.css":`@import "tailwindcss";
|
|
709
805
|
@source "../node_modules/streamdown/dist/*.js";
|
|
710
806
|
|
|
@@ -789,6 +885,8 @@ function partKey(part: EveMessagePart, index: number): string {
|
|
|
789
885
|
|
|
790
886
|
html {
|
|
791
887
|
height: 100%;
|
|
888
|
+
-webkit-font-smoothing: antialiased;
|
|
889
|
+
-moz-osx-font-smoothing: grayscale;
|
|
792
890
|
}
|
|
793
891
|
|
|
794
892
|
body {
|
|
@@ -803,6 +901,13 @@ input,
|
|
|
803
901
|
textarea {
|
|
804
902
|
font: inherit;
|
|
805
903
|
}
|
|
904
|
+
`,"app/icon.svg":`<svg width="102" height="102" viewBox="0 0 102 102" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
905
|
+
<path fill="#000" d="M0 0h102v102H0z" />
|
|
906
|
+
<path
|
|
907
|
+
fill="#fff"
|
|
908
|
+
d="M49.28 66.94 75.03 34.96h-6.89L47.91 60.11l-5.49 6.83h6.86ZM0 34.96h42.4v5.11H0zm0 13.32h27.66v5.11H0zm0 13.54h27.66v5.11H0zm69.63-26.86H102v5.11H69.63zm4.71 13.32H102v5.11H74.34zm0 13.54H102v5.11H74.34z"
|
|
909
|
+
/>
|
|
910
|
+
</svg>
|
|
806
911
|
`,"app/layout.tsx":`import type { Metadata } from "next";
|
|
807
912
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
808
913
|
import type { ReactNode } from "react";
|
|
@@ -1700,6 +1805,49 @@ export const ConversationContent = ({ className, ...props }: ConversationContent
|
|
|
1700
1805
|
<StickToBottom.Content className={cn("flex flex-col gap-8 p-4", className)} {...props} />
|
|
1701
1806
|
);
|
|
1702
1807
|
|
|
1808
|
+
export type ConversationTopFadeProps = ComponentProps<"div">;
|
|
1809
|
+
|
|
1810
|
+
export const ConversationTopFade = ({ className, ...props }: ConversationTopFadeProps) => {
|
|
1811
|
+
const { contentRef, scrollRef } = useStickToBottomContext();
|
|
1812
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
1813
|
+
|
|
1814
|
+
useEffect(() => {
|
|
1815
|
+
const scrollElement = scrollRef.current;
|
|
1816
|
+
if (scrollElement === null) return;
|
|
1817
|
+
|
|
1818
|
+
const updateVisibility = () => {
|
|
1819
|
+
setIsVisible(scrollElement.scrollTop > 0);
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
updateVisibility();
|
|
1823
|
+
scrollElement.addEventListener("scroll", updateVisibility, { passive: true });
|
|
1824
|
+
|
|
1825
|
+
const resizeObserver = new ResizeObserver(updateVisibility);
|
|
1826
|
+
resizeObserver.observe(scrollElement);
|
|
1827
|
+
if (contentRef.current !== null) {
|
|
1828
|
+
resizeObserver.observe(contentRef.current);
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
return () => {
|
|
1832
|
+
scrollElement.removeEventListener("scroll", updateVisibility);
|
|
1833
|
+
resizeObserver.disconnect();
|
|
1834
|
+
};
|
|
1835
|
+
}, [contentRef, scrollRef]);
|
|
1836
|
+
|
|
1837
|
+
return (
|
|
1838
|
+
<div
|
|
1839
|
+
{...props}
|
|
1840
|
+
aria-hidden
|
|
1841
|
+
className={cn(
|
|
1842
|
+
"pointer-events-none absolute inset-x-0 top-0 z-10 h-6 bg-linear-to-b from-background via-background/80 to-transparent transition-opacity duration-150",
|
|
1843
|
+
isVisible ? "opacity-100" : "opacity-0",
|
|
1844
|
+
className,
|
|
1845
|
+
)}
|
|
1846
|
+
data-slot="conversation-top-fade"
|
|
1847
|
+
/>
|
|
1848
|
+
);
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1703
1851
|
export type ConversationEmptyStateProps = ComponentProps<"div"> & {
|
|
1704
1852
|
title?: string;
|
|
1705
1853
|
description?: string;
|
|
@@ -2990,8 +3138,8 @@ export const PromptInput = ({
|
|
|
2990
3138
|
<form className="w-full" onSubmit={handleSubmit} ref={formRef} {...props}>
|
|
2991
3139
|
<InputGroup
|
|
2992
3140
|
className={cn(
|
|
2993
|
-
"overflow-hidden rounded-2xl bg-card shadow-sm",
|
|
2994
|
-
"focus-within:border-foreground has-[[data-slot=input-group-control]:focus-visible]:border-foreground",
|
|
3141
|
+
"overflow-hidden rounded-2xl bg-card/80 shadow-sm backdrop-blur-md",
|
|
3142
|
+
"focus-within:border-foreground! has-[[data-slot=input-group-control]:focus-visible]:border-foreground!",
|
|
2995
3143
|
className,
|
|
2996
3144
|
)}
|
|
2997
3145
|
>
|
|
@@ -3121,7 +3269,7 @@ export const PromptInputTextarea = ({
|
|
|
3121
3269
|
|
|
3122
3270
|
return (
|
|
3123
3271
|
<InputGroupTextarea
|
|
3124
|
-
className={cn("field-sizing-content max-h-48 min-h-18", className)}
|
|
3272
|
+
className={cn("field-sizing-content max-h-48 min-h-18 text-sm!", className)}
|
|
3125
3273
|
name="message"
|
|
3126
3274
|
onCompositionEnd={handleCompositionEnd}
|
|
3127
3275
|
onCompositionStart={handleCompositionStart}
|
|
@@ -3183,7 +3331,11 @@ export const PromptInputButton = ({
|
|
|
3183
3331
|
|
|
3184
3332
|
const button = (
|
|
3185
3333
|
<InputGroupButton
|
|
3186
|
-
className={cn(
|
|
3334
|
+
className={cn(
|
|
3335
|
+
"rounded-full",
|
|
3336
|
+
variant === "outline" && "bg-card hover:bg-card dark:hover:bg-input/30",
|
|
3337
|
+
className,
|
|
3338
|
+
)}
|
|
3187
3339
|
size={newSize}
|
|
3188
3340
|
type="button"
|
|
3189
3341
|
variant={variant}
|
|
@@ -3446,6 +3598,7 @@ import type {
|
|
|
3446
3598
|
ComponentProps,
|
|
3447
3599
|
FormEvent,
|
|
3448
3600
|
HTMLAttributes,
|
|
3601
|
+
KeyboardEvent,
|
|
3449
3602
|
MouseEvent,
|
|
3450
3603
|
ReactNode,
|
|
3451
3604
|
} from "react";
|
|
@@ -3597,7 +3750,7 @@ export const Question = ({
|
|
|
3597
3750
|
return (
|
|
3598
3751
|
<QuestionContext.Provider value={contextValue}>
|
|
3599
3752
|
<form
|
|
3600
|
-
className={cn("space-y-
|
|
3753
|
+
className={cn("space-y-3 rounded-xl border bg-card p-4", className)}
|
|
3601
3754
|
onSubmit={handleSubmit}
|
|
3602
3755
|
{...props}
|
|
3603
3756
|
>
|
|
@@ -3610,7 +3763,7 @@ export const Question = ({
|
|
|
3610
3763
|
export type QuestionPromptProps = HTMLAttributes<HTMLParagraphElement>;
|
|
3611
3764
|
|
|
3612
3765
|
export const QuestionPrompt = ({ className, ...props }: QuestionPromptProps) => (
|
|
3613
|
-
<p className={cn("font-medium text-sm", className)} {...props} />
|
|
3766
|
+
<p className={cn("font-medium text-sm leading-snug", className)} {...props} />
|
|
3614
3767
|
);
|
|
3615
3768
|
|
|
3616
3769
|
export type QuestionDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
@@ -3626,7 +3779,7 @@ export const QuestionOptions = ({ className, ...props }: QuestionOptionsProps) =
|
|
|
3626
3779
|
|
|
3627
3780
|
return (
|
|
3628
3781
|
<div
|
|
3629
|
-
className={cn("flex flex-wrap gap-
|
|
3782
|
+
className={cn("flex flex-wrap gap-1.5", className)}
|
|
3630
3783
|
role={selectionMode === "single" ? "radiogroup" : "group"}
|
|
3631
3784
|
{...props}
|
|
3632
3785
|
/>
|
|
@@ -3660,12 +3813,21 @@ export const QuestionOption = ({
|
|
|
3660
3813
|
return (
|
|
3661
3814
|
<Button
|
|
3662
3815
|
aria-checked={isSelected}
|
|
3663
|
-
|
|
3816
|
+
// Selection only changes colors: the border is always present so the
|
|
3817
|
+
// layout never shifts when an option is picked.
|
|
3818
|
+
className={cn(
|
|
3819
|
+
"group/option h-auto whitespace-normal border border-input font-normal shadow-none transition-colors",
|
|
3820
|
+
isSelected
|
|
3821
|
+
? "border-foreground/20 bg-accent text-accent-foreground disabled:opacity-100"
|
|
3822
|
+
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
3823
|
+
className,
|
|
3824
|
+
)}
|
|
3825
|
+
data-state={isSelected ? "checked" : "unchecked"}
|
|
3664
3826
|
disabled={question.disabled || disabled}
|
|
3665
3827
|
onClick={handleClick}
|
|
3666
3828
|
role={role}
|
|
3667
3829
|
type="button"
|
|
3668
|
-
variant={variant ??
|
|
3830
|
+
variant={variant ?? "ghost"}
|
|
3669
3831
|
{...props}
|
|
3670
3832
|
>
|
|
3671
3833
|
{children ?? value}
|
|
@@ -3675,7 +3837,13 @@ export const QuestionOption = ({
|
|
|
3675
3837
|
|
|
3676
3838
|
export type QuestionInputProps = Omit<ComponentProps<typeof Textarea>, "defaultValue" | "value">;
|
|
3677
3839
|
|
|
3678
|
-
export const QuestionInput = ({
|
|
3840
|
+
export const QuestionInput = ({
|
|
3841
|
+
className,
|
|
3842
|
+
disabled,
|
|
3843
|
+
onChange,
|
|
3844
|
+
onKeyDown,
|
|
3845
|
+
...props
|
|
3846
|
+
}: QuestionInputProps) => {
|
|
3679
3847
|
const question = useQuestion();
|
|
3680
3848
|
const handleChange = useCallback(
|
|
3681
3849
|
(event: ChangeEvent<HTMLTextAreaElement>) => {
|
|
@@ -3684,12 +3852,33 @@ export const QuestionInput = ({ className, disabled, onChange, ...props }: Quest
|
|
|
3684
3852
|
},
|
|
3685
3853
|
[onChange, question],
|
|
3686
3854
|
);
|
|
3855
|
+
const handleKeyDown = useCallback(
|
|
3856
|
+
(event: KeyboardEvent<HTMLTextAreaElement>) => {
|
|
3857
|
+
onKeyDown?.(event);
|
|
3858
|
+
if (
|
|
3859
|
+
event.defaultPrevented ||
|
|
3860
|
+
event.key !== "Enter" ||
|
|
3861
|
+
event.shiftKey ||
|
|
3862
|
+
event.nativeEvent.isComposing
|
|
3863
|
+
) {
|
|
3864
|
+
return;
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
event.preventDefault();
|
|
3868
|
+
event.currentTarget.form?.requestSubmit();
|
|
3869
|
+
},
|
|
3870
|
+
[onKeyDown],
|
|
3871
|
+
);
|
|
3687
3872
|
|
|
3688
3873
|
return (
|
|
3689
3874
|
<Textarea
|
|
3690
|
-
className={cn(
|
|
3875
|
+
className={cn(
|
|
3876
|
+
"min-h-16 resize-none rounded-lg text-sm shadow-none focus-visible:border-foreground!",
|
|
3877
|
+
className,
|
|
3878
|
+
)}
|
|
3691
3879
|
disabled={question.disabled || disabled}
|
|
3692
3880
|
onChange={handleChange}
|
|
3881
|
+
onKeyDown={handleKeyDown}
|
|
3693
3882
|
value={question.text}
|
|
3694
3883
|
{...props}
|
|
3695
3884
|
/>
|
|
@@ -3708,14 +3897,22 @@ export type QuestionSubmitProps = ComponentProps<typeof Button> & {
|
|
|
3708
3897
|
|
|
3709
3898
|
export const QuestionSubmit = ({
|
|
3710
3899
|
children = "Submit",
|
|
3900
|
+
className,
|
|
3711
3901
|
disabled,
|
|
3902
|
+
size = "sm",
|
|
3712
3903
|
...props
|
|
3713
3904
|
}: QuestionSubmitProps) => {
|
|
3714
3905
|
const question = useQuestion();
|
|
3715
3906
|
const hasResponse = question.selectedValues.length > 0 || question.text.trim().length > 0;
|
|
3716
3907
|
|
|
3717
3908
|
return (
|
|
3718
|
-
<Button
|
|
3909
|
+
<Button
|
|
3910
|
+
className={cn("text-sm! shadow-none", className)}
|
|
3911
|
+
disabled={question.disabled || disabled || !hasResponse}
|
|
3912
|
+
size={size}
|
|
3913
|
+
type="submit"
|
|
3914
|
+
{...props}
|
|
3915
|
+
>
|
|
3719
3916
|
{children}
|
|
3720
3917
|
</Button>
|
|
3721
3918
|
);
|
|
@@ -3770,7 +3967,6 @@ export type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
|
3770
3967
|
duration?: number;
|
|
3771
3968
|
};
|
|
3772
3969
|
|
|
3773
|
-
const AUTO_CLOSE_DELAY = 1000;
|
|
3774
3970
|
const MS_IN_S = 1000;
|
|
3775
3971
|
|
|
3776
3972
|
export const Reasoning = memo(
|
|
@@ -3825,12 +4021,8 @@ export const Reasoning = memo(
|
|
|
3825
4021
|
// Auto-close when streaming ends (once only, and only if it ever streamed)
|
|
3826
4022
|
useEffect(() => {
|
|
3827
4023
|
if (hasEverStreamedRef.current && !isStreaming && isOpen && !hasAutoClosed) {
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
setHasAutoClosed(true);
|
|
3831
|
-
}, AUTO_CLOSE_DELAY);
|
|
3832
|
-
|
|
3833
|
-
return () => clearTimeout(timer);
|
|
4024
|
+
setIsOpen(false);
|
|
4025
|
+
setHasAutoClosed(true);
|
|
3834
4026
|
}
|
|
3835
4027
|
}, [isStreaming, isOpen, setIsOpen, hasAutoClosed]);
|
|
3836
4028
|
|
|
@@ -4002,30 +4194,22 @@ const ShimmerComponent = ({
|
|
|
4002
4194
|
export const Shimmer = memo(ShimmerComponent);
|
|
4003
4195
|
`,"components/ai-elements/tool.tsx":`"use client";
|
|
4004
4196
|
|
|
4005
|
-
import { Badge } from "@/components/ui/badge";
|
|
4006
4197
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
|
4007
4198
|
import { cn } from "@/lib/utils";
|
|
4008
4199
|
import type { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4009
|
-
import {
|
|
4010
|
-
CheckCircleIcon,
|
|
4011
|
-
ChevronDownIcon,
|
|
4012
|
-
CircleIcon,
|
|
4013
|
-
ClockIcon,
|
|
4014
|
-
WrenchIcon,
|
|
4015
|
-
XCircleIcon,
|
|
4016
|
-
} from "lucide-react";
|
|
4200
|
+
import { ChevronRightIcon, TerminalIcon, WrenchIcon } from "lucide-react";
|
|
4017
4201
|
import type { ComponentProps, ReactNode } from "react";
|
|
4018
4202
|
import { isValidElement } from "react";
|
|
4019
4203
|
|
|
4020
4204
|
import { CodeBlock } from "./code-block";
|
|
4021
4205
|
|
|
4206
|
+
const compactCodeBlockClassName =
|
|
4207
|
+
"rounded-none border-0 bg-transparent [&_pre]:!bg-transparent [&_pre]:px-3 [&_pre]:pt-2 [&_pre]:pb-3 [&_pre]:text-xs [&_code]:text-xs";
|
|
4208
|
+
|
|
4022
4209
|
export type ToolProps = ComponentProps<typeof Collapsible>;
|
|
4023
4210
|
|
|
4024
4211
|
export const Tool = ({ className, ...props }: ToolProps) => (
|
|
4025
|
-
<Collapsible
|
|
4026
|
-
className={cn("group not-prose mb-4 w-full rounded-md border", className)}
|
|
4027
|
-
{...props}
|
|
4028
|
-
/>
|
|
4212
|
+
<Collapsible className={cn("group not-prose w-full", className)} {...props} />
|
|
4029
4213
|
);
|
|
4030
4214
|
|
|
4031
4215
|
export type ToolPart = ToolUIPart | DynamicToolUIPart;
|
|
@@ -4052,22 +4236,12 @@ const statusLabels: Record<ToolPart["state"], string> = {
|
|
|
4052
4236
|
"output-error": "Error",
|
|
4053
4237
|
};
|
|
4054
4238
|
|
|
4055
|
-
const
|
|
4056
|
-
"
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
"output-denied": <XCircleIcon className="size-4 text-orange-600" />,
|
|
4062
|
-
"output-error": <XCircleIcon className="size-4 text-red-600" />,
|
|
4063
|
-
};
|
|
4064
|
-
|
|
4065
|
-
export const getStatusBadge = (status: ToolPart["state"]) => (
|
|
4066
|
-
<Badge className="gap-1.5 rounded-full text-xs" variant="secondary">
|
|
4067
|
-
{statusIcons[status]}
|
|
4068
|
-
{statusLabels[status]}
|
|
4069
|
-
</Badge>
|
|
4070
|
-
);
|
|
4239
|
+
export const getStatusIndicator = (status: ToolPart["state"]) =>
|
|
4240
|
+
status === "output-available" ? null : (
|
|
4241
|
+
<span className={cn("text-sm", status === "output-error" && "text-destructive")}>
|
|
4242
|
+
{statusLabels[status]}
|
|
4243
|
+
</span>
|
|
4244
|
+
);
|
|
4071
4245
|
|
|
4072
4246
|
export const ToolHeader = ({
|
|
4073
4247
|
className,
|
|
@@ -4078,18 +4252,24 @@ export const ToolHeader = ({
|
|
|
4078
4252
|
...props
|
|
4079
4253
|
}: ToolHeaderProps) => {
|
|
4080
4254
|
const derivedName = type === "dynamic-tool" ? toolName : type.split("-").slice(1).join("-");
|
|
4255
|
+
const displayName = title ?? derivedName;
|
|
4081
4256
|
|
|
4082
4257
|
return (
|
|
4083
4258
|
<CollapsibleTrigger
|
|
4084
|
-
className={cn(
|
|
4259
|
+
className={cn(
|
|
4260
|
+
"flex w-full items-center gap-2 py-0.5 text-left text-muted-foreground transition-colors hover:text-foreground",
|
|
4261
|
+
className,
|
|
4262
|
+
)}
|
|
4085
4263
|
{...props}
|
|
4086
4264
|
>
|
|
4087
|
-
|
|
4088
|
-
<
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
<
|
|
4265
|
+
{displayName === "bash" ? (
|
|
4266
|
+
<TerminalIcon className="size-4 shrink-0" />
|
|
4267
|
+
) : (
|
|
4268
|
+
<WrenchIcon className="size-4 shrink-0" />
|
|
4269
|
+
)}
|
|
4270
|
+
<span className="text-sm">{displayName}</span>
|
|
4271
|
+
{getStatusIndicator(state)}
|
|
4272
|
+
<ChevronRightIcon className="size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-90" />
|
|
4093
4273
|
</CollapsibleTrigger>
|
|
4094
4274
|
);
|
|
4095
4275
|
};
|
|
@@ -4099,24 +4279,82 @@ export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
|
4099
4279
|
export const ToolContent = ({ className, ...props }: ToolContentProps) => (
|
|
4100
4280
|
<CollapsibleContent
|
|
4101
4281
|
className={cn(
|
|
4102
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 space-y-4
|
|
4282
|
+
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 space-y-4 py-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
4103
4283
|
className,
|
|
4104
4284
|
)}
|
|
4105
4285
|
{...props}
|
|
4106
4286
|
/>
|
|
4107
4287
|
);
|
|
4108
4288
|
|
|
4289
|
+
export type BashToolContentProps = ComponentProps<"div"> & {
|
|
4290
|
+
input: ToolPart["input"];
|
|
4291
|
+
output: ToolPart["output"];
|
|
4292
|
+
errorText: ToolPart["errorText"];
|
|
4293
|
+
};
|
|
4294
|
+
|
|
4295
|
+
export const BashToolContent = ({
|
|
4296
|
+
className,
|
|
4297
|
+
input,
|
|
4298
|
+
output,
|
|
4299
|
+
errorText,
|
|
4300
|
+
...props
|
|
4301
|
+
}: BashToolContentProps) => {
|
|
4302
|
+
const command = getRecordValue(input, "command");
|
|
4303
|
+
const stdout = getRecordValue(output, "stdout") ?? (typeof output === "string" ? output : "");
|
|
4304
|
+
const stderr = getRecordValue(output, "stderr") ?? errorText ?? "";
|
|
4305
|
+
const exitCode = getRecordValue(output, "exitCode");
|
|
4306
|
+
const hasResult = Boolean(stdout || stderr || (typeof exitCode === "number" && exitCode !== 0));
|
|
4307
|
+
|
|
4308
|
+
return (
|
|
4309
|
+
<div className={cn("space-y-2", className)} {...props}>
|
|
4310
|
+
<pre className="overflow-x-auto whitespace-pre-wrap rounded-md bg-muted/50 p-3 font-mono text-xs leading-relaxed">
|
|
4311
|
+
<code>
|
|
4312
|
+
<span className="text-muted-foreground">$ </span>
|
|
4313
|
+
{command ?? "…"}
|
|
4314
|
+
</code>
|
|
4315
|
+
</pre>
|
|
4316
|
+
{hasResult ? (
|
|
4317
|
+
<pre className="overflow-x-auto whitespace-pre-wrap rounded-md bg-muted/50 p-3 font-mono text-xs leading-relaxed">
|
|
4318
|
+
<code>
|
|
4319
|
+
<span className="mb-2 block font-sans text-[10px] text-muted-foreground uppercase tracking-wide">
|
|
4320
|
+
Output
|
|
4321
|
+
</span>
|
|
4322
|
+
{stdout ? <span className="block">{stdout.trimEnd()}</span> : null}
|
|
4323
|
+
{stderr ? <span className="block text-destructive">{stderr.trimEnd()}</span> : null}
|
|
4324
|
+
{typeof exitCode === "number" && exitCode !== 0 ? (
|
|
4325
|
+
<span className="block text-muted-foreground">Exited with code {exitCode}</span>
|
|
4326
|
+
) : null}
|
|
4327
|
+
</code>
|
|
4328
|
+
</pre>
|
|
4329
|
+
) : null}
|
|
4330
|
+
</div>
|
|
4331
|
+
);
|
|
4332
|
+
};
|
|
4333
|
+
|
|
4334
|
+
const getRecordValue = (value: unknown, key: string): string | number | undefined => {
|
|
4335
|
+
if (typeof value !== "object" || value === null || !(key in value)) {
|
|
4336
|
+
return undefined;
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4339
|
+
const property = value[key as keyof typeof value];
|
|
4340
|
+
return typeof property === "string" || typeof property === "number" ? property : undefined;
|
|
4341
|
+
};
|
|
4342
|
+
|
|
4109
4343
|
export type ToolInputProps = ComponentProps<"div"> & {
|
|
4110
4344
|
input: ToolPart["input"];
|
|
4111
4345
|
};
|
|
4112
4346
|
|
|
4113
4347
|
export const ToolInput = ({ className, input, ...props }: ToolInputProps) => (
|
|
4114
|
-
<div className={cn("
|
|
4115
|
-
<
|
|
4348
|
+
<div className={cn("overflow-hidden rounded-md bg-muted/50", className)} {...props}>
|
|
4349
|
+
<span className="block px-3 pt-3 font-sans text-[10px] text-muted-foreground uppercase tracking-wide">
|
|
4116
4350
|
Parameters
|
|
4117
|
-
</
|
|
4118
|
-
<div
|
|
4119
|
-
<CodeBlock
|
|
4351
|
+
</span>
|
|
4352
|
+
<div>
|
|
4353
|
+
<CodeBlock
|
|
4354
|
+
className={compactCodeBlockClassName}
|
|
4355
|
+
code={JSON.stringify(input, null, 2)}
|
|
4356
|
+
language="json"
|
|
4357
|
+
/>
|
|
4120
4358
|
</div>
|
|
4121
4359
|
</div>
|
|
4122
4360
|
);
|
|
@@ -4134,25 +4372,31 @@ export const ToolOutput = ({ className, output, errorText, ...props }: ToolOutpu
|
|
|
4134
4372
|
let Output = <div>{output as ReactNode}</div>;
|
|
4135
4373
|
|
|
4136
4374
|
if (typeof output === "object" && !isValidElement(output)) {
|
|
4137
|
-
Output =
|
|
4375
|
+
Output = (
|
|
4376
|
+
<CodeBlock
|
|
4377
|
+
className={compactCodeBlockClassName}
|
|
4378
|
+
code={JSON.stringify(output, null, 2)}
|
|
4379
|
+
language="json"
|
|
4380
|
+
/>
|
|
4381
|
+
);
|
|
4138
4382
|
} else if (typeof output === "string") {
|
|
4139
|
-
Output = <CodeBlock code={output} language="json" />;
|
|
4383
|
+
Output = <CodeBlock className={compactCodeBlockClassName} code={output} language="json" />;
|
|
4140
4384
|
}
|
|
4141
4385
|
|
|
4142
4386
|
return (
|
|
4143
|
-
<div
|
|
4144
|
-
|
|
4387
|
+
<div
|
|
4388
|
+
className={cn(
|
|
4389
|
+
"overflow-x-auto rounded-md text-xs [&_table]:w-full",
|
|
4390
|
+
errorText ? "bg-destructive/10 text-destructive" : "bg-muted/50 text-foreground",
|
|
4391
|
+
className,
|
|
4392
|
+
)}
|
|
4393
|
+
{...props}
|
|
4394
|
+
>
|
|
4395
|
+
<span className="block px-3 pt-3 font-sans text-[10px] text-muted-foreground uppercase tracking-wide">
|
|
4145
4396
|
{errorText ? "Error" : "Result"}
|
|
4146
|
-
</
|
|
4147
|
-
<div
|
|
4148
|
-
|
|
4149
|
-
"overflow-x-auto rounded-md text-xs [&_table]:w-full",
|
|
4150
|
-
errorText ? "bg-destructive/10 text-destructive" : "bg-muted/50 text-foreground",
|
|
4151
|
-
)}
|
|
4152
|
-
>
|
|
4153
|
-
{errorText && <div>{errorText}</div>}
|
|
4154
|
-
{Output}
|
|
4155
|
-
</div>
|
|
4397
|
+
</span>
|
|
4398
|
+
{errorText && <div className="px-3 pt-2 pb-3">{errorText}</div>}
|
|
4399
|
+
{Output}
|
|
4156
4400
|
</div>
|
|
4157
4401
|
);
|
|
4158
4402
|
};
|