@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
package/src/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
import { LaneQueue } from './queue.js';
|
|
28
28
|
import { AutomationStore } from './automations/store.js';
|
|
29
29
|
import { AutomationService } from './automations/service.js';
|
|
30
|
+
import { SavedWorkflow } from './automations/workflow.js';
|
|
30
31
|
import { createDeckDesigner } from './automations/designer.js';
|
|
31
32
|
import { createAgentAutomation } from './automations/agent.js';
|
|
32
33
|
import { runAutomationsCli } from './automations/cli.js';
|
|
@@ -54,14 +55,16 @@ import { FluidAudioEngine } from './speech/fluidAudio.js';
|
|
|
54
55
|
import { createSessionJournalSource } from './room/journalSource.js';
|
|
55
56
|
import { TurnLogStore } from './turnLog.js';
|
|
56
57
|
import { DaemonLease } from './daemonLease.js';
|
|
58
|
+
import { RecoveryExecutor, recoverProviderRuns } from './providerRecovery.js';
|
|
57
59
|
import { commandContext } from './coding/commandContext.js';
|
|
58
60
|
import { runCodeTurn } from './coding/runCodeTurn.js';
|
|
59
|
-
import { runConductTurn } from './coding/conduct.js';
|
|
60
61
|
import { cloneRepo } from './coding/cloneRepo.js';
|
|
61
62
|
import { listAllowlist } from './coding/discover.js';
|
|
62
63
|
import { resolveRepo } from './coding/repos.js';
|
|
63
64
|
import { watchBranches } from './coding/branchWatch.js';
|
|
65
|
+
import { mergedPrHead } from './coding/listPrs.js';
|
|
64
66
|
import { sweepStaleRequests } from './sweepStale.js';
|
|
67
|
+
import { stampLogs } from './logTimestamps.js';
|
|
65
68
|
import { runSetup } from './setup/server.js';
|
|
66
69
|
import { runClientSetup } from './mcp/clients.js';
|
|
67
70
|
import { runDecisionsCli } from './decisions/cli.js';
|
|
@@ -156,6 +159,8 @@ async function main(): Promise<void> {
|
|
|
156
159
|
process.exit(1);
|
|
157
160
|
}
|
|
158
161
|
|
|
162
|
+
stampLogs();
|
|
163
|
+
|
|
159
164
|
// The executor default is the Coding pair — the capable model. Every real-time turn
|
|
160
165
|
// (ask/voice) passes the Chat pair explicitly, and coding turns pass the Coding pair
|
|
161
166
|
// explicitly; this default catches only the batch jobs (briefing/weekly/attention),
|
|
@@ -163,11 +168,12 @@ async function main(): Promise<void> {
|
|
|
163
168
|
const lease = args.runNow === undefined ? new DaemonLease(CONFIG_DIR) : undefined;
|
|
164
169
|
process.once('exit', () => lease?.close());
|
|
165
170
|
const ownership = new ExecutionOwnership();
|
|
171
|
+
const turnLogs = args.runNow === undefined ? new TurnLogStore() : undefined;
|
|
166
172
|
const providers = {
|
|
167
173
|
claude: new HealthAwareExecutor(
|
|
168
|
-
new OwnedExecutor(new ClaudeAgentExecutor({ oauthToken: config.oauthToken }), 'claude', ownership),
|
|
174
|
+
new OwnedExecutor(new RecoveryExecutor(new ClaudeAgentExecutor({ oauthToken: config.oauthToken }), 'claude', turnLogs?.runtime), 'claude', ownership),
|
|
169
175
|
),
|
|
170
|
-
codex: new HealthAwareExecutor(new OwnedExecutor(new CodexExecutor(), 'codex', ownership)),
|
|
176
|
+
codex: new HealthAwareExecutor(new OwnedExecutor(new RecoveryExecutor(new CodexExecutor(), 'codex', turnLogs?.runtime), 'codex', ownership)),
|
|
171
177
|
};
|
|
172
178
|
const controls = new AgentControls(Object.values(providers));
|
|
173
179
|
const executor = new ProviderRouter(providers, () => ({
|
|
@@ -244,11 +250,12 @@ async function main(): Promise<void> {
|
|
|
244
250
|
);
|
|
245
251
|
}
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
if (!turnLogs) throw new Error('Daemon storage is unavailable.');
|
|
254
|
+
await recoverProviderRuns(turnLogs, providers);
|
|
248
255
|
turnLogs.runtime.set('supervisor', 'current', lease!.owner);
|
|
249
256
|
const workspaces = new WorkspaceRegistry(turnLogs.runtime, () => listAllowlist(config));
|
|
250
257
|
turnLogs.prune();
|
|
251
|
-
const automationStore = new AutomationStore(join(CONFIG_DIR, 'automations'));
|
|
258
|
+
const automationStore = new AutomationStore(join(CONFIG_DIR, 'automations'), turnLogs.runtime);
|
|
252
259
|
const designer = createDeckDesigner({
|
|
253
260
|
config,
|
|
254
261
|
directory: CONFIG_DIR,
|
|
@@ -275,6 +282,7 @@ async function main(): Promise<void> {
|
|
|
275
282
|
}
|
|
276
283
|
},
|
|
277
284
|
store: automationStore,
|
|
285
|
+
resumable: (job) => job.id === 'builtin:briefing',
|
|
278
286
|
validateRepo: designer.validateRepo,
|
|
279
287
|
saveGuidance: designer.saveGuidance,
|
|
280
288
|
connections: designer.connections,
|
|
@@ -290,7 +298,7 @@ async function main(): Promise<void> {
|
|
|
290
298
|
let result: import('./jobs/runner.js').JobResult | undefined;
|
|
291
299
|
await runJob(job.id.replace('builtin:', ''), queue, async () => {
|
|
292
300
|
if (job.id === 'builtin:briefing')
|
|
293
|
-
result = await runBriefing(config, bounded, deliverer, attention);
|
|
301
|
+
result = await runBriefing(config, bounded, deliverer, attention, new SavedWorkflow(automationStore, run.id, signal));
|
|
294
302
|
else if (job.id === 'builtin:weekly-review')
|
|
295
303
|
result = await runWeeklyReview(config, bounded, deliverer);
|
|
296
304
|
else if (job.id === 'builtin:goals')
|
|
@@ -487,31 +495,6 @@ async function main(): Promise<void> {
|
|
|
487
495
|
allowInPlace: config.allowInPlace,
|
|
488
496
|
})
|
|
489
497
|
: undefined,
|
|
490
|
-
// The fleet conductor (multi-worktree fan-out). Enabled wherever coding is; each fan-out's
|
|
491
|
-
// workers become Lucidity subtasks via the same API key the daemon already holds, so the
|
|
492
|
-
// task graph is the fleet's org chart. Tasks land in the Inbox for now (projectId null).
|
|
493
|
-
conductHandler:
|
|
494
|
-
config.repos.length || config.repoRoots.length
|
|
495
|
-
? (req, ctx) =>
|
|
496
|
-
runConductTurn(req, {
|
|
497
|
-
runWorker: ctx.runWorker,
|
|
498
|
-
onWorkerApproval: (requestId, approval) =>
|
|
499
|
-
controls.request(requestId, approval, ctx.signal, ctx.send),
|
|
500
|
-
onEnd: (requestId) => controls.end(requestId),
|
|
501
|
-
repos: listAllowlist(config),
|
|
502
|
-
executor,
|
|
503
|
-
send: ctx.send,
|
|
504
|
-
signal: ctx.signal,
|
|
505
|
-
model: config.codeModel,
|
|
506
|
-
effort: config.codeEffort,
|
|
507
|
-
api: config.apiKey
|
|
508
|
-
? createApiClient({
|
|
509
|
-
apiUrl: config.apiUrl,
|
|
510
|
-
apiKey: config.apiKey,
|
|
511
|
-
})
|
|
512
|
-
: undefined,
|
|
513
|
-
})
|
|
514
|
-
: undefined,
|
|
515
498
|
// Phone-initiated clone (#78) is enabled when a workspace root is configured.
|
|
516
499
|
cloneHandler: config.workspaceRoot
|
|
517
500
|
? (req, ctx) =>
|
|
@@ -568,6 +551,13 @@ async function main(): Promise<void> {
|
|
|
568
551
|
})
|
|
569
552
|
: null;
|
|
570
553
|
|
|
554
|
+
// Archive-on-merge has no event to hang on (the merge happens on GitHub), so look every few
|
|
555
|
+
// minutes. It asks gh only for worktrees in repositories that turned the setting on.
|
|
556
|
+
const mergedSweep = setInterval(() => {
|
|
557
|
+
void workspaces.archiveMerged(mergedPrHead).catch(() => {});
|
|
558
|
+
}, 5 * 60_000);
|
|
559
|
+
mergedSweep.unref();
|
|
560
|
+
|
|
571
561
|
const tz = config.timezone ? ` ${config.timezone}` : '';
|
|
572
562
|
const next = automationStore
|
|
573
563
|
.jobs()
|
|
@@ -601,6 +591,7 @@ async function main(): Promise<void> {
|
|
|
601
591
|
const stoppedAutomations = automations.stop();
|
|
602
592
|
chatServer.close();
|
|
603
593
|
branchWatcher?.stop();
|
|
594
|
+
clearInterval(mergedSweep);
|
|
604
595
|
roomClient.stop();
|
|
605
596
|
roomController.abort();
|
|
606
597
|
shuttingDown = (async () => {
|
package/src/jobs/briefing.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
buildBriefingPrompt,
|
|
3
|
-
|
|
4
|
-
buildMemoryReflectionPrompt,
|
|
5
|
-
createApiClient,
|
|
6
|
-
mergeFacts,
|
|
7
|
-
parseFacts,
|
|
8
|
-
type AgentExecutor,
|
|
2
|
+
buildBriefingPrompt, splitBriefingOutput, buildMemoryReflectionPrompt,
|
|
3
|
+
createApiClient, mergeFacts, parseFacts, type AgentExecutor,
|
|
9
4
|
} from '@lucidity/runtime';
|
|
10
5
|
import type { Task, User } from '@lucidity/shared';
|
|
11
6
|
import type { DaemonConfig } from '../config.js';
|
|
12
7
|
import type { Deliverer } from '../delivery/index.js';
|
|
13
8
|
import type { AttentionPublisher } from '../attention.js';
|
|
9
|
+
import type { SavedWorkflow } from '../automations/workflow.js';
|
|
14
10
|
import { createVault } from '../vault.js';
|
|
15
11
|
import { loadNotesContext } from '../notesContext.js';
|
|
16
12
|
import { loadFlaggedTasks } from '../importantTasks.js';
|
|
@@ -19,135 +15,92 @@ export interface BriefingResult {
|
|
|
19
15
|
text: string;
|
|
20
16
|
costUsd?: number;
|
|
21
17
|
sessionId?: string;
|
|
22
|
-
/** Delivery channel used. */
|
|
23
18
|
delivered: string;
|
|
24
|
-
/** Present if the briefing succeeded but delivery failed. */
|
|
25
19
|
deliveryError?: string;
|
|
26
|
-
/** Number of new durable facts learned this run. */
|
|
27
20
|
factsLearned: number;
|
|
28
|
-
/** How many attention boards this run produced for the phone (#320). */
|
|
29
21
|
boardsPublished: number;
|
|
30
22
|
}
|
|
31
23
|
|
|
32
|
-
/**
|
|
33
|
-
* The daily briefing pipeline:
|
|
34
|
-
* 1. fetch today's tasks + profile
|
|
35
|
-
* 2. read persona (SOUL.md) + durable facts (MEMORY.md) from the vault
|
|
36
|
-
* 3. assemble + run the briefing
|
|
37
|
-
* 4. deliver (notification) — failure is a warning, not a run failure
|
|
38
|
-
* 5. reflect → merge new facts into MEMORY.md (if config.reflect)
|
|
39
|
-
* 6. write a session log
|
|
40
|
-
* Returns metadata for the run log. stdout transcript + run-record timing are
|
|
41
|
-
* handled by the caller.
|
|
42
|
-
*/
|
|
43
24
|
export async function runBriefing(
|
|
44
25
|
config: DaemonConfig,
|
|
45
26
|
executor: AgentExecutor,
|
|
46
27
|
deliverer: Deliverer,
|
|
47
28
|
attention?: AttentionPublisher,
|
|
29
|
+
workflow?: SavedWorkflow,
|
|
48
30
|
): Promise<BriefingResult> {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// 1. Briefing — and, in the same turn, the phone's attention board (#320). One model call
|
|
68
|
-
// producing both, so the two framings come from one reading of the day and can't disagree.
|
|
69
|
-
const prompt = buildBriefingPrompt({
|
|
70
|
-
user,
|
|
71
|
-
tasks,
|
|
72
|
-
persona,
|
|
73
|
-
memory,
|
|
74
|
-
notes,
|
|
75
|
-
flagged,
|
|
76
|
-
withBoard: attention != null,
|
|
77
|
-
});
|
|
78
|
-
const briefing = await executor.run({
|
|
79
|
-
systemPrompt: prompt.systemPrompt,
|
|
80
|
-
userPrompt: prompt.userPrompt,
|
|
81
|
-
model: config.codeModel,
|
|
82
|
-
effort: config.codeEffort,
|
|
31
|
+
const step = <T>(key: string, policy: 'retry' | 'effect', action: () => Promise<T> | T): Promise<T> =>
|
|
32
|
+
workflow ? workflow.step(key, policy, action) : Promise.resolve().then(action);
|
|
33
|
+
const context = await step('Collect context', 'retry', async () => {
|
|
34
|
+
const api = createApiClient({ apiUrl: config.apiUrl, apiKey: config.apiKey });
|
|
35
|
+
const [tasks, user, flagged] = await Promise.all([
|
|
36
|
+
api.request<Task[]>('/api/tasks/today'), api.request<User>('/api/users/me'), loadFlaggedTasks(api),
|
|
37
|
+
]);
|
|
38
|
+
const vault = createVault(config.vaultPath);
|
|
39
|
+
const facts = vault.readMemoryFacts();
|
|
40
|
+
return {
|
|
41
|
+
tasks, user, flagged, persona: vault.readPersona(),
|
|
42
|
+
memory: facts.length ? facts.map((f) => `- ${f}`).join('\n') : undefined,
|
|
43
|
+
notes: loadNotesContext(config), startedAt: new Date().toISOString(),
|
|
44
|
+
model: config.codeModel, effort: config.codeEffort, provider: config.codeProvider,
|
|
45
|
+
reflect: config.reflect, vaultPath: config.vaultPath, delivery: deliverer.name,
|
|
46
|
+
withBoard: attention != null,
|
|
47
|
+
};
|
|
83
48
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
:
|
|
49
|
+
const { tasks, user, persona, memory, flagged } = context;
|
|
50
|
+
const vault = createVault(context.vaultPath);
|
|
51
|
+
const briefing = await step('Generate briefing', 'retry', () => executor.run({
|
|
52
|
+
...buildBriefingPrompt({ user, tasks, persona, memory, notes: context.notes, flagged, withBoard: context.withBoard }),
|
|
53
|
+
model: context.model, effort: context.effort, provider: context.provider, noTools: true,
|
|
54
|
+
}));
|
|
55
|
+
const split = context.withBoard ? splitBriefingOutput(briefing.text, [...tasks, ...flagged]) : { briefing: briefing.text, boards: [] };
|
|
89
56
|
const text = split.briefing;
|
|
90
57
|
let costUsd = briefing.costUsd;
|
|
91
58
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
59
|
+
// The local artifact has a stable identity and an exact-content receipt. Save before delivery.
|
|
60
|
+
if (workflow) await step('Save briefing', 'retry', () => vault.writeSessionLog({
|
|
61
|
+
startedAt: context.startedAt, body: text, deliveredVia: 'See automation run for delivery outcome', factsLearned: [],
|
|
62
|
+
}, { id: workflow.runId, strict: true }));
|
|
63
|
+
|
|
64
|
+
// Board publication replaces one dated value. Rehydrate it on resume without regressing a newer board.
|
|
65
|
+
if (attention && split.boards.length && (!attention.latest() || attention.latest()!.writtenAt <= context.startedAt))
|
|
66
|
+
attention.publish(split.boards, new Date(context.startedAt));
|
|
67
|
+
await step('Publish board', 'retry', () => ({ writtenAt: context.startedAt, boards: split.boards }));
|
|
96
68
|
|
|
97
|
-
// 2. Deliver
|
|
98
69
|
let deliveryError: string | undefined;
|
|
99
70
|
try {
|
|
100
|
-
await
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
71
|
+
await step('Deliver notification', 'effect', async () => {
|
|
72
|
+
if (deliverer.name !== context.delivery) throw new Error('The delivery channel changed since this run started.');
|
|
73
|
+
await deliverer.deliver({ title: 'Lucidity', body: text });
|
|
74
|
+
return { delivered: deliverer.name };
|
|
75
|
+
});
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (workflow) throw error;
|
|
78
|
+
deliveryError = error instanceof Error ? error.message : String(error);
|
|
106
79
|
}
|
|
107
80
|
|
|
108
|
-
// 3. Reflect → update MEMORY.md (best-effort; never fails the run)
|
|
109
81
|
let learned: string[] = [];
|
|
110
|
-
if (
|
|
82
|
+
if (context.reflect) {
|
|
111
83
|
try {
|
|
112
|
-
const
|
|
113
|
-
persona,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
memory,
|
|
118
|
-
});
|
|
119
|
-
const reflection = await executor.run({
|
|
120
|
-
systemPrompt: rp.systemPrompt,
|
|
121
|
-
userPrompt: rp.userPrompt,
|
|
122
|
-
model: config.codeModel,
|
|
123
|
-
effort: config.codeEffort,
|
|
124
|
-
});
|
|
125
|
-
if (reflection.costUsd != null)
|
|
126
|
-
costUsd = (costUsd ?? 0) + reflection.costUsd;
|
|
84
|
+
const reflection = await step('Reflect', 'retry', () => executor.run({
|
|
85
|
+
...buildMemoryReflectionPrompt({ persona, user, tasks, briefing: text, memory }),
|
|
86
|
+
model: context.model, effort: context.effort, provider: context.provider, noTools: true,
|
|
87
|
+
}));
|
|
88
|
+
if (reflection.costUsd != null) costUsd = (costUsd ?? 0) + reflection.costUsd;
|
|
127
89
|
learned = parseFacts(reflection.text);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
);
|
|
90
|
+
await step('Update memory', 'effect', () => {
|
|
91
|
+
// Read and merge synchronously at commit time, never reuse the initial facts snapshot.
|
|
92
|
+
if (learned.length) vault.writeMemoryFacts(mergeFacts(vault.readMemoryFacts(!!workflow), learned), !!workflow);
|
|
93
|
+
return { factsLearned: learned.length };
|
|
94
|
+
});
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (workflow) throw error;
|
|
97
|
+
console.error(`[briefing] reflection failed: ${String(error)}`);
|
|
133
98
|
}
|
|
134
99
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
vault.writeSessionLog({
|
|
138
|
-
startedAt: new Date().toISOString(),
|
|
139
|
-
body: text,
|
|
100
|
+
if (!workflow) vault.writeSessionLog({
|
|
101
|
+
startedAt: context.startedAt, body: text,
|
|
140
102
|
deliveredVia: deliveryError ? `${deliverer.name} (failed)` : deliverer.name,
|
|
141
103
|
factsLearned: learned,
|
|
142
104
|
});
|
|
143
|
-
|
|
144
|
-
return {
|
|
145
|
-
text,
|
|
146
|
-
costUsd,
|
|
147
|
-
sessionId: briefing.sessionId,
|
|
148
|
-
delivered: deliverer.name,
|
|
149
|
-
deliveryError,
|
|
150
|
-
factsLearned: learned.length,
|
|
151
|
-
boardsPublished: attention ? split.boards.length : 0,
|
|
152
|
-
};
|
|
105
|
+
return { text, costUsd, sessionId: briefing.sessionId, delivered: context.delivery, deliveryError, factsLearned: learned.length, boardsPublished: split.boards.length };
|
|
153
106
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type Level = 'log' | 'warn' | 'error';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Put the time on every line the daemon logs. launchd appends stdout and stderr to
|
|
5
|
+
* `daemon.out.log` and `daemon.err.log` with nothing added, so a relay 502 could not be placed
|
|
6
|
+
* against the turn it interrupted (#505). Only the daemon run mode calls this: the CLI commands
|
|
7
|
+
* print for a person and stay unstamped.
|
|
8
|
+
*/
|
|
9
|
+
export function stampLogs(target: Pick<Console, Level> = console, now: () => Date = () => new Date()): void {
|
|
10
|
+
for (const level of ['log', 'warn', 'error'] as const) {
|
|
11
|
+
const write = target[level].bind(target);
|
|
12
|
+
target[level] = (...args: unknown[]) => write(now().toISOString(), ...args);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
encodeSession,
|
|
3
|
+
type AgentExecutor,
|
|
4
|
+
type AgentProvider,
|
|
5
|
+
type ExecutorRunInput,
|
|
6
|
+
type ExecutorResult,
|
|
7
|
+
type ExecutorStreamEvent,
|
|
8
|
+
type ProviderRunRef,
|
|
9
|
+
type ProviderInspection,
|
|
10
|
+
} from '@lucidity/runtime';
|
|
11
|
+
import type { RuntimeStore } from './runtimeStore.js';
|
|
12
|
+
import type { TurnLogStore } from './turnLog.js';
|
|
13
|
+
|
|
14
|
+
export interface SavedProviderRun extends ProviderRunRef {
|
|
15
|
+
version: 1;
|
|
16
|
+
requestId: string;
|
|
17
|
+
provider: AgentProvider;
|
|
18
|
+
ownerPid: number;
|
|
19
|
+
cwd?: string;
|
|
20
|
+
model?: string;
|
|
21
|
+
effort?: string;
|
|
22
|
+
result?: ExecutorResult;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Persist provider evidence before callers transform or publish their result. */
|
|
26
|
+
export class RecoveryExecutor implements AgentExecutor {
|
|
27
|
+
constructor(private readonly executor: AgentExecutor, private readonly provider: AgentProvider, private readonly store?: RuntimeStore) {}
|
|
28
|
+
get name() { return this.executor.name; }
|
|
29
|
+
get strictResume() { return this.executor.strictResume; }
|
|
30
|
+
get recoveryCapability() { return this.executor.recoveryCapability; }
|
|
31
|
+
inspect(ref: ProviderRunRef, options?: { cwd?: string; timeoutMs?: number }): Promise<ProviderInspection> {
|
|
32
|
+
return this.executor.inspect?.(ref, options) ?? Promise.resolve({ status: 'unsupported', reason: 'Provider history inspection is unavailable.' });
|
|
33
|
+
}
|
|
34
|
+
models() { return this.executor.models?.() ?? Promise.resolve([]); }
|
|
35
|
+
commands(input?: Pick<ExecutorRunInput, 'cwd' | 'permissionMode' | 'mcp'>) { return this.executor.commands?.(input) ?? Promise.resolve([]); }
|
|
36
|
+
steer(id: string, text: string) { return this.executor.steer?.(id, text) ?? Promise.reject(new Error('Steering is unavailable.')); }
|
|
37
|
+
interrupt(id: string) { return this.executor.interrupt?.(id) ?? Promise.resolve(false); }
|
|
38
|
+
async dispose() { await this.executor.dispose?.(); }
|
|
39
|
+
async run(input: ExecutorRunInput): Promise<ExecutorResult> {
|
|
40
|
+
// Non-streaming consumers may validate or transform structured results.
|
|
41
|
+
return this.executor.run(input);
|
|
42
|
+
}
|
|
43
|
+
async *runStream(input: ExecutorRunInput): AsyncIterable<ExecutorStreamEvent> {
|
|
44
|
+
if (!this.executor.runStream) throw new Error('Streaming is unavailable.');
|
|
45
|
+
const request = input.requestId && this.store?.command(input.requestId);
|
|
46
|
+
const recordable = request && (request.kind === 'code' || (request.kind === 'ask' && !request.dayPlan && !request.projectPlan));
|
|
47
|
+
if (!recordable) { yield* this.executor.runStream(input); return; }
|
|
48
|
+
let saved: SavedProviderRun = {
|
|
49
|
+
version: 1, requestId: input.requestId!, provider: this.provider, ownerPid: process.pid,
|
|
50
|
+
cwd: input.cwd, sessionId: input.resume ?? input.sessionId, model: input.model, effort: input.effort,
|
|
51
|
+
};
|
|
52
|
+
const persist = (patch: Partial<SavedProviderRun>) => {
|
|
53
|
+
saved = { ...saved, ...patch };
|
|
54
|
+
this.store!.set('provider-runs', saved.requestId, saved);
|
|
55
|
+
};
|
|
56
|
+
persist({});
|
|
57
|
+
for await (const event of this.executor.runStream({ ...input, onRecovery: (ref) => { persist(ref); input.onRecovery?.(ref); } })) {
|
|
58
|
+
if (event.type === 'session') persist({ sessionId: event.sessionId });
|
|
59
|
+
if (event.type === 'done') persist({ result: event, sessionId: event.sessionId ?? saved.sessionId });
|
|
60
|
+
yield event;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function processAlive(pid?: number): boolean {
|
|
66
|
+
if (!pid) return false;
|
|
67
|
+
try { process.kill(pid, 0); return true; }
|
|
68
|
+
catch (error) { return (error as NodeJS.ErrnoException).code !== 'ESRCH'; }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Called under DaemonLease, before constructing queues or starting any new work. */
|
|
72
|
+
export async function recoverProviderRuns(logs: TurnLogStore, providers: Record<AgentProvider, AgentExecutor>, alive = processAlive): Promise<void> {
|
|
73
|
+
for (const saved of logs.runtime.list<SavedProviderRun>('provider-runs')) {
|
|
74
|
+
const state = logs.read(saved.requestId);
|
|
75
|
+
const terminal = state.frames.at(-1);
|
|
76
|
+
if (state.terminated && terminal?.code !== 'interrupted_unknown') continue;
|
|
77
|
+
if (saved.version !== 1) continue;
|
|
78
|
+
// A surviving native child can still own a workspace even after its daemon died.
|
|
79
|
+
if (alive(saved.ownerPid) || alive(saved.pid))
|
|
80
|
+
throw new Error(`Cannot recover ${saved.requestId}: its prior provider owner is still running. Wait for it to exit before restarting Lucidity.`);
|
|
81
|
+
let evidence: ProviderInspection;
|
|
82
|
+
if (saved.result) evidence = { status: 'completed', result: saved.result };
|
|
83
|
+
else {
|
|
84
|
+
try {
|
|
85
|
+
evidence = await providers[saved.provider].inspect?.(saved, { cwd: saved.cwd, timeoutMs: 10_000 }) ??
|
|
86
|
+
{ status: 'unsupported', reason: 'Provider history inspection is unavailable.' };
|
|
87
|
+
} catch { evidence = { status: 'unknown', reason: 'Provider history inspection failed.' }; }
|
|
88
|
+
}
|
|
89
|
+
const sessionId = saved.sessionId ? encodeSession({ provider: saved.provider, id: saved.sessionId, model: saved.model, effort: saved.effort }) : undefined;
|
|
90
|
+
const reconciliation = { requestId: saved.requestId, checkedAt: new Date().toISOString(), ...evidence,
|
|
91
|
+
...(evidence.status === 'completed' ? { result: { ...evidence.result, sessionId } } : {}) };
|
|
92
|
+
// Already-terminal unknown runs retain their original event stream. Review reads this linked record.
|
|
93
|
+
logs.runtime.set('reconciliation', saved.requestId, reconciliation);
|
|
94
|
+
if (!state.terminated && evidence.status === 'completed') {
|
|
95
|
+
if (sessionId) logs.append(saved.requestId, { type: 'session', requestId: saved.requestId, sessionId });
|
|
96
|
+
logs.append(saved.requestId, { type: 'done', requestId: saved.requestId, ...evidence.result, sessionId, recovered: true });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
package/src/room/client.ts
CHANGED
|
@@ -17,7 +17,6 @@ import type {
|
|
|
17
17
|
WorkspaceMode,
|
|
18
18
|
PrInfo,
|
|
19
19
|
HarnessImage,
|
|
20
|
-
FleetPlan,
|
|
21
20
|
DaemonConfigView,
|
|
22
21
|
DaemonConfigPatch,
|
|
23
22
|
} from '@lucidity/shared';
|
|
@@ -76,13 +75,6 @@ const STREAM_EVENT_TYPES = new Set([
|
|
|
76
75
|
'clone_result',
|
|
77
76
|
'error',
|
|
78
77
|
'cancelled',
|
|
79
|
-
// Conductor fleet events — logged + seq-stamped like any turn frame so a mid-fleet `pull`
|
|
80
|
-
// replays the plan and the workers' progress instead of settling the turn as cut off.
|
|
81
|
-
'fleet_plan',
|
|
82
|
-
'worker_status',
|
|
83
|
-
'fleet_conflict',
|
|
84
|
-
'worker_pr',
|
|
85
|
-
'fleet_done',
|
|
86
78
|
]);
|
|
87
79
|
|
|
88
80
|
/**
|
|
@@ -99,6 +91,7 @@ const STREAM_EVENT_TYPES = new Set([
|
|
|
99
91
|
|
|
100
92
|
export type CodeHandler = (
|
|
101
93
|
req: {
|
|
94
|
+
recoveryOf?: string;
|
|
102
95
|
id: string;
|
|
103
96
|
repoId: string;
|
|
104
97
|
prompt: string;
|
|
@@ -118,21 +111,6 @@ export type CloneHandler = (
|
|
|
118
111
|
ctx: { send: (obj: unknown) => void; signal?: AbortSignal },
|
|
119
112
|
) => Promise<void>;
|
|
120
113
|
|
|
121
|
-
export type ConductHandler = (
|
|
122
|
-
req: {
|
|
123
|
-
id: string;
|
|
124
|
-
repoId: string;
|
|
125
|
-
phase: 'plan' | 'run' | 'setup' | 'integrate';
|
|
126
|
-
prompt: string;
|
|
127
|
-
images?: HarnessImage[];
|
|
128
|
-
plan?: FleetPlan;
|
|
129
|
-
resume?: string;
|
|
130
|
-
/** A quick incremental spawn: skip the dogfood task graph (no parent task, no subtask). */
|
|
131
|
-
ephemeral?: boolean;
|
|
132
|
-
},
|
|
133
|
-
ctx: { send: (obj: unknown) => void; signal?: AbortSignal; runWorker: NonNullable<import('../coding/conduct.js').RunConductTurnDeps['runWorker']> },
|
|
134
|
-
) => Promise<void>;
|
|
135
|
-
|
|
136
114
|
/** One row of the phone's repo picker: which repo, what branch it sits on right now,
|
|
137
115
|
* and whether this daemon will let a turn run in that checkout (#121). */
|
|
138
116
|
export interface RepoInfo {
|
|
@@ -170,8 +148,6 @@ export interface DispatchDeps {
|
|
|
170
148
|
signal?: AbortSignal;
|
|
171
149
|
/** Handle a `code` turn (M7). Absent → coding stays disabled. */
|
|
172
150
|
codeHandler?: CodeHandler;
|
|
173
|
-
/** Handle a `conduct` turn (the fleet conductor). Absent → the conductor stays disabled. */
|
|
174
|
-
conductHandler?: ConductHandler;
|
|
175
151
|
/** Handle a `clone` turn (#78). Absent → phone cloning stays disabled. */
|
|
176
152
|
cloneHandler?: CloneHandler;
|
|
177
153
|
/** The phone's repo picker (`repos` request). A callback, not a value: resolving each
|
|
@@ -226,7 +202,7 @@ function sendStreamEvent(
|
|
|
226
202
|
else if (ev.type === 'delta')
|
|
227
203
|
send({ type: 'delta', requestId, text: ev.text });
|
|
228
204
|
else if (ev.type === 'tool_call')
|
|
229
|
-
send({
|
|
205
|
+
send({ ...ev, requestId });
|
|
230
206
|
else
|
|
231
207
|
send({
|
|
232
208
|
type: 'done',
|
|
@@ -406,6 +382,7 @@ export async function dispatchRequest(
|
|
|
406
382
|
reason: req.reason,
|
|
407
383
|
snapshot: req.snapshot,
|
|
408
384
|
diag: req.diag,
|
|
385
|
+
perf: req.perf,
|
|
409
386
|
});
|
|
410
387
|
const path = writeIncidentBundle(bundle, deps.incidentsDir);
|
|
411
388
|
deps.telemetry?.record(
|
|
@@ -505,7 +482,10 @@ export async function dispatchRequest(
|
|
|
505
482
|
// Completion can beat Stop while its terminal frame is lost in transit. Replay
|
|
506
483
|
// the actual outcome so the phone settles without rewriting finished work.
|
|
507
484
|
const state = deps.turnLogs.read(req.targetId);
|
|
508
|
-
if (state.terminated)
|
|
485
|
+
if (state.terminated) {
|
|
486
|
+
log(`stop for finished turn ${req.targetId}: replaying its ${state.frames.length} frames`);
|
|
487
|
+
for (const frame of state.frames) deps.sendRaw(frame);
|
|
488
|
+
}
|
|
509
489
|
}
|
|
510
490
|
return;
|
|
511
491
|
}
|
|
@@ -525,6 +505,10 @@ export async function dispatchRequest(
|
|
|
525
505
|
});
|
|
526
506
|
return;
|
|
527
507
|
}
|
|
508
|
+
// The phone is still waiting on a turn this computer already finished: its last frame was
|
|
509
|
+
// lost on the way. Worth a line, it is the only trace on this side of that failure (#505).
|
|
510
|
+
if (state.terminated && state.frames.some((frame) => frame.seq > req.sinceSeq))
|
|
511
|
+
log(`pull for finished turn ${req.targetId}: phone had seq ${req.sinceSeq} of ${state.frames.length}`);
|
|
528
512
|
// Replay the gap verbatim (already logged; don't re-log).
|
|
529
513
|
for (const frame of state.frames) {
|
|
530
514
|
if (frame.seq > req.sinceSeq) sendRaw(frame);
|
|
@@ -555,7 +539,7 @@ export async function dispatchRequest(
|
|
|
555
539
|
|
|
556
540
|
if (
|
|
557
541
|
deps.recordAcceptance &&
|
|
558
|
-
['ask', 'code', '
|
|
542
|
+
['ask', 'code', 'briefing', 'attention', 'clone'].includes(
|
|
559
543
|
req.kind,
|
|
560
544
|
)
|
|
561
545
|
) {
|
|
@@ -733,6 +717,10 @@ export async function dispatchRequest(
|
|
|
733
717
|
});
|
|
734
718
|
} else if (req.kind === 'workspaces') {
|
|
735
719
|
if (!deps.workspaces) throw new Error('Update Lucidity on the computer to use persistent workers.');
|
|
720
|
+
if (req.command.action === 'continue-run') {
|
|
721
|
+
if (!deps.turnQueue) throw new Error('The computer queue is unavailable.');
|
|
722
|
+
deps.turnQueue.enqueue(deps.workspaces.continuation(req.command));
|
|
723
|
+
}
|
|
736
724
|
send({ requestId: req.id, kind: 'workspaces', snapshot: await deps.workspaces.command(req.command, req.id) });
|
|
737
725
|
} else if (req.kind === 'repos') {
|
|
738
726
|
send({
|
|
@@ -806,29 +794,9 @@ export async function dispatchRequest(
|
|
|
806
794
|
});
|
|
807
795
|
if (r.restarting) deps.requestRestart?.();
|
|
808
796
|
}
|
|
809
|
-
} else if (req.kind === 'conduct') {
|
|
810
|
-
if (deps.conductHandler) {
|
|
811
|
-
await deps.conductHandler(
|
|
812
|
-
{ id: req.id, repoId: req.repoId, phase: req.phase, prompt: req.prompt,
|
|
813
|
-
images: req.images, plan: req.plan, resume: req.resume, ephemeral: req.ephemeral },
|
|
814
|
-
{
|
|
815
|
-
send, signal,
|
|
816
|
-
runWorker: (worker, workerDeps) => dispatchRequest(
|
|
817
|
-
JSON.stringify({ ...worker, kind: 'code', stream: true, mode: 'worktree' }),
|
|
818
|
-
{ ...deps, signal, send: workerDeps.send, recordAcceptance: true },
|
|
819
|
-
),
|
|
820
|
-
},
|
|
821
|
-
);
|
|
822
|
-
} else {
|
|
823
|
-
send({
|
|
824
|
-
type: 'error',
|
|
825
|
-
requestId: req.id,
|
|
826
|
-
message: 'The conductor is not enabled on this daemon.',
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
797
|
} else if (deps.codeHandler) {
|
|
830
798
|
// Per-worktree lane: two turns sharing a worktree/cwd must serialize, but genuinely
|
|
831
|
-
// independent work runs in parallel. The bare repo session and each
|
|
799
|
+
// independent work runs in parallel. The bare repo session and each worktree
|
|
832
800
|
// (`workerId`) own separate worktrees, so each gets its own lane — a phone turn drilled
|
|
833
801
|
// into worker A can't collide with worker B, and a bare turn keeps today's exact key.
|
|
834
802
|
const lane = req.workerId
|
|
@@ -847,6 +815,7 @@ export async function dispatchRequest(
|
|
|
847
815
|
mode: req.mode,
|
|
848
816
|
expectedBranch: req.expectedBranch,
|
|
849
817
|
workerId: req.workerId,
|
|
818
|
+
...(req.recoveryOf ? { recoveryOf: req.recoveryOf } : {}),
|
|
850
819
|
},
|
|
851
820
|
{ send, signal },
|
|
852
821
|
),
|
|
@@ -895,8 +864,6 @@ export interface RoomClientOptions {
|
|
|
895
864
|
logger?: (msg: string) => void;
|
|
896
865
|
/** Handle `code` turns (M7). Absent → coding disabled. */
|
|
897
866
|
codeHandler?: CodeHandler;
|
|
898
|
-
/** Handle `conduct` turns (the fleet conductor). Absent → the conductor disabled. */
|
|
899
|
-
conductHandler?: ConductHandler;
|
|
900
867
|
/** Serialises room turns per lane — see `DispatchDeps.queue`. Share the daemon's one instance
|
|
901
868
|
* so room turns also serialise against scheduled briefings and the local chat server. */
|
|
902
869
|
queue?: LaneQueue;
|
|
@@ -1045,7 +1012,6 @@ export function startRoomClient(opts: RoomClientOptions): RoomClientHandle {
|
|
|
1045
1012
|
vault,
|
|
1046
1013
|
signal,
|
|
1047
1014
|
codeHandler,
|
|
1048
|
-
conductHandler,
|
|
1049
1015
|
cloneHandler,
|
|
1050
1016
|
queue,
|
|
1051
1017
|
getConfig,
|
|
@@ -1193,8 +1159,7 @@ export function startRoomClient(opts: RoomClientOptions): RoomClientHandle {
|
|
|
1193
1159
|
workspaces: opts.workspaces,
|
|
1194
1160
|
signal,
|
|
1195
1161
|
codeHandler,
|
|
1196
|
-
|
|
1197
|
-
cloneHandler,
|
|
1162
|
+
cloneHandler,
|
|
1198
1163
|
queue: executionLanes,
|
|
1199
1164
|
inFlight,
|
|
1200
1165
|
attention: opts.attention,
|
package/src/room/computer.ts
CHANGED
|
@@ -58,8 +58,7 @@ export function computerRuntime(opts: RoomClientOptions): ComputerRuntime {
|
|
|
58
58
|
...(opts.commands ? ['commands'] : []),
|
|
59
59
|
...(opts.controls ? ['permission', 'steer'] : []),
|
|
60
60
|
...(opts.codeHandler ? ['code'] : []),
|
|
61
|
-
...(opts.workspaces ? ['workspaces', 'checkout-history'] : []),
|
|
62
|
-
...(opts.conductHandler ? ['conduct'] : []),
|
|
61
|
+
...(opts.workspaces ? ['workspaces', 'checkout-history', 'repo-settings', 'worktree-delete'] : []),
|
|
63
62
|
...(opts.cloneHandler ? ['clone'] : []),
|
|
64
63
|
...(opts.attention ? ['attention'] : []),
|
|
65
64
|
...(opts.getConfig ? ['getConfig'] : []),
|