@nervekit/desktop 0.11.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 +166 -135
- package/dist/app/run-runtime-recovery.d.ts +1 -0
- package/dist/app/run-runtime-recovery.d.ts.map +1 -1
- package/dist/app/run-runtime-recovery.js +23 -1
- package/dist/app/run-runtime-recovery.js.map +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/agents/agent.operations.schema.d.ts +1 -1
- 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.events.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.events.schema.js +5 -1
- package/node_modules/@nervekit/contracts/dist/domains/conversations/conversation-runtime.events.schema.js.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 +24 -5
- package/node_modules/@nervekit/contracts/dist/domains/protocol/operation-catalog.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.operations.schema.d.ts +12 -3
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.operations.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.schema.d.ts +8 -2
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.schema.js +13 -2
- package/node_modules/@nervekit/contracts/dist/domains/settings/settings.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.operations.schema.d.ts +5 -0
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.operations.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.schema.d.ts +5 -0
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.schema.js +1 -0
- package/node_modules/@nervekit/contracts/dist/domains/skills/skill.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/status/status.schema.d.ts +0 -2
- package/node_modules/@nervekit/contracts/dist/domains/status/status.schema.d.ts.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/status/status.schema.js +1 -8
- package/node_modules/@nervekit/contracts/dist/domains/status/status.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/tools/records.schema.d.ts +5 -5
- package/node_modules/@nervekit/contracts/dist/domains/tools/records.schema.js +2 -2
- package/node_modules/@nervekit/contracts/dist/domains/tools/records.schema.js.map +1 -1
- package/node_modules/@nervekit/contracts/dist/domains/tools/tool.operations.schema.d.ts +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/run-unit-of-work.d.ts.map +1 -1
- package/node_modules/@nervekit/host-runtime/dist/run-unit-of-work.js +18 -1
- package/node_modules/@nervekit/host-runtime/dist/run-unit-of-work.js.map +1 -1
- 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/catalog/core/python.tools.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/catalog/core/python.tools.js +6 -6
- package/node_modules/@nervekit/tools/dist/catalog/core/python.tools.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/catalog/core/shell.tools.d.ts +1 -0
- package/node_modules/@nervekit/tools/dist/catalog/core/shell.tools.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/catalog/core/shell.tools.js +3 -0
- package/node_modules/@nervekit/tools/dist/catalog/core/shell.tools.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/common/command-cwd.d.ts +2 -0
- package/node_modules/@nervekit/tools/dist/execution/common/command-cwd.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/execution/common/command-cwd.js +23 -0
- package/node_modules/@nervekit/tools/dist/execution/common/command-cwd.js.map +1 -0
- 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/common/process-result.js +1 -1
- package/node_modules/@nervekit/tools/dist/execution/common/process-result.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/common/process-tree.d.ts +8 -2
- package/node_modules/@nervekit/tools/dist/execution/common/process-tree.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/common/process-tree.js +63 -14
- package/node_modules/@nervekit/tools/dist/execution/common/process-tree.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/filesystem/find.js +3 -2
- package/node_modules/@nervekit/tools/dist/execution/filesystem/find.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/index.d.ts +3 -1
- package/node_modules/@nervekit/tools/dist/execution/index.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/index.js +3 -1
- package/node_modules/@nervekit/tools/dist/execution/index.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/python.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/python.js +35 -29
- package/node_modules/@nervekit/tools/dist/execution/python/python.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/runtime.d.ts +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/runtime.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/execution/python/runtime.js +6 -29
- package/node_modules/@nervekit/tools/dist/execution/python/runtime.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 +30 -24
- 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/git/git-branches.d.ts +7 -0
- package/node_modules/@nervekit/tools/dist/git/git-branches.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-branches.js +51 -52
- package/node_modules/@nervekit/tools/dist/git/git-branches.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-command.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-command.js +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-command.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-github-service.d.ts +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-github-service.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-github-service.js +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-github-service.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-observability.d.ts +21 -0
- package/node_modules/@nervekit/tools/dist/git/git-observability.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-observability.js +2 -0
- package/node_modules/@nervekit/tools/dist/git/git-observability.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-overview.d.ts +6 -0
- package/node_modules/@nervekit/tools/dist/git/git-overview.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-overview.js +94 -0
- package/node_modules/@nervekit/tools/dist/git/git-overview.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-repository-metadata.d.ts +21 -0
- package/node_modules/@nervekit/tools/dist/git/git-repository-metadata.d.ts.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-repository-metadata.js +59 -0
- package/node_modules/@nervekit/tools/dist/git/git-repository-metadata.js.map +1 -0
- package/node_modules/@nervekit/tools/dist/git/git-service.d.ts +14 -5
- package/node_modules/@nervekit/tools/dist/git/git-service.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/git/git-service.js +97 -109
- package/node_modules/@nervekit/tools/dist/git/git-service.js.map +1 -1
- package/node_modules/@nervekit/tools/dist/index.d.ts +2 -1
- package/node_modules/@nervekit/tools/dist/index.d.ts.map +1 -1
- package/node_modules/@nervekit/tools/dist/index.js +2 -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 +2 -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 +2 -0
- 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 +39 -2
- package/node_modules/@nervekit/workbench-server/dist/app/orchestrator-state.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/agent-lifecycle.service.d.ts +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/agent-lifecycle.service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/agent-lifecycle.service.js +37 -5
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/agent-lifecycle.service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/agent-browser-skills.d.ts +16 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/agent-browser-skills.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/agent-browser-skills.js +137 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/agent-browser-skills.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/resource-loader.d.ts +3 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/resource-loader.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/resource-loader.js +11 -4
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/prompting/resource-loader.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/subagent-runner.d.ts +3 -3
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/subagent-runner.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/subagent-runner.js +2 -5
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/subagent-runner.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/system-prompt-builder.d.ts +3 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/system-prompt-builder.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/system-prompt-builder.js +2 -0
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/system-prompt-builder.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/agents/run/workbench-agent-mechanics.d.ts +5 -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 +8 -3
- 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 +5 -2
- 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 +1 -0
- 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 +12 -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/runs/workbench-run.service.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/runs/workbench-run.service.js +5 -2
- package/node_modules/@nervekit/workbench-server/dist/domains/runs/workbench-run.service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/task-supervisor.js +4 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/task-supervisor.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tasks/workbench-task-adapters.d.ts +4 -0
- 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 +28 -7
- 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 +7 -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/tasks/workbench-task-service.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/agent-tool-adapter.js +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/agent-tool-adapter.js.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 +29 -15
- 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/policy.js +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/policy.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call-transcript-preview.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call-transcript-preview.js +2 -1
- package/node_modules/@nervekit/workbench-server/dist/domains/tools/tool-call-transcript-preview.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 +2 -1
- 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/log-migration.js +3 -3
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/log-migration.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.d.ts +12 -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 +74 -19
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log-registry.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log.d.ts +9 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log.js +85 -62
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/events/stream-log.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/file-mutations.d.ts +20 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/file-mutations.d.ts.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/file-mutations.js +99 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/file-mutations.js.map +1 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/index.d.ts +1 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/index.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/index.js +1 -0
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/index.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/initialize.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/initialize.js +43 -2
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/initialize.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 +84 -90
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/json.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/legacy-home-migration.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/legacy-home-migration.js +4 -3
- package/node_modules/@nervekit/workbench-server/dist/infrastructure/storage/legacy-home-migration.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/main.js +32 -14
- package/node_modules/@nervekit/workbench-server/dist/main.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/file-idempotency-store.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/protocol/file-idempotency-store.js +3 -2
- package/node_modules/@nervekit/workbench-server/dist/protocol/file-idempotency-store.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 -565
- package/node_modules/@nervekit/workbench-server/dist/protocol/method-handlers.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/routes/agent-routes.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/routes/agent-routes.js +2 -0
- package/node_modules/@nervekit/workbench-server/dist/routes/agent-routes.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-composition.d.ts +2 -0
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-composition.d.ts.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-composition.js +24 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-composition.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.d.ts +15 -2
- 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 +74 -19
- package/node_modules/@nervekit/workbench-server/dist/runtime/runtime-registry.js.map +1 -1
- package/node_modules/@nervekit/workbench-server/dist/web/assets/{dist-CzAenP9m.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-uoIbQOdM.js +261 -0
- 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-5CMVpr1y.js +0 -260
- package/node_modules/@nervekit/workbench-server/dist/web/assets/index-CtD2pS6K.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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { numberArg } from "../common/args.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveCommandCwd } from "../common/command-cwd.js";
|
|
4
|
+
import { LiveOutputDelivery } from "../common/live-output.js";
|
|
4
5
|
import { forceKillProcessTree } from "../common/process-tree.js";
|
|
5
6
|
import { buildProcessResult } from "../common/process-result.js";
|
|
6
7
|
import { resolveBashShellConfig } from "./shell-config.js";
|
|
@@ -19,6 +20,7 @@ export async function executeBash(args, context) {
|
|
|
19
20
|
if (typeof args.command !== "string" || args.command.trim().length === 0) {
|
|
20
21
|
throw new Error("Tool argument 'command' must be a non-empty string.");
|
|
21
22
|
}
|
|
23
|
+
const cwd = await resolveCommandCwd(context.cwd, args.cwd);
|
|
22
24
|
const timeoutSeconds = typeof args.timeout === "number"
|
|
23
25
|
? Math.max(0, numberArg(args.timeout, 0))
|
|
24
26
|
: undefined;
|
|
@@ -35,12 +37,13 @@ export async function executeBash(args, context) {
|
|
|
35
37
|
shellPath: context.shellPath,
|
|
36
38
|
});
|
|
37
39
|
const child = spawn(shellConfig.shell, [...shellConfig.args, args.command], {
|
|
38
|
-
cwd
|
|
40
|
+
cwd,
|
|
39
41
|
detached: process.platform !== "win32",
|
|
40
42
|
env: nonInteractiveShellEnv(),
|
|
41
43
|
stdio: ["ignore", "pipe", "pipe"],
|
|
42
44
|
windowsHide: true,
|
|
43
45
|
});
|
|
46
|
+
const liveOutput = new LiveOutputDelivery(context.onUpdate);
|
|
44
47
|
let settled = false;
|
|
45
48
|
let timedOut = false;
|
|
46
49
|
let timeoutKilled = false;
|
|
@@ -53,26 +56,30 @@ export async function executeBash(args, context) {
|
|
|
53
56
|
clearTimeout(forceKillTimeout);
|
|
54
57
|
context.signal?.removeEventListener("abort", onAbort);
|
|
55
58
|
};
|
|
56
|
-
const
|
|
59
|
+
const killPosix = (signal) => {
|
|
57
60
|
try {
|
|
58
|
-
if (
|
|
61
|
+
if (child.pid)
|
|
59
62
|
process.kill(-child.pid, signal);
|
|
60
|
-
|
|
61
|
-
else {
|
|
63
|
+
else
|
|
62
64
|
child.kill(signal);
|
|
63
|
-
}
|
|
64
65
|
}
|
|
65
66
|
catch {
|
|
66
67
|
child.kill(signal);
|
|
67
68
|
}
|
|
68
69
|
};
|
|
70
|
+
const rejectTerminationFailure = (error) => {
|
|
71
|
+
if (settled)
|
|
72
|
+
return;
|
|
73
|
+
settled = true;
|
|
74
|
+
cleanup();
|
|
75
|
+
reject(new Error(`Failed to terminate command process tree: ${error instanceof Error ? error.message : String(error)}`));
|
|
76
|
+
};
|
|
69
77
|
const onAbort = () => {
|
|
70
78
|
if (settled)
|
|
71
79
|
return;
|
|
72
|
-
forceKillProcessTree(child);
|
|
73
80
|
settled = true;
|
|
74
81
|
cleanup();
|
|
75
|
-
reject(new Error("Command aborted."));
|
|
82
|
+
void forceKillProcessTree(child).then(() => reject(new Error("Command aborted.")), () => reject(new Error("Command aborted after process termination failed.")));
|
|
76
83
|
};
|
|
77
84
|
context.signal?.addEventListener("abort", onAbort, { once: true });
|
|
78
85
|
if (timeoutSeconds !== undefined && timeoutSeconds > 0) {
|
|
@@ -81,30 +88,27 @@ export async function executeBash(args, context) {
|
|
|
81
88
|
return;
|
|
82
89
|
timedOut = true;
|
|
83
90
|
timeoutKilled = true;
|
|
84
|
-
|
|
91
|
+
if (process.platform === "win32") {
|
|
92
|
+
void forceKillProcessTree(child).catch(rejectTerminationFailure);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
killPosix("SIGTERM");
|
|
85
96
|
forceKillTimeout = setTimeout(() => {
|
|
86
|
-
if (!settled)
|
|
87
|
-
|
|
97
|
+
if (!settled) {
|
|
98
|
+
void forceKillProcessTree(child).catch(rejectTerminationFailure);
|
|
99
|
+
}
|
|
88
100
|
}, FORCE_KILL_AFTER_MS);
|
|
89
101
|
}, timeoutSeconds * 1000);
|
|
90
102
|
}
|
|
91
103
|
child.stdout?.on("data", (chunk) => {
|
|
92
104
|
stdoutChunks.push(chunk);
|
|
93
105
|
combinedChunks.push(chunk);
|
|
94
|
-
|
|
95
|
-
kind: "output",
|
|
96
|
-
stream: "stdout",
|
|
97
|
-
chunk: boundLiveOutputChunk(chunk.toString("utf8")),
|
|
98
|
-
});
|
|
106
|
+
liveOutput.write("stdout", chunk, child.stdout ?? undefined);
|
|
99
107
|
});
|
|
100
108
|
child.stderr?.on("data", (chunk) => {
|
|
101
109
|
stderrChunks.push(chunk);
|
|
102
110
|
combinedChunks.push(chunk);
|
|
103
|
-
|
|
104
|
-
kind: "output",
|
|
105
|
-
stream: "stderr",
|
|
106
|
-
chunk: boundLiveOutputChunk(chunk.toString("utf8")),
|
|
107
|
-
});
|
|
111
|
+
liveOutput.write("stderr", chunk, child.stderr ?? undefined);
|
|
108
112
|
});
|
|
109
113
|
child.on("error", (error) => {
|
|
110
114
|
if (settled)
|
|
@@ -118,14 +122,16 @@ export async function executeBash(args, context) {
|
|
|
118
122
|
return;
|
|
119
123
|
settled = true;
|
|
120
124
|
cleanup();
|
|
121
|
-
void
|
|
125
|
+
void liveOutput
|
|
126
|
+
.end()
|
|
127
|
+
.then(() => buildResult(stdoutChunks, stderrChunks, combinedChunks, code, signal, context.dataDir, {
|
|
122
128
|
durationMs: Math.round(performance.now() - startedAt),
|
|
123
129
|
timedOut,
|
|
124
130
|
timeoutKilled,
|
|
125
131
|
timeoutMessage: timeoutSeconds !== undefined
|
|
126
132
|
? `Command timed out after ${timeoutSeconds}s and ${timeoutKilled ? "was killed" : "was not killed"}.`
|
|
127
133
|
: undefined,
|
|
128
|
-
})
|
|
134
|
+
}))
|
|
129
135
|
.then(resolve)
|
|
130
136
|
.catch(reject);
|
|
131
137
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash.js","sourceRoot":"","sources":["../../../src/execution/shell/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bash.js","sourceRoot":"","sources":["../../../src/execution/shell/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC,SAAS,sBAAsB;IAC7B,OAAO;QACL,GAAG,OAAO,CAAC,GAAG;QACd,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,mBAAmB,EAAE,GAAG;QACxB,IAAI,EAAE,MAAM;QACZ,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,IAA6B,EAC7B,OAA6B;IAE7B,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAA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,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,WAAW,CACxB,YAAsB,EACtB,YAAsB,EACtB,cAAwB,EACxB,IAAmB,EACnB,MAA6B,EAC7B,OAA2B,EAC3B,UAKI,EAAE;IAEN,OAAO,kBAAkB,CAAC;QACxB,YAAY;QACZ,YAAY;QACZ,cAAc;QACd,IAAI;QACJ,MAAM;QACN,gBAAgB,EAAE,YAAY;QAC9B,iBAAiB,EAAE,SAAS;QAC5B,OAAO;QACP,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-fetch.d.ts","sourceRoot":"","sources":["../../../src/execution/web/web-fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web-fetch.d.ts","sourceRoot":"","sources":["../../../src/execution/web/web-fetch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAmLhF,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAgG9B"}
|
|
@@ -2,9 +2,11 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import {
|
|
5
|
+
import { HTML_CONVERSION_MAX_INPUT_BYTES, HTML_CONVERSION_TIMEOUT_MS, isolatedHtmlToMarkdown, } from "../common/isolated-html-to-markdown.js";
|
|
6
|
+
import { ToolExecutionError } from "../common/tool-error.js";
|
|
6
7
|
import { formatByteSize } from "../common/truncate.js";
|
|
7
8
|
const MAX_INLINE_BYTES = 512 * 1024;
|
|
9
|
+
const MAX_RESPONSE_BYTES = HTML_CONVERSION_MAX_INPUT_BYTES;
|
|
8
10
|
const CONTENT_TYPE_EXT = {
|
|
9
11
|
"text/html": ".html",
|
|
10
12
|
"text/plain": ".txt",
|
|
@@ -91,6 +93,44 @@ function timeoutSignal(signal, milliseconds) {
|
|
|
91
93
|
const timeout = AbortSignal.timeout(milliseconds);
|
|
92
94
|
return signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
93
95
|
}
|
|
96
|
+
async function readBoundedResponse(response, signal) {
|
|
97
|
+
const declaredLength = Number(response.headers.get("content-length"));
|
|
98
|
+
if (Number.isFinite(declaredLength) && declaredLength > MAX_RESPONSE_BYTES) {
|
|
99
|
+
await response.body?.cancel().catch(() => undefined);
|
|
100
|
+
throw new ToolExecutionError("WEB_FETCH_RESPONSE_TOO_LARGE", `Response exceeds the ${formatByteSize(MAX_RESPONSE_BYTES)} download limit.`);
|
|
101
|
+
}
|
|
102
|
+
if (!response.body)
|
|
103
|
+
return Buffer.alloc(0);
|
|
104
|
+
const reader = response.body.getReader();
|
|
105
|
+
const chunks = [];
|
|
106
|
+
let size = 0;
|
|
107
|
+
const onAbort = () => void reader.cancel().catch(() => undefined);
|
|
108
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
109
|
+
try {
|
|
110
|
+
for (;;) {
|
|
111
|
+
const { done, value } = await reader.read();
|
|
112
|
+
if (done)
|
|
113
|
+
break;
|
|
114
|
+
if (!value)
|
|
115
|
+
continue;
|
|
116
|
+
size += value.byteLength;
|
|
117
|
+
if (size > MAX_RESPONSE_BYTES) {
|
|
118
|
+
await reader.cancel().catch(() => undefined);
|
|
119
|
+
throw new ToolExecutionError("WEB_FETCH_RESPONSE_TOO_LARGE", `Response exceeds the ${formatByteSize(MAX_RESPONSE_BYTES)} download limit.`);
|
|
120
|
+
}
|
|
121
|
+
chunks.push(value);
|
|
122
|
+
}
|
|
123
|
+
if (signal.aborted) {
|
|
124
|
+
throw signal.reason instanceof Error
|
|
125
|
+
? signal.reason
|
|
126
|
+
: new Error("Web fetch was aborted.");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
signal.removeEventListener("abort", onAbort);
|
|
131
|
+
}
|
|
132
|
+
return Buffer.concat(chunks, size);
|
|
133
|
+
}
|
|
94
134
|
async function saveContent(context, url, ext, content) {
|
|
95
135
|
await mkdir(saveDir(context), { recursive: true });
|
|
96
136
|
const path = tmpPath(context, url, ext);
|
|
@@ -100,19 +140,20 @@ async function saveContent(context, url, ext, content) {
|
|
|
100
140
|
export async function executeWebFetch(args, context) {
|
|
101
141
|
const url = stringArg(args.url, "url");
|
|
102
142
|
const raw = args.raw === true;
|
|
143
|
+
const signal = timeoutSignal(context.signal, 60_000);
|
|
103
144
|
const response = await fetch(url, {
|
|
104
145
|
headers: {
|
|
105
146
|
"User-Agent": "nerve/1.0",
|
|
106
147
|
Accept: "text/html,application/json,text/plain,*/*",
|
|
107
148
|
},
|
|
108
149
|
redirect: "follow",
|
|
109
|
-
signal
|
|
150
|
+
signal,
|
|
110
151
|
});
|
|
111
152
|
if (!response.ok) {
|
|
112
153
|
throw new Error(`Fetch failed: ${response.status} ${response.statusText}`);
|
|
113
154
|
}
|
|
114
155
|
const contentType = response.headers.get("content-type") ?? "application/octet-stream";
|
|
115
|
-
const buffer =
|
|
156
|
+
const buffer = await readBoundedResponse(response, signal);
|
|
116
157
|
const size = buffer.byteLength;
|
|
117
158
|
const ext = getExtension(contentType);
|
|
118
159
|
const details = {
|
|
@@ -122,6 +163,10 @@ export async function executeWebFetch(args, context) {
|
|
|
122
163
|
size,
|
|
123
164
|
converted: false,
|
|
124
165
|
savedTo: undefined,
|
|
166
|
+
limits: {
|
|
167
|
+
maxResponseBytes: MAX_RESPONSE_BYTES,
|
|
168
|
+
htmlConversionTimeoutMs: HTML_CONVERSION_TIMEOUT_MS,
|
|
169
|
+
},
|
|
125
170
|
};
|
|
126
171
|
if (raw) {
|
|
127
172
|
details.savedTo = await saveContent(context, url, ext, buffer);
|
|
@@ -145,7 +190,7 @@ export async function executeWebFetch(args, context) {
|
|
|
145
190
|
}
|
|
146
191
|
let text = buffer.toString("utf8");
|
|
147
192
|
if (isHtml(contentType)) {
|
|
148
|
-
text =
|
|
193
|
+
text = await isolatedHtmlToMarkdown(text, { signal });
|
|
149
194
|
details.converted = true;
|
|
150
195
|
}
|
|
151
196
|
if (Buffer.byteLength(text) <= MAX_INLINE_BYTES) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-fetch.js","sourceRoot":"","sources":["../../../src/execution/web/web-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"web-fetch.js","sourceRoot":"","sources":["../../../src/execution/web/web-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AACpC,MAAM,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AO,EAAE,CAAC;AAChF,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { GitBranchListResponse } from "@nervekit/contracts";
|
|
2
2
|
import type { GitService } from "./git-service.js";
|
|
3
|
+
export interface GitRefSnapshot {
|
|
4
|
+
readonly refs: ReadonlySet<string>;
|
|
5
|
+
readonly originHead?: string;
|
|
6
|
+
}
|
|
3
7
|
export declare function listBranches(this: GitService, projectId: string, relativePath: string): Promise<GitBranchListResponse>;
|
|
8
|
+
export declare function readRefSnapshot(this: GitService, repoDir: string): Promise<GitRefSnapshot>;
|
|
9
|
+
export declare function baseBranchFromRefSnapshot(snapshot: GitRefSnapshot): string | undefined;
|
|
10
|
+
export declare function comparisonBaseRefFromSnapshot(snapshot: GitRefSnapshot, baseBranch: string): string;
|
|
4
11
|
export declare function detectBaseBranch(this: GitService, repoDir: string): Promise<string>;
|
|
5
12
|
export declare function branchExists(this: GitService, repoDir: string, name: string): Promise<boolean>;
|
|
6
13
|
export declare function comparisonBaseRef(this: GitService, repoDir: string, baseBranch: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-branches.d.ts","sourceRoot":"","sources":["../../src/git/git-branches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"git-branches.d.ts","sourceRoot":"","sources":["../../src/git/git-branches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CA+BhC;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAuBzB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,cAAc,GACvB,MAAM,GAAG,SAAS,CAcpB;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,MAAM,GACjB,MAAM,CAOR;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAMlB;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;IACL,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB,GACA,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const BASE_BRANCH_CANDIDATES = ["main", "master", "develop"];
|
|
1
2
|
export async function listBranches(projectId, relativePath) {
|
|
2
3
|
const repoDir = this.resolveRepoDir(projectId, relativePath);
|
|
3
4
|
const { stdout } = await this.runGit(repoDir, [
|
|
@@ -33,25 +34,60 @@ export async function listBranches(projectId, relativePath) {
|
|
|
33
34
|
});
|
|
34
35
|
return { branches };
|
|
35
36
|
}
|
|
36
|
-
export async function
|
|
37
|
+
export async function readRefSnapshot(repoDir) {
|
|
37
38
|
try {
|
|
38
39
|
const { stdout } = await this.runGit(repoDir, [
|
|
39
|
-
"
|
|
40
|
-
"--
|
|
41
|
-
"refs/
|
|
40
|
+
"for-each-ref",
|
|
41
|
+
"--format=%(refname)%00%(symref)",
|
|
42
|
+
"refs/heads",
|
|
43
|
+
"refs/remotes/origin",
|
|
42
44
|
]);
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
const refs = new Set();
|
|
46
|
+
let originHead;
|
|
47
|
+
for (const line of stdout.split("\n")) {
|
|
48
|
+
if (!line)
|
|
49
|
+
continue;
|
|
50
|
+
const [refname, symref] = line.split("\u0000");
|
|
51
|
+
if (!refname)
|
|
52
|
+
continue;
|
|
53
|
+
refs.add(refname);
|
|
54
|
+
if (refname === "refs/remotes/origin/HEAD" && symref) {
|
|
55
|
+
originHead = symref;
|
|
56
|
+
}
|
|
46
57
|
}
|
|
58
|
+
return { refs, originHead };
|
|
47
59
|
}
|
|
48
60
|
catch {
|
|
49
|
-
|
|
61
|
+
return { refs: new Set() };
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function baseBranchFromRefSnapshot(snapshot) {
|
|
65
|
+
const prefix = "refs/remotes/origin/";
|
|
66
|
+
if (snapshot.originHead?.startsWith(prefix)) {
|
|
67
|
+
return snapshot.originHead.slice(prefix.length);
|
|
50
68
|
}
|
|
51
|
-
for (const candidate of
|
|
52
|
-
if (
|
|
69
|
+
for (const candidate of BASE_BRANCH_CANDIDATES) {
|
|
70
|
+
if (snapshot.refs.has(`refs/heads/${candidate}`) ||
|
|
71
|
+
snapshot.refs.has(`refs/remotes/origin/${candidate}`)) {
|
|
53
72
|
return candidate;
|
|
73
|
+
}
|
|
54
74
|
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
export function comparisonBaseRefFromSnapshot(snapshot, baseBranch) {
|
|
78
|
+
const remote = `refs/remotes/origin/${baseBranch}`;
|
|
79
|
+
if (snapshot.refs.has(remote) || snapshot.originHead === remote)
|
|
80
|
+
return remote;
|
|
81
|
+
const local = `refs/heads/${baseBranch}`;
|
|
82
|
+
if (snapshot.refs.has(local))
|
|
83
|
+
return local;
|
|
84
|
+
return baseBranch;
|
|
85
|
+
}
|
|
86
|
+
export async function detectBaseBranch(repoDir) {
|
|
87
|
+
const snapshot = await readRefSnapshot.call(this, repoDir);
|
|
88
|
+
const detected = baseBranchFromRefSnapshot(snapshot);
|
|
89
|
+
if (detected)
|
|
90
|
+
return detected;
|
|
55
91
|
try {
|
|
56
92
|
const { stdout } = await this.runGit(repoDir, [
|
|
57
93
|
"rev-parse",
|
|
@@ -65,50 +101,13 @@ export async function detectBaseBranch(repoDir) {
|
|
|
65
101
|
}
|
|
66
102
|
}
|
|
67
103
|
export async function branchExists(repoDir, name) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"--verify",
|
|
72
|
-
"--quiet",
|
|
73
|
-
`refs/heads/${name}`,
|
|
74
|
-
]);
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
try {
|
|
79
|
-
await this.runGit(repoDir, [
|
|
80
|
-
"rev-parse",
|
|
81
|
-
"--verify",
|
|
82
|
-
"--quiet",
|
|
83
|
-
`refs/remotes/origin/${name}`,
|
|
84
|
-
]);
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
catch {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
104
|
+
const snapshot = await readRefSnapshot.call(this, repoDir);
|
|
105
|
+
return (snapshot.refs.has(`refs/heads/${name}`) ||
|
|
106
|
+
snapshot.refs.has(`refs/remotes/origin/${name}`));
|
|
91
107
|
}
|
|
92
108
|
export async function comparisonBaseRef(repoDir, baseBranch) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`refs/heads/${baseBranch}`,
|
|
96
|
-
baseBranch,
|
|
97
|
-
]) {
|
|
98
|
-
try {
|
|
99
|
-
await this.runGit(repoDir, [
|
|
100
|
-
"rev-parse",
|
|
101
|
-
"--verify",
|
|
102
|
-
"--quiet",
|
|
103
|
-
`${candidate}^{commit}`,
|
|
104
|
-
]);
|
|
105
|
-
return candidate;
|
|
106
|
-
}
|
|
107
|
-
catch {
|
|
108
|
-
// Try the next possible ref.
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return baseBranch;
|
|
109
|
+
const snapshot = await readRefSnapshot.call(this, repoDir);
|
|
110
|
+
return comparisonBaseRefFromSnapshot(snapshot, baseBranch);
|
|
112
111
|
}
|
|
113
112
|
export async function mergedToBase(repoDir, baseBranch, state) {
|
|
114
113
|
if (state.detached || state.onBaseBranch || !state.currentBranch) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-branches.js","sourceRoot":"","sources":["../../src/git/git-branches.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,KAAK,UAAU,YAAY,CAEhC,SAAiB,EACjB,YAAoB;IAEpB,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;QAC5C,cAAc;QACd,sEAAsE;QACtE,YAAY;QACZ,cAAc;KACf,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM;SACpB,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,GAAG,CAAC,CAAC,IAAI,EAA2B,EAAE;QACrC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,KA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IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-command.d.ts","sourceRoot":"","sources":["../../src/git/git-command.ts"],"names":[],"mappings":"AAOA,qBAAa,eAAgB,SAAQ,KAAK;IAEtC,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM;gBAHN,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,SAAK;CAKvB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,KAAK,GAAG,IAAI,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"git-command.d.ts","sourceRoot":"","sources":["../../src/git/git-command.ts"],"names":[],"mappings":"AAOA,qBAAa,eAAgB,SAAQ,KAAK;IAEtC,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM;gBAHN,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,SAAK;CAKvB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,KAAK,GAAG,IAAI,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,UAAU,CAAC,CAqBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-command.js","sourceRoot":"","sources":["../../src/git/git-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAE7B;IACA;IACA;IACA;IAJX,YACW,OAAe,EACf,IAAmB,EACnB,MAAc,EACd,SAAS,EAAE;QAEpB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,SAAS,CAAC,CAAC;QALnC,YAAO,GAAP,OAAO,CAAQ;QACf,SAAI,GAAJ,IAAI,CAAe;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAK;QAGpB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAOD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAAiB,EACjB,GAAW,EACX,IAAc;IAEd,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE;YACxD,GAAG;YACH,OAAO,EAAE,kBAAkB;YAC3B,SAAS,EAAE,UAAU;YACrB,QAAQ,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"git-command.js","sourceRoot":"","sources":["../../src/git/git-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,S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AAC,CAAC,CAAC,IAAI,CAAC;QAC5D,MAAM,IAAI,eAAe,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
|
|
@@ -17,6 +17,7 @@ export type GithubServiceContext = {
|
|
|
17
17
|
runGh(repoDir: string, args: string[]): Promise<ExecResult>;
|
|
18
18
|
runGit(repoDir: string, args: string[]): Promise<ExecResult>;
|
|
19
19
|
ensureGithubRemote(repoDir: string): Promise<void>;
|
|
20
|
+
invalidateStableMetadata(repoDir: string): void;
|
|
20
21
|
mapGh<T>(fn: () => Promise<T>): Promise<T>;
|
|
21
22
|
summarizeRepo(repoDir: string, relativePath: string, name: string): Promise<GitRepoSummary>;
|
|
22
23
|
repoName(projectId: string, relativePath: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-github-service.d.ts","sourceRoot":"","sources":["../../src/git/git-github-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EAExB,cAAc,EAEd,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAS7B,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,KAAK,mBAAmB,GAAG,KAAK,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QACxC,SAAS,EAAE,OAAO,CAAC;QAC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AAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,aAAa,CACX,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1D,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAAC;CACjE,CAAC;AAEF,wBAAsB,YAAY,CAChC,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAqD/B;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,EAAE,CAmBvE;AAMD,wBAAsB,WAAW,CAC/B,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAgC/B;AA4BD,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,CAuEzB;AAED,wBAAsB,UAAU,CAC9B,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,wBAAwB,CAAC,CAyBnC"}
|
|
@@ -177,6 +177,7 @@ export async function checkoutPr(context, projectId, relativePath, number) {
|
|
|
177
177
|
throw new GitWorkflowError(409, "GIT_DIRTY_WORKTREE", "Working tree has uncommitted changes. Commit or stash them before checking out a PR.");
|
|
178
178
|
}
|
|
179
179
|
await context.mapGh(() => context.runGh(repoDir, ["pr", "checkout", String(number)]));
|
|
180
|
+
context.invalidateStableMetadata(repoDir);
|
|
180
181
|
return {
|
|
181
182
|
repo: await context.summarizeRepo(repoDir, relativePath, context.repoName(projectId, relativePath)),
|
|
182
183
|
number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-github-service.js","sourceRoot":"","sources":["../../src/git/git-github-service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"git-github-service.js","sourceRoot":"","sources":["../../src/git/git-github-service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA8BnD,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAA6B,EAC7B,SAAiB,EACjB,YAAoB;IAEpB,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAChE,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAC3B,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,aAAa,EAAE,KAAK;YACpB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,kCAAkC;SAC3C,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;QACjC,OAAO;YACL,SAAS,E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,OAA6B,EAC7B,SAAiB,EACjB,YAAoB,EACpB,MAAc;IAEd,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAChE,MAAM,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAChC,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CACrE,CAAC;IACF,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,gBAAgB,CACxB,GAAG,EACH,oBAAoB,EACpB,sFAAsF,CACvF,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CACvB,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAC3D,CAAC;IACF,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO;QACL,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAC/B,OAAO,EACP,YAAY,EACZ,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC,CAC1C;QACD,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type GitWorkspaceRef = {
|
|
2
|
+
dir: string;
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
export interface GitCommandObservation {
|
|
6
|
+
readonly bin: "git" | "gh";
|
|
7
|
+
readonly command: string;
|
|
8
|
+
readonly durationMs: number;
|
|
9
|
+
readonly succeeded: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface GitOverviewObservation {
|
|
12
|
+
readonly durationMs: number;
|
|
13
|
+
readonly succeeded: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface GitServiceOptions {
|
|
16
|
+
readonly stableMetadataTtlMs?: number;
|
|
17
|
+
readonly now?: () => number;
|
|
18
|
+
readonly onCommandCompleted?: (observation: GitCommandObservation) => void;
|
|
19
|
+
readonly onOverviewCompleted?: (observation: GitOverviewObservation) => void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=git-observability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-observability.d.ts","sourceRoot":"","sources":["../../src/git/git-observability.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC3E,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-observability.js","sourceRoot":"","sources":["../../src/git/git-observability.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GitOverviewResponse, GitRecentCommit, GitRepoSummary } from "@nervekit/contracts";
|
|
2
|
+
import type { GitService } from "./git-service.js";
|
|
3
|
+
export declare function summarizeRepo(service: GitService, repoDir: string, relativePath: string, name: string, statusOutput?: string): Promise<GitRepoSummary>;
|
|
4
|
+
export declare function overview(service: GitService, projectId: string, relativePath: string): Promise<GitOverviewResponse>;
|
|
5
|
+
export declare function recentCommits(service: GitService, repoDir: string): Promise<GitRecentCommit[]>;
|
|
6
|
+
//# sourceMappingURL=git-overview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-overview.d.ts","sourceRoot":"","sources":["../../src/git/git-overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,wBAAsB,aAAa,CACjC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,cAAc,CAAC,CAqCzB;AAED,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,mBAAmB,CAAC,CA4C9B;AAED,wBAAsB,aAAa,CACjC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,EAAE,CAAC,CAsB5B"}
|