@opencorelabs/lucidity 0.8.0 → 0.9.5
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 +2 -2
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/service.d.ts +4 -0
- package/dist/automations/service.d.ts.map +1 -1
- package/dist/automations/service.js +60 -22
- package/dist/automations/store.d.ts +9 -3
- package/dist/automations/store.d.ts.map +1 -1
- package/dist/automations/store.js +45 -32
- package/dist/automations/workflow.d.ts +14 -0
- package/dist/automations/workflow.d.ts.map +1 -0
- package/dist/automations/workflow.js +57 -0
- package/dist/coding/listPrs.d.ts +2 -0
- package/dist/coding/listPrs.d.ts.map +1 -1
- package/dist/coding/listPrs.js +10 -0
- package/dist/coding/runCodeTurn.d.ts +3 -14
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +21 -86
- package/dist/coding/runReview.d.ts +10 -0
- package/dist/coding/runReview.d.ts.map +1 -0
- package/dist/coding/runReview.js +87 -0
- package/dist/coding/workspaceRegistry.d.ts +49 -1
- package/dist/coding/workspaceRegistry.d.ts.map +1 -1
- package/dist/coding/workspaceRegistry.js +208 -17
- package/dist/coding/worktree.d.ts +61 -18
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +149 -17
- package/dist/coding/worktreeSetup.d.ts +7 -0
- package/dist/coding/worktreeSetup.d.ts.map +1 -0
- package/dist/coding/worktreeSetup.js +49 -0
- package/dist/index.js +21 -28
- package/dist/jobs/briefing.d.ts +2 -16
- package/dist/jobs/briefing.d.ts.map +1 -1
- package/dist/jobs/briefing.js +65 -93
- package/dist/logTimestamps.d.ts +10 -0
- package/dist/logTimestamps.d.ts.map +1 -0
- package/dist/logTimestamps.js +12 -0
- package/dist/providerRecovery.d.ts +48 -0
- package/dist/providerRecovery.d.ts.map +1 -0
- package/dist/providerRecovery.js +100 -0
- package/dist/room/client.d.ts +2 -20
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +18 -29
- package/dist/room/computer.d.ts.map +1 -1
- package/dist/room/computer.js +1 -2
- package/dist/room/incidents.d.ts +3 -0
- package/dist/room/incidents.d.ts.map +1 -1
- package/dist/room/incidents.js +1 -0
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +28 -22
- package/dist/runtimeStore.d.ts +2 -0
- package/dist/runtimeStore.d.ts.map +1 -1
- package/dist/runtimeStore.js +17 -0
- package/dist/vault.d.ts +6 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +18 -4
- package/package.json +1 -1
- package/src/automations/service.ts +47 -21
- package/src/automations/store.ts +41 -50
- package/src/automations/workflow.ts +49 -0
- package/src/coding/listPrs.ts +14 -0
- package/src/coding/runCodeTurn.ts +26 -95
- package/src/coding/runReview.ts +83 -0
- package/src/coding/workspaceRegistry.ts +186 -16
- package/src/coding/worktree.ts +161 -20
- package/src/coding/worktreeSetup.ts +50 -0
- package/src/index.ts +22 -31
- package/src/jobs/briefing.ts +62 -109
- package/src/logTimestamps.ts +14 -0
- package/src/providerRecovery.ts +99 -0
- package/src/room/client.ts +19 -54
- package/src/room/computer.ts +1 -2
- package/src/room/incidents.ts +4 -0
- package/src/room/turnQueue.ts +27 -29
- package/src/runtimeStore.ts +18 -1
- package/src/vault.ts +16 -7
- package/vendor/mcp-server/package.json +1 -1
- package/vendor/runtime/README.md +34 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +4 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +57 -4
- package/vendor/runtime/dist/executor/codex.d.ts +7 -2
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +47 -4
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts +24 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts +14 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts +29 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts +20 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts +16 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts +100 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts +216 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts +19 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts +36 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.js +2 -0
- package/vendor/runtime/dist/executor/codexRpc.d.ts +3 -1
- package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.js +3 -2
- package/vendor/runtime/dist/executor/health.d.ts +6 -1
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +4 -0
- package/vendor/runtime/dist/executor/ownership.d.ts +6 -1
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/ownership.js +7 -0
- package/vendor/runtime/dist/executor/types.d.ts +25 -0
- package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.js +1 -0
- package/vendor/runtime/dist/index.d.ts +1 -1
- package/vendor/runtime/dist/index.d.ts.map +1 -1
- package/vendor/runtime/src/executor/claudeAgent.ts +50 -4
- package/vendor/runtime/src/executor/codex.ts +51 -5
- package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationFailure.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationItem.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/LegacyAppPathString.ts +27 -0
- package/vendor/runtime/src/executor/codexProtocol/MessagePhase.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/SleepItem.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/SubAgentSource.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/ThreadId.ts +10 -0
- package/vendor/runtime/src/executor/codexProtocol/WebSearchItem.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AgentMessageDelivery.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CodexErrorInfo.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentState.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentTool.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandAction.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionSource.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/FileUpdateChange.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GitInfo.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/HookPromptFragment.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppDisplayMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppUi.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallAppContext.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallError.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallResult.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitation.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitationEntry.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentErrorDetails.ts +18 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentSteer.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/NonSteerableTurnKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchApplyStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchChangeKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SessionSource.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SubAgentActivityKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Thread.ts +104 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadActiveFlag.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadHistoryMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadItem.ts +125 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadParams.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadResponse.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSection.ts +21 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSectionAppearance.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStatus.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Turn.ts +37 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnError.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnItemsView.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
- package/vendor/runtime/src/executor/codexRpc.ts +4 -2
- package/vendor/runtime/src/executor/health.ts +5 -1
- package/vendor/runtime/src/executor/ownership.ts +8 -1
- package/vendor/runtime/src/executor/types.ts +18 -1
- package/vendor/runtime/src/harness/index.ts +1 -0
- package/vendor/runtime/src/index.ts +1 -1
- package/vendor/shared/dist/automations.d.ts +34 -0
- package/vendor/shared/dist/automations.d.ts.map +1 -1
- package/vendor/shared/dist/automations.js +12 -0
- package/vendor/shared/dist/computer.d.ts +1 -1
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +1 -2
- package/vendor/shared/dist/constants.d.ts +1 -1
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +3 -10
- package/vendor/shared/dist/index.d.ts +4 -2
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +3 -1
- package/vendor/shared/dist/journal-vault.d.ts +1 -1
- package/vendor/shared/dist/messagingSafety.d.ts +21 -0
- package/vendor/shared/dist/messagingSafety.d.ts.map +1 -0
- package/vendor/shared/dist/messagingSafety.js +8 -0
- package/vendor/shared/dist/schemas/harness.d.ts +98 -169
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +19 -124
- package/vendor/shared/dist/smartCapture.d.ts +24 -0
- package/vendor/shared/dist/smartCapture.d.ts.map +1 -1
- package/vendor/shared/dist/smartCapture.js +15 -0
- package/vendor/shared/dist/taskSync.d.ts +342 -0
- package/vendor/shared/dist/taskSync.d.ts.map +1 -0
- package/vendor/shared/dist/taskSync.js +111 -0
- package/vendor/shared/dist/types.d.ts +1 -4
- package/vendor/shared/dist/types.d.ts.map +1 -1
- package/vendor/shared/dist/voiceCapture.d.ts +1 -1
- package/vendor/shared/dist/workspaces.d.ts +117 -0
- package/vendor/shared/dist/workspaces.d.ts.map +1 -1
- package/vendor/shared/dist/workspaces.js +50 -1
- package/vendor/shared/src/automations.ts +12 -0
- package/vendor/shared/src/computer.ts +3 -3
- package/vendor/shared/src/constants.ts +3 -10
- package/vendor/shared/src/index.ts +3 -6
- package/vendor/shared/src/messagingSafety.ts +11 -0
- package/vendor/shared/src/schemas/harness.ts +18 -130
- package/vendor/shared/src/smartCapture.ts +27 -0
- package/vendor/shared/src/taskSync.ts +81 -0
- package/vendor/shared/src/types.ts +0 -6
- package/vendor/shared/src/workspaces.ts +56 -1
- package/dist/coding/conduct.d.ts +0 -48
- package/dist/coding/conduct.d.ts.map +0 -1
- package/dist/coding/conduct.js +0 -263
- package/dist/coding/fleetPlan.d.ts +0 -20
- package/dist/coding/fleetPlan.d.ts.map +0 -1
- package/dist/coding/fleetPlan.js +0 -125
- package/dist/coding/fleetTasks.d.ts +0 -33
- package/dist/coding/fleetTasks.d.ts.map +0 -1
- package/dist/coding/fleetTasks.js +0 -75
- package/src/coding/conduct.ts +0 -325
- package/src/coding/fleetPlan.ts +0 -135
- package/src/coding/fleetTasks.ts +0 -109
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/room/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/room/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,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AClB,iFAAiF;IACjF,IAAI,IAAI,IAAI,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,eAAe,EACvB,eAAe,SAAoB,GAClC,SAAS,CAeX;AAED;yEACyE;AACzE,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,gBAAgB,CA4WzE"}
|
package/dist/room/client.js
CHANGED
|
@@ -39,13 +39,6 @@ const STREAM_EVENT_TYPES = new Set([
|
|
|
39
39
|
'clone_result',
|
|
40
40
|
'error',
|
|
41
41
|
'cancelled',
|
|
42
|
-
// Conductor fleet events — logged + seq-stamped like any turn frame so a mid-fleet `pull`
|
|
43
|
-
// replays the plan and the workers' progress instead of settling the turn as cut off.
|
|
44
|
-
'fleet_plan',
|
|
45
|
-
'worker_status',
|
|
46
|
-
'fleet_conflict',
|
|
47
|
-
'worker_pr',
|
|
48
|
-
'fleet_done',
|
|
49
42
|
]);
|
|
50
43
|
function sendStreamEvent(send, requestId, ev, freshStart = false) {
|
|
51
44
|
if (ev.type === 'session')
|
|
@@ -53,7 +46,7 @@ function sendStreamEvent(send, requestId, ev, freshStart = false) {
|
|
|
53
46
|
else if (ev.type === 'delta')
|
|
54
47
|
send({ type: 'delta', requestId, text: ev.text });
|
|
55
48
|
else if (ev.type === 'tool_call')
|
|
56
|
-
send({
|
|
49
|
+
send({ ...ev, requestId });
|
|
57
50
|
else
|
|
58
51
|
send({
|
|
59
52
|
type: 'done',
|
|
@@ -201,6 +194,7 @@ export async function dispatchRequest(raw, deps) {
|
|
|
201
194
|
reason: req.reason,
|
|
202
195
|
snapshot: req.snapshot,
|
|
203
196
|
diag: req.diag,
|
|
197
|
+
perf: req.perf,
|
|
204
198
|
});
|
|
205
199
|
const path = writeIncidentBundle(bundle, deps.incidentsDir);
|
|
206
200
|
deps.telemetry?.record('incident', bundle.summary, bundle.requestId ?? undefined);
|
|
@@ -290,9 +284,11 @@ export async function dispatchRequest(raw, deps) {
|
|
|
290
284
|
// Completion can beat Stop while its terminal frame is lost in transit. Replay
|
|
291
285
|
// the actual outcome so the phone settles without rewriting finished work.
|
|
292
286
|
const state = deps.turnLogs.read(req.targetId);
|
|
293
|
-
if (state.terminated)
|
|
287
|
+
if (state.terminated) {
|
|
288
|
+
log(`stop for finished turn ${req.targetId}: replaying its ${state.frames.length} frames`);
|
|
294
289
|
for (const frame of state.frames)
|
|
295
290
|
deps.sendRaw(frame);
|
|
291
|
+
}
|
|
296
292
|
}
|
|
297
293
|
return;
|
|
298
294
|
}
|
|
@@ -311,6 +307,10 @@ export async function dispatchRequest(raw, deps) {
|
|
|
311
307
|
});
|
|
312
308
|
return;
|
|
313
309
|
}
|
|
310
|
+
// The phone is still waiting on a turn this computer already finished: its last frame was
|
|
311
|
+
// lost on the way. Worth a line, it is the only trace on this side of that failure (#505).
|
|
312
|
+
if (state.terminated && state.frames.some((frame) => frame.seq > req.sinceSeq))
|
|
313
|
+
log(`pull for finished turn ${req.targetId}: phone had seq ${req.sinceSeq} of ${state.frames.length}`);
|
|
314
314
|
// Replay the gap verbatim (already logged; don't re-log).
|
|
315
315
|
for (const frame of state.frames) {
|
|
316
316
|
if (frame.seq > req.sinceSeq)
|
|
@@ -341,7 +341,7 @@ export async function dispatchRequest(raw, deps) {
|
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
343
|
if (deps.recordAcceptance &&
|
|
344
|
-
['ask', 'code', '
|
|
344
|
+
['ask', 'code', 'briefing', 'attention', 'clone'].includes(req.kind)) {
|
|
345
345
|
try {
|
|
346
346
|
deps.turnLogs.read(req.id); // Adopt legacy receipts before admission.
|
|
347
347
|
const receipt = deps.turnLogs.runtime.accept(req);
|
|
@@ -508,6 +508,11 @@ export async function dispatchRequest(raw, deps) {
|
|
|
508
508
|
else if (req.kind === 'workspaces') {
|
|
509
509
|
if (!deps.workspaces)
|
|
510
510
|
throw new Error('Update Lucidity on the computer to use persistent workers.');
|
|
511
|
+
if (req.command.action === 'continue-run') {
|
|
512
|
+
if (!deps.turnQueue)
|
|
513
|
+
throw new Error('The computer queue is unavailable.');
|
|
514
|
+
deps.turnQueue.enqueue(deps.workspaces.continuation(req.command));
|
|
515
|
+
}
|
|
511
516
|
send({ requestId: req.id, kind: 'workspaces', snapshot: await deps.workspaces.command(req.command, req.id) });
|
|
512
517
|
}
|
|
513
518
|
else if (req.kind === 'repos') {
|
|
@@ -586,25 +591,9 @@ export async function dispatchRequest(raw, deps) {
|
|
|
586
591
|
deps.requestRestart?.();
|
|
587
592
|
}
|
|
588
593
|
}
|
|
589
|
-
else if (req.kind === 'conduct') {
|
|
590
|
-
if (deps.conductHandler) {
|
|
591
|
-
await deps.conductHandler({ id: req.id, repoId: req.repoId, phase: req.phase, prompt: req.prompt,
|
|
592
|
-
images: req.images, plan: req.plan, resume: req.resume, ephemeral: req.ephemeral }, {
|
|
593
|
-
send, signal,
|
|
594
|
-
runWorker: (worker, workerDeps) => dispatchRequest(JSON.stringify({ ...worker, kind: 'code', stream: true, mode: 'worktree' }), { ...deps, signal, send: workerDeps.send, recordAcceptance: true }),
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
else {
|
|
598
|
-
send({
|
|
599
|
-
type: 'error',
|
|
600
|
-
requestId: req.id,
|
|
601
|
-
message: 'The conductor is not enabled on this daemon.',
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
594
|
else if (deps.codeHandler) {
|
|
606
595
|
// Per-worktree lane: two turns sharing a worktree/cwd must serialize, but genuinely
|
|
607
|
-
// independent work runs in parallel. The bare repo session and each
|
|
596
|
+
// independent work runs in parallel. The bare repo session and each worktree
|
|
608
597
|
// (`workerId`) own separate worktrees, so each gets its own lane — a phone turn drilled
|
|
609
598
|
// into worker A can't collide with worker B, and a bare turn keeps today's exact key.
|
|
610
599
|
const lane = req.workerId
|
|
@@ -621,6 +610,7 @@ export async function dispatchRequest(raw, deps) {
|
|
|
621
610
|
mode: req.mode,
|
|
622
611
|
expectedBranch: req.expectedBranch,
|
|
623
612
|
workerId: req.workerId,
|
|
613
|
+
...(req.recoveryOf ? { recoveryOf: req.recoveryOf } : {}),
|
|
624
614
|
}, { send, signal }));
|
|
625
615
|
}
|
|
626
616
|
else {
|
|
@@ -719,7 +709,7 @@ export function roomUrl(apiUrl, machine) {
|
|
|
719
709
|
* halts reconnection. Also stops automatically if `signal` aborts.
|
|
720
710
|
*/
|
|
721
711
|
export function startRoomClient(opts) {
|
|
722
|
-
const { config, harness, vault, signal, codeHandler,
|
|
712
|
+
const { config, harness, vault, signal, codeHandler, cloneHandler, queue, getConfig, setConfig, requestRestart, } = opts;
|
|
723
713
|
const log = opts.logger ?? ((m) => console.error(`[room] ${m}`));
|
|
724
714
|
const identity = opts.computerId ?? computerId();
|
|
725
715
|
const url = roomUrl(config.apiUrl, config.machineName) +
|
|
@@ -850,7 +840,6 @@ export function startRoomClient(opts) {
|
|
|
850
840
|
workspaces: opts.workspaces,
|
|
851
841
|
signal,
|
|
852
842
|
codeHandler,
|
|
853
|
-
conductHandler,
|
|
854
843
|
cloneHandler,
|
|
855
844
|
queue: executionLanes,
|
|
856
845
|
inFlight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/room/computer.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,gGAAgG;AAChG,wBAAgB,UAAU,CACxB,IAAI,SAA8C,GACjD,MAAM,CAmBR;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/room/computer.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,gGAAgG;AAChG,wBAAgB,UAAU,CACxB,IAAI,SAA8C,GACjD,MAAM,CAmBR;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,eAAe,CA2CxE"}
|
package/dist/room/computer.js
CHANGED
|
@@ -54,8 +54,7 @@ export function computerRuntime(opts) {
|
|
|
54
54
|
...(opts.commands ? ['commands'] : []),
|
|
55
55
|
...(opts.controls ? ['permission', 'steer'] : []),
|
|
56
56
|
...(opts.codeHandler ? ['code'] : []),
|
|
57
|
-
...(opts.workspaces ? ['workspaces', 'checkout-history'] : []),
|
|
58
|
-
...(opts.conductHandler ? ['conduct'] : []),
|
|
57
|
+
...(opts.workspaces ? ['workspaces', 'checkout-history', 'repo-settings', 'worktree-delete'] : []),
|
|
59
58
|
...(opts.cloneHandler ? ['clone'] : []),
|
|
60
59
|
...(opts.attention ? ['attention'] : []),
|
|
61
60
|
...(opts.getConfig ? ['getConfig'] : []),
|
package/dist/room/incidents.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ export interface IncidentBundle {
|
|
|
93
93
|
snapshot?: IncidentSnapshot;
|
|
94
94
|
/** The tail of the phone's diag ring, when the frame carried it. */
|
|
95
95
|
phoneDiag?: IncidentDiagEvent[];
|
|
96
|
+
/** The phone's stutter-meter reading, when the frame carried one. */
|
|
97
|
+
perf?: Record<string, unknown>;
|
|
96
98
|
}
|
|
97
99
|
/**
|
|
98
100
|
* Classify one turn from the phone record joined to the daemon's turn-log view. Pure — the
|
|
@@ -113,6 +115,7 @@ export interface BuildIncidentOptions {
|
|
|
113
115
|
/** The phone socket snapshot + diag ring, when the frame carried them — feeds the detectors. */
|
|
114
116
|
snapshot?: IncidentSnapshot;
|
|
115
117
|
diag?: IncidentDiagEvent[];
|
|
118
|
+
perf?: Record<string, unknown>;
|
|
116
119
|
now?: () => number;
|
|
117
120
|
}
|
|
118
121
|
/** Join the phone ledger to the turn log and produce the bundle object (does not write it). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incidents.d.ts","sourceRoot":"","sources":["../../src/room/incidents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,aAAa,GACrB,IAAI,GACJ,iBAAiB,GACjB,qBAAqB,GACrB,WAAW,GACX,SAAS,GACT,eAAe,GACf,cAAc,GACd,eAAe,CAAC;AAEpB,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB;;;6FAGyF;IACzF,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,IAAI,CAAC;IACpD,mGAAmG;IACnG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;gFAEgF;AAChF,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,IAA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IAQf,OAAO,CAAC,IAAI;IAOZ,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIzB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IASzB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IA+C/B;0FACsF;IACtF,OAAO,CAAC,WAAW;IAiCnB,IAAI,IAAI,IAAI;IAgEN,OAAO,CACX,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,QAAQ,GAAG,OAAO,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAuChB,IAAI,IAAI,IAAI;CAGb"}
|
package/dist/room/turnQueue.js
CHANGED
|
@@ -108,7 +108,7 @@ export class DurableTurnQueue {
|
|
|
108
108
|
}
|
|
109
109
|
owns(id) {
|
|
110
110
|
const state = this.entries.get(id)?.state;
|
|
111
|
-
return state === 'queued' || state === 'running' || state === 'steering';
|
|
111
|
+
return state === 'queued' || state === 'held' || state === 'running' || state === 'steering';
|
|
112
112
|
}
|
|
113
113
|
confirm(id) {
|
|
114
114
|
const entry = this.entries.get(id);
|
|
@@ -116,6 +116,7 @@ export class DurableTurnQueue {
|
|
|
116
116
|
this.publish(id, {
|
|
117
117
|
type: 'queue_state',
|
|
118
118
|
state: entry.state === 'running' ? 'running' : 'queued',
|
|
119
|
+
...(entry.blockedBy ? { blockedBy: entry.blockedBy, message: 'Held for review of the interrupted turn.' } : {}),
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
122
|
enqueue(request) {
|
|
@@ -123,7 +124,7 @@ export class DurableTurnQueue {
|
|
|
123
124
|
throw new Error('Queued turns require streaming replies.');
|
|
124
125
|
const existing = this.entries.get(request.id);
|
|
125
126
|
if (existing) {
|
|
126
|
-
if (JSON.stringify(existing.request) !== JSON.stringify(request))
|
|
127
|
+
if (JSON.stringify(HarnessRequestSchema.parse(existing.request)) !== JSON.stringify(HarnessRequestSchema.parse(request)))
|
|
127
128
|
throw new Error('Request ID already belongs to another message.');
|
|
128
129
|
for (const frame of this.deps.logs.read(request.id).frames)
|
|
129
130
|
this.deps.sendRaw(frame);
|
|
@@ -143,13 +144,10 @@ export class DurableTurnQueue {
|
|
|
143
144
|
const same = scope &&
|
|
144
145
|
(request.kind === 'ask'
|
|
145
146
|
? scope.kind === 'ask'
|
|
146
|
-
:
|
|
147
|
+
: scope.kind === 'code' &&
|
|
147
148
|
scope.repoId === request.repoId &&
|
|
148
149
|
scope.workerId === request.workerId &&
|
|
149
|
-
(scope.mode ?? 'worktree') === (request.mode ?? 'worktree'))
|
|
150
|
-
(scope.kind === 'conduct' &&
|
|
151
|
-
scope.repoId === request.repoId &&
|
|
152
|
-
!!request.workerId));
|
|
150
|
+
(scope.mode ?? 'worktree') === (request.mode ?? 'worktree'));
|
|
153
151
|
if (!same)
|
|
154
152
|
throw new Error('The preceding turn does not belong to this conversation. Refresh it before sending again.');
|
|
155
153
|
}
|
|
@@ -170,6 +168,10 @@ export class DurableTurnQueue {
|
|
|
170
168
|
if (previous) {
|
|
171
169
|
if (previous.state === 'skipped')
|
|
172
170
|
return this.predecessor(previous);
|
|
171
|
+
if (previous.state === 'held')
|
|
172
|
+
return { ready: false, blockedBy: previous.blockedBy ?? id };
|
|
173
|
+
if (previous.state === 'failed' && this.terminal(id)?.code === 'interrupted_unknown')
|
|
174
|
+
return { ready: false, blockedBy: id };
|
|
173
175
|
if (previous.state === 'failed')
|
|
174
176
|
throw new Error('The previous turn did not finish. Review it before resending this message.');
|
|
175
177
|
if (previous.state !== 'done')
|
|
@@ -181,18 +183,11 @@ export class DurableTurnQueue {
|
|
|
181
183
|
const terminal = this.terminal(id);
|
|
182
184
|
if (!terminal)
|
|
183
185
|
return { ready: false };
|
|
186
|
+
if (terminal.code === 'interrupted_unknown')
|
|
187
|
+
return { ready: false, blockedBy: id };
|
|
184
188
|
if (terminal.type !== 'done')
|
|
185
189
|
throw new Error('The previous turn did not finish. Review it before resending this message.');
|
|
186
|
-
const
|
|
187
|
-
.read(id)
|
|
188
|
-
.frames.find((frame) => frame.type === 'accepted');
|
|
189
|
-
const scope = receipt?.scope;
|
|
190
|
-
const source = scope?.kind === 'conduct' && entry.request.kind === 'code'
|
|
191
|
-
? entry.request.workerId
|
|
192
|
-
: id;
|
|
193
|
-
if (source !== id && this.terminal(source)?.type !== 'done')
|
|
194
|
-
throw new Error('The worker did not finish. Review it before resending this message.');
|
|
195
|
-
const resume = this.session(source);
|
|
190
|
+
const resume = this.session(id);
|
|
196
191
|
if (!resume)
|
|
197
192
|
throw new Error('The previous turn has no session to continue. Start a new conversation.');
|
|
198
193
|
return { ready: true, resume };
|
|
@@ -210,19 +205,29 @@ export class DurableTurnQueue {
|
|
|
210
205
|
const lane = turnLane(entry.request);
|
|
211
206
|
if (!this.owns(id))
|
|
212
207
|
continue;
|
|
208
|
+
if (entry.state === 'held')
|
|
209
|
+
continue;
|
|
213
210
|
if (occupied.has(lane))
|
|
214
211
|
continue;
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
if (entry.state !== 'queued' || this.scheduled.has(id)) {
|
|
213
|
+
occupied.add(lane);
|
|
217
214
|
continue;
|
|
215
|
+
}
|
|
218
216
|
try {
|
|
219
|
-
|
|
217
|
+
const previous = this.predecessor(entry);
|
|
218
|
+
if (!previous.ready) {
|
|
219
|
+
if (previous.blockedBy) {
|
|
220
|
+
this.save({ ...entry, state: 'held', blockedBy: previous.blockedBy });
|
|
221
|
+
this.confirm(id);
|
|
222
|
+
}
|
|
220
223
|
continue;
|
|
224
|
+
}
|
|
221
225
|
}
|
|
222
226
|
catch (error) {
|
|
223
227
|
this.fail(entry, String(error.message));
|
|
224
228
|
continue;
|
|
225
229
|
}
|
|
230
|
+
occupied.add(lane);
|
|
226
231
|
this.scheduled.add(id);
|
|
227
232
|
void this.deps.lanes
|
|
228
233
|
.run(turnLane(entry.request), async () => {
|
|
@@ -270,15 +275,16 @@ export class DurableTurnQueue {
|
|
|
270
275
|
this.deps.sendRaw(frame);
|
|
271
276
|
return;
|
|
272
277
|
}
|
|
273
|
-
if (entry.state !== 'queued')
|
|
278
|
+
if (entry.state !== 'queued' && entry.state !== 'held')
|
|
274
279
|
throw new Error('This message has already started or left the queue.');
|
|
275
280
|
if (action === 'steer') {
|
|
281
|
+
if (entry.state === 'held')
|
|
282
|
+
throw new Error('Review the interrupted turn before using this follow-up.');
|
|
276
283
|
if (entry.request.images?.length)
|
|
277
284
|
throw new Error('Attachments must run as a separate turn.');
|
|
278
285
|
if (!activeId || !this.deps.steer)
|
|
279
286
|
throw new Error('There is no active turn to influence.');
|
|
280
287
|
const active = this.entries.get(activeId);
|
|
281
|
-
// For a spawned fleet worker, the active request uses the worker's own ID.
|
|
282
288
|
if (active
|
|
283
289
|
? turnLane(active.request) !== turnLane(entry.request) ||
|
|
284
290
|
active.state !== 'running'
|
package/dist/runtimeStore.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class RuntimeStore {
|
|
|
16
16
|
transaction<T>(action: () => T): T;
|
|
17
17
|
get<T>(bucket: string, id: string): T | undefined;
|
|
18
18
|
set(bucket: string, id: string, value: unknown): void;
|
|
19
|
+
delete(bucket: string, id: string): void;
|
|
19
20
|
list<T>(bucket: string): T[];
|
|
20
21
|
/** The command and its first replayable receipt are one durable operation. */
|
|
21
22
|
accept(request: HarnessRequest, queuedEntry?: unknown): {
|
|
@@ -37,6 +38,7 @@ export declare class RuntimeStore {
|
|
|
37
38
|
}[];
|
|
38
39
|
latestSession(conversation: string, after?: string): string | undefined;
|
|
39
40
|
lastCommand(conversation: string): string | undefined;
|
|
41
|
+
command(id: string): HarnessRequest | undefined;
|
|
40
42
|
unfinished(conversation: string): boolean;
|
|
41
43
|
reconcile(owns: (id: string) => boolean): void;
|
|
42
44
|
close(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeStore.d.ts","sourceRoot":"","sources":["../src/runtimeStore.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,
|
|
1
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K,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAI7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;IAI7C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS;IAQ3B,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI;IAW7C,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,EAAE;IAS1I,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOvE,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAGrD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAI/C,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAIzC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI;IAO9C,KAAK,IAAI,IAAI;CACd"}
|
package/dist/runtimeStore.js
CHANGED
|
@@ -82,6 +82,9 @@ export class RuntimeStore {
|
|
|
82
82
|
this.write(() => this.db.prepare('INSERT INTO records VALUES (?, ?, ?) ON CONFLICT(bucket,id) DO UPDATE SET value=excluded.value')
|
|
83
83
|
.run(bucket, id, JSON.stringify(value)));
|
|
84
84
|
}
|
|
85
|
+
delete(bucket, id) {
|
|
86
|
+
this.write(() => this.db.prepare('DELETE FROM records WHERE bucket=? AND id=?').run(bucket, id));
|
|
87
|
+
}
|
|
85
88
|
list(bucket) {
|
|
86
89
|
return this.db.prepare('SELECT value FROM records WHERE bucket=? ORDER BY rowid').all(bucket)
|
|
87
90
|
.map((row) => JSON.parse(row.value));
|
|
@@ -95,6 +98,16 @@ export class RuntimeStore {
|
|
|
95
98
|
throw new Error('This request ID already belongs to different input.');
|
|
96
99
|
if (old)
|
|
97
100
|
return { duplicate: true, frames: this.read(request.id).frames };
|
|
101
|
+
if (request.kind === 'code' && request.recoveryOf) {
|
|
102
|
+
const review = this.get('run-reviews', request.recoveryOf);
|
|
103
|
+
const source = this.command(request.recoveryOf);
|
|
104
|
+
if (!review || review.reviewId !== request.recoveryReviewId || review.continuationId !== request.id ||
|
|
105
|
+
source?.kind !== 'code' || conversationKey(source) !== conversationKey(request) ||
|
|
106
|
+
this.read(source.id).frames.at(-1)?.code !== 'interrupted_unknown' ||
|
|
107
|
+
review.continuedAt || !request.prompt.trim() || request.prompt.trim().startsWith('/') || request.prompt.trim() === source.prompt.trim())
|
|
108
|
+
throw new Error('A current review is required before continuing this interrupted turn.');
|
|
109
|
+
this.set('run-reviews', source.id, { ...review, continuedAt: new Date().toISOString(), instruction: request.prompt });
|
|
110
|
+
}
|
|
98
111
|
this.db.prepare('INSERT INTO runs (id,command,conversation,updated) VALUES (?,?,?,?)')
|
|
99
112
|
.run(request.id, payload, conversationKey(request), Date.now());
|
|
100
113
|
const scope = {
|
|
@@ -173,6 +186,10 @@ export class RuntimeStore {
|
|
|
173
186
|
lastCommand(conversation) {
|
|
174
187
|
return this.db.prepare('SELECT id FROM runs WHERE conversation=? AND command IS NOT NULL ORDER BY rowid DESC LIMIT 1').get(conversation)?.id;
|
|
175
188
|
}
|
|
189
|
+
command(id) {
|
|
190
|
+
const row = this.db.prepare('SELECT command FROM runs WHERE id=?').get(id);
|
|
191
|
+
return row?.command ? JSON.parse(row.command) : undefined;
|
|
192
|
+
}
|
|
176
193
|
unfinished(conversation) {
|
|
177
194
|
return !!this.db.prepare('SELECT id FROM runs WHERE conversation=? AND terminal IS NULL LIMIT 1').get(conversation);
|
|
178
195
|
}
|
package/dist/vault.d.ts
CHANGED
|
@@ -19,9 +19,12 @@ export interface Vault {
|
|
|
19
19
|
/** SOUL.md if present (and non-empty), else the packaged default — seeding SOUL.md so it's editable. */
|
|
20
20
|
readPersona(): string;
|
|
21
21
|
/** Durable facts from MEMORY.md (empty if absent/malformed). */
|
|
22
|
-
readMemoryFacts(): string[];
|
|
23
|
-
writeMemoryFacts(facts: string[]): void;
|
|
24
|
-
writeSessionLog(entry: SessionEntry
|
|
22
|
+
readMemoryFacts(strict?: boolean): string[];
|
|
23
|
+
writeMemoryFacts(facts: string[], strict?: boolean): void;
|
|
24
|
+
writeSessionLog(entry: SessionEntry, receipt?: {
|
|
25
|
+
id: string;
|
|
26
|
+
strict: boolean;
|
|
27
|
+
}): void;
|
|
25
28
|
}
|
|
26
29
|
export declare function createVault(vaultPath: string): Vault;
|
|
27
30
|
//# sourceMappingURL=vault.d.ts.map
|
package/dist/vault.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../src/vault.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wGAAwG;IACxG,WAAW,IAAI,MAAM,CAAC;IACtB,gEAAgE;IAChE,eAAe,
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../src/vault.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wGAAwG;IACxG,WAAW,IAAI,MAAM,CAAC;IACtB,gEAAgE;IAChE,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC5C,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1D,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACvF;AAMD,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAsEpD"}
|
package/dist/vault.js
CHANGED
|
@@ -27,27 +27,31 @@ export function createVault(vaultPath) {
|
|
|
27
27
|
}
|
|
28
28
|
return def;
|
|
29
29
|
},
|
|
30
|
-
readMemoryFacts() {
|
|
30
|
+
readMemoryFacts(strict = false) {
|
|
31
31
|
if (!existsSync(memoryPath))
|
|
32
32
|
return [];
|
|
33
33
|
try {
|
|
34
34
|
return parseFacts(readFileSync(memoryPath, 'utf8'));
|
|
35
35
|
}
|
|
36
36
|
catch (err) {
|
|
37
|
+
if (strict)
|
|
38
|
+
throw err;
|
|
37
39
|
console.error(`[vault] could not read MEMORY.md: ${msg(err)}`);
|
|
38
40
|
return [];
|
|
39
41
|
}
|
|
40
42
|
},
|
|
41
|
-
writeMemoryFacts(facts) {
|
|
43
|
+
writeMemoryFacts(facts, strict = false) {
|
|
42
44
|
try {
|
|
43
45
|
mkdirSync(vaultPath, { recursive: true });
|
|
44
46
|
writeFileSync(memoryPath, renderMemoryFile(facts), 'utf8');
|
|
45
47
|
}
|
|
46
48
|
catch (err) {
|
|
49
|
+
if (strict)
|
|
50
|
+
throw err;
|
|
47
51
|
console.error(`[vault] could not write MEMORY.md: ${msg(err)}`);
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
|
-
writeSessionLog(entry) {
|
|
54
|
+
writeSessionLog(entry, receipt) {
|
|
51
55
|
try {
|
|
52
56
|
mkdirSync(sessionsDir, { recursive: true });
|
|
53
57
|
const kind = entry.kind ?? 'briefing';
|
|
@@ -59,9 +63,19 @@ export function createVault(vaultPath) {
|
|
|
59
63
|
`Delivered via: ${entry.deliveredVia}\n\n` +
|
|
60
64
|
`## Message\n\n${entry.body.trim()}\n\n` +
|
|
61
65
|
`## Facts learned\n\n${facts}\n`;
|
|
62
|
-
|
|
66
|
+
if (receipt && !/^[a-zA-Z0-9-]+$/.test(receipt.id))
|
|
67
|
+
throw new Error('Invalid session receipt ID');
|
|
68
|
+
const path = join(sessionsDir, `${receipt?.id ?? stamp}-${kind}.md`);
|
|
69
|
+
if (receipt && existsSync(path)) {
|
|
70
|
+
if (readFileSync(path, 'utf8') !== content)
|
|
71
|
+
throw new Error('The saved briefing was changed outside this run.');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
writeFileSync(path, content, { encoding: 'utf8', flag: receipt ? 'wx' : 'w' });
|
|
63
75
|
}
|
|
64
76
|
catch (err) {
|
|
77
|
+
if (receipt?.strict)
|
|
78
|
+
throw err;
|
|
65
79
|
console.error(`[vault] could not write session log: ${msg(err)}`);
|
|
66
80
|
}
|
|
67
81
|
},
|