@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
|
@@ -8,6 +8,23 @@ export declare const SavedChatMessageSchema: z.ZodObject<{
|
|
|
8
8
|
}>;
|
|
9
9
|
text: z.ZodString;
|
|
10
10
|
}, z.core.$loose>;
|
|
11
|
+
/** How one repository's worktrees are prepared. Stored on the computer and edited from the phone. */
|
|
12
|
+
export declare const RepoSettingsSchema: z.ZodObject<{
|
|
13
|
+
copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
14
|
+
setup: z.ZodOptional<z.ZodString>;
|
|
15
|
+
baseRef: z.ZodOptional<z.ZodString>;
|
|
16
|
+
archiveScript: z.ZodOptional<z.ZodString>;
|
|
17
|
+
archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
/** Where a repository lives on the computer, and what its copy list matches there right now. */
|
|
21
|
+
export declare const RepoPlacesSchema: z.ZodObject<{
|
|
22
|
+
root: z.ZodString;
|
|
23
|
+
worktrees: z.ZodString;
|
|
24
|
+
copyMatches: z.ZodArray<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type RepoPlaces = z.infer<typeof RepoPlacesSchema>;
|
|
27
|
+
export type RepoSettings = z.infer<typeof RepoSettingsSchema>;
|
|
11
28
|
export declare const WorkerWorkspaceSchema: z.ZodObject<{
|
|
12
29
|
workerId: z.ZodUUID;
|
|
13
30
|
repoId: z.ZodString;
|
|
@@ -26,6 +43,11 @@ export declare const WorkerWorkspaceSchema: z.ZodObject<{
|
|
|
26
43
|
baseSha: z.ZodOptional<z.ZodString>;
|
|
27
44
|
resume: z.ZodOptional<z.ZodString>;
|
|
28
45
|
error: z.ZodOptional<z.ZodString>;
|
|
46
|
+
setup: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
running: "running";
|
|
48
|
+
failed: "failed";
|
|
49
|
+
}>>;
|
|
50
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
29
51
|
createdAt: z.ZodString;
|
|
30
52
|
updatedAt: z.ZodString;
|
|
31
53
|
}, z.core.$strip>;
|
|
@@ -34,12 +56,21 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
|
|
|
34
56
|
action: z.ZodEnum<{
|
|
35
57
|
archive: "archive";
|
|
36
58
|
history: "history";
|
|
59
|
+
settings: "settings";
|
|
60
|
+
delete: "delete";
|
|
37
61
|
list: "list";
|
|
62
|
+
setup: "setup";
|
|
38
63
|
create: "create";
|
|
39
64
|
restore: "restore";
|
|
40
65
|
import: "import";
|
|
41
66
|
"clear-history": "clear-history";
|
|
67
|
+
"inspect-run": "inspect-run";
|
|
68
|
+
"continue-run": "continue-run";
|
|
69
|
+
"save-settings": "save-settings";
|
|
42
70
|
}>;
|
|
71
|
+
requestId: z.ZodOptional<z.ZodUUID>;
|
|
72
|
+
reviewId: z.ZodOptional<z.ZodUUID>;
|
|
73
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
43
74
|
repoId: z.ZodOptional<z.ZodString>;
|
|
44
75
|
workerId: z.ZodOptional<z.ZodUUID>;
|
|
45
76
|
checkout: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -47,6 +78,15 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
|
|
|
47
78
|
title: z.ZodOptional<z.ZodString>;
|
|
48
79
|
brief: z.ZodOptional<z.ZodString>;
|
|
49
80
|
before: z.ZodOptional<z.ZodString>;
|
|
81
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
83
|
+
setup: z.ZodOptional<z.ZodString>;
|
|
84
|
+
baseRef: z.ZodOptional<z.ZodString>;
|
|
85
|
+
archiveScript: z.ZodOptional<z.ZodString>;
|
|
86
|
+
archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
50
90
|
legacy: z.ZodOptional<z.ZodObject<{
|
|
51
91
|
messages: z.ZodArray<z.ZodObject<{
|
|
52
92
|
id: z.ZodString;
|
|
@@ -62,6 +102,12 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
|
|
|
62
102
|
}, z.core.$strip>>;
|
|
63
103
|
}, z.core.$strip>;
|
|
64
104
|
export type WorkspaceCommand = z.infer<typeof WorkspaceCommandSchema>;
|
|
105
|
+
/** Work an archived worktree still holds that is neither in the repository's base branch nor pushed. */
|
|
106
|
+
export declare const UnmergedWorkSchema: z.ZodObject<{
|
|
107
|
+
commits: z.ZodNumber;
|
|
108
|
+
uncommitted: z.ZodBoolean;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type UnmergedWork = z.infer<typeof UnmergedWorkSchema>;
|
|
65
111
|
export declare const WorkspaceRunSchema: z.ZodObject<{
|
|
66
112
|
requestId: z.ZodString;
|
|
67
113
|
prompt: z.ZodString;
|
|
@@ -79,6 +125,31 @@ export declare const WorkspaceRunSchema: z.ZodObject<{
|
|
|
79
125
|
terminated: z.ZodBoolean;
|
|
80
126
|
}, z.core.$strip>;
|
|
81
127
|
export type WorkspaceRun = z.infer<typeof WorkspaceRunSchema>;
|
|
128
|
+
export declare const RunReviewSchema: z.ZodObject<{
|
|
129
|
+
requestId: z.ZodUUID;
|
|
130
|
+
reviewId: z.ZodUUID;
|
|
131
|
+
inspectedAt: z.ZodString;
|
|
132
|
+
prompt: z.ZodString;
|
|
133
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
134
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
135
|
+
changes: z.ZodString;
|
|
136
|
+
diff: z.ZodString;
|
|
137
|
+
inspectionError: z.ZodOptional<z.ZodString>;
|
|
138
|
+
progress: z.ZodString;
|
|
139
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
140
|
+
evidence: z.ZodString;
|
|
141
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
phase: z.ZodString;
|
|
144
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
145
|
+
outcome: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
unresolved: z.ZodArray<z.ZodString>;
|
|
148
|
+
continuationId: z.ZodUUID;
|
|
149
|
+
continuedAt: z.ZodOptional<z.ZodString>;
|
|
150
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type RunReview = z.infer<typeof RunReviewSchema>;
|
|
82
153
|
export declare const WorkspaceSnapshotSchema: z.ZodObject<{
|
|
83
154
|
workers: z.ZodArray<z.ZodObject<{
|
|
84
155
|
workerId: z.ZodUUID;
|
|
@@ -98,9 +169,38 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
|
|
|
98
169
|
baseSha: z.ZodOptional<z.ZodString>;
|
|
99
170
|
resume: z.ZodOptional<z.ZodString>;
|
|
100
171
|
error: z.ZodOptional<z.ZodString>;
|
|
172
|
+
setup: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
running: "running";
|
|
174
|
+
failed: "failed";
|
|
175
|
+
}>>;
|
|
176
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
101
177
|
createdAt: z.ZodString;
|
|
102
178
|
updatedAt: z.ZodString;
|
|
103
179
|
}, z.core.$strip>>;
|
|
180
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
requestId: z.ZodUUID;
|
|
182
|
+
reviewId: z.ZodUUID;
|
|
183
|
+
inspectedAt: z.ZodString;
|
|
184
|
+
prompt: z.ZodString;
|
|
185
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
186
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
187
|
+
changes: z.ZodString;
|
|
188
|
+
diff: z.ZodString;
|
|
189
|
+
inspectionError: z.ZodOptional<z.ZodString>;
|
|
190
|
+
progress: z.ZodString;
|
|
191
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
192
|
+
evidence: z.ZodString;
|
|
193
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
phase: z.ZodString;
|
|
196
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
197
|
+
outcome: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
unresolved: z.ZodArray<z.ZodString>;
|
|
200
|
+
continuationId: z.ZodUUID;
|
|
201
|
+
continuedAt: z.ZodOptional<z.ZodString>;
|
|
202
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
104
204
|
checkout: z.ZodOptional<z.ZodObject<{
|
|
105
205
|
repoId: z.ZodString;
|
|
106
206
|
conversationId: z.ZodString;
|
|
@@ -133,6 +233,23 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
|
|
|
133
233
|
text: z.ZodString;
|
|
134
234
|
}, z.core.$loose>>>;
|
|
135
235
|
nextBefore: z.ZodOptional<z.ZodString>;
|
|
236
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
238
|
+
setup: z.ZodOptional<z.ZodString>;
|
|
239
|
+
baseRef: z.ZodOptional<z.ZodString>;
|
|
240
|
+
archiveScript: z.ZodOptional<z.ZodString>;
|
|
241
|
+
archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
}, z.core.$strip>>;
|
|
244
|
+
places: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
root: z.ZodString;
|
|
246
|
+
worktrees: z.ZodString;
|
|
247
|
+
copyMatches: z.ZodArray<z.ZodString>;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
unmerged: z.ZodOptional<z.ZodObject<{
|
|
250
|
+
commits: z.ZodNumber;
|
|
251
|
+
uncommitted: z.ZodBoolean;
|
|
252
|
+
}, z.core.$strip>>;
|
|
136
253
|
}, z.core.$strip>;
|
|
137
254
|
export type WorkspaceSnapshot = z.infer<typeof WorkspaceSnapshotSchema>;
|
|
138
255
|
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;iBAEnB,CAAC;AAEjB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;iBAEnB,CAAC;AAEjB,qGAAqG;AACrG,eAAO,MAAM,kBAAkB;;;;;;;iBAa7B,CAAC;AACH,gGAAgG;AAChG,eAAO,MAAM,gBAAgB;;;;iBAE3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;iBAYhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,wGAAwG;AACxG,eAAO,MAAM,kBAAkB;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;iBAQ1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAclC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -2,6 +2,25 @@ import { z } from 'zod';
|
|
|
2
2
|
export const SavedChatMessageSchema = z.object({
|
|
3
3
|
id: z.string().min(1), role: z.enum(['user', 'lucid', 'notice']), text: z.string(),
|
|
4
4
|
}).passthrough();
|
|
5
|
+
/** How one repository's worktrees are prepared. Stored on the computer and edited from the phone. */
|
|
6
|
+
export const RepoSettingsSchema = z.object({
|
|
7
|
+
/** Gitignored files copied from the main checkout into a new worktree. Wildcards in the file name only. */
|
|
8
|
+
copy: z.array(z.string().trim().min(1).max(300)).max(50).default([]),
|
|
9
|
+
/** Shell command run in a new worktree once those files are in place. */
|
|
10
|
+
setup: z.string().trim().max(2000).optional(),
|
|
11
|
+
/** Remote branch new worktrees start from, e.g. `origin/main`. Unset uses the remote default. */
|
|
12
|
+
baseRef: z.string().trim().max(200).optional(),
|
|
13
|
+
/** Shell command run in a worktree just before it is archived. A failure stops the archive. */
|
|
14
|
+
archiveScript: z.string().trim().max(2000).optional(),
|
|
15
|
+
/** Archive a worktree once the pull request for its branch has merged. */
|
|
16
|
+
archiveOnMerge: z.boolean().optional(),
|
|
17
|
+
/** Delete the local branch when a worktree is archived. Restore brings it back from the snapshot. */
|
|
18
|
+
deleteBranchOnArchive: z.boolean().optional(),
|
|
19
|
+
});
|
|
20
|
+
/** Where a repository lives on the computer, and what its copy list matches there right now. */
|
|
21
|
+
export const RepoPlacesSchema = z.object({
|
|
22
|
+
root: z.string(), worktrees: z.string(), copyMatches: z.array(z.string()),
|
|
23
|
+
});
|
|
5
24
|
export const WorkerWorkspaceSchema = z.object({
|
|
6
25
|
workerId: z.uuidv7(), repoId: z.string().min(1), title: z.string().min(1).max(200),
|
|
7
26
|
brief: z.string().max(8000).default(''),
|
|
@@ -9,27 +28,53 @@ export const WorkerWorkspaceSchema = z.object({
|
|
|
9
28
|
state: z.enum(['creating', 'ready', 'setup_failed', 'archived']),
|
|
10
29
|
branch: z.string().optional(), baseRef: z.string().optional(), baseSha: z.string().optional(),
|
|
11
30
|
resume: z.string().optional(), error: z.string().optional(),
|
|
31
|
+
/** The setup command's progress on a ready worktree. A failure's output is in `error`. */
|
|
32
|
+
setup: z.enum(['running', 'failed']).optional(),
|
|
33
|
+
/** First of the ten ports reserved for this worktree's servers. */
|
|
34
|
+
port: z.number().int().min(1024).max(65525).optional(),
|
|
12
35
|
createdAt: z.string(), updatedAt: z.string(),
|
|
13
36
|
});
|
|
14
37
|
export const WorkspaceCommandSchema = z.object({
|
|
15
|
-
action: z.enum(['list', 'create', 'history', 'archive', 'restore', 'import', 'clear-history'
|
|
38
|
+
action: z.enum(['list', 'create', 'history', 'archive', 'restore', 'import', 'clear-history', 'inspect-run', 'continue-run',
|
|
39
|
+
'settings', 'save-settings', 'setup', 'delete']),
|
|
40
|
+
requestId: z.uuidv7().optional(), reviewId: z.uuidv7().optional(),
|
|
41
|
+
instruction: z.string().trim().min(1).max(8000).optional(),
|
|
16
42
|
repoId: z.string().min(1).optional(), workerId: z.uuidv7().optional(),
|
|
17
43
|
checkout: z.boolean().optional(), revision: z.string().optional(),
|
|
18
44
|
title: z.string().trim().min(1).max(200).optional(),
|
|
19
45
|
brief: z.string().max(8000).optional(), before: z.string().optional(),
|
|
46
|
+
settings: RepoSettingsSchema.optional(),
|
|
47
|
+
/** `delete` only: go ahead even though the worktree holds work that is not in the base branch. */
|
|
48
|
+
force: z.boolean().optional(),
|
|
20
49
|
legacy: z.object({
|
|
21
50
|
messages: z.array(SavedChatMessageSchema).max(10_000), resume: z.string().optional(),
|
|
22
51
|
sessionCheckout: z.boolean().optional(),
|
|
23
52
|
}).optional(),
|
|
24
53
|
});
|
|
54
|
+
/** Work an archived worktree still holds that is neither in the repository's base branch nor pushed. */
|
|
55
|
+
export const UnmergedWorkSchema = z.object({
|
|
56
|
+
commits: z.number().int().min(0),
|
|
57
|
+
/** The archive snapshot holds files that were never committed. */
|
|
58
|
+
uncommitted: z.boolean(),
|
|
59
|
+
});
|
|
25
60
|
export const WorkspaceRunSchema = z.object({
|
|
26
61
|
requestId: z.string(), prompt: z.string(),
|
|
27
62
|
handoff: z.object({ from: z.enum(['claude', 'codex']), to: z.enum(['claude', 'codex']) }).optional(),
|
|
28
63
|
frames: z.array(z.record(z.string(), z.unknown())),
|
|
29
64
|
terminated: z.boolean(),
|
|
30
65
|
});
|
|
66
|
+
export const RunReviewSchema = z.object({
|
|
67
|
+
requestId: z.uuidv7(), reviewId: z.uuidv7(), inspectedAt: z.string(),
|
|
68
|
+
prompt: z.string(), workspace: z.string().optional(), branch: z.string().optional(),
|
|
69
|
+
changes: z.string(), diff: z.string(), inspectionError: z.string().optional(),
|
|
70
|
+
progress: z.string(), answer: z.string().optional(), evidence: z.string(),
|
|
71
|
+
tools: z.array(z.object({ name: z.string(), phase: z.string(), itemId: z.string().optional(), outcome: z.string().optional() })),
|
|
72
|
+
unresolved: z.array(z.string()),
|
|
73
|
+
continuationId: z.uuidv7(), continuedAt: z.string().optional(), instruction: z.string().optional(),
|
|
74
|
+
});
|
|
31
75
|
export const WorkspaceSnapshotSchema = z.object({
|
|
32
76
|
workers: z.array(WorkerWorkspaceSchema),
|
|
77
|
+
review: RunReviewSchema.optional(),
|
|
33
78
|
checkout: z.object({
|
|
34
79
|
repoId: z.string(), conversationId: z.string(), revision: z.string(),
|
|
35
80
|
resume: z.string().optional(),
|
|
@@ -37,4 +82,8 @@ export const WorkspaceSnapshotSchema = z.object({
|
|
|
37
82
|
runs: z.array(WorkspaceRunSchema).optional(),
|
|
38
83
|
legacyMessages: z.array(SavedChatMessageSchema).optional(),
|
|
39
84
|
nextBefore: z.string().optional(),
|
|
85
|
+
settings: RepoSettingsSchema.optional(),
|
|
86
|
+
places: RepoPlacesSchema.optional(),
|
|
87
|
+
/** A `delete` that was not carried out: what would be lost. Sending it again with `force` deletes. */
|
|
88
|
+
unmerged: UnmergedWorkSchema.optional(),
|
|
40
89
|
});
|
|
@@ -233,6 +233,18 @@ export const AutomationRunSchema = z.object({
|
|
|
233
233
|
costUsd: z.number().optional(),
|
|
234
234
|
sessionId: z.string().optional(),
|
|
235
235
|
summary: z.string().default(''),
|
|
236
|
+
cancelRequested: z.boolean().optional(),
|
|
237
|
+
workflow: z.object({
|
|
238
|
+
version: z.number().int(),
|
|
239
|
+
attempts: z.number().int(),
|
|
240
|
+
possibleAdditionalCost: z.boolean(),
|
|
241
|
+
steps: z.array(z.object({
|
|
242
|
+
key: z.string(),
|
|
243
|
+
status: z.enum(['running', 'completed', 'uncertain', 'failed']),
|
|
244
|
+
attempts: z.number().int(),
|
|
245
|
+
error: z.string().optional(),
|
|
246
|
+
})),
|
|
247
|
+
}).optional(),
|
|
236
248
|
error: z.string().optional(),
|
|
237
249
|
parentRunId: id.optional(),
|
|
238
250
|
input: AutomationInputSchema.optional(),
|
|
@@ -51,13 +51,14 @@ export type ComputerPresence = z.infer<typeof ComputerPresenceSchema>;
|
|
|
51
51
|
export type ComputerFeature =
|
|
52
52
|
| 'checkout-history'
|
|
53
53
|
| 'workspaces'
|
|
54
|
+
| 'repo-settings'
|
|
55
|
+
| 'worktree-delete'
|
|
54
56
|
| 'turn-queue'
|
|
55
57
|
| 'provider-handoff'
|
|
56
58
|
| 'queue-control'
|
|
57
59
|
| 'day-plan'
|
|
58
60
|
| 'ask'
|
|
59
61
|
| 'code'
|
|
60
|
-
| 'conduct'
|
|
61
62
|
| 'briefing'
|
|
62
63
|
| 'attention'
|
|
63
64
|
| 'models'
|
|
@@ -98,7 +99,6 @@ export const INFERENCE_FEATURES = new Set<string>([
|
|
|
98
99
|
'ask',
|
|
99
100
|
'day-plan',
|
|
100
101
|
'code',
|
|
101
|
-
'conduct',
|
|
102
102
|
'briefing',
|
|
103
103
|
'attention',
|
|
104
104
|
]);
|
|
@@ -174,7 +174,7 @@ export function computerAvailability(
|
|
|
174
174
|
`Update Lucidity on ${presence.computer?.name ?? presence.machine ?? 'your computer'} to use this feature. Other compatible features remain available.`,
|
|
175
175
|
);
|
|
176
176
|
if (
|
|
177
|
-
['code', '
|
|
177
|
+
['code', 'repos', 'prs'].includes(feature) &&
|
|
178
178
|
!runtime.permissions.includes('coding')
|
|
179
179
|
)
|
|
180
180
|
return blocked(
|
|
@@ -395,10 +395,6 @@ export const HARNESS_REQUEST_KINDS = [
|
|
|
395
395
|
'getConfig',
|
|
396
396
|
'setConfig',
|
|
397
397
|
'incident',
|
|
398
|
-
// Conductor (fleet of coding agents): `plan` decomposes a goal into workers (returns a
|
|
399
|
-
// fan-out plan, runs no code); `run` executes an approved plan — one isolated worker
|
|
400
|
-
// worktree per subtask, dispatched in merge order, integrated back onto lucid/<repo>.
|
|
401
|
-
'conduct',
|
|
402
398
|
// Phone asks for the Dashboard's attention board (#320) — returns the cached one when it's
|
|
403
399
|
// still fresh, otherwise composes a new one.
|
|
404
400
|
'attention',
|
|
@@ -471,12 +467,9 @@ export const DELIVERY_CHANNELS = ['macos', 'stdout'] as const;
|
|
|
471
467
|
export const AGENT_MODES = ['off', 'auto', 'danger'] as const;
|
|
472
468
|
export type AgentMode = (typeof AGENT_MODES)[number];
|
|
473
469
|
|
|
474
|
-
//
|
|
475
|
-
// `
|
|
476
|
-
//
|
|
477
|
-
// integrated onto the fleet branch; `blocked` = paused for an approval or a merge conflict;
|
|
478
|
-
// `failed` = its turn errored. Mapped to Lucidity task status by the dogfood helper
|
|
479
|
-
// (pending/in_progress/blocked/completed), since a worker IS a subtask.
|
|
470
|
+
// What a worktree's chat is doing, as the phone shows it. `queued` = being created; `working` =
|
|
471
|
+
// its turn is streaming; `review` = idle and waiting for you; `failed` = its turn or setup errored.
|
|
472
|
+
// `merged` and `blocked` are kept for lanes saved by older builds.
|
|
480
473
|
export const WORKER_STATUSES = [
|
|
481
474
|
'queued',
|
|
482
475
|
'working',
|
|
@@ -4,6 +4,7 @@ export * from './githubContributions.js';
|
|
|
4
4
|
export * from './projectCapture.js';
|
|
5
5
|
export * from './taskActivity.js';
|
|
6
6
|
export * from './recurrence.js';
|
|
7
|
+
export * from './taskSync.js';
|
|
7
8
|
export * from './vault-search.js';
|
|
8
9
|
export * from './journal-vault.js';
|
|
9
10
|
export * from './journal-migration.js';
|
|
@@ -250,9 +251,6 @@ export {
|
|
|
250
251
|
BriefingRequestSchema,
|
|
251
252
|
JournalRequestSchema,
|
|
252
253
|
CodeRequestSchema,
|
|
253
|
-
ConductRequestSchema,
|
|
254
|
-
FleetPlanSchema,
|
|
255
|
-
FleetWorkerSchema,
|
|
256
254
|
RepoListRequestSchema,
|
|
257
255
|
ListPrsRequestSchema,
|
|
258
256
|
GetConfigRequestSchema,
|
|
@@ -386,9 +384,6 @@ export type {
|
|
|
386
384
|
BriefingRequest,
|
|
387
385
|
JournalRequest,
|
|
388
386
|
CodeRequest,
|
|
389
|
-
ConductRequest,
|
|
390
|
-
FleetPlan,
|
|
391
|
-
FleetWorker,
|
|
392
387
|
RepoListRequest,
|
|
393
388
|
ListPrsRequest,
|
|
394
389
|
PrInfo,
|
|
@@ -450,3 +445,5 @@ export type { AgentCommandOption, AgentCommandContext } from './agentCommands.js
|
|
|
450
445
|
|
|
451
446
|
export * from './goals.js';
|
|
452
447
|
export * from './goalNotes.js';
|
|
448
|
+
|
|
449
|
+
export * from './messagingSafety.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const MESSAGE_REPORT_REASONS = ['harassment', 'hate', 'sexual_content', 'violence', 'spam', 'other'] as const;
|
|
4
|
+
export const MessageReportSchema = z.object({
|
|
5
|
+
id: z.uuid(),
|
|
6
|
+
messageId: z.uuid(),
|
|
7
|
+
reason: z.enum(MESSAGE_REPORT_REASONS),
|
|
8
|
+
details: z.string().trim().max(2000).default(''),
|
|
9
|
+
});
|
|
10
|
+
export type MessageReportInput = z.infer<typeof MessageReportSchema>;
|
|
11
|
+
export type MessagingSafetyState = { blockedByMe: boolean; canMessage: boolean };
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
HARNESS_REQUEST_KINDS,
|
|
23
23
|
APPROVAL_DECISIONS,
|
|
24
24
|
WORKSPACE_MODES,
|
|
25
|
-
WORKER_STATUSES,
|
|
26
25
|
EFFORT_LEVELS,
|
|
27
26
|
DELIVERY_CHANNELS,
|
|
28
27
|
AGENT_MODES,
|
|
@@ -113,6 +112,8 @@ export const JournalRequestSchema = HarnessRequestBase.extend({
|
|
|
113
112
|
// server-side through the daemon's allowlist to an absolute path — the phone
|
|
114
113
|
// never sends a filesystem path.
|
|
115
114
|
export const CodeRequestSchema = HarnessRequestBase.extend({
|
|
115
|
+
recoveryOf: z.uuidv7().optional(),
|
|
116
|
+
recoveryReviewId: z.uuidv7().optional(),
|
|
116
117
|
kind: z.literal('code'),
|
|
117
118
|
repoId: z.string().min(1),
|
|
118
119
|
prompt: z.string().min(1).max(8000),
|
|
@@ -126,10 +127,8 @@ export const CodeRequestSchema = HarnessRequestBase.extend({
|
|
|
126
127
|
handoff: ProviderHandoffSchema.optional(),
|
|
127
128
|
queue: z.boolean().optional(),
|
|
128
129
|
afterRequestId: z.uuidv7().optional(),
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* isolated `fleet/<repoId>/<workerId>` worktree, on its own lane. Absent → the bare repo
|
|
132
|
-
* session, exactly as before. */
|
|
130
|
+
/** The worktree this turn belongs to. The daemon runs it in that worktree's own folder and
|
|
131
|
+
* branch, on its own lane. Absent → the repository's main session. */
|
|
133
132
|
workerId: z.uuidv7().optional(),
|
|
134
133
|
/** Where to do the work (#121). Absent → 'worktree', so a daemon on this schema
|
|
135
134
|
* still understands a phone that predates the mode picker. The daemon rejects
|
|
@@ -163,72 +162,6 @@ export const CloneRepoRequestSchema = HarnessRequestBase.extend({
|
|
|
163
162
|
url: z.string().min(1).max(2000),
|
|
164
163
|
});
|
|
165
164
|
|
|
166
|
-
// ---- Conductor (a fleet of coding agents) ---------------------------------
|
|
167
|
-
|
|
168
|
-
// One worker in a fan-out plan — a single coding lane. Its `workerId` is the fleet
|
|
169
|
-
// subtask's uuid AND the stream id its code frames arrive under (both uuidv7), so a
|
|
170
|
-
// worker reuses the whole existing code-turn pipeline: the phone routes any frame whose
|
|
171
|
-
// `requestId` equals a known `workerId` into that worker's lane. `ownedPaths` is the
|
|
172
|
-
// files/globs this worker may touch (the ownership map that prevents two lanes colliding);
|
|
173
|
-
// `mergeOrder` (lower first) mirrors the subtask's priority and decides integration order.
|
|
174
|
-
export const FleetWorkerSchema = z.object({
|
|
175
|
-
workerId: z.uuidv7(),
|
|
176
|
-
title: z.string().min(1).max(200),
|
|
177
|
-
brief: z.string().min(1).max(8000),
|
|
178
|
-
ownedPaths: z.array(z.string().max(400)).max(200),
|
|
179
|
-
mergeOrder: z.number().int(),
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// The lead's decomposition of a goal — what the phone renders as the Fan-out card, and
|
|
183
|
-
// what it sends back (possibly edited) to execute. `overlaps` are the ⚠ pairs whose owned
|
|
184
|
-
// paths intersect, so the card can warn and the runner can force those two to serialize.
|
|
185
|
-
export const FleetPlanSchema = z.object({
|
|
186
|
-
goal: z.string().min(1).max(500),
|
|
187
|
-
/** The parent Lucidity task (the goal); each worker is a subtask of it. Set once the
|
|
188
|
-
* daemon has created the task graph (dogfood); absent on a freshly-proposed plan. */
|
|
189
|
-
parentTaskId: z.uuidv7().optional(),
|
|
190
|
-
workers: z.array(FleetWorkerSchema).min(1).max(16),
|
|
191
|
-
overlaps: z
|
|
192
|
-
.array(
|
|
193
|
-
z.object({
|
|
194
|
-
a: z.uuidv7(),
|
|
195
|
-
b: z.uuidv7(),
|
|
196
|
-
paths: z.array(z.string().max(400)).max(200),
|
|
197
|
-
}),
|
|
198
|
-
)
|
|
199
|
-
.max(120) // at most C(16,2) pairs for the 16-worker ceiling
|
|
200
|
-
.optional(),
|
|
201
|
-
/** How many workers may run at once (quota guard). Absent → the daemon's default cap. */
|
|
202
|
-
maxParallel: z.number().int().positive().max(16).optional(),
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// Phone → daemon. Four phases over one request kind:
|
|
206
|
-
// - `plan`: decompose `prompt` (the goal) → one `fleet_plan` event. Nothing runs or is created,
|
|
207
|
-
// so the user edits or discards freely.
|
|
208
|
-
// - `setup`: materialize an approved plan for the DESIGN-FIRST flow — create the task graph and
|
|
209
|
-
// announce the workers (`worker_status: queued`), but write NO code. The user then chats each
|
|
210
|
-
// worker via a `code` turn carrying its `workerId`, and merges with `integrate` when ready.
|
|
211
|
-
// - `run`: the AUTO flow — create the graph, dispatch every worker to code in merge order, then
|
|
212
|
-
// integrate. One-tap "fan out & run".
|
|
213
|
-
// - `integrate`: merge the plan's worker branches onto lucid/<repo> in order → `worker_status`
|
|
214
|
-
// (merged) / `fleet_conflict` / `fleet_done`. Used by the design-first flow's "Merge fleet".
|
|
215
|
-
// Splitting plan from the rest keeps fan-out a one-tap opt-in: no worker spawns until the phone
|
|
216
|
-
// sends `setup`/`run` with a plan the user accepted.
|
|
217
|
-
export const ConductRequestSchema = HarnessRequestBase.extend({
|
|
218
|
-
kind: z.literal('conduct'),
|
|
219
|
-
repoId: z.string().min(1),
|
|
220
|
-
phase: z.enum(['plan', 'run', 'setup', 'integrate']),
|
|
221
|
-
prompt: z.string().min(1).max(8000),
|
|
222
|
-
images: harnessImagesField,
|
|
223
|
-
/** The approved plan to execute — required on `run`, ignored on `plan`. */
|
|
224
|
-
plan: FleetPlanSchema.optional(),
|
|
225
|
-
/** Conductor (lead) session id to continue its planning conversation across turns. */
|
|
226
|
-
resume: z.string().optional(),
|
|
227
|
-
/** Skip the dogfood task graph (no parent/subtask on the board). Set for quick incremental
|
|
228
|
-
* spawns so the board isn't spammed with a parent per task; the fleet UI tracks them anyway. */
|
|
229
|
-
ephemeral: z.boolean().optional(),
|
|
230
|
-
});
|
|
231
|
-
|
|
232
165
|
// Stop an in-flight request (the phone's stop button). `targetId` is the original
|
|
233
166
|
// request's `id`; the daemon aborts its executor run and replies with a
|
|
234
167
|
// `cancelled` stream event correlated to that same id.
|
|
@@ -328,6 +261,8 @@ export const IncidentReportRequestSchema = HarnessRequestBase.extend({
|
|
|
328
261
|
snapshot: IncidentSnapshotSchema.optional(),
|
|
329
262
|
/** The tail of the phone's diag ring — feeds SUSPEND_GAP and enriches the timeline. */
|
|
330
263
|
diag: z.array(IncidentDiagEventSchema).max(400).optional(),
|
|
264
|
+
/** The phone's stutter-meter reading (frame times, redraw counts, time in history work). */
|
|
265
|
+
perf: z.record(z.string(), z.unknown()).optional(),
|
|
331
266
|
});
|
|
332
267
|
|
|
333
268
|
// ---- Voice diagnostics (Kokoro TTS drop/pause capture) --------------------
|
|
@@ -543,7 +478,6 @@ export const HarnessRequestSchema = z.discriminatedUnion('kind', [
|
|
|
543
478
|
BriefingRequestSchema,
|
|
544
479
|
JournalRequestSchema,
|
|
545
480
|
CodeRequestSchema,
|
|
546
|
-
ConductRequestSchema,
|
|
547
481
|
RepoListRequestSchema,
|
|
548
482
|
ListPrsRequestSchema,
|
|
549
483
|
CloneRepoRequestSchema,
|
|
@@ -843,6 +777,8 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
|
|
|
843
777
|
type: z.literal('queue_state'),
|
|
844
778
|
requestId: z.uuidv7(),
|
|
845
779
|
state: z.enum(['queued', 'running']),
|
|
780
|
+
blockedBy: z.uuidv7().optional(),
|
|
781
|
+
message: z.string().optional(),
|
|
846
782
|
}),
|
|
847
783
|
z.object({
|
|
848
784
|
// Durable receipt written before execution; recovery only pulls saved output.
|
|
@@ -870,6 +806,8 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
|
|
|
870
806
|
requestId: z.uuidv7(),
|
|
871
807
|
name: z.string(),
|
|
872
808
|
phase: z.enum(['start', 'end']),
|
|
809
|
+
itemId: z.string().optional(),
|
|
810
|
+
outcome: z.string().optional(),
|
|
873
811
|
}),
|
|
874
812
|
z.object({
|
|
875
813
|
type: z.literal('done'),
|
|
@@ -882,6 +820,7 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
|
|
|
882
820
|
// has no memory of earlier turns — the phone surfaces/counts this so a silent
|
|
883
821
|
// conversation reset is never invisible again (the root cause behind the #107 wipe).
|
|
884
822
|
freshStart: z.boolean().optional(),
|
|
823
|
+
recovered: z.boolean().optional(),
|
|
885
824
|
}),
|
|
886
825
|
z.object({
|
|
887
826
|
// The result of a `code` turn (M7): the diff the turn produced, ready for the
|
|
@@ -892,6 +831,13 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
|
|
|
892
831
|
requestId: z.uuidv7(),
|
|
893
832
|
branch: z.string(),
|
|
894
833
|
diff: z.string(),
|
|
834
|
+
/** What the turn changed in tracked files: line counts and paths. The phone shows this in
|
|
835
|
+
* place of a diff. Absent when nothing changed or the count could not be taken. */
|
|
836
|
+
changes: z.object({
|
|
837
|
+
added: z.number().int().nonnegative(),
|
|
838
|
+
removed: z.number().int().nonnegative(),
|
|
839
|
+
files: z.array(z.string()).max(40),
|
|
840
|
+
}).optional(),
|
|
895
841
|
summary: z.string().optional(),
|
|
896
842
|
mode: z.enum(WORKSPACE_MODES).optional(),
|
|
897
843
|
// In-place only: the branch the phone expected this turn to land on, echoed back ONLY
|
|
@@ -908,64 +854,6 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
|
|
|
908
854
|
requestId: z.uuidv7(),
|
|
909
855
|
repoId: z.string(),
|
|
910
856
|
}),
|
|
911
|
-
// ---- Conductor fleet events (stream under the CONDUCT turn's requestId) ----
|
|
912
|
-
z.object({
|
|
913
|
-
// The lead's decomposition, produced by a `conduct` `plan` turn — the phone renders it
|
|
914
|
-
// as the Fan-out card. Nothing has run or been created yet; the user edits/accepts, then
|
|
915
|
-
// sends `conduct` `run` with this (possibly edited) plan.
|
|
916
|
-
type: z.literal('fleet_plan'),
|
|
917
|
-
requestId: z.uuidv7(),
|
|
918
|
-
plan: FleetPlanSchema,
|
|
919
|
-
}),
|
|
920
|
-
z.object({
|
|
921
|
-
// A worker crossed into a new lifecycle state. The phone updates that lane's card on the
|
|
922
|
-
// Fleet board. The worker's own delta/tool_call/code_result/done frames arrive separately,
|
|
923
|
-
// UNDER `requestId === workerId`, so they flow through the existing code-turn rendering.
|
|
924
|
-
type: z.literal('worker_status'),
|
|
925
|
-
requestId: z.uuidv7(),
|
|
926
|
-
workerId: z.uuidv7(),
|
|
927
|
-
status: z.enum(WORKER_STATUSES),
|
|
928
|
-
/** A short live line for the card ("editing serialTts.ts"). Optional. */
|
|
929
|
-
detail: z.string().optional(),
|
|
930
|
-
/** This worker's diff size once it has one, for the card's "+N −M". Optional. */
|
|
931
|
-
diffStat: z
|
|
932
|
-
.object({
|
|
933
|
-
added: z.number().int(),
|
|
934
|
-
removed: z.number().int(),
|
|
935
|
-
files: z.number().int(),
|
|
936
|
-
})
|
|
937
|
-
.optional(),
|
|
938
|
-
}),
|
|
939
|
-
z.object({
|
|
940
|
-
// Integration hit a conflict merging a worker onto the fleet branch. Surfaced in the
|
|
941
|
-
// conductor feed (never silently) so the user can hand it back to a worker as a fresh turn.
|
|
942
|
-
// (Legacy combined-integrate path; per-feature delivery opens independent PRs and never
|
|
943
|
-
// merges workers together, so this doesn't fire there.)
|
|
944
|
-
type: z.literal('fleet_conflict'),
|
|
945
|
-
requestId: z.uuidv7(),
|
|
946
|
-
workerId: z.uuidv7(),
|
|
947
|
-
paths: z.array(z.string()),
|
|
948
|
-
message: z.string(),
|
|
949
|
-
}),
|
|
950
|
-
z.object({
|
|
951
|
-
// One worker was delivered as its OWN pull request (per-feature delivery): its branch was
|
|
952
|
-
// pushed and a PR opened against the base. `url` is that worker's PR; `error` a short reason
|
|
953
|
-
// it couldn't open (no remote / no gh / no auth) — the worker's commits still exist on its
|
|
954
|
-
// branch. One of these fires per delivered worker.
|
|
955
|
-
type: z.literal('worker_pr'),
|
|
956
|
-
requestId: z.uuidv7(),
|
|
957
|
-
workerId: z.uuidv7(),
|
|
958
|
-
url: z.string().optional(),
|
|
959
|
-
error: z.string().optional(),
|
|
960
|
-
}),
|
|
961
|
-
z.object({
|
|
962
|
-
// The fan-out finished. Per-feature delivery: `delivered`/`total` count how many workers got
|
|
963
|
-
// their own PR (each worker's URL arrives in its `worker_pr`). No single integration branch.
|
|
964
|
-
type: z.literal('fleet_done'),
|
|
965
|
-
requestId: z.uuidv7(),
|
|
966
|
-
delivered: z.number().int(),
|
|
967
|
-
total: z.number().int(),
|
|
968
|
-
}),
|
|
969
857
|
z.object({
|
|
970
858
|
type: z.literal('error'),
|
|
971
859
|
requestId: z.uuidv7(),
|
|
@@ -65,3 +65,30 @@ export type SmartCaptureReview = {
|
|
|
65
65
|
message?: string;
|
|
66
66
|
pollAfterMs?: number | null;
|
|
67
67
|
};
|
|
68
|
+
|
|
69
|
+
/** Bump when the disclosure below changes in a way people should agree to again. */
|
|
70
|
+
export const AI_CONSENT_VERSION = '2026-10-12';
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The one wording of what is sent and to whom, shown before anything is transmitted.
|
|
74
|
+
* It names the recipients on purpose: that is the point of asking.
|
|
75
|
+
*/
|
|
76
|
+
export const AI_CONSENT_DISCLOSURE = {
|
|
77
|
+
title: 'Allow AI features?',
|
|
78
|
+
body: 'Lucidity can suggest a project and date for a new task, spot a duplicate, and carry out the quick actions you speak or type. To do that it sends the task or instruction text, your project and milestone names, and the titles, dates and status of related tasks to Vercel’s AI Gateway and TypeSafe’s Jev model. Lucidity keeps what you asked for 14 days to improve quick actions. Notes, journal entries and audio are never sent. You can turn this off at any time in Settings.',
|
|
79
|
+
allow: 'Allow',
|
|
80
|
+
decline: 'Not now',
|
|
81
|
+
} as const;
|
|
82
|
+
|
|
83
|
+
export const AiConsentInputSchema = z.object({ granted: z.boolean() }).strict();
|
|
84
|
+
|
|
85
|
+
export type AiConsent = {
|
|
86
|
+
/** The account has AI features to turn on. Nobody else is asked. */
|
|
87
|
+
available: boolean;
|
|
88
|
+
/** null until the person has answered. */
|
|
89
|
+
granted: boolean | null;
|
|
90
|
+
decidedAt: string | null;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** The `code` on a 403 from an AI route when the only thing missing is consent. */
|
|
94
|
+
export const AI_CONSENT_REQUIRED = 'ai_consent_required';
|