@opencorelabs/lucidity 0.3.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -3
- package/dist/assets/speech/licenses/FluidAudio/LICENSE +201 -0
- package/dist/assets/speech/licenses/FluidAudio/ThirdPartyLicenses/fastcluster-LICENSE.md +11 -0
- package/dist/assets/speech/licenses/FluidAudio/ThirdPartyLicenses/vbx-LICENSE.md +201 -0
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/agent.d.ts +16 -0
- package/dist/automations/agent.d.ts.map +1 -0
- package/dist/automations/agent.js +196 -0
- package/dist/automations/cli.d.ts +4 -0
- package/dist/automations/cli.d.ts.map +1 -0
- package/dist/automations/cli.js +44 -0
- package/dist/automations/connections.d.ts +11 -0
- package/dist/automations/connections.d.ts.map +1 -0
- package/dist/automations/connections.js +74 -0
- package/dist/automations/designer.d.ts +39 -0
- package/dist/automations/designer.d.ts.map +1 -0
- package/dist/automations/designer.js +450 -0
- package/dist/automations/history.d.ts +4 -0
- package/dist/automations/history.d.ts.map +1 -0
- package/dist/automations/history.js +57 -0
- package/dist/automations/learning.d.ts +19 -0
- package/dist/automations/learning.d.ts.map +1 -0
- package/dist/automations/learning.js +121 -0
- package/dist/automations/pinterest.d.ts +21 -0
- package/dist/automations/pinterest.d.ts.map +1 -0
- package/dist/automations/pinterest.js +113 -0
- package/dist/automations/service.d.ts +42 -0
- package/dist/automations/service.d.ts.map +1 -0
- package/dist/automations/service.js +406 -0
- package/dist/automations/setup.d.ts +3 -0
- package/dist/automations/setup.d.ts.map +1 -0
- package/dist/automations/setup.js +48 -0
- package/dist/automations/skill.d.ts +3 -0
- package/dist/automations/skill.d.ts.map +1 -0
- package/dist/automations/skill.js +29 -0
- package/dist/automations/store.d.ts +13 -0
- package/dist/automations/store.d.ts.map +1 -0
- package/dist/automations/store.js +46 -0
- package/dist/chat/server.d.ts +2 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +46 -2
- package/dist/coding/commandContext.d.ts +6 -0
- package/dist/coding/commandContext.d.ts.map +1 -0
- package/dist/coding/commandContext.js +20 -0
- package/dist/coding/runCodeTurn.d.ts +12 -2
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +49 -19
- package/dist/coding/worktree.d.ts +3 -4
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +3 -4
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +20 -3
- package/dist/decisions/cli.d.ts +2 -0
- package/dist/decisions/cli.d.ts.map +1 -0
- package/dist/decisions/cli.js +106 -0
- package/dist/decisions/client.d.ts +20 -0
- package/dist/decisions/client.d.ts.map +1 -0
- package/dist/decisions/client.js +41 -0
- package/dist/handoff.d.ts +11 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +21 -0
- package/dist/index.js +185 -40
- package/dist/jobs/briefing.js +1 -1
- package/dist/jobs/extraction.d.ts.map +1 -1
- package/dist/jobs/extraction.js +112 -22
- package/dist/jobs/fastModeReview.d.ts +39 -0
- package/dist/jobs/fastModeReview.d.ts.map +1 -0
- package/dist/jobs/fastModeReview.js +192 -0
- package/dist/jobs/voiceReview.d.ts +24 -0
- package/dist/jobs/voiceReview.d.ts.map +1 -0
- package/dist/jobs/voiceReview.js +128 -0
- package/dist/mcp/clients.d.ts +5 -0
- package/dist/mcp/clients.d.ts.map +1 -1
- package/dist/mcp/clients.js +1 -1
- package/dist/mcp/config.d.ts +3 -1
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +48 -6
- package/dist/mcp/paired.js +1 -0
- package/dist/notesContext.d.ts.map +1 -1
- package/dist/notesContext.js +3 -2
- package/dist/room/client.d.ts +20 -7
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +266 -47
- package/dist/room/computer.d.ts.map +1 -1
- package/dist/room/computer.js +9 -0
- package/dist/room/context.d.ts +3 -2
- package/dist/room/context.d.ts.map +1 -1
- package/dist/room/context.js +10 -3
- package/dist/room/turnQueue.d.ts +40 -0
- package/dist/room/turnQueue.d.ts.map +1 -0
- package/dist/room/turnQueue.js +301 -0
- package/dist/skills/lucidity-automations/SKILL.md +54 -0
- package/dist/speech/captures.d.ts +30 -0
- package/dist/speech/captures.d.ts.map +1 -0
- package/dist/speech/captures.js +209 -0
- package/dist/speech/fluidAudio.d.ts +28 -0
- package/dist/speech/fluidAudio.d.ts.map +1 -0
- package/dist/speech/fluidAudio.js +182 -0
- package/dist/speech/service.d.ts +14 -0
- package/dist/speech/service.d.ts.map +1 -0
- package/dist/speech/service.js +88 -0
- package/dist/speech/types.d.ts +19 -0
- package/dist/speech/types.d.ts.map +1 -0
- package/dist/speech/types.js +1 -0
- package/dist/turnLog.d.ts +1 -0
- package/dist/turnLog.d.ts.map +1 -1
- package/dist/turnLog.js +3 -0
- package/native/speech/Package.resolved +15 -0
- package/native/speech/Package.swift +16 -0
- package/native/speech/Sources/lucidity-speech/Speech.swift +81 -0
- package/package.json +6 -2
- package/src/automations/agent.ts +239 -0
- package/src/automations/cli.ts +52 -0
- package/src/automations/connections.ts +83 -0
- package/src/automations/designer.ts +594 -0
- package/src/automations/history.ts +59 -0
- package/src/automations/learning.ts +180 -0
- package/src/automations/pinterest.ts +146 -0
- package/src/automations/service.ts +505 -0
- package/src/automations/setup.ts +71 -0
- package/src/automations/skill.ts +40 -0
- package/src/automations/store.ts +63 -0
- package/src/chat/server.ts +62 -3
- package/src/coding/commandContext.ts +29 -0
- package/src/coding/runCodeTurn.ts +65 -21
- package/src/coding/worktree.ts +3 -4
- package/src/config.ts +29 -2
- package/src/decisions/cli.ts +136 -0
- package/src/decisions/client.ts +62 -0
- package/src/handoff.ts +28 -0
- package/src/index.ts +202 -67
- package/src/jobs/briefing.ts +1 -1
- package/src/jobs/extraction.ts +157 -32
- package/src/jobs/fastModeReview.ts +221 -0
- package/src/jobs/voiceReview.ts +156 -0
- package/src/mcp/clients.ts +1 -1
- package/src/mcp/config.ts +56 -6
- package/src/mcp/paired.ts +1 -0
- package/src/notesContext.ts +3 -2
- package/src/room/client.ts +320 -54
- package/src/room/computer.ts +9 -0
- package/src/room/context.ts +12 -3
- package/src/room/turnQueue.ts +358 -0
- package/src/speech/captures.ts +265 -0
- package/src/speech/fluidAudio.ts +242 -0
- package/src/speech/service.ts +108 -0
- package/src/speech/types.ts +13 -0
- package/src/turnLog.ts +4 -0
- package/vendor/decisions/LICENSE +662 -0
- package/vendor/decisions/dist/capture.d.ts +79 -0
- package/vendor/decisions/dist/capture.js +183 -0
- package/vendor/decisions/dist/command.d.ts +202 -0
- package/vendor/decisions/dist/command.js +750 -0
- package/vendor/decisions/dist/dayPlan.d.ts +9 -0
- package/vendor/decisions/dist/dayPlan.js +82 -0
- package/vendor/decisions/dist/gate.d.ts +12 -0
- package/vendor/decisions/dist/gate.js +18 -0
- package/vendor/decisions/dist/index.d.ts +6 -0
- package/vendor/decisions/dist/index.js +6 -0
- package/vendor/decisions/dist/jev.d.ts +15 -0
- package/vendor/decisions/dist/jev.js +244 -0
- package/vendor/decisions/dist/types.d.ts +67 -0
- package/vendor/decisions/dist/types.js +1 -0
- package/vendor/decisions/package.json +22 -0
- package/vendor/decisions/src/capture.ts +199 -0
- package/vendor/decisions/src/command.ts +836 -0
- package/vendor/decisions/src/dayPlan.ts +80 -0
- package/vendor/decisions/src/gate.ts +32 -0
- package/vendor/decisions/src/index.ts +6 -0
- package/vendor/decisions/src/jev.ts +295 -0
- package/vendor/decisions/src/types.ts +79 -0
- package/vendor/mcp-server/README.md +6 -1
- package/vendor/mcp-server/dist/client.d.ts +1 -0
- package/vendor/mcp-server/dist/client.d.ts.map +1 -1
- package/vendor/mcp-server/dist/client.js +8 -0
- package/vendor/mcp-server/dist/commentProvider.d.ts +3 -0
- package/vendor/mcp-server/dist/commentProvider.d.ts.map +1 -0
- package/vendor/mcp-server/dist/commentProvider.js +10 -0
- package/vendor/mcp-server/dist/index.js +21 -6
- package/vendor/mcp-server/dist/tools/automations.d.ts +6 -0
- package/vendor/mcp-server/dist/tools/automations.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/automations.js +163 -0
- package/vendor/mcp-server/dist/tools/commandEventFormat.d.ts +52 -0
- package/vendor/mcp-server/dist/tools/commandEventFormat.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/commandEventFormat.js +83 -0
- package/vendor/mcp-server/dist/tools/commandEvents.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/commandEvents.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/commandEvents.js +21 -0
- package/vendor/mcp-server/dist/tools/comments.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/comments.js +25 -4
- package/vendor/mcp-server/dist/tools/index.d.ts +2 -0
- package/vendor/mcp-server/dist/tools/index.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/index.js +2 -0
- package/vendor/mcp-server/dist/tools/journal.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/journal.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/journal.js +131 -0
- package/vendor/mcp-server/dist/tools/taskActivity.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/taskActivity.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/taskActivity.js +32 -0
- package/vendor/mcp-server/dist/tools/taskOccurrences.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/taskOccurrences.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/taskOccurrences.js +12 -0
- package/vendor/mcp-server/dist/tools/taskTrash.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/taskTrash.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/taskTrash.js +21 -0
- package/vendor/mcp-server/dist/tools/tasks.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/tasks.js +67 -27
- package/vendor/mcp-server/package.json +5 -1
- package/vendor/mcp-server/src/client.ts +10 -0
- package/vendor/mcp-server/src/commentProvider.ts +9 -0
- package/vendor/mcp-server/src/index.ts +20 -6
- package/vendor/mcp-server/src/tools/automations.ts +199 -0
- package/vendor/mcp-server/src/tools/commandEventFormat.ts +108 -0
- package/vendor/mcp-server/src/tools/commandEvents.ts +27 -0
- package/vendor/mcp-server/src/tools/comments.ts +24 -3
- package/vendor/mcp-server/src/tools/index.ts +2 -0
- package/vendor/mcp-server/src/tools/journal.ts +168 -0
- package/vendor/mcp-server/src/tools/taskActivity.ts +55 -0
- package/vendor/mcp-server/src/tools/taskOccurrences.ts +26 -0
- package/vendor/mcp-server/src/tools/taskTrash.ts +23 -0
- package/vendor/mcp-server/src/tools/tasks.ts +66 -30
- package/vendor/notes/dist/index.d.ts +2 -0
- package/vendor/notes/dist/index.d.ts.map +1 -1
- package/vendor/notes/dist/index.js +2 -0
- package/vendor/notes/dist/journal-backend.d.ts +4 -0
- package/vendor/notes/dist/journal-backend.d.ts.map +1 -0
- package/vendor/notes/dist/journal-backend.js +33 -0
- package/vendor/notes/dist/journal.d.ts +7 -0
- package/vendor/notes/dist/journal.d.ts.map +1 -0
- package/vendor/notes/dist/journal.js +173 -0
- package/vendor/notes/dist/vault.d.ts.map +1 -1
- package/vendor/notes/dist/vault.js +6 -1
- package/vendor/notes/src/index.ts +2 -0
- package/vendor/notes/src/journal-backend.ts +53 -0
- package/vendor/notes/src/journal.ts +194 -0
- package/vendor/notes/src/vault.ts +9 -1
- package/vendor/runtime/README.md +4 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +2 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +117 -8
- package/vendor/runtime/dist/executor/claudeCode.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeCode.js +8 -4
- package/vendor/runtime/dist/executor/codex.d.ts +2 -0
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +214 -11
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CreditsSnapshot.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CreditsSnapshot.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CreditsSnapshot.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts +26 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitReachedType.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitReachedType.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitReachedType.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCredit.d.ts +27 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCredit.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCredit.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditsSummary.d.ts +13 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditsSummary.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetCreditsSummary.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetType.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetType.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitResetType.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts +20 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitWindow.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitWindow.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitWindow.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewDelivery.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewDelivery.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewDelivery.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewTarget.d.ts +17 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewTarget.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewTarget.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillDependencies.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillDependencies.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillDependencies.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillErrorInfo.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillErrorInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillErrorInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillInterface.d.ts +18 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillInterface.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillInterface.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillMetadata.d.ts +22 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillMetadata.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillMetadata.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillScope.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillScope.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillScope.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillToolDependency.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillToolDependency.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillToolDependency.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListEntry.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListEntry.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListEntry.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListResponse.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SkillsListResponse.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SpendControlLimitSnapshot.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SpendControlLimitSnapshot.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SpendControlLimitSnapshot.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSetNameParams.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSetNameParams.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSetNameParams.js +2 -0
- package/vendor/runtime/dist/executor/health.d.ts +1 -0
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +3 -0
- package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/liveTurns.js +3 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/providerRouter.js +2 -1
- package/vendor/runtime/dist/executor/types.d.ts +10 -0
- package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.d.ts +2 -0
- package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.js +46 -1
- package/vendor/runtime/dist/harness/types.d.ts +5 -1
- package/vendor/runtime/dist/harness/types.d.ts.map +1 -1
- 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 +2 -0
- package/vendor/runtime/dist/journal/context.d.ts +18 -0
- package/vendor/runtime/dist/journal/context.d.ts.map +1 -1
- package/vendor/runtime/dist/journal/context.js +19 -5
- package/vendor/runtime/dist/prompts/briefing.d.ts +4 -7
- package/vendor/runtime/dist/prompts/briefing.d.ts.map +1 -1
- package/vendor/runtime/dist/prompts/briefing.js +61 -12
- package/vendor/runtime/dist/prompts/cardStatement.d.ts +7 -0
- package/vendor/runtime/dist/prompts/cardStatement.d.ts.map +1 -0
- package/vendor/runtime/dist/prompts/cardStatement.js +52 -0
- package/vendor/runtime/dist/prompts/chat.d.ts +1 -0
- package/vendor/runtime/dist/prompts/chat.d.ts.map +1 -1
- package/vendor/runtime/dist/prompts/chat.js +15 -1
- package/vendor/runtime/dist/prompts/dayPlanning.d.ts +44 -0
- package/vendor/runtime/dist/prompts/dayPlanning.d.ts.map +1 -0
- package/vendor/runtime/dist/prompts/dayPlanning.js +42 -0
- package/vendor/runtime/dist/prompts/projectCapture.d.ts +7 -0
- package/vendor/runtime/dist/prompts/projectCapture.d.ts.map +1 -0
- package/vendor/runtime/dist/prompts/projectCapture.js +31 -0
- package/vendor/runtime/src/executor/claudeAgent.ts +137 -7
- package/vendor/runtime/src/executor/claudeCode.ts +6 -4
- package/vendor/runtime/src/executor/codex.ts +281 -20
- package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CreditsSnapshot.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GetAccountRateLimitsResponse.ts +25 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitReachedType.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitResetCredit.ts +27 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitResetCreditStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitResetCreditsSummary.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitResetType.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitSnapshot.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitWindow.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewDelivery.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewTarget.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillDependencies.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillErrorInfo.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillInterface.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillMetadata.ts +17 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillScope.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillToolDependency.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillsListEntry.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SkillsListResponse.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SpendControlLimitSnapshot.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSetNameParams.ts +5 -0
- package/vendor/runtime/src/executor/health.ts +3 -0
- package/vendor/runtime/src/executor/liveTurns.ts +3 -0
- package/vendor/runtime/src/executor/providerRouter.ts +2 -1
- package/vendor/runtime/src/executor/types.ts +10 -0
- package/vendor/runtime/src/harness/index.ts +51 -6
- package/vendor/runtime/src/harness/types.ts +5 -1
- package/vendor/runtime/src/index.ts +4 -1
- package/vendor/runtime/src/journal/context.ts +40 -7
- package/vendor/runtime/src/prompts/briefing.ts +62 -17
- package/vendor/runtime/src/prompts/cardStatement.ts +64 -0
- package/vendor/runtime/src/prompts/chat.ts +25 -3
- package/vendor/runtime/src/prompts/dayPlanning.ts +46 -0
- package/vendor/runtime/src/prompts/projectCapture.ts +51 -0
- package/vendor/shared/dist/agentCommands.d.ts +22 -0
- package/vendor/shared/dist/agentCommands.d.ts.map +1 -0
- package/vendor/shared/dist/agentCommands.js +11 -0
- package/vendor/shared/dist/automationTemplates.d.ts +37 -0
- package/vendor/shared/dist/automationTemplates.d.ts.map +1 -0
- package/vendor/shared/dist/automationTemplates.js +48 -0
- package/vendor/shared/dist/automations.d.ts +1052 -0
- package/vendor/shared/dist/automations.d.ts.map +1 -0
- package/vendor/shared/dist/automations.js +300 -0
- package/vendor/shared/dist/cardStatement.d.ts +28 -0
- package/vendor/shared/dist/cardStatement.d.ts.map +1 -0
- package/vendor/shared/dist/cardStatement.js +37 -0
- package/vendor/shared/dist/cardStudio.d.ts +756 -0
- package/vendor/shared/dist/cardStudio.d.ts.map +1 -0
- package/vendor/shared/dist/cardStudio.js +297 -0
- package/vendor/shared/dist/commandLocal.d.ts +218 -0
- package/vendor/shared/dist/commandLocal.d.ts.map +1 -0
- package/vendor/shared/dist/commandLocal.js +664 -0
- package/vendor/shared/dist/commandText.d.ts +12 -0
- package/vendor/shared/dist/commandText.d.ts.map +1 -0
- package/vendor/shared/dist/commandText.js +21 -0
- package/vendor/shared/dist/commands.d.ts +1534 -0
- package/vendor/shared/dist/commands.d.ts.map +1 -0
- package/vendor/shared/dist/commands.js +233 -0
- package/vendor/shared/dist/computer.d.ts +9 -9
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +12 -2
- 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 +9 -2
- package/vendor/shared/dist/dayPlan.d.ts +86 -0
- package/vendor/shared/dist/dayPlan.d.ts.map +1 -0
- package/vendor/shared/dist/dayPlan.js +46 -0
- package/vendor/shared/dist/dayPlanning.d.ts +139 -0
- package/vendor/shared/dist/dayPlanning.d.ts.map +1 -0
- package/vendor/shared/dist/dayPlanning.js +67 -0
- package/vendor/shared/dist/githubContributions.d.ts +93 -0
- package/vendor/shared/dist/githubContributions.d.ts.map +1 -0
- package/vendor/shared/dist/githubContributions.js +54 -0
- package/vendor/shared/dist/habitContributions.d.ts +26 -0
- package/vendor/shared/dist/habitContributions.d.ts.map +1 -0
- package/vendor/shared/dist/habitContributions.js +119 -0
- package/vendor/shared/dist/index.d.ts +28 -2
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +25 -2
- package/vendor/shared/dist/journal-migration.d.ts +29 -0
- package/vendor/shared/dist/journal-migration.d.ts.map +1 -0
- package/vendor/shared/dist/journal-migration.js +73 -0
- package/vendor/shared/dist/journal-vault.d.ts +414 -0
- package/vendor/shared/dist/journal-vault.d.ts.map +1 -0
- package/vendor/shared/dist/journal-vault.js +972 -0
- package/vendor/shared/dist/projectCapture.d.ts +73 -0
- package/vendor/shared/dist/projectCapture.d.ts.map +1 -0
- package/vendor/shared/dist/projectCapture.js +66 -0
- package/vendor/shared/dist/quickAdd.d.ts +90 -0
- package/vendor/shared/dist/quickAdd.d.ts.map +1 -0
- package/vendor/shared/dist/quickAdd.js +260 -0
- package/vendor/shared/dist/recurrence.d.ts +44 -0
- package/vendor/shared/dist/recurrence.d.ts.map +1 -0
- package/vendor/shared/dist/recurrence.js +37 -0
- package/vendor/shared/dist/reminderWords.d.ts +11 -0
- package/vendor/shared/dist/reminderWords.d.ts.map +1 -0
- package/vendor/shared/dist/reminderWords.js +63 -0
- package/vendor/shared/dist/schemas/comment.d.ts +13 -1
- package/vendor/shared/dist/schemas/comment.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/comment.js +5 -0
- package/vendor/shared/dist/schemas/conversation.d.ts +3 -3
- package/vendor/shared/dist/schemas/harness.d.ts +976 -59
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +124 -3
- package/vendor/shared/dist/schemas/journal.d.ts +10 -0
- package/vendor/shared/dist/schemas/journal.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/journal.js +10 -2
- package/vendor/shared/dist/schemas/notification.d.ts +1 -1
- package/vendor/shared/dist/schemas/organization.d.ts +3 -2
- package/vendor/shared/dist/schemas/organization.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/organization.js +3 -2
- package/vendor/shared/dist/schemas/proposal.d.ts +7 -3
- package/vendor/shared/dist/schemas/proposal.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/proposal.js +2 -1
- package/vendor/shared/dist/schemas/request.d.ts +44 -4
- package/vendor/shared/dist/schemas/request.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/task.d.ts +83 -8
- package/vendor/shared/dist/schemas/task.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/task.js +20 -2
- package/vendor/shared/dist/schemas/timeSession.d.ts +2 -2
- package/vendor/shared/dist/smartCapture.d.ts +60 -0
- package/vendor/shared/dist/smartCapture.d.ts.map +1 -0
- package/vendor/shared/dist/smartCapture.js +56 -0
- package/vendor/shared/dist/speech.d.ts +39 -0
- package/vendor/shared/dist/speech.d.ts.map +1 -0
- package/vendor/shared/dist/speech.js +36 -0
- package/vendor/shared/dist/spokenNames.d.ts +25 -0
- package/vendor/shared/dist/spokenNames.d.ts.map +1 -0
- package/vendor/shared/dist/spokenNames.js +120 -0
- package/vendor/shared/dist/taskActivity.d.ts +76 -0
- package/vendor/shared/dist/taskActivity.d.ts.map +1 -0
- package/vendor/shared/dist/taskActivity.js +27 -0
- package/vendor/shared/dist/vault-search.d.ts +50 -0
- package/vendor/shared/dist/vault-search.d.ts.map +1 -0
- package/vendor/shared/dist/vault-search.js +177 -0
- package/vendor/shared/dist/voiceCapture.d.ts +32 -0
- package/vendor/shared/dist/voiceCapture.d.ts.map +1 -0
- package/vendor/shared/dist/voiceCapture.js +29 -0
- package/vendor/shared/package.json +4 -0
- package/vendor/shared/src/agentCommands.ts +35 -0
- package/vendor/shared/src/automationTemplates.ts +54 -0
- package/vendor/shared/src/automations.ts +329 -0
- package/vendor/shared/src/cardStatement.ts +49 -0
- package/vendor/shared/src/cardStudio.ts +340 -0
- package/vendor/shared/src/commandLocal.ts +740 -0
- package/vendor/shared/src/commandText.ts +25 -0
- package/vendor/shared/src/commands.ts +255 -0
- package/vendor/shared/src/computer.ts +25 -6
- package/vendor/shared/src/constants.ts +9 -2
- package/vendor/shared/src/dayPlan.ts +81 -0
- package/vendor/shared/src/dayPlanning.ts +77 -0
- package/vendor/shared/src/githubContributions.ts +70 -0
- package/vendor/shared/src/habitContributions.ts +144 -0
- package/vendor/shared/src/index.ts +44 -1
- package/vendor/shared/src/journal-migration.ts +130 -0
- package/vendor/shared/src/journal-vault.ts +1240 -0
- package/vendor/shared/src/projectCapture.ts +86 -0
- package/vendor/shared/src/quickAdd.ts +310 -0
- package/vendor/shared/src/recurrence.ts +37 -0
- package/vendor/shared/src/reminderWords.ts +54 -0
- package/vendor/shared/src/schemas/comment.ts +5 -0
- package/vendor/shared/src/schemas/harness.ts +146 -7
- package/vendor/shared/src/schemas/journal.ts +15 -6
- package/vendor/shared/src/schemas/organization.ts +3 -2
- package/vendor/shared/src/schemas/proposal.ts +6 -1
- package/vendor/shared/src/schemas/task.ts +20 -2
- package/vendor/shared/src/smartCapture.ts +67 -0
- package/vendor/shared/src/speech.ts +44 -0
- package/vendor/shared/src/spokenNames.ts +128 -0
- package/vendor/shared/src/taskActivity.ts +34 -0
- package/vendor/shared/src/vault-search.ts +243 -0
- package/vendor/shared/src/voiceCapture.ts +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCvB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAC9E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAWvF,CAAC;AACF,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,EAAE,SAAS,kBAAkB,EAAgC,CAAC;AAGpG,QAAA,MAAM,QAAQ;;;;EAA2C,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvD,oGAAoG;AACpG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyB7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PRIORITY_MAX, PRIORITY_MIN, RECURRING_FREQUENCY_VALUES } from './constants.js';
|
|
3
|
+
import { RecurringReminderSchema } from './recurrence.js';
|
|
4
|
+
/**
|
|
5
|
+
* Jev commands: one spoken or typed instruction, interpreted by the API and carried out by the
|
|
6
|
+
* phone. Jev never writes anything itself. The API lists what could be meant (screens, tasks,
|
|
7
|
+
* projects, dates, cleaned-up titles), Jev picks from those lists, and the client executes the
|
|
8
|
+
* resulting step with the same mutations its own buttons use.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Places a command can take you. Keys match the tab catalog in `hooks/useTabSlots` where one
|
|
12
|
+
* exists, so the phone can reuse the tab bar's own navigation for them.
|
|
13
|
+
*/
|
|
14
|
+
export const COMMAND_DESTINATIONS = [
|
|
15
|
+
{ key: 'dash', label: 'Dashboard', description: 'The Dashboard or home screen' },
|
|
16
|
+
{ key: 'search', label: 'Tasks', description: 'The Tasks tab: recent tasks, search and quick capture' },
|
|
17
|
+
{ key: 'today', label: 'Today', description: 'Today: tasks due today and overdue' },
|
|
18
|
+
{ key: 'inbox', label: 'Inbox', description: 'The Inbox: tasks not filed in any project' },
|
|
19
|
+
{ key: 'projects', label: 'Projects', description: 'The list of all projects' },
|
|
20
|
+
{ key: 'milestones', label: 'Milestones', description: 'The list of milestones' },
|
|
21
|
+
{ key: 'notes', label: 'Notes', description: 'Notes' },
|
|
22
|
+
{ key: 'journal', label: 'Journal', description: 'The voice journal' },
|
|
23
|
+
{ key: 'habits', label: 'Habits', description: 'Habits' },
|
|
24
|
+
{ key: 'chat', label: 'Messages', description: 'Messages: direct messages and chats with people' },
|
|
25
|
+
{ key: 'code', label: 'Code', description: 'The Code tab for coding with Lucid' },
|
|
26
|
+
{ key: 'team', label: 'Teams', description: 'Teams: organizations, standups and procurement' },
|
|
27
|
+
{ key: 'standups', label: 'Standups', description: 'Standups in an organization' },
|
|
28
|
+
{ key: 'procurement', label: 'Procurement', description: 'Procurement requests in an organization' },
|
|
29
|
+
{ key: 'notifications', label: 'Notifications', description: 'Notifications' },
|
|
30
|
+
{ key: 'settings', label: 'Settings', description: 'Settings' },
|
|
31
|
+
{ key: 'voice', label: 'Voice', description: 'Settings › Voice: dictation, speech recognition and spoken replies' },
|
|
32
|
+
{ key: 'computer', label: 'Computer', description: 'Settings › Computer: connecting your computer to Lucid' },
|
|
33
|
+
{ key: 'computer_settings', label: 'Computer settings', description: 'Settings for Lucid on your computer' },
|
|
34
|
+
{ key: 'automations', label: 'Automations', description: 'Settings › Automations: what Lucid runs on a schedule' },
|
|
35
|
+
{ key: 'trash', label: 'Trash', description: 'Settings › Trash: restore deleted tasks within 30 days' },
|
|
36
|
+
{ key: 'apple_watch', label: 'Apple Watch', description: 'Settings › Apple Watch' },
|
|
37
|
+
{ key: 'tab_bar', label: 'Tab bar', description: 'Settings › Tab bar: which places sit on the bar' },
|
|
38
|
+
{ key: 'organizations', label: 'Organizations', description: 'Settings › Organizations: create, join and manage them' },
|
|
39
|
+
{ key: 'api_key', label: 'API key', description: 'Settings › API key' },
|
|
40
|
+
{ key: 'profile', label: 'Profile', description: 'Your profile' },
|
|
41
|
+
{ key: 'edit_profile', label: 'Edit profile', description: 'Editing your name, handle and bio' },
|
|
42
|
+
{ key: 'connections', label: 'Connections', description: 'People you are connected with, and adding someone' },
|
|
43
|
+
{ key: 'review', label: 'Review', description: 'What Lucid inferred from the journal and habits, waiting for a yes or no' },
|
|
44
|
+
{ key: 'weekly_review', label: 'Week in view', description: 'A look back at the week' },
|
|
45
|
+
{ key: 'focus', label: 'Focus', description: 'The focus timer' },
|
|
46
|
+
{ key: 'card_studio', label: 'Card Studio', description: 'Choosing the cards on the Dashboard' },
|
|
47
|
+
{ key: 'ask_lucid', label: 'Lucid', description: 'A conversation with Lucid on your computer' },
|
|
48
|
+
{ key: 'plan', label: 'My day', description: 'Plan the day and review its chosen tasks and main focus' },
|
|
49
|
+
{ key: 'deck', label: 'Deck', description: 'The cards for habits, projects and daily summaries' },
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* The place each one sits under, so "voice settings" and "settings voice" find Voice without an
|
|
53
|
+
* alias for every pair.
|
|
54
|
+
*/
|
|
55
|
+
export const DESTINATION_PARENTS = {
|
|
56
|
+
voice: 'settings',
|
|
57
|
+
computer: 'settings',
|
|
58
|
+
automations: 'settings',
|
|
59
|
+
trash: 'settings',
|
|
60
|
+
apple_watch: 'settings',
|
|
61
|
+
tab_bar: 'settings',
|
|
62
|
+
organizations: 'settings',
|
|
63
|
+
api_key: 'settings',
|
|
64
|
+
edit_profile: 'profile',
|
|
65
|
+
connections: 'chat',
|
|
66
|
+
};
|
|
67
|
+
/** Places every organization has its own of. Going to one needs to know which organization. */
|
|
68
|
+
export const ORGANIZATION_DESTINATIONS = ['standups', 'procurement'];
|
|
69
|
+
const DESTINATION_KEYS = COMMAND_DESTINATIONS.map((d) => d.key);
|
|
70
|
+
const ItemKind = z.enum(['task', 'project', 'milestone']);
|
|
71
|
+
/** What the screen you're looking at shows, top to bottom. What "here" and "the first one" mean. */
|
|
72
|
+
export const CommandScreenSchema = z.object({
|
|
73
|
+
/** A destination key, or a detail screen such as `project` or `milestone`. */
|
|
74
|
+
name: z.string().trim().min(1).max(40),
|
|
75
|
+
title: z.string().trim().max(200).optional(),
|
|
76
|
+
/** The project or milestone this screen is, so a new task said here lands here. */
|
|
77
|
+
projectId: z.uuid().optional(),
|
|
78
|
+
milestoneId: z.uuid().optional(),
|
|
79
|
+
items: z
|
|
80
|
+
.array(z.object({ kind: ItemKind, id: z.uuid(), title: z.string().max(500) }))
|
|
81
|
+
.max(50),
|
|
82
|
+
});
|
|
83
|
+
export const CommandRequestSchema = z.object({
|
|
84
|
+
text: z.string().trim().min(1).max(500),
|
|
85
|
+
capturedAt: z.iso.datetime({ offset: true }),
|
|
86
|
+
timeZone: z
|
|
87
|
+
.string()
|
|
88
|
+
.min(1)
|
|
89
|
+
.max(100)
|
|
90
|
+
.refine((zone) => {
|
|
91
|
+
try {
|
|
92
|
+
new Intl.DateTimeFormat('en', { timeZone: zone });
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}, 'Use an IANA timezone'),
|
|
99
|
+
screen: CommandScreenSchema.optional(),
|
|
100
|
+
/** Tasks earlier steps in this conversation acted on, newest first: what "it" and "that" mean. */
|
|
101
|
+
recentTaskIds: z.array(z.uuid()).max(10).optional(),
|
|
102
|
+
/** Already one clause of a split instruction, so the API must not split it again. */
|
|
103
|
+
single: z.boolean().optional(),
|
|
104
|
+
/** Older phones cannot execute a recurring-reminder step. */
|
|
105
|
+
supportsRecurringReminders: z.boolean().optional(),
|
|
106
|
+
});
|
|
107
|
+
const Ref = z.object({ id: z.uuid(), title: z.string() });
|
|
108
|
+
const Due = {
|
|
109
|
+
dueDate: z.string().nullable(),
|
|
110
|
+
dueDatePrecision: z.enum(['date', 'time']).nullable(),
|
|
111
|
+
dueTimeZone: z.string().nullable(),
|
|
112
|
+
/** How the date reads in a reply, "Sat, Sep 26, 2026". Null when clearing a date. */
|
|
113
|
+
dueLabel: z.string().nullable(),
|
|
114
|
+
};
|
|
115
|
+
const Placement = { projectId: z.uuid().nullable(), projectName: z.string().nullable() };
|
|
116
|
+
/** Everything a step can be. Every step except `clarify`, `lucid` and `unclear` is directly executable. */
|
|
117
|
+
const ExecutableStep = z.discriminatedUnion('kind', [
|
|
118
|
+
z.object({ kind: z.literal('navigate'), destination: z.enum(DESTINATION_KEYS), organizationId: z.uuid().optional() }),
|
|
119
|
+
z.object({ kind: z.literal('open'), item: Ref.extend({ kind: ItemKind }) }),
|
|
120
|
+
/** The previous screen, or out of the task sheet. Only the phone reads this one. */
|
|
121
|
+
z.object({ kind: z.literal('back') }),
|
|
122
|
+
z.object({
|
|
123
|
+
kind: z.literal('create_task'),
|
|
124
|
+
title: z.string().min(1).max(500),
|
|
125
|
+
...Placement,
|
|
126
|
+
...Due,
|
|
127
|
+
/** Set when the task was said on a milestone's screen. */
|
|
128
|
+
milestoneId: z.uuid().nullable().optional(),
|
|
129
|
+
}),
|
|
130
|
+
z.object({ kind: z.literal('create_project'), name: z.string().min(1).max(255) }),
|
|
131
|
+
z.object({ kind: z.literal('complete'), task: Ref }),
|
|
132
|
+
z.object({ kind: z.literal('reopen'), task: Ref }),
|
|
133
|
+
z.object({ kind: z.literal('start'), task: Ref }),
|
|
134
|
+
/** Undoable: the phone holds the delete back while Undo is on screen. */
|
|
135
|
+
z.object({ kind: z.literal('delete'), task: Ref }),
|
|
136
|
+
z.object({ kind: z.literal('reschedule'), task: Ref, ...Due }),
|
|
137
|
+
z.object({ kind: z.literal('move'), task: Ref, ...Placement }),
|
|
138
|
+
/** A comment on an existing task, as the task sheet's Add Comment writes one. */
|
|
139
|
+
z.object({ kind: z.literal('comment'), task: Ref, text: z.string().min(1).max(5000) }),
|
|
140
|
+
/** One or more subtasks under an existing task: "add subtasks pack, book flights and call the hotel". */
|
|
141
|
+
z.object({ kind: z.literal('add_subtasks'), task: Ref, titles: z.array(z.string().min(1).max(500)).min(1).max(10) }),
|
|
142
|
+
z.object({ kind: z.literal('rename'), task: Ref, title: z.string().min(1).max(500) }),
|
|
143
|
+
/** The statuses besides done and in progress, which have steps of their own. */
|
|
144
|
+
z.object({ kind: z.literal('set_status'), task: Ref, status: z.enum(['pending', 'blocked', 'deferred']) }),
|
|
145
|
+
z.object({ kind: z.literal('priority'), task: Ref, priority: z.number().int().min(PRIORITY_MIN).max(PRIORITY_MAX) }),
|
|
146
|
+
/** Null stops it repeating. Repeating needs a due date, as in the task sheet. */
|
|
147
|
+
z.object({ kind: z.literal('repeat'), task: Ref, frequency: z.enum(RECURRING_FREQUENCY_VALUES).nullable() }),
|
|
148
|
+
/** Null removes the reminder. `reminderLabel` is how the time reads in a reply. */
|
|
149
|
+
z.object({ kind: z.literal('remind'), task: Ref, reminderAt: z.string().nullable(), reminderLabel: z.string().nullable() }),
|
|
150
|
+
z.object({ kind: z.literal('remind_recurring'), task: Ref, rule: RecurringReminderSchema }),
|
|
151
|
+
/** Deletes every task in it too, so the phone asks first and offers archiving instead. */
|
|
152
|
+
z.object({ kind: z.literal('delete_project'), project: Ref }),
|
|
153
|
+
z.object({ kind: z.literal('archive_project'), project: Ref }),
|
|
154
|
+
z.object({ kind: z.literal('rename_project'), project: Ref, name: z.string().min(1).max(255) }),
|
|
155
|
+
/** Read out, with nothing changed: the reply is the words. */
|
|
156
|
+
z.object({ kind: z.literal('read'), task: Ref, what: z.enum(['description', 'comments', 'all']) }),
|
|
157
|
+
z.object({ kind: z.literal('set_milestone'), task: Ref, milestoneId: z.uuid().nullable(), milestoneName: z.string().nullable() }),
|
|
158
|
+
/** A new description, added to the end of the one there when `append`; null clears it. */
|
|
159
|
+
z.object({ kind: z.literal('describe'), task: Ref, description: z.string().min(1).max(10_000).nullable(), append: z.boolean() }),
|
|
160
|
+
z.object({ kind: z.literal('list'), title: z.string(), tasks: z.array(Ref.extend({ due: z.string().nullable() })) }),
|
|
161
|
+
]);
|
|
162
|
+
export const CommandStepSchema = z.union([
|
|
163
|
+
ExecutableStep,
|
|
164
|
+
/** Jev was unsure which of a few things you meant. Each option is a ready step to run on tap. */
|
|
165
|
+
z.object({
|
|
166
|
+
kind: z.literal('clarify'),
|
|
167
|
+
question: z.string(),
|
|
168
|
+
options: z.array(z.object({ label: z.string(), step: ExecutableStep })).min(1).max(4),
|
|
169
|
+
}),
|
|
170
|
+
/** Needs thinking or conversation rather than an action: offer to hand it to Lucid. */
|
|
171
|
+
z.object({ kind: z.literal('lucid') }),
|
|
172
|
+
z.object({ kind: z.literal('unclear') }),
|
|
173
|
+
]);
|
|
174
|
+
/**
|
|
175
|
+
* What Jev made of one instruction, returned with the step so the phone can record it: each
|
|
176
|
+
* call's answers as "choice@confidence" per question ("edit@0.80"), or the reason a call failed.
|
|
177
|
+
*/
|
|
178
|
+
export const CommandTraceSchema = z.object({
|
|
179
|
+
calls: z.array(z.union([z.record(z.string(), z.string()), z.string()])).max(6),
|
|
180
|
+
attempts: z.number().int().min(0),
|
|
181
|
+
gatherMs: z.number().int().min(0),
|
|
182
|
+
jevMs: z.number().int().min(0),
|
|
183
|
+
});
|
|
184
|
+
export const CommandResponseSchema = z.object({
|
|
185
|
+
step: CommandStepSchema,
|
|
186
|
+
/** One short sentence describing the step, written by code rather than Jev. */
|
|
187
|
+
reply: z.string(),
|
|
188
|
+
/** The remaining clauses of a split instruction, to send one at a time after this step runs. */
|
|
189
|
+
rest: z.array(z.string()),
|
|
190
|
+
elapsedMs: z.number(),
|
|
191
|
+
trace: CommandTraceSchema.optional(),
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* What happened to an instruction: carried out, a question back ("What should the task say?"), a
|
|
195
|
+
* choice offered, not understood, handed to Chat, failed; later undone, or a choice picked.
|
|
196
|
+
*/
|
|
197
|
+
export const COMMAND_EVENT_OUTCOMES = [
|
|
198
|
+
'done', 'asked', 'clarify', 'unclear', 'lucid', 'failed', 'undone', 'chose', 'handed_to_chat', 'sent', 'answered',
|
|
199
|
+
'cancelled', 'blocked', 'incomplete',
|
|
200
|
+
];
|
|
201
|
+
const Outcome = z.enum(COMMAND_EVENT_OUTCOMES);
|
|
202
|
+
/** One instruction said to Fast mode or Chat, recorded for the Fast mode review. */
|
|
203
|
+
export const CommandEventSchema = z.object({
|
|
204
|
+
id: z.uuid(),
|
|
205
|
+
mode: z.enum(['fast', 'chat']),
|
|
206
|
+
heard: z.string().trim().min(1).max(500),
|
|
207
|
+
handledBy: z.enum(['phone', 'jev', 'lucid']),
|
|
208
|
+
did: z.string().max(32).optional(),
|
|
209
|
+
reply: z.string().max(500).optional(),
|
|
210
|
+
ms: z.number().int().min(0).max(86_400_000).optional(),
|
|
211
|
+
screen: z.string().max(40).optional(),
|
|
212
|
+
outcome: Outcome,
|
|
213
|
+
detail: z.string().max(2000).optional(),
|
|
214
|
+
/** Shared by every row one sentence led to; see command_events in @lucidity/db. */
|
|
215
|
+
turnId: z.uuid().optional(),
|
|
216
|
+
step: z.number().int().min(0).max(20).optional(),
|
|
217
|
+
replyTo: z.uuid().optional(),
|
|
218
|
+
rule: z.string().max(64).optional(),
|
|
219
|
+
target: z.object({ kind: z.string().max(24), id: z.string().max(64).optional(), title: z.string().max(200).optional() }).optional(),
|
|
220
|
+
context: z.object({
|
|
221
|
+
sheetTaskId: z.uuid().optional(),
|
|
222
|
+
sheetTaskTitle: z.string().max(200).optional(),
|
|
223
|
+
projectId: z.uuid().optional(),
|
|
224
|
+
milestoneId: z.uuid().optional(),
|
|
225
|
+
screenTitle: z.string().max(200).optional(),
|
|
226
|
+
}).optional(),
|
|
227
|
+
jev: CommandTraceSchema.optional(),
|
|
228
|
+
});
|
|
229
|
+
export const UpdateCommandEventSchema = z.object({
|
|
230
|
+
outcome: Outcome,
|
|
231
|
+
detail: z.string().max(2000).optional(),
|
|
232
|
+
ms: z.number().int().min(0).max(86_400_000).optional(),
|
|
233
|
+
});
|
|
@@ -21,9 +21,9 @@ export declare const ProviderHealthSchema: z.ZodObject<{
|
|
|
21
21
|
exhausted: "exhausted";
|
|
22
22
|
}>;
|
|
23
23
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
24
|
-
allowance: "allowance";
|
|
25
24
|
login: "login";
|
|
26
25
|
unavailable: "unavailable";
|
|
26
|
+
allowance: "allowance";
|
|
27
27
|
}>>;
|
|
28
28
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
29
29
|
}, z.core.$strip>;
|
|
@@ -47,9 +47,9 @@ export declare const ComputerRuntimeSchema: z.ZodObject<{
|
|
|
47
47
|
exhausted: "exhausted";
|
|
48
48
|
}>;
|
|
49
49
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
50
|
-
allowance: "allowance";
|
|
51
50
|
login: "login";
|
|
52
51
|
unavailable: "unavailable";
|
|
52
|
+
allowance: "allowance";
|
|
53
53
|
}>>;
|
|
54
54
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
55
55
|
}, z.core.$strip>;
|
|
@@ -66,9 +66,9 @@ export declare const ComputerRuntimeSchema: z.ZodObject<{
|
|
|
66
66
|
exhausted: "exhausted";
|
|
67
67
|
}>;
|
|
68
68
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
69
|
-
allowance: "allowance";
|
|
70
69
|
login: "login";
|
|
71
70
|
unavailable: "unavailable";
|
|
71
|
+
allowance: "allowance";
|
|
72
72
|
}>>;
|
|
73
73
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
74
74
|
}, z.core.$strip>;
|
|
@@ -107,9 +107,9 @@ export declare const ComputerHelloSchema: z.ZodObject<{
|
|
|
107
107
|
exhausted: "exhausted";
|
|
108
108
|
}>;
|
|
109
109
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
110
|
-
allowance: "allowance";
|
|
111
110
|
login: "login";
|
|
112
111
|
unavailable: "unavailable";
|
|
112
|
+
allowance: "allowance";
|
|
113
113
|
}>>;
|
|
114
114
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
115
115
|
}, z.core.$strip>;
|
|
@@ -126,9 +126,9 @@ export declare const ComputerHelloSchema: z.ZodObject<{
|
|
|
126
126
|
exhausted: "exhausted";
|
|
127
127
|
}>;
|
|
128
128
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
129
|
-
allowance: "allowance";
|
|
130
129
|
login: "login";
|
|
131
130
|
unavailable: "unavailable";
|
|
131
|
+
allowance: "allowance";
|
|
132
132
|
}>>;
|
|
133
133
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
134
134
|
}, z.core.$strip>;
|
|
@@ -174,9 +174,9 @@ export declare const ComputerPresenceSchema: z.ZodObject<{
|
|
|
174
174
|
exhausted: "exhausted";
|
|
175
175
|
}>;
|
|
176
176
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
177
|
-
allowance: "allowance";
|
|
178
177
|
login: "login";
|
|
179
178
|
unavailable: "unavailable";
|
|
179
|
+
allowance: "allowance";
|
|
180
180
|
}>>;
|
|
181
181
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
182
182
|
}, z.core.$strip>;
|
|
@@ -193,9 +193,9 @@ export declare const ComputerPresenceSchema: z.ZodObject<{
|
|
|
193
193
|
exhausted: "exhausted";
|
|
194
194
|
}>;
|
|
195
195
|
problem: z.ZodOptional<z.ZodEnum<{
|
|
196
|
-
allowance: "allowance";
|
|
197
196
|
login: "login";
|
|
198
197
|
unavailable: "unavailable";
|
|
198
|
+
allowance: "allowance";
|
|
199
199
|
}>>;
|
|
200
200
|
checkedAt: z.ZodOptional<z.ZodString>;
|
|
201
201
|
}, z.core.$strip>;
|
|
@@ -213,9 +213,9 @@ export declare const ComputerPresenceSchema: z.ZodObject<{
|
|
|
213
213
|
}, z.core.$strip>>>;
|
|
214
214
|
}, z.core.$strip>;
|
|
215
215
|
export type ComputerPresence = z.infer<typeof ComputerPresenceSchema>;
|
|
216
|
-
export type ComputerFeature = 'ask' | 'code' | 'conduct' | 'briefing' | 'attention' | 'models' | 'steer' | 'permission' | 'pull' | 'repos' | 'prs' | 'clone' | 'getConfig' | 'setConfig' | 'journal' | 'incident' | 'voice-diag' | 'cancel';
|
|
216
|
+
export type ComputerFeature = 'turn-queue' | 'provider-handoff' | 'queue-control' | 'day-plan' | 'ask' | 'code' | 'conduct' | 'briefing' | 'attention' | 'models' | 'commands' | 'steer' | 'permission' | 'pull' | 'repos' | 'prs' | 'clone' | 'getConfig' | 'getAutomations' | 'automation' | 'setConfig' | 'journal' | 'incident' | 'voice-diag' | 'transcribe' | 'voice-capture' | 'voice-capture-status' | 'cancel';
|
|
217
217
|
export type Availability = {
|
|
218
|
-
state: 'checking' | 'network' | 'never_paired' | 'offline' | 'update' | 'permission' | 'provider' | 'ready';
|
|
218
|
+
state: 'checking' | 'network' | 'never_paired' | 'offline' | 'update' | 'permission' | 'other_device' | 'provider' | 'ready';
|
|
219
219
|
title: string;
|
|
220
220
|
detail: string;
|
|
221
221
|
canSend: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../src/computer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAClD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK9B,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iB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,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAa7E"}
|
|
@@ -44,6 +44,7 @@ export const ComputerPresenceSchema = z.object({
|
|
|
44
44
|
});
|
|
45
45
|
export const INFERENCE_FEATURES = new Set([
|
|
46
46
|
'ask',
|
|
47
|
+
'day-plan',
|
|
47
48
|
'code',
|
|
48
49
|
'conduct',
|
|
49
50
|
'briefing',
|
|
@@ -63,8 +64,17 @@ export function computerAvailability(presence, network, feature = 'ask', provide
|
|
|
63
64
|
return blocked('offline', `${presence.computer.name} is offline`, `Last seen ${presence.computer.lastSeenAt}. Open Lucidity on that computer when you want to run AI work. Your draft and saved output stay here.`);
|
|
64
65
|
}
|
|
65
66
|
if (presence.readOnly &&
|
|
66
|
-
![
|
|
67
|
-
|
|
67
|
+
![
|
|
68
|
+
'pull',
|
|
69
|
+
'getConfig',
|
|
70
|
+
'getAutomations',
|
|
71
|
+
'models',
|
|
72
|
+
'commands',
|
|
73
|
+
'repos',
|
|
74
|
+
'prs',
|
|
75
|
+
'journal',
|
|
76
|
+
].includes(feature))
|
|
77
|
+
return blocked('other_device', 'Another device is in control', 'Only one device can send messages or approve actions at a time. Choose “Use on this device” to switch control here.');
|
|
68
78
|
const runtime = presence.runtime;
|
|
69
79
|
if (!runtime ||
|
|
70
80
|
runtime.protocol !== COMPUTER_PROTOCOL ||
|
|
@@ -110,7 +110,7 @@ export declare const BIO_MAX_LENGTH = 80;
|
|
|
110
110
|
* would otherwise break the header) and turns an all-blank value into null, so
|
|
111
111
|
* "cleared" and "never set" are the same state rather than two. */
|
|
112
112
|
export declare function normalizeBio(input: string): string | null;
|
|
113
|
-
export declare const HARNESS_REQUEST_KINDS: readonly ["ask", "briefing", "journal", "code", "repos", "prs", "clone", "cancel", "pull", "getConfig", "setConfig", "incident", "conduct", "attention", "voice-diag", "steer", "permission", "models"];
|
|
113
|
+
export declare const HARNESS_REQUEST_KINDS: readonly ["getAutomations", "automation", "queue-control", "ask", "briefing", "journal", "code", "repos", "prs", "clone", "cancel", "pull", "getConfig", "setConfig", "incident", "conduct", "attention", "voice-diag", "transcribe", "voice-capture", "voice-capture-status", "steer", "permission", "models", "commands"];
|
|
114
114
|
export declare const EFFORT_LEVELS: readonly ["auto", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
115
115
|
export declare const EFFORT_OPTIONS: readonly [{
|
|
116
116
|
readonly value: "auto";
|
|
@@ -130,8 +130,8 @@ export declare const EFFORT_OPTIONS: readonly [{
|
|
|
130
130
|
readonly blurb: "Thorough reasoning";
|
|
131
131
|
}, {
|
|
132
132
|
readonly value: "xhigh";
|
|
133
|
-
readonly label: "
|
|
134
|
-
readonly blurb: "
|
|
133
|
+
readonly label: "XHigh";
|
|
134
|
+
readonly blurb: "Extra-high reasoning";
|
|
135
135
|
}, {
|
|
136
136
|
readonly value: "max";
|
|
137
137
|
readonly label: "Max";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,yEAMrB,CAAC;AAEX,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,0BAA0B,mDAK7B,CAAC;AAEX,eAAO,MAAM,qBAAqB,6BAA8B,CAAC;AACjE,eAAO,MAAM,sBAAsB,oCAAqC,CAAC;AAEzE,eAAO,MAAM,0BAA0B,qCAAsC,CAAC;AAE9E,eAAO,MAAM,yBAAyB,0CAI5B,CAAC;AACX,eAAO,MAAM,oBAAoB,2BAA4B,CAAC;AAK9D,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAUxE,eAAO,MAAM,YAAY,6BAA8B,CAAC;AAMxD,eAAO,MAAM,wBAAwB,kCAAmC,CAAC;AAMzE,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAInC,eAAO,MAAM,iBAAiB,KAAK,CAA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BAA8B,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAM7D,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAO3C,eAAO,MAAM,yBAAyB,wDAK5B,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMhF,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAIrC,eAAO,MAAM,cAAc,mCAAoC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,iBAAiB,8CAA+C,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB,8BAA+B,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMxE,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAI/C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAIhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAavD;AAID,eAAO,MAAM,kBAAkB,4BAA6B,CAAC;AAW7D,eAAO,MAAM,eAAe,mCAAoC,CAAC"}
|
|
@@ -335,6 +335,9 @@ export function normalizeBio(input) {
|
|
|
335
335
|
// re-fetches an interrupted turn's frames from the daemon's durable turn log
|
|
336
336
|
// (`sinceSeq` onward) so a dropped reply is recovered, never re-run.
|
|
337
337
|
export const HARNESS_REQUEST_KINDS = [
|
|
338
|
+
'getAutomations',
|
|
339
|
+
'automation',
|
|
340
|
+
'queue-control',
|
|
338
341
|
'ask',
|
|
339
342
|
'briefing',
|
|
340
343
|
'journal',
|
|
@@ -357,9 +360,13 @@ export const HARNESS_REQUEST_KINDS = [
|
|
|
357
360
|
// Phone ships a per-utterance capture of the Kokoro TTS pipeline so a Claude session can
|
|
358
361
|
// localize where it drops words / collapses pauses (voice diagnostics).
|
|
359
362
|
'voice-diag',
|
|
363
|
+
'transcribe',
|
|
364
|
+
'voice-capture',
|
|
365
|
+
'voice-capture-status',
|
|
360
366
|
'steer',
|
|
361
367
|
'permission',
|
|
362
368
|
'models',
|
|
369
|
+
'commands',
|
|
363
370
|
];
|
|
364
371
|
// Union of provider effort levels. Model pickers filter this list by provider capabilities.
|
|
365
372
|
export const EFFORT_LEVELS = [
|
|
@@ -372,7 +379,7 @@ export const EFFORT_LEVELS = [
|
|
|
372
379
|
'ultra',
|
|
373
380
|
];
|
|
374
381
|
// Reasoning-effort levels with display labels/blurbs for the phone's picker (values are
|
|
375
|
-
// `EFFORT_LEVELS`). `auto` leaves the choice to the provider
|
|
382
|
+
// `EFFORT_LEVELS`). `auto` leaves the choice to the provider; keep XHigh recognizable in the UI.
|
|
376
383
|
export const EFFORT_OPTIONS = [
|
|
377
384
|
{
|
|
378
385
|
value: 'auto',
|
|
@@ -382,7 +389,7 @@ export const EFFORT_OPTIONS = [
|
|
|
382
389
|
{ value: 'low', label: 'Low', blurb: 'Fastest, least thorough' },
|
|
383
390
|
{ value: 'medium', label: 'Medium', blurb: 'Quick, some reasoning' },
|
|
384
391
|
{ value: 'high', label: 'High', blurb: 'Thorough reasoning' },
|
|
385
|
-
{ value: 'xhigh', label: '
|
|
392
|
+
{ value: 'xhigh', label: 'XHigh', blurb: 'Extra-high reasoning' },
|
|
386
393
|
{ value: 'max', label: 'Max', blurb: 'Very thorough reasoning' },
|
|
387
394
|
{
|
|
388
395
|
value: 'ultra',
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PlanDateSchema: z.ZodISODate;
|
|
3
|
+
export declare const PlanTimeZoneSchema: z.ZodString;
|
|
4
|
+
export declare const PlanTaskLinkSchema: z.ZodObject<{
|
|
5
|
+
kind: z.ZodLiteral<"task">;
|
|
6
|
+
taskId: z.ZodUUID;
|
|
7
|
+
occurrenceId: z.ZodNullable<z.ZodUUID>;
|
|
8
|
+
focus: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const PlanNewTaskSchema: z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"new">;
|
|
12
|
+
taskId: z.ZodUUID;
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
focus: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const PlanInputItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"task">;
|
|
18
|
+
taskId: z.ZodUUID;
|
|
19
|
+
occurrenceId: z.ZodNullable<z.ZodUUID>;
|
|
20
|
+
focus: z.ZodBoolean;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<"new">;
|
|
23
|
+
taskId: z.ZodUUID;
|
|
24
|
+
title: z.ZodString;
|
|
25
|
+
focus: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>], "kind">;
|
|
27
|
+
export declare const SaveDayPlanSchema: z.ZodObject<{
|
|
28
|
+
timeZone: z.ZodString;
|
|
29
|
+
revision: z.ZodNumber;
|
|
30
|
+
mutationId: z.ZodUUID;
|
|
31
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
kind: z.ZodLiteral<"task">;
|
|
33
|
+
taskId: z.ZodUUID;
|
|
34
|
+
occurrenceId: z.ZodNullable<z.ZodUUID>;
|
|
35
|
+
focus: z.ZodBoolean;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"new">;
|
|
38
|
+
taskId: z.ZodUUID;
|
|
39
|
+
title: z.ZodString;
|
|
40
|
+
focus: z.ZodBoolean;
|
|
41
|
+
}, z.core.$strip>], "kind">>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type PlanTaskLink = z.infer<typeof PlanTaskLinkSchema>;
|
|
44
|
+
export type PlanInputItem = z.infer<typeof PlanInputItemSchema>;
|
|
45
|
+
export type SaveDayPlan = z.infer<typeof SaveDayPlanSchema>;
|
|
46
|
+
/** A task becoming private or deleted leaves a placeholder, never a cached title. */
|
|
47
|
+
export interface PlanTask {
|
|
48
|
+
id: string;
|
|
49
|
+
title: string;
|
|
50
|
+
projectName: string | null;
|
|
51
|
+
projectKey: string | null;
|
|
52
|
+
taskNumber: number | null;
|
|
53
|
+
occurrenceId: string | null;
|
|
54
|
+
completed: boolean;
|
|
55
|
+
canComplete: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface DayPlanItem extends PlanTaskLink {
|
|
58
|
+
task: PlanTask | null;
|
|
59
|
+
}
|
|
60
|
+
export interface DayPlan {
|
|
61
|
+
date: string;
|
|
62
|
+
timeZone: string;
|
|
63
|
+
revision: number;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
items: DayPlanItem[];
|
|
66
|
+
}
|
|
67
|
+
export interface DayPlanResponse {
|
|
68
|
+
plan: DayPlan | null;
|
|
69
|
+
previous: DayPlan | null;
|
|
70
|
+
}
|
|
71
|
+
export declare const InterpretDayPlanSchema: z.ZodObject<{
|
|
72
|
+
text: z.ZodString;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export interface PlanSuggestion {
|
|
75
|
+
words: string;
|
|
76
|
+
title: string;
|
|
77
|
+
task: PlanTask | null;
|
|
78
|
+
focus: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface PlanInterpretation {
|
|
81
|
+
suggestions: PlanSuggestion[];
|
|
82
|
+
unresolved: string[];
|
|
83
|
+
}
|
|
84
|
+
export declare function localPlanDate(now: Date, timeZone: string): string;
|
|
85
|
+
export declare const planItemKey: (item: P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,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AACD,MAAM,WAAW,eAAe;IAAG,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE;AAEnF,eAAO,MAAM,sBAAsB;;iBAAyD,CAAC;AAC7F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;CAChB;AACD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIjE;AAED,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,cAAc,CAAC,KAAG,MACrC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const PlanDateSchema = z.iso.date();
|
|
3
|
+
export const PlanTimeZoneSchema = z.string().min(1).max(100).refine((zone) => {
|
|
4
|
+
try {
|
|
5
|
+
new Intl.DateTimeFormat('en', { timeZone: zone });
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}, 'Choose a valid time zone.');
|
|
12
|
+
export const PlanTaskLinkSchema = z.object({
|
|
13
|
+
kind: z.literal('task'),
|
|
14
|
+
taskId: z.uuid(),
|
|
15
|
+
occurrenceId: z.uuid().nullable(),
|
|
16
|
+
focus: z.boolean(),
|
|
17
|
+
});
|
|
18
|
+
export const PlanNewTaskSchema = z.object({
|
|
19
|
+
kind: z.literal('new'),
|
|
20
|
+
taskId: z.uuidv7(),
|
|
21
|
+
title: z.string().trim().min(1).max(500),
|
|
22
|
+
focus: z.boolean(),
|
|
23
|
+
});
|
|
24
|
+
export const PlanInputItemSchema = z.discriminatedUnion('kind', [PlanTaskLinkSchema, PlanNewTaskSchema]);
|
|
25
|
+
export const SaveDayPlanSchema = z.object({
|
|
26
|
+
timeZone: PlanTimeZoneSchema,
|
|
27
|
+
revision: z.number().int().min(0),
|
|
28
|
+
mutationId: z.uuidv7(),
|
|
29
|
+
items: z.array(PlanInputItemSchema).max(30),
|
|
30
|
+
}).superRefine(({ items }, context) => {
|
|
31
|
+
if (items.filter((item) => item.focus).length > 1)
|
|
32
|
+
context.addIssue({ code: 'custom', message: 'Choose one main focus.', path: ['items'] });
|
|
33
|
+
const links = items.map((item) => `${item.taskId}:${item.kind === 'task' ? item.occurrenceId ?? '' : ''}`);
|
|
34
|
+
if (new Set(links).size !== links.length)
|
|
35
|
+
context.addIssue({ code: 'custom', message: 'A task can appear only once in a plan.', path: ['items'] });
|
|
36
|
+
const newIds = items.filter((item) => item.kind === 'new').map((item) => item.taskId);
|
|
37
|
+
if (newIds.some((id) => items.filter((item) => item.taskId === id).length > 1))
|
|
38
|
+
context.addIssue({ code: 'custom', message: 'New tasks need separate identities.', path: ['items'] });
|
|
39
|
+
});
|
|
40
|
+
export const InterpretDayPlanSchema = z.object({ text: z.string().trim().min(1).max(4000) });
|
|
41
|
+
export function localPlanDate(now, timeZone) {
|
|
42
|
+
const parts = new Intl.DateTimeFormat('en', { timeZone, year: 'numeric', month: '2-digit', day: '2-digit' }).formatToParts(now);
|
|
43
|
+
const value = (name) => parts.find((part) => part.type === name).value;
|
|
44
|
+
return `${value('year')}-${value('month')}-${value('day')}`;
|
|
45
|
+
}
|
|
46
|
+
export const planItemKey = (item) => `${item.taskId}:${item.occurrenceId ?? ''}`;
|