@opencorelabs/lucidity 0.7.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 +9 -2
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/agent.d.ts.map +1 -1
- package/dist/automations/agent.js +2 -0
- package/dist/automations/designer.d.ts +1 -1
- 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/chat/server.d.ts +1 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +6 -1
- 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 +6 -30
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +145 -218
- 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 +72 -0
- package/dist/coding/workspaceRegistry.d.ts.map +1 -0
- package/dist/coding/workspaceRegistry.js +421 -0
- package/dist/coding/worktree.d.ts +72 -32
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +190 -38
- 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/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/daemonLease.d.ts +12 -0
- package/dist/daemonLease.d.ts.map +1 -0
- package/dist/daemonLease.js +32 -0
- package/dist/goals/assessment.d.ts +115 -0
- package/dist/goals/assessment.d.ts.map +1 -0
- package/dist/goals/assessment.js +67 -0
- package/dist/goals/notes.d.ts +18 -0
- package/dist/goals/notes.d.ts.map +1 -0
- package/dist/goals/notes.js +72 -0
- package/dist/index.js +75 -40
- 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/jobs/goals.d.ts +15 -0
- package/dist/jobs/goals.d.ts.map +1 -0
- package/dist/jobs/goals.js +286 -0
- package/dist/jobs/weeklyReview.d.ts.map +1 -1
- package/dist/jobs/weeklyReview.js +3 -2
- 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/queue.d.ts +1 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +4 -0
- package/dist/room/client.d.ts +6 -19
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +127 -123
- package/dist/room/computer.js +1 -1
- package/dist/room/durablePublish.d.ts +6 -0
- package/dist/room/durablePublish.d.ts.map +1 -0
- package/dist/room/durablePublish.js +19 -0
- package/dist/room/incidents.d.ts +4 -1
- package/dist/room/incidents.d.ts.map +1 -1
- package/dist/room/incidents.js +15 -7
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +55 -46
- package/dist/runtimeStore.d.ts +46 -0
- package/dist/runtimeStore.d.ts.map +1 -0
- package/dist/runtimeStore.js +205 -0
- package/dist/setup/server.js +1 -1
- package/dist/turnLog.d.ts +10 -40
- package/dist/turnLog.d.ts.map +1 -1
- package/dist/turnLog.js +33 -56
- package/dist/vault.d.ts +6 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +18 -4
- package/package.json +4 -4
- package/src/automations/agent.ts +2 -0
- package/src/automations/service.ts +47 -21
- package/src/automations/store.ts +41 -50
- package/src/automations/workflow.ts +49 -0
- package/src/chat/server.ts +7 -1
- package/src/coding/listPrs.ts +14 -0
- package/src/coding/runCodeTurn.ts +51 -139
- package/src/coding/runReview.ts +83 -0
- package/src/coding/workspaceRegistry.ts +380 -0
- package/src/coding/worktree.ts +205 -40
- package/src/coding/worktreeSetup.ts +50 -0
- package/src/config.ts +2 -0
- package/src/daemonLease.ts +33 -0
- package/src/goals/assessment.ts +106 -0
- package/src/goals/notes.ts +88 -0
- package/src/index.ts +76 -46
- package/src/jobs/briefing.ts +62 -109
- package/src/jobs/goals.ts +384 -0
- package/src/jobs/weeklyReview.ts +4 -3
- package/src/logTimestamps.ts +14 -0
- package/src/providerRecovery.ts +99 -0
- package/src/queue.ts +4 -0
- package/src/room/client.ts +84 -116
- package/src/room/computer.ts +1 -1
- package/src/room/durablePublish.ts +25 -0
- package/src/room/incidents.ts +20 -8
- package/src/room/turnQueue.ts +53 -56
- package/src/runtimeStore.ts +207 -0
- package/src/setup/server.ts +1 -1
- package/src/turnLog.ts +32 -75
- package/src/vault.ts +16 -7
- package/vendor/mcp-server/dist/index.js +2 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts +4 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/goals.js +38 -0
- package/vendor/mcp-server/package.json +1 -1
- package/vendor/mcp-server/src/index.ts +2 -0
- package/vendor/mcp-server/src/tools/goals.ts +62 -0
- package/vendor/runtime/README.md +36 -2
- package/vendor/runtime/dist/executor/asyncQueue.d.ts +1 -0
- package/vendor/runtime/dist/executor/asyncQueue.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/asyncQueue.js +3 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +5 -1
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +77 -13
- package/vendor/runtime/dist/executor/codex.d.ts +8 -2
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +113 -38
- 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/FunctionCallOutputContentItem.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts.map +1 -1
- 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/Personality.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -1
- 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/CyberAccessProgram.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.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/GetAccountRateLimitsResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -1
- 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/Model.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.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/RateLimitSnapshot.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -1
- 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/ThreadResumeParams.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts.map +1 -1
- 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/ThreadStartParams.d.ts +3 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts.map +1 -1
- 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/TurnStartParams.d.ts +7 -2
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts.map +1 -1
- 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/UserInput.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts.map +1 -1
- 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 +13 -4
- package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.js +21 -5
- package/vendor/runtime/dist/executor/codexSessions.d.ts +30 -0
- package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexSessions.js +88 -0
- package/vendor/runtime/dist/executor/health.d.ts +8 -2
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +21 -5
- package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -1
- package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/liveTurns.js +12 -5
- package/vendor/runtime/dist/executor/ownership.d.ts +40 -0
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/ownership.js +106 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts +1 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/providerRouter.js +5 -0
- package/vendor/runtime/dist/executor/types.d.ts +27 -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 +2 -1
- package/vendor/runtime/dist/index.d.ts.map +1 -1
- package/vendor/runtime/dist/index.js +1 -0
- package/vendor/runtime/src/executor/asyncQueue.ts +3 -0
- package/vendor/runtime/src/executor/claudeAgent.ts +66 -13
- package/vendor/runtime/src/executor/codex.ts +124 -47
- package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/FunctionCallOutputContentItem.ts +1 -1
- 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/Personality.ts +3 -0
- package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/README.md +2 -2
- 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/CyberAccessProgram.ts +9 -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/GetAccountRateLimitsResponse.ts +5 -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/Model.ts +11 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/ModelAccessPrograms.ts +13 -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/RateLimitSnapshot.ts +5 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +2 -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/ThreadResumeParams.ts +5 -1
- 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/ThreadStartParams.ts +4 -1
- 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/TurnStartParams.ts +7 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/UserInput.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
- package/vendor/runtime/src/executor/codexRpc.ts +26 -6
- package/vendor/runtime/src/executor/codexSessions.ts +108 -0
- package/vendor/runtime/src/executor/health.ts +21 -7
- package/vendor/runtime/src/executor/liveTurns.ts +12 -5
- package/vendor/runtime/src/executor/ownership.ts +83 -0
- package/vendor/runtime/src/executor/providerRouter.ts +6 -0
- package/vendor/runtime/src/executor/types.ts +20 -1
- package/vendor/runtime/src/harness/index.ts +1 -0
- package/vendor/runtime/src/index.ts +2 -1
- package/vendor/shared/dist/agentCommands.d.ts +1 -0
- package/vendor/shared/dist/agentCommands.d.ts.map +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/cardStudio.d.ts +41 -0
- package/vendor/shared/dist/cardStudio.d.ts.map +1 -1
- package/vendor/shared/dist/cardStudio.js +13 -3
- package/vendor/shared/dist/computer.d.ts +7 -1
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +13 -4
- package/vendor/shared/dist/constants.d.ts +3 -3
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +8 -14
- package/vendor/shared/dist/goalNotes.d.ts +4 -0
- package/vendor/shared/dist/goalNotes.d.ts.map +1 -0
- package/vendor/shared/dist/goalNotes.js +23 -0
- package/vendor/shared/dist/goals.d.ts +835 -0
- package/vendor/shared/dist/goals.d.ts.map +1 -0
- package/vendor/shared/dist/goals.js +198 -0
- package/vendor/shared/dist/index.d.ts +7 -2
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +6 -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 +199 -169
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +25 -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 +255 -0
- package/vendor/shared/dist/workspaces.d.ts.map +1 -0
- package/vendor/shared/dist/workspaces.js +89 -0
- package/vendor/shared/src/agentCommands.ts +1 -0
- package/vendor/shared/src/automations.ts +12 -0
- package/vendor/shared/src/cardStudio.ts +13 -3
- package/vendor/shared/src/computer.ts +19 -5
- package/vendor/shared/src/constants.ts +8 -14
- package/vendor/shared/src/goalNotes.ts +23 -0
- package/vendor/shared/src/goals.ts +237 -0
- package/vendor/shared/src/index.ts +7 -6
- package/vendor/shared/src/messagingSafety.ts +11 -0
- package/vendor/shared/src/schemas/harness.ts +24 -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 +103 -0
- package/dist/coding/conduct.d.ts +0 -69
- package/dist/coding/conduct.d.ts.map +0 -1
- package/dist/coding/conduct.js +0 -348
- package/dist/coding/fleetIntegrate.d.ts +0 -37
- package/dist/coding/fleetIntegrate.d.ts.map +0 -1
- package/dist/coding/fleetIntegrate.js +0 -64
- 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/dist/coding/openFleetPr.d.ts +0 -41
- package/dist/coding/openFleetPr.d.ts.map +0 -1
- package/dist/coding/openFleetPr.js +0 -121
- package/src/coding/conduct.ts +0 -462
- package/src/coding/fleetIntegrate.ts +0 -95
- package/src/coding/fleetPlan.ts +0 -135
- package/src/coding/fleetTasks.ts +0 -109
- package/src/coding/openFleetPr.ts +0 -148
|
@@ -49,13 +49,16 @@ export const ComputerPresenceSchema = z.object({
|
|
|
49
49
|
});
|
|
50
50
|
export type ComputerPresence = z.infer<typeof ComputerPresenceSchema>;
|
|
51
51
|
export type ComputerFeature =
|
|
52
|
+
| 'checkout-history'
|
|
53
|
+
| 'workspaces'
|
|
54
|
+
| 'repo-settings'
|
|
55
|
+
| 'worktree-delete'
|
|
52
56
|
| 'turn-queue'
|
|
53
57
|
| 'provider-handoff'
|
|
54
58
|
| 'queue-control'
|
|
55
59
|
| 'day-plan'
|
|
56
60
|
| 'ask'
|
|
57
61
|
| 'code'
|
|
58
|
-
| 'conduct'
|
|
59
62
|
| 'briefing'
|
|
60
63
|
| 'attention'
|
|
61
64
|
| 'models'
|
|
@@ -96,7 +99,6 @@ export const INFERENCE_FEATURES = new Set<string>([
|
|
|
96
99
|
'ask',
|
|
97
100
|
'day-plan',
|
|
98
101
|
'code',
|
|
99
|
-
'conduct',
|
|
100
102
|
'briefing',
|
|
101
103
|
'attention',
|
|
102
104
|
]);
|
|
@@ -172,7 +174,7 @@ export function computerAvailability(
|
|
|
172
174
|
`Update Lucidity on ${presence.computer?.name ?? presence.machine ?? 'your computer'} to use this feature. Other compatible features remain available.`,
|
|
173
175
|
);
|
|
174
176
|
if (
|
|
175
|
-
['code', '
|
|
177
|
+
['code', 'repos', 'prs'].includes(feature) &&
|
|
176
178
|
!runtime.permissions.includes('coding')
|
|
177
179
|
)
|
|
178
180
|
return blocked(
|
|
@@ -229,15 +231,27 @@ export function computerAvailability(
|
|
|
229
231
|
|
|
230
232
|
/** Session affinity can be read in RN without importing Node Buffer. Legacy IDs are Claude. */
|
|
231
233
|
export function sessionProvider(resume?: string): ComputerProvider | undefined {
|
|
234
|
+
return sessionPreferences(resume)?.provider;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** Saved overrides are needed when a conversation keeps a different provider from settings. */
|
|
238
|
+
export function sessionPreferences(resume?: string):
|
|
239
|
+
| { provider: ComputerProvider; model?: string; effort?: string }
|
|
240
|
+
| undefined {
|
|
232
241
|
if (!resume) return undefined;
|
|
233
|
-
if (!resume.startsWith('lucidity-session:')) return 'claude';
|
|
242
|
+
if (!resume.startsWith('lucidity-session:')) return { provider: 'claude' };
|
|
234
243
|
try {
|
|
235
244
|
const encoded = resume
|
|
236
245
|
.slice('lucidity-session:'.length)
|
|
237
246
|
.replace(/-/g, '+')
|
|
238
247
|
.replace(/_/g, '/');
|
|
239
248
|
const session = JSON.parse(atob(encoded));
|
|
240
|
-
|
|
249
|
+
if (session.provider !== 'codex' && session.provider !== 'claude') return undefined;
|
|
250
|
+
return {
|
|
251
|
+
provider: session.provider,
|
|
252
|
+
model: typeof session.model === 'string' ? session.model : undefined,
|
|
253
|
+
effort: typeof session.effort === 'string' ? session.effort : undefined,
|
|
254
|
+
};
|
|
241
255
|
} catch {
|
|
242
256
|
return undefined;
|
|
243
257
|
}
|
|
@@ -379,6 +379,7 @@ export function normalizeBio(input: string): string | null {
|
|
|
379
379
|
// re-fetches an interrupted turn's frames from the daemon's durable turn log
|
|
380
380
|
// (`sinceSeq` onward) so a dropped reply is recovered, never re-run.
|
|
381
381
|
export const HARNESS_REQUEST_KINDS = [
|
|
382
|
+
'workspaces',
|
|
382
383
|
'getAutomations',
|
|
383
384
|
'automation',
|
|
384
385
|
'queue-control',
|
|
@@ -394,10 +395,6 @@ export const HARNESS_REQUEST_KINDS = [
|
|
|
394
395
|
'getConfig',
|
|
395
396
|
'setConfig',
|
|
396
397
|
'incident',
|
|
397
|
-
// Conductor (fleet of coding agents): `plan` decomposes a goal into workers (returns a
|
|
398
|
-
// fan-out plan, runs no code); `run` executes an approved plan — one isolated worker
|
|
399
|
-
// worktree per subtask, dispatched in merge order, integrated back onto lucid/<repo>.
|
|
400
|
-
'conduct',
|
|
401
398
|
// Phone asks for the Dashboard's attention board (#320) — returns the cached one when it's
|
|
402
399
|
// still fresh, otherwise composes a new one.
|
|
403
400
|
'attention',
|
|
@@ -429,7 +426,7 @@ export const EFFORT_LEVELS = [
|
|
|
429
426
|
export const EFFORT_OPTIONS = [
|
|
430
427
|
{
|
|
431
428
|
value: 'auto',
|
|
432
|
-
label: '
|
|
429
|
+
label: 'Automatic',
|
|
433
430
|
blurb: 'Use the model’s recommended effort',
|
|
434
431
|
},
|
|
435
432
|
{ value: 'low', label: 'Low', blurb: 'Fastest, least thorough' },
|
|
@@ -446,13 +443,13 @@ export const EFFORT_OPTIONS = [
|
|
|
446
443
|
|
|
447
444
|
/** A safe fallback when the live provider catalog is unavailable. Never guess a version. */
|
|
448
445
|
export function claudeModelLabel(alias: string): string {
|
|
449
|
-
return alias === 'default' ? '
|
|
446
|
+
return alias === 'default' ? 'Claude' : alias;
|
|
450
447
|
}
|
|
451
448
|
|
|
452
|
-
/** Friendly label for an effort level; unset
|
|
449
|
+
/** Friendly label for an effort level; unset values use automatic reasoning. */
|
|
453
450
|
export function effortLabel(value: string | null | undefined): string {
|
|
454
451
|
return (
|
|
455
|
-
EFFORT_OPTIONS.find((e) => e.value === value)?.label ?? '
|
|
452
|
+
EFFORT_OPTIONS.find((e) => e.value === value)?.label ?? 'Automatic'
|
|
456
453
|
);
|
|
457
454
|
}
|
|
458
455
|
|
|
@@ -470,12 +467,9 @@ export const DELIVERY_CHANNELS = ['macos', 'stdout'] as const;
|
|
|
470
467
|
export const AGENT_MODES = ['off', 'auto', 'danger'] as const;
|
|
471
468
|
export type AgentMode = (typeof AGENT_MODES)[number];
|
|
472
469
|
|
|
473
|
-
//
|
|
474
|
-
// `
|
|
475
|
-
//
|
|
476
|
-
// integrated onto the fleet branch; `blocked` = paused for an approval or a merge conflict;
|
|
477
|
-
// `failed` = its turn errored. Mapped to Lucidity task status by the dogfood helper
|
|
478
|
-
// (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.
|
|
479
473
|
export const WORKER_STATUSES = [
|
|
480
474
|
'queued',
|
|
481
475
|
'working',
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { parseFrontmatter } from './notes.js';
|
|
3
|
+
|
|
4
|
+
/** The UUID travels with the note when it is renamed or moved in the private vault. */
|
|
5
|
+
export function goalNoteId(content: string): string | null {
|
|
6
|
+
const parsed = z.uuid().safeParse(parseFrontmatter(content).data.lucidity_id);
|
|
7
|
+
return parsed.success ? parsed.data : null;
|
|
8
|
+
}
|
|
9
|
+
export function withGoalNoteId(content: string, id: string): string {
|
|
10
|
+
z.uuid().parse(id);
|
|
11
|
+
const existing = goalNoteId(content);
|
|
12
|
+
if (existing) {
|
|
13
|
+
if (existing !== id) throw new Error('This note already has a different identity. Reload it.');
|
|
14
|
+
return content;
|
|
15
|
+
}
|
|
16
|
+
if (content.startsWith('---')) {
|
|
17
|
+
const open = /^---[ \t]*\r?\n/.exec(content);
|
|
18
|
+
if (!open || !/^---[ \t]*(?:\r?\n|$)/m.test(content.slice(open[0].length)) || /^lucidity_id\s*:/m.test(content))
|
|
19
|
+
throw new Error('Fix the note’s frontmatter before linking it.');
|
|
20
|
+
return open[0] + `lucidity_id: ${id}\n` + content.slice(open[0].length);
|
|
21
|
+
}
|
|
22
|
+
return `---\nlucidity_id: ${id}\n---\n${content}`;
|
|
23
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
StudioDateSchema,
|
|
4
|
+
studioLocalDate,
|
|
5
|
+
shiftStudioDate,
|
|
6
|
+
} from './cardStudio.js';
|
|
7
|
+
|
|
8
|
+
export const GoalTimeZoneSchema = z
|
|
9
|
+
.string()
|
|
10
|
+
.max(100)
|
|
11
|
+
.refine((zone) => {
|
|
12
|
+
try {
|
|
13
|
+
new Intl.DateTimeFormat('en', { timeZone: zone });
|
|
14
|
+
return true;
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}, 'Choose a valid time zone.');
|
|
19
|
+
export const GoalTimeframeSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
start: StudioDateSchema,
|
|
22
|
+
end: StudioDateSchema,
|
|
23
|
+
precision: z.enum(['month', 'quarter', 'year', 'custom']),
|
|
24
|
+
timeZone: GoalTimeZoneSchema,
|
|
25
|
+
})
|
|
26
|
+
.refine(
|
|
27
|
+
(value) => value.end >= value.start,
|
|
28
|
+
'The end must be on or after the start.',
|
|
29
|
+
);
|
|
30
|
+
export type GoalTimeframe = z.infer<typeof GoalTimeframeSchema>;
|
|
31
|
+
export const GoalStatusSchema = z.enum([
|
|
32
|
+
'active',
|
|
33
|
+
'paused',
|
|
34
|
+
'completed',
|
|
35
|
+
'archived',
|
|
36
|
+
]);
|
|
37
|
+
export const GoalCadenceSchema = z.enum(['weekly', 'monthly', 'yearly']);
|
|
38
|
+
export type GoalCadence = z.infer<typeof GoalCadenceSchema>;
|
|
39
|
+
export const GoalInputSchema = z.object({
|
|
40
|
+
title: z.string().trim().min(1).max(240),
|
|
41
|
+
timeframe: GoalTimeframeSchema,
|
|
42
|
+
status: GoalStatusSchema.default('active'),
|
|
43
|
+
tracking: z.boolean().default(true),
|
|
44
|
+
reviews: z
|
|
45
|
+
.array(GoalCadenceSchema)
|
|
46
|
+
.max(3)
|
|
47
|
+
.default(['weekly', 'monthly'])
|
|
48
|
+
.refine((values) => new Set(values).size === values.length),
|
|
49
|
+
});
|
|
50
|
+
export type GoalInput = z.infer<typeof GoalInputSchema>;
|
|
51
|
+
export const SaveGoalSchema = GoalInputSchema.extend({
|
|
52
|
+
id: z.uuid(),
|
|
53
|
+
revision: z.number().int().nonnegative(),
|
|
54
|
+
});
|
|
55
|
+
export const GoalSchema = GoalInputSchema.extend({
|
|
56
|
+
id: z.uuid(),
|
|
57
|
+
revision: z.number().int().nonnegative(),
|
|
58
|
+
createdAt: z.iso.datetime(),
|
|
59
|
+
updatedAt: z.iso.datetime(),
|
|
60
|
+
});
|
|
61
|
+
export type Goal = z.infer<typeof GoalSchema>;
|
|
62
|
+
export const GoalReferenceSchema = z.object({
|
|
63
|
+
kind: z.enum(['task', 'project', 'habit', 'note']),
|
|
64
|
+
id: z.uuid(),
|
|
65
|
+
});
|
|
66
|
+
export type GoalReference = z.infer<typeof GoalReferenceSchema>;
|
|
67
|
+
export const goalReferenceKey = (ref: GoalReference) => `${ref.kind}:${ref.id}`;
|
|
68
|
+
export const GoalLinkInputSchema = GoalReferenceSchema.extend({
|
|
69
|
+
source: z.enum(['manual', 'ai']).default('manual'),
|
|
70
|
+
reason: z.string().trim().min(1).max(240),
|
|
71
|
+
state: z.enum(['active', 'rejected']).default('active'),
|
|
72
|
+
});
|
|
73
|
+
export const GoalLinkSchema = GoalLinkInputSchema.extend({
|
|
74
|
+
title: z.string().nullable(),
|
|
75
|
+
available: z.boolean(),
|
|
76
|
+
updatedAt: z.iso.datetime(),
|
|
77
|
+
});
|
|
78
|
+
export type GoalLink = z.infer<typeof GoalLinkSchema>;
|
|
79
|
+
export const GoalEvidenceSchema = z.object({
|
|
80
|
+
key: z.string(),
|
|
81
|
+
reference: GoalReferenceSchema,
|
|
82
|
+
at: z.iso.datetime(),
|
|
83
|
+
kind: z.enum([
|
|
84
|
+
'task_completed',
|
|
85
|
+
'task_started',
|
|
86
|
+
'task_reopened',
|
|
87
|
+
'task_changed',
|
|
88
|
+
'habit_check_in',
|
|
89
|
+
'note_changed',
|
|
90
|
+
]),
|
|
91
|
+
title: z.string().nullable(),
|
|
92
|
+
available: z.boolean(),
|
|
93
|
+
});
|
|
94
|
+
export type GoalEvidence = z.infer<typeof GoalEvidenceSchema>;
|
|
95
|
+
export const GoalCheckSchema = z.object({
|
|
96
|
+
key: z.string(),
|
|
97
|
+
cadence: z.enum(['daily', 'weekly', 'monthly', 'yearly']),
|
|
98
|
+
start: StudioDateSchema,
|
|
99
|
+
end: StudioDateSchema,
|
|
100
|
+
checkedAt: z.iso.datetime(),
|
|
101
|
+
signal: z.enum(['moving', 'quiet', 'unknown']),
|
|
102
|
+
summary: z.string(),
|
|
103
|
+
evidence: z.array(GoalEvidenceSchema),
|
|
104
|
+
references: z.array(GoalReferenceSchema),
|
|
105
|
+
timeframe: GoalTimeframeSchema,
|
|
106
|
+
});
|
|
107
|
+
export type GoalCheck = z.infer<typeof GoalCheckSchema>;
|
|
108
|
+
export const GoalActionSchema = z.object({
|
|
109
|
+
id: z.uuid(),
|
|
110
|
+
goalId: z.uuid(),
|
|
111
|
+
title: z.string(),
|
|
112
|
+
instruction: z.string(),
|
|
113
|
+
references: z.array(GoalReferenceSchema),
|
|
114
|
+
status: z.enum([
|
|
115
|
+
'proposed',
|
|
116
|
+
'approved',
|
|
117
|
+
'running',
|
|
118
|
+
'completed',
|
|
119
|
+
'cancelled',
|
|
120
|
+
'failed',
|
|
121
|
+
]),
|
|
122
|
+
createdAt: z.iso.datetime(),
|
|
123
|
+
updatedAt: z.iso.datetime(),
|
|
124
|
+
resultNoteId: z.uuid().nullable(),
|
|
125
|
+
resultMarkdown: z.string().nullable(),
|
|
126
|
+
error: z.string().nullable(),
|
|
127
|
+
});
|
|
128
|
+
export type GoalAction = z.infer<typeof GoalActionSchema>;
|
|
129
|
+
export const GoalDetailSchema = z.object({
|
|
130
|
+
goal: GoalSchema,
|
|
131
|
+
links: z.array(GoalLinkSchema),
|
|
132
|
+
checks: z.array(GoalCheckSchema),
|
|
133
|
+
actions: z.array(GoalActionSchema),
|
|
134
|
+
});
|
|
135
|
+
export type GoalDetail = z.infer<typeof GoalDetailSchema>;
|
|
136
|
+
export const GoalsSnapshotSchema = z.object({
|
|
137
|
+
goals: z.array(GoalDetailSchema),
|
|
138
|
+
refreshedAt: z.iso.datetime(),
|
|
139
|
+
});
|
|
140
|
+
export type GoalsSnapshot = z.infer<typeof GoalsSnapshotSchema>;
|
|
141
|
+
|
|
142
|
+
/** Date-only arithmetic deliberately ignores DST and the computer's current zone. */
|
|
143
|
+
export function goalDaysRemaining(
|
|
144
|
+
timeframe: GoalTimeframe,
|
|
145
|
+
now = new Date(),
|
|
146
|
+
): number {
|
|
147
|
+
return Math.round(
|
|
148
|
+
(Date.parse(timeframe.end) -
|
|
149
|
+
Date.parse(studioLocalDate(now, timeframe.timeZone))) /
|
|
150
|
+
86_400_000,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
export function goalPeriod(
|
|
154
|
+
cadence: 'daily' | GoalCadence,
|
|
155
|
+
today: string,
|
|
156
|
+
): { start: string; end: string; key: string } {
|
|
157
|
+
StudioDateSchema.parse(today);
|
|
158
|
+
let start = today,
|
|
159
|
+
end = today;
|
|
160
|
+
if (cadence === 'weekly') {
|
|
161
|
+
const day = new Date(today + 'T12:00:00Z').getUTCDay();
|
|
162
|
+
end = shiftStudioDate(today, -((day + 6) % 7) - 1);
|
|
163
|
+
start = shiftStudioDate(end, -6);
|
|
164
|
+
} else if (cadence === 'monthly') {
|
|
165
|
+
end = shiftStudioDate(today.slice(0, 8) + '01', -1);
|
|
166
|
+
start = end.slice(0, 8) + '01';
|
|
167
|
+
} else if (cadence === 'yearly') {
|
|
168
|
+
const year = Number(today.slice(0, 4)) - 1;
|
|
169
|
+
start = `${year}-01-01`;
|
|
170
|
+
end = `${year}-12-31`;
|
|
171
|
+
}
|
|
172
|
+
return { start, end, key: `${cadence}:${start}` };
|
|
173
|
+
}
|
|
174
|
+
/** Completed periods only, with no backlog flood after a computer wakes. */
|
|
175
|
+
export function dueGoalPeriods(
|
|
176
|
+
goal: Goal,
|
|
177
|
+
existing: readonly Pick<GoalCheck, 'key'>[],
|
|
178
|
+
now = new Date(),
|
|
179
|
+
) {
|
|
180
|
+
if (!goal.tracking || goal.status !== 'active') return [];
|
|
181
|
+
const today = studioLocalDate(now, goal.timeframe.timeZone);
|
|
182
|
+
if (today < goal.timeframe.start) return [];
|
|
183
|
+
const created = studioLocalDate(
|
|
184
|
+
new Date(goal.createdAt),
|
|
185
|
+
goal.timeframe.timeZone,
|
|
186
|
+
);
|
|
187
|
+
return (['daily', ...goal.reviews] as const)
|
|
188
|
+
.map((cadence) => ({ cadence, ...goalPeriod(cadence, today) }))
|
|
189
|
+
.filter(
|
|
190
|
+
(period) =>
|
|
191
|
+
period.end >= created &&
|
|
192
|
+
period.end >= goal.timeframe.start &&
|
|
193
|
+
!existing.some((check) => check.key === period.key),
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export const GoalAnalysisSchema = z.object({
|
|
198
|
+
links: z
|
|
199
|
+
.array(GoalReferenceSchema.extend({ reason: z.string().max(240) }))
|
|
200
|
+
.max(12),
|
|
201
|
+
summary: z.string().trim().min(1).max(400),
|
|
202
|
+
help: z
|
|
203
|
+
.object({
|
|
204
|
+
title: z.string().max(100),
|
|
205
|
+
instruction: z.string().max(800),
|
|
206
|
+
references: z.array(GoalReferenceSchema).min(1).max(12),
|
|
207
|
+
})
|
|
208
|
+
.nullable(),
|
|
209
|
+
});
|
|
210
|
+
export type GoalAnalysis = z.infer<typeof GoalAnalysisSchema>;
|
|
211
|
+
|
|
212
|
+
export const GoalCandidateSchema = GoalReferenceSchema.extend({
|
|
213
|
+
title: z.string(),
|
|
214
|
+
description: z.string().nullable(),
|
|
215
|
+
updatedAt: z.iso.datetime().nullable(),
|
|
216
|
+
status: z.string().nullable(),
|
|
217
|
+
projectId: z.uuid().nullable(),
|
|
218
|
+
});
|
|
219
|
+
export type GoalCandidate = z.infer<typeof GoalCandidateSchema>;
|
|
220
|
+
export const GoalTrackingContextSchema = z.object({
|
|
221
|
+
detail: GoalDetailSchema,
|
|
222
|
+
candidates: z.array(GoalCandidateSchema),
|
|
223
|
+
evidence: z.array(GoalEvidenceSchema),
|
|
224
|
+
complete: z.boolean(),
|
|
225
|
+
});
|
|
226
|
+
export type GoalTrackingContext = z.infer<typeof GoalTrackingContextSchema>;
|
|
227
|
+
export const RecordGoalCheckSchema = z.object({
|
|
228
|
+
revision: z.number().int().positive(),
|
|
229
|
+
cadence: z.enum(['daily', 'weekly', 'monthly', 'yearly']),
|
|
230
|
+
summary: z.string().trim().min(1).max(400),
|
|
231
|
+
noteObservations: z
|
|
232
|
+
.array(z.object({ id: z.uuid(), at: z.iso.datetime() }))
|
|
233
|
+
.max(100)
|
|
234
|
+
.default([]),
|
|
235
|
+
notesAvailable: z.boolean().default(false),
|
|
236
|
+
help: GoalAnalysisSchema.shape.help,
|
|
237
|
+
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './dayPlanning.js';
|
|
2
|
+
export * from './workspaces.js';
|
|
2
3
|
export * from './githubContributions.js';
|
|
3
4
|
export * from './projectCapture.js';
|
|
4
5
|
export * from './taskActivity.js';
|
|
5
6
|
export * from './recurrence.js';
|
|
7
|
+
export * from './taskSync.js';
|
|
6
8
|
export * from './vault-search.js';
|
|
7
9
|
export * from './journal-vault.js';
|
|
8
10
|
export * from './journal-migration.js';
|
|
@@ -249,9 +251,6 @@ export {
|
|
|
249
251
|
BriefingRequestSchema,
|
|
250
252
|
JournalRequestSchema,
|
|
251
253
|
CodeRequestSchema,
|
|
252
|
-
ConductRequestSchema,
|
|
253
|
-
FleetPlanSchema,
|
|
254
|
-
FleetWorkerSchema,
|
|
255
254
|
RepoListRequestSchema,
|
|
256
255
|
ListPrsRequestSchema,
|
|
257
256
|
GetConfigRequestSchema,
|
|
@@ -385,9 +384,6 @@ export type {
|
|
|
385
384
|
BriefingRequest,
|
|
386
385
|
JournalRequest,
|
|
387
386
|
CodeRequest,
|
|
388
|
-
ConductRequest,
|
|
389
|
-
FleetPlan,
|
|
390
|
-
FleetWorker,
|
|
391
387
|
RepoListRequest,
|
|
392
388
|
ListPrsRequest,
|
|
393
389
|
PrInfo,
|
|
@@ -446,3 +442,8 @@ export * from './dayPlan.js';
|
|
|
446
442
|
|
|
447
443
|
export { parseAgentCommand, findAgentCommand } from './agentCommands.js';
|
|
448
444
|
export type { AgentCommandOption, AgentCommandContext } from './agentCommands.js';
|
|
445
|
+
|
|
446
|
+
export * from './goals.js';
|
|
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 };
|