@nervekit/desktop 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/app/startup-sequence.d.ts +28 -0
- package/dist/app/startup-sequence.d.ts.map +1 -0
- package/dist/app/startup-sequence.js +46 -0
- package/dist/app/startup-sequence.js.map +1 -0
- package/dist/main.js +56 -31
- package/dist/main.js.map +1 -1
- package/dist/settings/desktop-settings.d.ts +2 -1
- package/dist/settings/desktop-settings.d.ts.map +1 -1
- package/dist/settings/desktop-settings.js +7 -3
- package/dist/settings/desktop-settings.js.map +1 -1
- package/dist/window/initial-zoom.d.ts +3 -0
- package/dist/window/initial-zoom.d.ts.map +1 -0
- package/dist/window/initial-zoom.js +9 -0
- package/dist/window/initial-zoom.js.map +1 -0
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.d.ts +2 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.js +15 -10
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.operations.schema.d.ts +4 -0
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.operations.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.operations.schema.js +1 -0
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.operations.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.schema.d.ts +28 -2
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.schema.js +17 -2
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/events/bounded-public-data.schema.d.ts +2 -0
- package/node_modules/@nervekit/contracts/dist/domains/events/bounded-public-data.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/events/bounded-public-data.schema.js +5 -5
- package/node_modules/@nervekit/contracts/dist/domains/events/bounded-public-data.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/protocol/http.schema.d.ts +4 -0
- package/node_modules/@nervekit/contracts/dist/domains/protocol/http.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/protocol/messages.schema.d.ts +2 -0
- package/node_modules/@nervekit/contracts/dist/domains/protocol/messages.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/protocol/operation-catalog.schema.d.ts +5 -0
- package/node_modules/@nervekit/contracts/dist/domains/protocol/operation-catalog.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/package.json +1 -1
- package/node_modules/@nervekit/harness/dist/{agent.d.ts → agent/agent.d.ts} +2 -2
- package/node_modules/@nervekit/harness/dist/agent/agent.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{agent.js → agent/agent.js} +2 -2
- package/node_modules/@nervekit/harness/dist/agent/agent.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/agent-loop.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/agent-loop.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/loop/agent-loop.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/events.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/events.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/loop/events.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/stream-assistant.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/stream-assistant.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/stream-assistant.js +2 -2
- package/node_modules/@nervekit/harness/dist/agent/loop/stream-assistant.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/tool-execution.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/tool-execution.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/tool-execution.js +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/tool-execution.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/turn-loop.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/agent/loop/turn-loop.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/loop/turn-loop.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{suspension.d.ts → agent/suspension.d.ts} +1 -1
- package/node_modules/@nervekit/harness/dist/agent/suspension.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/suspension.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{tool-adapter.d.ts → agent/tool-adapter.d.ts} +1 -1
- package/node_modules/@nervekit/harness/dist/agent/tool-adapter.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/tool-adapter.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/agent.d.ts +83 -0
- package/node_modules/@nervekit/harness/dist/agent/types/agent.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/agent.js +2 -0
- package/node_modules/@nervekit/harness/dist/agent/types/agent.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/common.d.ts +26 -0
- package/node_modules/@nervekit/harness/dist/agent/types/common.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/common.js +2 -0
- package/node_modules/@nervekit/harness/dist/agent/types/common.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/index.d.ts +6 -0
- package/node_modules/@nervekit/harness/dist/agent/types/index.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/index.js +6 -0
- package/node_modules/@nervekit/harness/dist/agent/types/index.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{types.d.ts → agent/types/loop.d.ts} +5 -197
- package/node_modules/@nervekit/harness/dist/agent/types/loop.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/loop.js +2 -0
- package/node_modules/@nervekit/harness/dist/agent/types/loop.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/messages.d.ts +24 -0
- package/node_modules/@nervekit/harness/dist/agent/types/messages.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/messages.js +2 -0
- package/node_modules/@nervekit/harness/dist/agent/types/messages.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/tools.d.ts +74 -0
- package/node_modules/@nervekit/harness/dist/agent/types/tools.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/agent/types/tools.js +2 -0
- package/node_modules/@nervekit/harness/dist/agent/types/tools.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/agent-harness.d.ts +6 -5
- package/node_modules/@nervekit/harness/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/agent-harness.js +67 -191
- package/node_modules/@nervekit/harness/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/branch-summarization.d.ts +2 -2
- package/node_modules/@nervekit/harness/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/branch-summarization.js +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/types.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/types.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/usage.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/usage.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/utils.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/compaction/utils.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/{harness-configuration-methods.d.ts → configuration/operations.d.ts} +4 -4
- package/node_modules/@nervekit/harness/dist/harness/configuration/operations.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-configuration-methods.js → configuration/operations.js} +5 -5
- package/node_modules/@nervekit/harness/dist/harness/configuration/operations.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{options.d.ts → configuration/options.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/configuration/options.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/configuration/options.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/configuration/stream-options.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/configuration/stream-options.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{configuration.d.ts → configuration/tools.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/configuration/tools.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{configuration.js → configuration/tools.js} +2 -2
- package/node_modules/@nervekit/harness/dist/harness/configuration/tools.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{turn-state.d.ts → configuration/turn-state.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/configuration/turn-state.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/configuration/turn-state.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/conversation/context.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/context.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/conversation.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/conversation.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/entries.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/entries.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/jsonl-repo.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/jsonl-repo.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/jsonl-storage.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation/jsonl-storage.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/environment/nodejs.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/environment/nodejs.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/environment/types.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/environment/types.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-events.d.ts → lifecycle/event-hub.d.ts} +4 -4
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-hub.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-events.js → lifecycle/event-hub.js} +4 -4
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-hub.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-processing.d.ts +26 -0
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-processing.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-processing.js +52 -0
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/event-processing.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{events.d.ts → lifecycle/events.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/lifecycle/events.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{events.js.map → lifecycle/events.js.map} +1 -1
- package/node_modules/@nervekit/harness/dist/harness/{harness-maintenance.d.ts → maintenance/operations.d.ts} +5 -5
- package/node_modules/@nervekit/harness/dist/harness/maintenance/operations.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-maintenance.js → maintenance/operations.js} +6 -6
- package/node_modules/@nervekit/harness/dist/harness/maintenance/operations.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/messages.d.ts +2 -2
- package/node_modules/@nervekit/harness/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/harness/{utils/env-path.d.ts → path-utils.d.ts} +1 -1
- package/node_modules/@nervekit/harness/dist/harness/path-utils.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{utils/env-path.js → path-utils.js} +1 -1
- package/node_modules/@nervekit/harness/dist/harness/path-utils.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-queue-coalescing.d.ts → queue/coalescing.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/queue/coalescing.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-queue-coalescing.js → queue/coalescing.js} +2 -2
- package/node_modules/@nervekit/harness/dist/harness/queue/coalescing.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-queue-methods.d.ts → queue/operations.d.ts} +14 -4
- package/node_modules/@nervekit/harness/dist/harness/queue/operations.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-queue-methods.js → queue/operations.js} +35 -5
- package/node_modules/@nervekit/harness/dist/harness/queue/operations.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-invocations.d.ts → resources/invocations.d.ts} +4 -4
- package/node_modules/@nervekit/harness/dist/harness/resources/invocations.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-invocations.js → resources/invocations.js} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/resources/invocations.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{prompt-templates.d.ts → resources/prompt-templates.d.ts} +2 -2
- package/node_modules/@nervekit/harness/dist/harness/resources/prompt-templates.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{prompt-templates.js → resources/prompt-templates.js} +2 -2
- package/node_modules/@nervekit/harness/dist/harness/resources/prompt-templates.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/format.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/format.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/format.js +1 -1
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/format.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/index.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/index.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/loader.d.ts +2 -2
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/loader.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/loader.js +1 -1
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/loader.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/parser.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/parser.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/parser.js +1 -1
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/parser.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/validation.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/skills/validation.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/system-prompt.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/resources/system-prompt.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-continuation.d.ts → run/continuation.d.ts} +4 -4
- package/node_modules/@nervekit/harness/dist/harness/run/continuation.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{harness-continuation.js → run/continuation.js} +6 -6
- package/node_modules/@nervekit/harness/dist/harness/run/continuation.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/{conversation-writes.d.ts → run/conversation-writes.d.ts} +3 -3
- package/node_modules/@nervekit/harness/dist/harness/run/conversation-writes.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/run/conversation-writes.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/run/execution.d.ts +42 -0
- package/node_modules/@nervekit/harness/dist/harness/run/execution.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/run/execution.js +118 -0
- package/node_modules/@nervekit/harness/dist/harness/run/execution.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/harness/run/messages.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/harness/run/messages.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/index.d.ts +22 -13
- package/node_modules/@nervekit/harness/dist/index.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/index.js +22 -13
- package/node_modules/@nervekit/harness/dist/index.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/models/image-normalization.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/image-normalization.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/prompt-stream.d.ts +4 -0
- package/node_modules/@nervekit/harness/dist/models/prompt-stream.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/prompt-stream.js +23 -0
- package/node_modules/@nervekit/harness/dist/models/prompt-stream.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{pi-ai-models.d.ts → models/provider-registry.d.ts} +1 -1
- package/node_modules/@nervekit/harness/dist/models/provider-registry.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{pi-ai-models.js → models/provider-registry.js} +1 -1
- package/node_modules/@nervekit/harness/dist/models/provider-registry.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/resolution.d.ts +17 -0
- package/node_modules/@nervekit/harness/dist/models/resolution.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime.js → models/resolution.js} +5 -74
- package/node_modules/@nervekit/harness/dist/models/resolution.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/scripted-provider.d.ts +10 -0
- package/node_modules/@nervekit/harness/dist/models/scripted-provider.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/models/scripted-provider.js +55 -0
- package/node_modules/@nervekit/harness/dist/models/scripted-provider.js.map +1 -0
- package/node_modules/@nervekit/harness/dist/{runtime.d.ts → models/types.d.ts} +3 -23
- package/node_modules/@nervekit/harness/dist/models/types.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/{harness/env → models}/types.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/node.d.ts +1 -1
- package/node_modules/@nervekit/harness/dist/node.d.ts.map +1 -1
- package/node_modules/@nervekit/harness/dist/node.js +1 -1
- package/node_modules/@nervekit/harness/dist/node.js.map +1 -1
- package/node_modules/@nervekit/harness/dist/{proxy.d.ts → transport/proxy.d.ts} +1 -1
- package/node_modules/@nervekit/harness/dist/transport/proxy.d.ts.map +1 -0
- package/node_modules/@nervekit/harness/dist/transport/proxy.js.map +1 -0
- package/node_modules/@nervekit/harness/package.json +3 -3
- package/node_modules/@nervekit/host-runtime/dist/task-service.d.ts +1 -2
- package/node_modules/@nervekit/host-runtime/dist/task-service.d.ts.map +1 -1
- package/node_modules/@nervekit/host-runtime/dist/task-service.js +21 -6
- package/node_modules/@nervekit/host-runtime/dist/task-service.js.map +1 -1
- package/node_modules/@nervekit/host-runtime/package.json +4 -4
- package/node_modules/@nervekit/protocol/package.json +2 -2
- package/node_modules/@nervekit/tools/dist/execution/common/html-to-markdown.worker.d.ts +2 -0
- package/node_modules/@nervekit/tools/dist/execution/common/html-to-markdown.worker.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/html-to-markdown.worker.js +59 -0
- package/node_modules/@nervekit/tools/dist/execution/common/html-to-markdown.worker.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/isolated-html-to-markdown.d.ts +17 -0
- package/node_modules/@nervekit/tools/dist/execution/common/isolated-html-to-markdown.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/isolated-html-to-markdown.js +162 -0
- package/node_modules/@nervekit/tools/dist/execution/common/isolated-html-to-markdown.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/live-output.d.ts +15 -0
- package/node_modules/@nervekit/tools/dist/execution/common/live-output.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/live-output.js +47 -0
- package/node_modules/@nervekit/tools/dist/execution/common/live-output.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/output-budget.d.ts +5 -1
- package/node_modules/@nervekit/tools/dist/execution/common/output-budget.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/common/output-budget.js +24 -10
- package/node_modules/@nervekit/tools/dist/execution/common/output-budget.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/confluence/files.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/confluence/files.js +2 -2
- package/node_modules/@nervekit/tools/dist/execution/confluence/files.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/confluence/markdown.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/execution/confluence/markdown.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/confluence/markdown.js +6 -31
- package/node_modules/@nervekit/tools/dist/execution/confluence/markdown.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/index.d.ts +2 -1
- package/node_modules/@nervekit/tools/dist/execution/index.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/index.js +2 -1
- package/node_modules/@nervekit/tools/dist/execution/index.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/python.js +7 -12
- package/node_modules/@nervekit/tools/dist/execution/python/python.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/shell/bash.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/shell/bash.js +8 -13
- package/node_modules/@nervekit/tools/dist/execution/shell/bash.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/web/web-fetch.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/web/web-fetch.js +49 -4
- package/node_modules/@nervekit/tools/dist/execution/web/web-fetch.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/index.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/index.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/index.js +1 -1
- package/node_modules/@nervekit/tools/dist/index.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/runtime/dispatcher.js +3 -3
- package/node_modules/@nervekit/tools/dist/runtime/dispatcher.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/runtime/types.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/runtime/types.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/runtime/types.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/types.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/types.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/package.json +2 -2
- package/node_modules/@nervekit/workbench-server/dist/app/orchestrator-state.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/app/orchestrator-state.js +8 -0
- package/node_modules/@nervekit/workbench-server/dist/app/orchestrator-state.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/auto-compaction-runner.d.ts +5 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/auto-compaction-runner.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/auto-compaction-runner.js +10 -4
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/auto-compaction-runner.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-agent-mechanics.d.ts +3 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-agent-mechanics.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-agent-mechanics.js +7 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-agent-mechanics.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-harness-execution.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-harness-execution.js +2 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-harness-execution.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/auth/oauth-flow-manager.d.ts +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/auth/oauth-flow-manager.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/auth/oauth-flow-manager.js +5 -5
- package/node_modules/@nervekit/workbench-server/dist/domains/auth/oauth-flow-manager.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-lifecycle.service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-lifecycle.service.js +5 -3
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-lifecycle.service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-service.js +3 -3
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation.repository.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation.repository.js +5 -7
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation.repository.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/operations/compaction-service.d.ts +5 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/operations/compaction-service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/operations/compaction-service.js +210 -145
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/operations/compaction-service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/runs/run-transition.repository.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/runs/run-transition.repository.js +2 -3
- package/node_modules/@nervekit/workbench-server/dist/domains/runs/run-transition.repository.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-adapters.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-adapters.js +23 -4
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-adapters.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-service.d.ts +3 -3
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/live-tool-output-publisher.d.ts +17 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/live-tool-output-publisher.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/live-tool-output-publisher.js +75 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/live-tool-output-publisher.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher-handlers.d.ts +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher-handlers.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher-handlers.js +5 -31
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher-handlers.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher.d.ts +5 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher.js +15 -7
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/orchestration-tool-dispatcher.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call.repository.d.ts +17 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call.repository.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call.repository.js +44 -4
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call.repository.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-service.d.ts +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-service.js +16 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/usage/subscription-usage-service.d.ts +2 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/usage/subscription-usage-service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/usage/subscription-usage-service.js +9 -2
- package/node_modules/@nervekit/workbench-server/dist/domains/usage/subscription-usage-service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/diagnostics/logging.d.ts +1 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/diagnostics/logging.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/diagnostics/logging.js +20 -4
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/diagnostics/logging.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.d.ts +8 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.js +26 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/index-store/index-store.d.ts +2 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/index-store/index-store.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/index-store/index-store.js +49 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/index-store/index-store.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/json.d.ts +7 -3
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/json.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/json.js +67 -21
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/json.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/main.js +21 -14
- package/node_modules/@nervekit/workbench-server/dist/main.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/http-dispatcher.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/http-dispatcher.js +3 -11
- package/node_modules/@nervekit/workbench-server/dist/protocol/http-dispatcher.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handler-registry.d.ts +17 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handler-registry.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handler-registry.js +54 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handler-registry.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/conversation-agent-method-handlers.d.ts +505 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/conversation-agent-method-handlers.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/conversation-agent-method-handlers.js +88 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/conversation-agent-method-handlers.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/git-method-handlers.d.ts +433 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/git-method-handlers.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/git-method-handlers.js +24 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/git-method-handlers.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/interaction-method-handlers.d.ts +400 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/interaction-method-handlers.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/interaction-method-handlers.js +68 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/interaction-method-handlers.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/platform-method-handlers.d.ts +1099 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/platform-method-handlers.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/platform-method-handlers.js +127 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/platform-method-handlers.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/project-task-method-handlers.d.ts +910 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/project-task-method-handlers.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/project-task-method-handlers.js +82 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers/project-task-method-handlers.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers.d.ts +3 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers.js +18 -566
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/routes/auth-routes.js +1 -1
- package/node_modules/@nervekit/workbench-server/dist/routes/auth-routes.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.d.ts +13 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.js +72 -18
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/web/assets/{dist-CUNRgpDl.js → dist-CFWIYh0s.js} +1 -1
- package/node_modules/@nervekit/workbench-server/dist/web/assets/index-maZKRPqe.css +1 -0
- package/node_modules/@nervekit/workbench-server/dist/web/assets/{index-CEGKY4zN.js → index-uoIbQOdM.js} +145 -144
- package/node_modules/@nervekit/workbench-server/dist/web/index.html +31 -2
- package/node_modules/@nervekit/workbench-server/dist/web/sw.js +1 -1
- package/node_modules/@nervekit/workbench-server/package.json +5 -5
- package/package.json +8 -8
- package/node_modules/@nervekit/harness/dist/agent-loop.d.ts +0 -2
- package/node_modules/@nervekit/harness/dist/agent-loop.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/agent-loop.js +0 -2
- package/node_modules/@nervekit/harness/dist/agent-loop.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/agent.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/agent.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/configuration.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/configuration.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation-writes.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/conversation-writes.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/env/nodejs.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/env/nodejs.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/env/types.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/events.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-configuration-methods.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-configuration-methods.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-continuation.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-continuation.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-events.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-events.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-invocations.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-invocations.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-maintenance.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-maintenance.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-queue-coalescing.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-queue-coalescing.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-queue-methods.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/harness-queue-methods.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/options.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/options.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/prompt-templates.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/prompt-templates.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/format.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/format.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/index.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/index.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/loader.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/loader.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/parser.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/parser.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/validation.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills/validation.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills.d.ts +0 -2
- package/node_modules/@nervekit/harness/dist/harness/skills.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/skills.js +0 -2
- package/node_modules/@nervekit/harness/dist/harness/skills.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/stream-options.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/stream-options.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/system-prompt.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/system-prompt.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/turn-state.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/turn-state.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/types.d.ts +0 -9
- package/node_modules/@nervekit/harness/dist/harness/types.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/types.js +0 -8
- package/node_modules/@nervekit/harness/dist/harness/types.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/utils/env-path.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/harness/utils/env-path.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/pi-ai-models.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/pi-ai-models.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/proxy.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/proxy.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/image-normalization.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/image-normalization.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/agent-loop.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/agent-loop.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/events.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/events.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/index.d.ts +0 -6
- package/node_modules/@nervekit/harness/dist/runtime/loop/index.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/index.js +0 -6
- package/node_modules/@nervekit/harness/dist/runtime/loop/index.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/stream-assistant.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/stream-assistant.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/tool-execution.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/tool-execution.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/turn-loop.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime/loop/turn-loop.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/runtime.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/suspension.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/suspension.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/tool-adapter.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/tool-adapter.js.map +0 -1
- package/node_modules/@nervekit/harness/dist/types.d.ts.map +0 -1
- package/node_modules/@nervekit/harness/dist/types.js.map +0 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-runtime.d.ts +0 -114
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-runtime.d.ts.map +0 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-runtime.js +0 -452
- package/node_modules/@nervekit/workbench-server/dist/domains/conversations/conversation-runtime.js.map +0 -1
- package/node_modules/@nervekit/workbench-server/dist/web/assets/index-oDY02_0Y.css +0 -2
- /package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/agent-loop.js +0 -0
- /package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/events.js +0 -0
- /package/node_modules/@nervekit/harness/dist/{runtime → agent}/loop/turn-loop.js +0 -0
- /package/node_modules/@nervekit/harness/dist/{suspension.js → agent/suspension.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/{tool-adapter.js → agent/tool-adapter.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{options.js → configuration/options.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{stream-options.d.ts → configuration/stream-options.d.ts} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{stream-options.js → configuration/stream-options.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{turn-state.js → configuration/turn-state.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{env → environment}/nodejs.d.ts +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{env → environment}/nodejs.js +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{env → environment}/types.d.ts +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{env → environment}/types.js +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{events.js → lifecycle/events.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/index.d.ts +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/index.js +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/validation.d.ts +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{skills → resources/skills}/validation.js +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{system-prompt.d.ts → resources/system-prompt.d.ts} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{system-prompt.js → resources/system-prompt.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/harness/{conversation-writes.js → run/conversation-writes.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/{runtime → models}/image-normalization.d.ts +0 -0
- /package/node_modules/@nervekit/harness/dist/{runtime → models}/image-normalization.js +0 -0
- /package/node_modules/@nervekit/harness/dist/{types.js → models/types.js} +0 -0
- /package/node_modules/@nervekit/harness/dist/{proxy.js → transport/proxy.js} +0 -0
|
@@ -0,0 +1 @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I,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,WAAW,GAAmB,EAAE,CAAC;IACvC,MAAM,cAAc,GAAiB,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpD,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IACpC,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;IAEnC,MAAM,OAAO,CAAC,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventStream } from "@earendil-works/pi-ai";
|
|
2
|
-
import type { AgentEvent, AgentMessage } from "
|
|
2
|
+
import type { AgentEvent, AgentMessage } from "../types/index.js";
|
|
3
3
|
export type AgentEventSink = (event: AgentEvent) => Promise<void> | void;
|
|
4
4
|
export declare function createAgentStream(): EventStream<AgentEvent, AgentMessage[]>;
|
|
5
5
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/agent/loop/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAEzE,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,UAAU,EAAE,YAAY,EAAE,CAAC,CAK3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/agent/loop/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,IAAI,WAAW,CACpB,CAAC,KAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW,EACjD,CAAC,KAAiB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AssistantMessage } from "@earendil-works/pi-ai";
|
|
2
|
-
import type { AgentContext, AgentLoopConfig, StreamFn } from "
|
|
2
|
+
import type { AgentContext, AgentLoopConfig, StreamFn } from "../types/index.js";
|
|
3
3
|
import type { AgentEventSink } from "./events.js";
|
|
4
4
|
/**
|
|
5
5
|
* Stream an assistant response from the LLM.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-assistant.d.ts","sourceRoot":"","sources":["../../../src/agent/loop/stream-assistant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAW,MAAM,uBAAuB,CAAC;AAEvE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,IAAI,EAAE,cAAc,EACpB,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,gBAAgB,CAAC,CA4F3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { streamSimpleWithModel } from "../../
|
|
2
|
-
import { normalizeImagesForModel } from "
|
|
1
|
+
import { streamSimpleWithModel } from "../../models/provider-registry.js";
|
|
2
|
+
import { normalizeImagesForModel } from "../../models/image-normalization.js";
|
|
3
3
|
/**
|
|
4
4
|
* Stream an assistant response from the LLM.
|
|
5
5
|
* This is where AgentMessage[] gets transformed to Message[] for the LLM.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-assistant.js","sourceRoot":"","sources":["../../../src/agent/loop/stream-assistant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAM1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAG9E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAqB,EACrB,MAAuB,EACvB,MAA+B,EAC/B,IAAoB,EACpB,QAAmB;IAEnB,0EAA0E;IAC1E,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAChC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,QAAQ,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,kEAAkE;IAClE,MAAM,WAAW,GAAG,MAAM,uBAAuB,CAC/C,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,EACnC,MAAM,CAAC,KAAK,CACb,CAAC;IAEF,oBAAoB;IACpB,MAAM,UAAU,GAAY;QAC1B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,QAAQ,EAAE,WAAW;QACrB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC;IAEF,MAAM,cAAc,GAAG,QAAQ,IAAI,qBAAqB,CAAC;IAEz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,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IAC3D,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AssistantMessage, type ToolResultMessage } from "@earendil-works/pi-ai";
|
|
2
|
-
import type { AgentContext, AgentLoopConfig, AgentToolCall } from "
|
|
2
|
+
import type { AgentContext, AgentLoopConfig, AgentToolCall } from "../types/index.js";
|
|
3
3
|
import type { AgentEventSink } from "./events.js";
|
|
4
4
|
/**
|
|
5
5
|
* Execute tool calls from an assistant message.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-execution.d.ts","sourceRoot":"","sources":["../../../src/agent/loop/tool-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAEf,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,YAAY,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,qBAAqB,CAAC,CA2BhC;AAED,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAsB,0BAA0B,CAC9C,cAAc,EAAE,YAAY,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,aAAa,EAAE,EAC1B,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,IAAI,EAAE,cAAc,GACnB,OAAO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C,SAAmC,EACnC,IAAoB;IAEpB,MAAM,IAAI,CAAC;QACT,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;QACjC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI;QACjC,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,OAAO,EAAE,SAAS,CAAC,OAAO;KAC3B,CAAC,CAAC;AACL,CAAC;AAED,SAAS,uBAAuB,CAC9B,SAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;QACjC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI;QACjC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO;QACjC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO;QACjC,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,qBAAqB,CAClC,iBAAoC,EACpC,IAAoB;IAEpB,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAClE,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentContext, AgentLoopConfig, AgentMessage, StreamFn } from "
|
|
1
|
+
import type { AgentContext, AgentLoopConfig, AgentMessage, StreamFn } from "../types/index.js";
|
|
2
2
|
import type { AgentEventSink } from "./events.js";
|
|
3
3
|
/**
|
|
4
4
|
* Main loop logic shared by agentLoop and agentLoopContinue.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-loop.d.ts","sourceRoot":"","sources":["../../../src/agent/loop/turn-lo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9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suspension.js","sourceRoot":"","sources":["../../src/agent/suspension.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACnC,IAAI,GAAG,uBAAuB,CAAC;IAC/B,IAAI,CAA0B;IAEvC,YAAY,IAA6B;QACvC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,WAAW,CACT,KAKC;QAED,OAAO,IAAI,mBAAmB,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,UAAU,qBAAqB,CACnC,KAAc;IAEd,OAAO,CACL,KAAK,YAAY,mBAAmB;QACpC,OAAO,CACL,KAAK;YACL,OAAO,KAAK,KAAK,QAAQ;YACxB,KAA4B,CAAC,IAAI,KAAK,uBAAuB,CAC/D,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Static, TSchema } from "typebox";
|
|
2
|
-
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback, ToolExecutionMode } from "./types.js";
|
|
2
|
+
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback, ToolExecutionMode } from "./types/index.js";
|
|
3
3
|
export type AgentToolDefinitionLike<TParams extends TSchema = TSchema> = {
|
|
4
4
|
name: string;
|
|
5
5
|
label: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-adapter.d.ts","sourceRoot":"","sources":["../../src/agent/tool-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,uBAAuB,EACv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;IAErC,OAAO,WAAW;SACf,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC1E,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;QAC7C,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,OAAO,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CACtD,OAAO,CACL,UAAU,EACV,gBAAgB,EAChB,MAAiC,EACjC,MAAM,EACN,CAAC,MAAM,EAAE,EAAE;YACT,OAAO,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACpE,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC,CACF;KACJ,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { AssistantMessageEvent, ToolResultMessage } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { AnyModel, ThinkingLevel } from "./common.js";
|
|
3
|
+
import type { AgentMessage } from "./messages.js";
|
|
4
|
+
import type { AgentTool } from "./tools.js";
|
|
5
|
+
/**
|
|
6
|
+
* Public agent state.
|
|
7
|
+
*
|
|
8
|
+
* `tools` and `messages` use accessor properties so implementations can copy
|
|
9
|
+
* assigned arrays before storing them.
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentState {
|
|
12
|
+
/** System prompt sent with each model request. */
|
|
13
|
+
systemPrompt: string;
|
|
14
|
+
/** Active model used for future turns. */
|
|
15
|
+
model: AnyModel;
|
|
16
|
+
/** Requested reasoning level for future turns. */
|
|
17
|
+
thinkingLevel: ThinkingLevel;
|
|
18
|
+
/** Available tools. Assigning a new array copies the top-level array. */
|
|
19
|
+
set tools(tools: AgentTool[]);
|
|
20
|
+
get tools(): AgentTool[];
|
|
21
|
+
/** Conversation transcript. Assigning a new array copies the top-level array. */
|
|
22
|
+
set messages(messages: AgentMessage[]);
|
|
23
|
+
get messages(): AgentMessage[];
|
|
24
|
+
/**
|
|
25
|
+
* True while the agent is processing a prompt or continuation.
|
|
26
|
+
*
|
|
27
|
+
* This remains true until awaited `agent_end` listeners settle.
|
|
28
|
+
*/
|
|
29
|
+
readonly isStreaming: boolean;
|
|
30
|
+
/** Partial assistant message for the current streamed response, if any. */
|
|
31
|
+
readonly streamingMessage?: AgentMessage;
|
|
32
|
+
/** Tool call ids currently executing. */
|
|
33
|
+
readonly pendingToolCalls: ReadonlySet<string>;
|
|
34
|
+
/** Error message from the most recent failed or aborted assistant turn, if any. */
|
|
35
|
+
readonly errorMessage?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Events emitted by the Agent for UI updates.
|
|
39
|
+
*
|
|
40
|
+
* `agent_end` is the last event emitted for a run, but awaited `Agent.subscribe()`
|
|
41
|
+
* listeners for that event are still part of run settlement. The agent becomes
|
|
42
|
+
* idle only after those listeners finish.
|
|
43
|
+
*/
|
|
44
|
+
export type AgentEvent = {
|
|
45
|
+
type: "agent_start";
|
|
46
|
+
} | {
|
|
47
|
+
type: "agent_end";
|
|
48
|
+
messages: AgentMessage[];
|
|
49
|
+
} | {
|
|
50
|
+
type: "turn_start";
|
|
51
|
+
} | {
|
|
52
|
+
type: "turn_end";
|
|
53
|
+
message: AgentMessage;
|
|
54
|
+
toolResults: ToolResultMessage[];
|
|
55
|
+
} | {
|
|
56
|
+
type: "message_start";
|
|
57
|
+
message: AgentMessage;
|
|
58
|
+
} | {
|
|
59
|
+
type: "message_update";
|
|
60
|
+
message: AgentMessage;
|
|
61
|
+
assistantMessageEvent: AssistantMessageEvent;
|
|
62
|
+
} | {
|
|
63
|
+
type: "message_end";
|
|
64
|
+
message: AgentMessage;
|
|
65
|
+
} | {
|
|
66
|
+
type: "tool_execution_start";
|
|
67
|
+
toolCallId: string;
|
|
68
|
+
toolName: string;
|
|
69
|
+
args: unknown;
|
|
70
|
+
} | {
|
|
71
|
+
type: "tool_execution_update";
|
|
72
|
+
toolCallId: string;
|
|
73
|
+
toolName: string;
|
|
74
|
+
args: unknown;
|
|
75
|
+
partialResult: unknown;
|
|
76
|
+
} | {
|
|
77
|
+
type: "tool_execution_end";
|
|
78
|
+
toolCallId: string;
|
|
79
|
+
toolName: string;
|
|
80
|
+
result: unknown;
|
|
81
|
+
isError: boolean;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/agent/types/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,KAAK,EAAE,QAAQ,CAAC;IAChB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,yEAAyE;IACzE,IAAI,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;IAC9B,IAAI,KAAK,IAAI,SAAS,EAAE,CAAC;IACzB,iFAAiF;IACjF,IAAI,QAAQ,CAAC,QAAQ,EAAE,YAAY,EAAE,E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B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/agent/types/agent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for how tool calls from a single assistant message are executed.
|
|
4
|
+
*
|
|
5
|
+
* - "sequential": each tool call is prepared, executed, and finalized before the next one starts.
|
|
6
|
+
* - "parallel": tool calls are prepared sequentially, then allowed tools execute concurrently.
|
|
7
|
+
* `tool_execution_end` is emitted in tool completion order after each tool is finalized,
|
|
8
|
+
* while tool-result message artifacts are emitted later in assistant source order.
|
|
9
|
+
*/
|
|
10
|
+
export type ToolExecutionMode = "sequential" | "parallel";
|
|
11
|
+
/**
|
|
12
|
+
* Controls how many queued user messages are injected when the agent loop reaches a queue drain point.
|
|
13
|
+
*
|
|
14
|
+
* - "all": drain and inject every queued message at that point.
|
|
15
|
+
* - "one-at-a-time": drain and inject only the oldest queued message, leaving the rest queued for later drain points.
|
|
16
|
+
*/
|
|
17
|
+
export type QueueMode = "all" | "one-at-a-time";
|
|
18
|
+
/** Provider-agnostic model supported by the runtime. */
|
|
19
|
+
export type AnyModel = Model<Api>;
|
|
20
|
+
/**
|
|
21
|
+
* Thinking/reasoning level for models that support it.
|
|
22
|
+
* Note: "xhigh" and "max" are only supported by selected model families. Use model
|
|
23
|
+
* thinking-level metadata from @earendil-works/pi-ai to detect support for a concrete model.
|
|
24
|
+
*/
|
|
25
|
+
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
26
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/agent/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,eAAe,CAAC;AAEhD,wDAAwD;AACxD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/agent/types/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agent/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AssistantMessage, AssistantMessageEventStream, Context, Message, SimpleStreamOptions, ToolResultMessage } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { AnyModel, ThinkingLevel, ToolExecutionMode } from "./common.js";
|
|
3
|
+
import type { AgentMessage } from "./messages.js";
|
|
4
|
+
import type { AfterToolCallResult, AgentTool, AgentToolCall, AgentToolResult, BeforeToolCallResult } from "./tools.js";
|
|
3
5
|
/**
|
|
4
6
|
* Stream function used by the agent loop.
|
|
5
7
|
*
|
|
@@ -10,60 +12,6 @@ import type { Static, TSchema } from "typebox";
|
|
|
10
12
|
* final AssistantMessage with stopReason "error" or "aborted" and errorMessage.
|
|
11
13
|
*/
|
|
12
14
|
export type StreamFn = (model: AnyModel, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream | Promise<AssistantMessageEventStream>;
|
|
13
|
-
/**
|
|
14
|
-
* Configuration for how tool calls from a single assistant message are executed.
|
|
15
|
-
*
|
|
16
|
-
* - "sequential": each tool call is prepared, executed, and finalized before the next one starts.
|
|
17
|
-
* - "parallel": tool calls are prepared sequentially, then allowed tools execute concurrently.
|
|
18
|
-
* `tool_execution_end` is emitted in tool completion order after each tool is finalized,
|
|
19
|
-
* while tool-result message artifacts are emitted later in assistant source order.
|
|
20
|
-
*/
|
|
21
|
-
export type ToolExecutionMode = "sequential" | "parallel";
|
|
22
|
-
/**
|
|
23
|
-
* Controls how many queued user messages are injected when the agent loop reaches a queue drain point.
|
|
24
|
-
*
|
|
25
|
-
* - "all": drain and inject every queued message at that point.
|
|
26
|
-
* - "one-at-a-time": drain and inject only the oldest queued message, leaving the rest queued for later drain points.
|
|
27
|
-
*/
|
|
28
|
-
export type QueueMode = "all" | "one-at-a-time";
|
|
29
|
-
/** Provider-agnostic model supported by the runtime. */
|
|
30
|
-
export type AnyModel = Model<Api>;
|
|
31
|
-
/** A single tool call content block emitted by an assistant message. */
|
|
32
|
-
export type AgentToolCall = Extract<AssistantMessage["content"][number], {
|
|
33
|
-
type: "toolCall";
|
|
34
|
-
}>;
|
|
35
|
-
/**
|
|
36
|
-
* Result returned from `beforeToolCall`.
|
|
37
|
-
*
|
|
38
|
-
* Returning `{ block: true }` prevents the tool from executing. The loop emits an error tool result instead.
|
|
39
|
-
* `reason` becomes the text shown in that error result. If omitted, a default blocked message is used.
|
|
40
|
-
*/
|
|
41
|
-
export interface BeforeToolCallResult {
|
|
42
|
-
block?: boolean;
|
|
43
|
-
reason?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Partial override returned from `afterToolCall`.
|
|
47
|
-
*
|
|
48
|
-
* Merge semantics are field-by-field:
|
|
49
|
-
* - `content`: if provided, replaces the tool result content array in full
|
|
50
|
-
* - `details`: if provided, replaces the tool result details value in full
|
|
51
|
-
* - `isError`: if provided, replaces the tool result error flag
|
|
52
|
-
* - `terminate`: if provided, replaces the early-termination hint
|
|
53
|
-
*
|
|
54
|
-
* Omitted fields keep the original executed tool result values.
|
|
55
|
-
* There is no deep merge for `content` or `details`.
|
|
56
|
-
*/
|
|
57
|
-
export interface AfterToolCallResult {
|
|
58
|
-
content?: (TextContent | ImageContent)[];
|
|
59
|
-
details?: unknown;
|
|
60
|
-
isError?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Hint that the agent should stop after the current tool batch.
|
|
63
|
-
* Early termination only happens when every finalized tool result in the batch sets this to true.
|
|
64
|
-
*/
|
|
65
|
-
terminate?: boolean;
|
|
66
|
-
}
|
|
67
15
|
/** Context passed to `beforeToolCall`. */
|
|
68
16
|
export interface BeforeToolCallContext {
|
|
69
17
|
/** The assistant message that requested the tool call. */
|
|
@@ -245,100 +193,6 @@ export interface AgentLoopConfig extends SimpleStreamOptions {
|
|
|
245
193
|
*/
|
|
246
194
|
afterToolCall?: (context: AfterToolCallContext, signal?: AbortSignal) => Promise<AfterToolCallResult | undefined>;
|
|
247
195
|
}
|
|
248
|
-
/**
|
|
249
|
-
* Thinking/reasoning level for models that support it.
|
|
250
|
-
* Note: "xhigh" and "max" are only supported by selected model families. Use model
|
|
251
|
-
* thinking-level metadata from @earendil-works/pi-ai to detect support for a concrete model.
|
|
252
|
-
*/
|
|
253
|
-
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
254
|
-
/**
|
|
255
|
-
* Extensible interface for custom app messages.
|
|
256
|
-
* Apps can extend via declaration merging:
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* ```typescript
|
|
260
|
-
* declare module "@mariozechner/agent" {
|
|
261
|
-
* interface CustomAgentMessages {
|
|
262
|
-
* artifact: ArtifactMessage;
|
|
263
|
-
* notification: NotificationMessage;
|
|
264
|
-
* }
|
|
265
|
-
* }
|
|
266
|
-
* ```
|
|
267
|
-
*/
|
|
268
|
-
export interface CustomAgentMessages {
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* AgentMessage: Union of LLM messages + custom messages.
|
|
272
|
-
* This abstraction allows apps to add custom message types while maintaining
|
|
273
|
-
* type safety and compatibility with the base LLM messages.
|
|
274
|
-
*/
|
|
275
|
-
export type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessages];
|
|
276
|
-
/**
|
|
277
|
-
* Public agent state.
|
|
278
|
-
*
|
|
279
|
-
* `tools` and `messages` use accessor properties so implementations can copy
|
|
280
|
-
* assigned arrays before storing them.
|
|
281
|
-
*/
|
|
282
|
-
export interface AgentState {
|
|
283
|
-
/** System prompt sent with each model request. */
|
|
284
|
-
systemPrompt: string;
|
|
285
|
-
/** Active model used for future turns. */
|
|
286
|
-
model: AnyModel;
|
|
287
|
-
/** Requested reasoning level for future turns. */
|
|
288
|
-
thinkingLevel: ThinkingLevel;
|
|
289
|
-
/** Available tools. Assigning a new array copies the top-level array. */
|
|
290
|
-
set tools(tools: AgentTool[]);
|
|
291
|
-
get tools(): AgentTool[];
|
|
292
|
-
/** Conversation transcript. Assigning a new array copies the top-level array. */
|
|
293
|
-
set messages(messages: AgentMessage[]);
|
|
294
|
-
get messages(): AgentMessage[];
|
|
295
|
-
/**
|
|
296
|
-
* True while the agent is processing a prompt or continuation.
|
|
297
|
-
*
|
|
298
|
-
* This remains true until awaited `agent_end` listeners settle.
|
|
299
|
-
*/
|
|
300
|
-
readonly isStreaming: boolean;
|
|
301
|
-
/** Partial assistant message for the current streamed response, if any. */
|
|
302
|
-
readonly streamingMessage?: AgentMessage;
|
|
303
|
-
/** Tool call ids currently executing. */
|
|
304
|
-
readonly pendingToolCalls: ReadonlySet<string>;
|
|
305
|
-
/** Error message from the most recent failed or aborted assistant turn, if any. */
|
|
306
|
-
readonly errorMessage?: string;
|
|
307
|
-
}
|
|
308
|
-
/** Final or partial result produced by a tool. */
|
|
309
|
-
export interface AgentToolResult<T> {
|
|
310
|
-
/** Text or image content returned to the model. */
|
|
311
|
-
content: (TextContent | ImageContent)[];
|
|
312
|
-
/** Arbitrary structured details for logs or UI rendering. */
|
|
313
|
-
details: T;
|
|
314
|
-
/**
|
|
315
|
-
* Hint that the agent should stop after the current tool batch.
|
|
316
|
-
* Early termination only happens when every finalized tool result in the batch sets this to true.
|
|
317
|
-
*/
|
|
318
|
-
terminate?: boolean;
|
|
319
|
-
}
|
|
320
|
-
/** Callback used by tools to stream partial execution updates. */
|
|
321
|
-
export type AgentToolUpdateCallback<T = unknown> = (partialResult: AgentToolResult<T>) => void;
|
|
322
|
-
/** Tool definition used by the agent runtime. */
|
|
323
|
-
export interface AgentTool<TParameters extends TSchema = TSchema, TDetails = unknown> extends Tool<TParameters> {
|
|
324
|
-
/** Human-readable label for UI display. */
|
|
325
|
-
label: string;
|
|
326
|
-
/**
|
|
327
|
-
* Optional compatibility shim for raw tool-call arguments before schema validation.
|
|
328
|
-
* Must return an object that matches `TParameters`.
|
|
329
|
-
*/
|
|
330
|
-
prepareArguments?: (args: unknown) => Static<TParameters>;
|
|
331
|
-
/** Execute the tool call. Throw on failure instead of encoding errors in `content`. */
|
|
332
|
-
execute: (toolCallId: string, params: Static<TParameters>, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<TDetails>) => Promise<AgentToolResult<TDetails>>;
|
|
333
|
-
/**
|
|
334
|
-
* Per-tool execution mode override.
|
|
335
|
-
* - "sequential": this tool must execute one at a time with other tool calls.
|
|
336
|
-
* - "parallel": this tool can execute concurrently with other tool calls.
|
|
337
|
-
*
|
|
338
|
-
* If omitted, the default execution mode applies.
|
|
339
|
-
*/
|
|
340
|
-
executionMode?: ToolExecutionMode;
|
|
341
|
-
}
|
|
342
196
|
/** Context snapshot passed into the low-level agent loop. */
|
|
343
197
|
export interface AgentContext {
|
|
344
198
|
/** System prompt included with the request. */
|
|
@@ -348,50 +202,4 @@ export interface AgentContext {
|
|
|
348
202
|
/** Tools available for this run. */
|
|
349
203
|
tools?: AgentTool[];
|
|
350
204
|
}
|
|
351
|
-
|
|
352
|
-
* Events emitted by the Agent for UI updates.
|
|
353
|
-
*
|
|
354
|
-
* `agent_end` is the last event emitted for a run, but awaited `Agent.subscribe()`
|
|
355
|
-
* listeners for that event are still part of run settlement. The agent becomes
|
|
356
|
-
* idle only after those listeners finish.
|
|
357
|
-
*/
|
|
358
|
-
export type AgentEvent = {
|
|
359
|
-
type: "agent_start";
|
|
360
|
-
} | {
|
|
361
|
-
type: "agent_end";
|
|
362
|
-
messages: AgentMessage[];
|
|
363
|
-
} | {
|
|
364
|
-
type: "turn_start";
|
|
365
|
-
} | {
|
|
366
|
-
type: "turn_end";
|
|
367
|
-
message: AgentMessage;
|
|
368
|
-
toolResults: ToolResultMessage[];
|
|
369
|
-
} | {
|
|
370
|
-
type: "message_start";
|
|
371
|
-
message: AgentMessage;
|
|
372
|
-
} | {
|
|
373
|
-
type: "message_update";
|
|
374
|
-
message: AgentMessage;
|
|
375
|
-
assistantMessageEvent: AssistantMessageEvent;
|
|
376
|
-
} | {
|
|
377
|
-
type: "message_end";
|
|
378
|
-
message: AgentMessage;
|
|
379
|
-
} | {
|
|
380
|
-
type: "tool_execution_start";
|
|
381
|
-
toolCallId: string;
|
|
382
|
-
toolName: string;
|
|
383
|
-
args: unknown;
|
|
384
|
-
} | {
|
|
385
|
-
type: "tool_execution_update";
|
|
386
|
-
toolCallId: string;
|
|
387
|
-
toolName: string;
|
|
388
|
-
args: unknown;
|
|
389
|
-
partialResult: unknown;
|
|
390
|
-
} | {
|
|
391
|
-
type: "tool_execution_end";
|
|
392
|
-
toolCallId: string;
|
|
393
|
-
toolName: string;
|
|
394
|
-
result: unknown;
|
|
395
|
-
isError: boolean;
|
|
396
|
-
};
|
|
397
|
-
//# sourceMappingURL=types.d.ts.map
|
|
205
|
+
//# sourceMappingURL=loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/agent/types/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,OAAO,EACP,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,eAAe,EACf,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,mBAAmB,KAC1B,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAExE,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,+DAA+D;IAC/D,QAAQ,EAAE,aAAa,CAAC;IACxB,2DAA2D;IAC3D,IAAI,EAAE,OAAO,CAAC;IACd,mEAAmE;IACnE,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,gBAAgB,EAAE,gBAA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 +1,24 @@
|
|
|
1
|
+
import type { Message } from "@earendil-works/pi-ai";
|
|
2
|
+
/**
|
|
3
|
+
* Extensible interface for custom app messages.
|
|
4
|
+
* Apps can extend via declaration merging:
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* declare module "@mariozechner/agent" {
|
|
9
|
+
* interface CustomAgentMessages {
|
|
10
|
+
* artifact: ArtifactMessage;
|
|
11
|
+
* notification: NotificationMessage;
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export interface CustomAgentMessages {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* AgentMessage: Union of LLM messages + custom messages.
|
|
20
|
+
* This abstraction allows apps to add custom message types while maintaining
|
|
21
|
+
* type safety and compatibility with the base LLM messages.
|
|
22
|
+
*/
|
|
23
|
+
export type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessages];
|
|
24
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/agent/types/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,mBAAmB;CAEnC;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,mBAAmB,CAAC,MAAM,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/agent/types/messages.ts"],"names":[],"mappings":""}
|