@opencorelabs/lucidity 0.9.5 → 0.9.6
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 +46 -5
- package/bin/lucidity.js +9 -1
- package/dist/agentControls.d.ts +3 -3
- package/dist/agentControls.d.ts.map +1 -1
- package/dist/agentControls.js +9 -6
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/agent.d.ts.map +1 -1
- package/dist/automations/agent.js +8 -3
- package/dist/automations/githubIssues.d.ts +25 -0
- package/dist/automations/githubIssues.d.ts.map +1 -0
- package/dist/automations/githubIssues.js +48 -0
- package/dist/automations/service.d.ts +4 -0
- package/dist/automations/service.d.ts.map +1 -1
- package/dist/automations/service.js +24 -3
- package/dist/automations/skill.d.ts +1 -1
- package/dist/automations/skill.d.ts.map +1 -1
- package/dist/automations/skill.js +3 -25
- package/dist/automations/workflowCrash.integration.d.ts +2 -0
- package/dist/automations/workflowCrash.integration.d.ts.map +1 -0
- package/dist/automations/workflowCrash.integration.js +78 -0
- package/dist/chat/server.d.ts +18 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +203 -84
- package/dist/coding/agentMessages.d.ts +37 -0
- package/dist/coding/agentMessages.d.ts.map +1 -0
- package/dist/coding/agentMessages.js +220 -0
- package/dist/coding/agentSettings.d.ts +9 -0
- package/dist/coding/agentSettings.d.ts.map +1 -0
- package/dist/coding/agentSettings.js +22 -0
- package/dist/coding/fileContext.d.ts +4 -0
- package/dist/coding/fileContext.d.ts.map +1 -0
- package/dist/coding/fileContext.js +61 -0
- package/dist/coding/listPrs.d.ts +4 -0
- package/dist/coding/listPrs.d.ts.map +1 -1
- package/dist/coding/listPrs.js +1 -1
- package/dist/coding/lucidRouting.d.ts +67 -0
- package/dist/coding/lucidRouting.d.ts.map +1 -0
- package/dist/coding/lucidRouting.js +216 -0
- package/dist/coding/overviewSources.d.ts +52 -0
- package/dist/coding/overviewSources.d.ts.map +1 -0
- package/dist/coding/overviewSources.js +78 -0
- package/dist/coding/progress.d.ts +27 -0
- package/dist/coding/progress.d.ts.map +1 -0
- package/dist/coding/progress.js +152 -0
- package/dist/coding/repositoryRequests.d.ts +38 -0
- package/dist/coding/repositoryRequests.d.ts.map +1 -0
- package/dist/coding/repositoryRequests.js +137 -0
- package/dist/coding/runCodeTurn.d.ts +25 -8
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +93 -77
- package/dist/coding/workspaceOverview.d.ts +106 -0
- package/dist/coding/workspaceOverview.d.ts.map +1 -0
- package/dist/coding/workspaceOverview.js +96 -0
- package/dist/coding/workspaceRegistry.d.ts +230 -4
- package/dist/coding/workspaceRegistry.d.ts.map +1 -1
- package/dist/coding/workspaceRegistry.js +827 -37
- package/dist/coding/workspaceTitle.d.ts +14 -0
- package/dist/coding/workspaceTitle.d.ts.map +1 -0
- package/dist/coding/workspaceTitle.js +8 -0
- package/dist/coding/worktree.d.ts +1 -1
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +3 -2
- package/dist/coding/worktreeSetup.d.ts +1 -1
- package/dist/coding/worktreeSetup.d.ts.map +1 -1
- package/dist/coding/worktreeSetup.js +43 -10
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +38 -3
- package/dist/editor/existingWorkspace.d.ts +3 -0
- package/dist/editor/existingWorkspace.d.ts.map +1 -0
- package/dist/editor/existingWorkspace.js +19 -0
- package/dist/editor/fileActions.d.ts +26 -0
- package/dist/editor/fileActions.d.ts.map +1 -0
- package/dist/editor/fileActions.js +134 -0
- package/dist/editor/files.d.ts +27 -0
- package/dist/editor/files.d.ts.map +1 -0
- package/dist/editor/files.js +279 -0
- package/dist/editor/gitActions.d.ts +18 -0
- package/dist/editor/gitActions.d.ts.map +1 -0
- package/dist/editor/gitActions.js +140 -0
- package/dist/editor/localEndpoint.d.ts +4 -0
- package/dist/editor/localEndpoint.d.ts.map +1 -0
- package/dist/editor/localEndpoint.js +35 -0
- package/dist/editor/service.d.ts +28 -0
- package/dist/editor/service.d.ts.map +1 -0
- package/dist/editor/service.js +101 -0
- package/dist/editor/shellCommands.d.ts +21 -0
- package/dist/editor/shellCommands.d.ts.map +1 -0
- package/dist/editor/shellCommands.js +165 -0
- package/dist/editor/terminals.d.ts +34 -0
- package/dist/editor/terminals.d.ts.map +1 -0
- package/dist/editor/terminals.js +161 -0
- package/dist/editor/types.d.ts +37 -0
- package/dist/editor/types.d.ts.map +1 -0
- package/dist/editor/types.js +1 -0
- package/dist/files/store.d.ts +13 -0
- package/dist/files/store.d.ts.map +1 -0
- package/dist/files/store.js +150 -0
- package/dist/goals/assessment.d.ts +6 -6
- package/dist/index.js +232 -56
- package/dist/install.d.ts +7 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +5 -2
- package/dist/jobs/briefing.d.ts +1 -1
- package/dist/jobs/briefing.d.ts.map +1 -1
- package/dist/jobs/briefing.js +16 -33
- package/dist/jobs/extraction.d.ts +2 -1
- package/dist/jobs/extraction.d.ts.map +1 -1
- package/dist/jobs/extraction.js +2 -2
- package/dist/jobs/fastModeReview.d.ts +3 -1
- package/dist/jobs/fastModeReview.d.ts.map +1 -1
- package/dist/jobs/fastModeReview.js +20 -11
- package/dist/jobs/voiceReview.js +4 -4
- package/dist/jobs/weeklyReview.d.ts +1 -1
- package/dist/jobs/weeklyReview.d.ts.map +1 -1
- package/dist/jobs/weeklyReview.js +2 -5
- package/dist/lucidInvocations.d.ts +44 -0
- package/dist/lucidInvocations.d.ts.map +1 -0
- package/dist/lucidInvocations.js +164 -0
- package/dist/mcp/config.d.ts +8 -2
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +52 -10
- package/dist/mcp/paired.js +1 -0
- package/dist/providerFallbackContext.d.ts +5 -0
- package/dist/providerFallbackContext.d.ts.map +1 -0
- package/dist/providerFallbackContext.js +58 -0
- package/dist/providerRecovery.d.ts +18 -1
- package/dist/providerRecovery.d.ts.map +1 -1
- package/dist/providerRecovery.js +3 -1
- package/dist/providerRoles.d.ts +9 -0
- package/dist/providerRoles.d.ts.map +1 -0
- package/dist/providerRoles.js +25 -0
- package/dist/recall/command.d.ts +139 -0
- package/dist/recall/command.d.ts.map +1 -0
- package/dist/recall/command.js +35 -0
- package/dist/recall/context.d.ts +5 -0
- package/dist/recall/context.d.ts.map +1 -0
- package/dist/recall/context.js +66 -0
- package/dist/recall/conversations.d.ts +182 -0
- package/dist/recall/conversations.d.ts.map +1 -0
- package/dist/recall/conversations.js +58 -0
- package/dist/recall/documents.d.ts +76 -0
- package/dist/recall/documents.d.ts.map +1 -0
- package/dist/recall/documents.js +32 -0
- package/dist/recall/evaluation.d.ts +77 -0
- package/dist/recall/evaluation.d.ts.map +1 -0
- package/dist/recall/evaluation.js +88 -0
- package/dist/recall/factory.d.ts +6 -0
- package/dist/recall/factory.d.ts.map +1 -0
- package/dist/recall/factory.js +20 -0
- package/dist/recall/index.d.ts +13 -0
- package/dist/recall/index.d.ts.map +1 -0
- package/dist/recall/index.js +92 -0
- package/dist/recall/memories.d.ts +16 -0
- package/dist/recall/memories.d.ts.map +1 -0
- package/dist/recall/memories.js +136 -0
- package/dist/recall/memorySelection.d.ts +4 -0
- package/dist/recall/memorySelection.d.ts.map +1 -0
- package/dist/recall/memorySelection.js +16 -0
- package/dist/recall/memoryService.d.ts +22 -0
- package/dist/recall/memoryService.d.ts.map +1 -0
- package/dist/recall/memoryService.js +171 -0
- package/dist/recall/personal.d.ts +127 -0
- package/dist/recall/personal.d.ts.map +1 -0
- package/dist/recall/personal.js +125 -0
- package/dist/recall/projects.d.ts +67 -0
- package/dist/recall/projects.d.ts.map +1 -0
- package/dist/recall/projects.js +117 -0
- package/dist/recall/query.d.ts +5 -0
- package/dist/recall/query.d.ts.map +1 -0
- package/dist/recall/query.js +17 -0
- package/dist/recall/semanticEvaluation.d.ts +2 -0
- package/dist/recall/semanticEvaluation.d.ts.map +1 -0
- package/dist/recall/semanticEvaluation.js +123 -0
- package/dist/recall/service.d.ts +62 -0
- package/dist/recall/service.d.ts.map +1 -0
- package/dist/recall/service.js +94 -0
- package/dist/room/client.d.ts +41 -0
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +224 -25
- package/dist/room/codingActivity.d.ts +21 -0
- package/dist/room/codingActivity.d.ts.map +1 -0
- package/dist/room/codingActivity.js +86 -0
- package/dist/room/computer.d.ts.map +1 -1
- package/dist/room/computer.js +19 -3
- package/dist/room/context.d.ts +3 -2
- package/dist/room/context.d.ts.map +1 -1
- package/dist/room/context.js +5 -4
- package/dist/room/desktop-live.integration.d.ts +2 -0
- package/dist/room/desktop-live.integration.d.ts.map +1 -0
- package/dist/room/desktop-live.integration.js +219 -0
- package/dist/room/turnQueue.d.ts +24 -2
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +96 -30
- package/dist/runtimeStore.d.ts +17 -0
- package/dist/runtimeStore.d.ts.map +1 -1
- package/dist/runtimeStore.js +33 -4
- package/dist/setup/page.d.ts +1 -1
- package/dist/setup/page.d.ts.map +1 -1
- package/dist/setup/page.js +15 -2
- package/dist/setup/server.d.ts +5 -1
- package/dist/setup/server.d.ts.map +1 -1
- package/dist/setup/server.js +37 -13
- package/dist/skills/install.d.ts +8 -0
- package/dist/skills/install.d.ts.map +1 -0
- package/dist/skills/install.js +82 -0
- package/dist/skills/lucidity/SKILL.md +65 -0
- package/dist/skills/lucidity-task-handoff/SKILL.md +122 -0
- package/dist/speech/captures.d.ts +4 -0
- package/dist/speech/captures.d.ts.map +1 -1
- package/dist/speech/captures.js +53 -41
- package/dist/updateCli.d.ts +2 -0
- package/dist/updateCli.d.ts.map +1 -0
- package/dist/updateCli.js +40 -0
- package/dist/updateService.d.ts +3 -0
- package/dist/updateService.d.ts.map +1 -0
- package/dist/updateService.js +23 -0
- package/dist/updates/admission.d.ts +23 -0
- package/dist/updates/admission.d.ts.map +1 -0
- package/dist/updates/admission.js +76 -0
- package/dist/updates/bootstrap.d.ts +23 -0
- package/dist/updates/bootstrap.d.ts.map +1 -0
- package/dist/updates/bootstrap.js +95 -0
- package/dist/updates/bootstrapConfig.d.ts +34 -0
- package/dist/updates/bootstrapConfig.d.ts.map +1 -0
- package/dist/updates/bootstrapConfig.js +35 -0
- package/dist/updates/connection.d.ts +20 -0
- package/dist/updates/connection.d.ts.map +1 -0
- package/dist/updates/connection.js +111 -0
- package/dist/updates/developmentAdmission.d.ts +29 -0
- package/dist/updates/developmentAdmission.d.ts.map +1 -0
- package/dist/updates/developmentAdmission.js +73 -0
- package/dist/updates/developmentCli.d.ts +2 -0
- package/dist/updates/developmentCli.d.ts.map +1 -0
- package/dist/updates/developmentCli.js +61 -0
- package/dist/updates/developmentRefresh.d.ts +73 -0
- package/dist/updates/developmentRefresh.d.ts.map +1 -0
- package/dist/updates/developmentRefresh.js +157 -0
- package/dist/updates/developmentService.d.ts +13 -0
- package/dist/updates/developmentService.d.ts.map +1 -0
- package/dist/updates/developmentService.js +217 -0
- package/dist/updates/download.d.ts +7 -0
- package/dist/updates/download.d.ts.map +1 -0
- package/dist/updates/download.js +52 -0
- package/dist/updates/feed.d.ts +7 -0
- package/dist/updates/feed.d.ts.map +1 -0
- package/dist/updates/feed.js +37 -0
- package/dist/updates/installService.d.ts +3 -0
- package/dist/updates/installService.d.ts.map +1 -0
- package/dist/updates/installService.js +78 -0
- package/dist/updates/installationReferences.d.ts +17 -0
- package/dist/updates/installationReferences.d.ts.map +1 -0
- package/dist/updates/installationReferences.js +104 -0
- package/dist/updates/installationStore.d.ts +49 -0
- package/dist/updates/installationStore.d.ts.map +1 -0
- package/dist/updates/installationStore.js +237 -0
- package/dist/updates/installer.d.ts +29 -0
- package/dist/updates/installer.d.ts.map +1 -0
- package/dist/updates/installer.js +205 -0
- package/dist/updates/journal.d.ts +228 -0
- package/dist/updates/journal.d.ts.map +1 -0
- package/dist/updates/journal.js +249 -0
- package/dist/updates/managedLifecycle.d.ts +26 -0
- package/dist/updates/managedLifecycle.d.ts.map +1 -0
- package/dist/updates/managedLifecycle.js +60 -0
- package/dist/updates/migrateService.d.ts +2 -0
- package/dist/updates/migrateService.d.ts.map +1 -0
- package/dist/updates/migrateService.js +44 -0
- package/dist/updates/migration.d.ts +15 -0
- package/dist/updates/migration.d.ts.map +1 -0
- package/dist/updates/migration.js +108 -0
- package/dist/updates/processControl.d.ts +47 -0
- package/dist/updates/processControl.d.ts.map +1 -0
- package/dist/updates/processControl.js +98 -0
- package/dist/updates/processHost.d.ts +52 -0
- package/dist/updates/processHost.d.ts.map +1 -0
- package/dist/updates/processHost.js +165 -0
- package/dist/updates/registerService.d.ts +4 -0
- package/dist/updates/registerService.d.ts.map +1 -0
- package/dist/updates/registerService.js +34 -0
- package/dist/updates/releases.d.ts +84 -0
- package/dist/updates/releases.d.ts.map +1 -0
- package/dist/updates/releases.js +51 -0
- package/dist/updates/retention.d.ts +32 -0
- package/dist/updates/retention.d.ts.map +1 -0
- package/dist/updates/retention.js +188 -0
- package/dist/updates/runner.d.ts +6 -0
- package/dist/updates/runner.d.ts.map +1 -0
- package/dist/updates/runner.js +117 -0
- package/dist/updates/service.d.ts +53 -0
- package/dist/updates/service.d.ts.map +1 -0
- package/dist/updates/service.js +268 -0
- package/dist/updates/servicePlan.d.ts +29 -0
- package/dist/updates/servicePlan.d.ts.map +1 -0
- package/dist/updates/servicePlan.js +58 -0
- package/dist/updates/signCatalog.d.ts +10 -0
- package/dist/updates/signCatalog.d.ts.map +1 -0
- package/dist/updates/signCatalog.js +44 -0
- package/dist/updates/supervisor.d.ts +27 -0
- package/dist/updates/supervisor.d.ts.map +1 -0
- package/dist/updates/supervisor.js +137 -0
- package/dist/updates/windowsService.d.ts +12 -0
- package/dist/updates/windowsService.d.ts.map +1 -0
- package/dist/updates/windowsService.js +51 -0
- package/dist/video/context.d.ts +4 -0
- package/dist/video/context.d.ts.map +1 -0
- package/dist/video/context.js +74 -0
- package/dist/video/store.d.ts +22 -0
- package/dist/video/store.d.ts.map +1 -0
- package/dist/video/store.js +184 -0
- package/npm-shrinkwrap.json +1792 -0
- package/package.json +4 -1
- package/src/agentControls.ts +11 -7
- package/src/automations/agent.ts +11 -2
- package/src/automations/githubIssues.ts +63 -0
- package/src/automations/service.ts +25 -3
- package/src/automations/skill.ts +5 -37
- package/src/automations/workflowCrash.integration.ts +70 -0
- package/src/chat/server.ts +162 -89
- package/src/coding/agentMessages.ts +217 -0
- package/src/coding/agentSettings.ts +22 -0
- package/src/coding/fileContext.ts +72 -0
- package/src/coding/listPrs.ts +1 -1
- package/src/coding/lucidRouting.ts +211 -0
- package/src/coding/overviewSources.ts +86 -0
- package/src/coding/progress.ts +146 -0
- package/src/coding/repositoryRequests.ts +117 -0
- package/src/coding/runCodeTurn.ts +106 -92
- package/src/coding/workspaceOverview.ts +99 -0
- package/src/coding/workspaceRegistry.ts +762 -39
- package/src/coding/workspaceTitle.ts +10 -0
- package/src/coding/worktree.ts +3 -2
- package/src/coding/worktreeSetup.ts +33 -10
- package/src/config.ts +37 -2
- package/src/editor/existingWorkspace.ts +17 -0
- package/src/editor/fileActions.ts +162 -0
- package/src/editor/files.ts +276 -0
- package/src/editor/gitActions.ts +150 -0
- package/src/editor/localEndpoint.ts +28 -0
- package/src/editor/service.ts +93 -0
- package/src/editor/shellCommands.ts +132 -0
- package/src/editor/terminals.ts +129 -0
- package/src/editor/types.ts +32 -0
- package/src/files/store.ts +131 -0
- package/src/index.ts +224 -50
- package/src/install.ts +4 -2
- package/src/jobs/briefing.ts +18 -29
- package/src/jobs/extraction.ts +5 -4
- package/src/jobs/fastModeReview.ts +22 -11
- package/src/jobs/voiceReview.ts +4 -4
- package/src/jobs/weeklyReview.ts +2 -4
- package/src/lucidInvocations.ts +152 -0
- package/src/mcp/config.ts +48 -10
- package/src/mcp/paired.ts +1 -0
- package/src/providerFallbackContext.ts +48 -0
- package/src/providerRecovery.ts +3 -1
- package/src/providerRoles.ts +35 -0
- package/src/recall/command.ts +42 -0
- package/src/recall/context.ts +64 -0
- package/src/recall/conversations.ts +53 -0
- package/src/recall/documents.ts +32 -0
- package/src/recall/evaluation.ts +89 -0
- package/src/recall/factory.ts +21 -0
- package/src/recall/index.ts +87 -0
- package/src/recall/memories.ts +123 -0
- package/src/recall/memorySelection.ts +17 -0
- package/src/recall/memoryService.ts +138 -0
- package/src/recall/personal.ts +97 -0
- package/src/recall/projects.ts +98 -0
- package/src/recall/query.ts +21 -0
- package/src/recall/semanticEvaluation.ts +101 -0
- package/src/recall/service.ts +85 -0
- package/src/room/client.ts +238 -31
- package/src/room/codingActivity.ts +70 -0
- package/src/room/computer.ts +19 -3
- package/src/room/context.ts +7 -2
- package/src/room/desktop-live.integration.ts +203 -0
- package/src/room/turnQueue.ts +91 -34
- package/src/runtimeStore.ts +36 -4
- package/src/setup/page.ts +15 -2
- package/src/setup/server.ts +28 -5
- package/src/skills/install.ts +65 -0
- package/src/speech/captures.ts +56 -44
- package/src/updateCli.ts +37 -0
- package/src/updateService.ts +21 -0
- package/src/updates/admission.ts +70 -0
- package/src/updates/bootstrap.ts +77 -0
- package/src/updates/bootstrapConfig.ts +29 -0
- package/src/updates/connection.ts +84 -0
- package/src/updates/developmentAdmission.ts +56 -0
- package/src/updates/developmentCli.ts +47 -0
- package/src/updates/developmentRefresh.ts +130 -0
- package/src/updates/developmentService.ts +170 -0
- package/src/updates/download.ts +53 -0
- package/src/updates/feed.ts +34 -0
- package/src/updates/installService.ts +67 -0
- package/src/updates/installationReferences.ts +87 -0
- package/src/updates/installationStore.ts +196 -0
- package/src/updates/installer.ts +203 -0
- package/src/updates/journal.ts +250 -0
- package/src/updates/managedLifecycle.ts +64 -0
- package/src/updates/migrateService.ts +33 -0
- package/src/updates/migration.ts +92 -0
- package/src/updates/processControl.ts +96 -0
- package/src/updates/processHost.ts +159 -0
- package/src/updates/registerService.ts +27 -0
- package/src/updates/releases.ts +53 -0
- package/src/updates/retention.ts +154 -0
- package/src/updates/runner.ts +104 -0
- package/src/updates/service.ts +241 -0
- package/src/updates/servicePlan.ts +63 -0
- package/src/updates/signCatalog.ts +40 -0
- package/src/updates/supervisor.ts +114 -0
- package/src/updates/windowsService.ts +54 -0
- package/src/video/context.ts +101 -0
- package/src/video/store.ts +250 -0
- package/vendor/decisions/dist/followup.d.ts +14 -0
- package/vendor/decisions/dist/followup.js +86 -0
- package/vendor/decisions/dist/index.d.ts +3 -0
- package/vendor/decisions/dist/index.js +3 -0
- package/vendor/decisions/dist/repositoryReplay.d.ts +103 -0
- package/vendor/decisions/dist/repositoryReplay.js +177 -0
- package/vendor/decisions/dist/repositoryRouting.d.ts +21 -0
- package/vendor/decisions/dist/repositoryRouting.js +125 -0
- package/vendor/decisions/src/followup.ts +129 -0
- package/vendor/decisions/src/index.ts +3 -0
- package/vendor/decisions/src/repositoryReplay.ts +312 -0
- package/vendor/decisions/src/repositoryRouting.ts +167 -0
- package/vendor/mcp-server/README.md +6 -0
- package/vendor/mcp-server/dist/index.js +21 -7
- package/vendor/mcp-server/dist/localDaemon.d.ts +4 -0
- package/vendor/mcp-server/dist/localDaemon.d.ts.map +1 -0
- package/vendor/mcp-server/dist/localDaemon.js +41 -0
- package/vendor/mcp-server/dist/tools/agents.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/agents.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/agents.js +60 -0
- package/vendor/mcp-server/dist/tools/artifacts.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/artifacts.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/artifacts.js +22 -0
- package/vendor/mcp-server/dist/tools/automations.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/automations.js +7 -32
- package/vendor/mcp-server/dist/tools/commandEventFormat.d.ts +1 -1
- package/vendor/mcp-server/dist/tools/commandEventFormat.js +2 -2
- package/vendor/mcp-server/dist/tools/commandEvents.js +1 -1
- package/vendor/mcp-server/dist/tools/comments.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/comments.js +5 -1
- package/vendor/mcp-server/dist/tools/journal.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/journal.js +1 -0
- package/vendor/mcp-server/dist/tools/memory.d.ts +0 -10
- package/vendor/mcp-server/dist/tools/memory.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/memory.js +28 -102
- package/vendor/mcp-server/dist/tools/notes.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/notes.js +38 -4
- package/vendor/mcp-server/dist/tools/recall.d.ts +6 -0
- package/vendor/mcp-server/dist/tools/recall.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/recall.js +78 -0
- package/vendor/mcp-server/dist/tools/summary.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/summary.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/summary.js +22 -0
- package/vendor/mcp-server/dist/tools/taskSheet.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/taskSheet.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/taskSheet.js +32 -0
- package/vendor/mcp-server/dist/tools/tasks.d.ts.map +1 -1
- package/vendor/mcp-server/dist/tools/tasks.js +117 -24
- package/vendor/mcp-server/dist/tools/worktrees.d.ts +3 -0
- package/vendor/mcp-server/dist/tools/worktrees.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/worktrees.js +51 -0
- package/vendor/mcp-server/package.json +1 -1
- package/vendor/mcp-server/src/index.ts +17 -7
- package/vendor/mcp-server/src/localDaemon.ts +56 -0
- package/vendor/mcp-server/src/tools/agents.ts +78 -0
- package/vendor/mcp-server/src/tools/artifacts.ts +26 -0
- package/vendor/mcp-server/src/tools/automations.ts +7 -47
- package/vendor/mcp-server/src/tools/commandEventFormat.ts +2 -2
- package/vendor/mcp-server/src/tools/commandEvents.ts +1 -1
- package/vendor/mcp-server/src/tools/comments.ts +4 -1
- package/vendor/mcp-server/src/tools/journal.ts +1 -0
- package/vendor/mcp-server/src/tools/memory.ts +37 -130
- package/vendor/mcp-server/src/tools/notes.ts +35 -5
- package/vendor/mcp-server/src/tools/recall.ts +89 -0
- package/vendor/mcp-server/src/tools/summary.ts +30 -0
- package/vendor/mcp-server/src/tools/taskSheet.ts +60 -0
- package/vendor/mcp-server/src/tools/tasks.ts +125 -24
- package/vendor/mcp-server/src/tools/worktrees.ts +61 -0
- package/vendor/notes/dist/artifacts.d.ts +8 -0
- package/vendor/notes/dist/artifacts.d.ts.map +1 -0
- package/vendor/notes/dist/artifacts.js +105 -0
- package/vendor/notes/dist/index.d.ts +1 -0
- package/vendor/notes/dist/index.d.ts.map +1 -1
- package/vendor/notes/dist/index.js +1 -0
- package/vendor/notes/dist/vault.d.ts.map +1 -1
- package/vendor/notes/dist/vault.js +2 -0
- package/vendor/notes/src/artifacts.ts +100 -0
- package/vendor/notes/src/index.ts +2 -0
- package/vendor/notes/src/vault.ts +1 -0
- package/vendor/runtime/README.md +8 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +18 -1
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +157 -39
- package/vendor/runtime/dist/executor/claudeCode.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeCode.js +19 -2
- package/vendor/runtime/dist/executor/claudeSession.d.ts +32 -0
- package/vendor/runtime/dist/executor/claudeSession.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/claudeSession.js +154 -0
- package/vendor/runtime/dist/executor/codex.d.ts +18 -2
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +134 -18
- package/vendor/runtime/dist/executor/codexSessions.d.ts +5 -10
- package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexSessions.js +12 -78
- package/vendor/runtime/dist/executor/fallback.d.ts +27 -0
- package/vendor/runtime/dist/executor/fallback.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/fallback.js +45 -0
- package/vendor/runtime/dist/executor/health.d.ts +19 -1
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +19 -2
- package/vendor/runtime/dist/executor/integrations.d.ts +4 -0
- package/vendor/runtime/dist/executor/integrations.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/integrations.js +5 -0
- package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -2
- package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/liveTurns.js +3 -3
- package/vendor/runtime/dist/executor/ownership.d.ts +18 -1
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/ownership.js +3 -1
- package/vendor/runtime/dist/executor/providerRouter.d.ts +13 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/providerRouter.js +91 -5
- package/vendor/runtime/dist/executor/sessionRetention.d.ts +34 -0
- package/vendor/runtime/dist/executor/sessionRetention.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/sessionRetention.js +126 -0
- package/vendor/runtime/dist/executor/types.d.ts +30 -7
- package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/usage.d.ts +5 -0
- package/vendor/runtime/dist/executor/usage.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/usage.js +56 -0
- package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.js +2 -5
- package/vendor/runtime/dist/harness/types.d.ts +3 -1
- package/vendor/runtime/dist/harness/types.d.ts.map +1 -1
- package/vendor/runtime/dist/index.d.ts +6 -1
- package/vendor/runtime/dist/index.d.ts.map +1 -1
- package/vendor/runtime/dist/index.js +3 -0
- package/vendor/runtime/dist/prompts/recall.d.ts +15 -0
- package/vendor/runtime/dist/prompts/recall.d.ts.map +1 -0
- package/vendor/runtime/dist/prompts/recall.js +71 -0
- package/vendor/runtime/src/executor/claudeAgent.ts +149 -37
- package/vendor/runtime/src/executor/claudeCode.ts +17 -3
- package/vendor/runtime/src/executor/claudeSession.ts +180 -0
- package/vendor/runtime/src/executor/codex.ts +136 -21
- package/vendor/runtime/src/executor/codexSessions.ts +18 -82
- package/vendor/runtime/src/executor/fallback.ts +63 -0
- package/vendor/runtime/src/executor/health.ts +16 -2
- package/vendor/runtime/src/executor/integrations.ts +7 -0
- package/vendor/runtime/src/executor/liveTurns.ts +5 -5
- package/vendor/runtime/src/executor/ownership.ts +3 -1
- package/vendor/runtime/src/executor/providerRouter.ts +85 -4
- package/vendor/runtime/src/executor/sessionRetention.ts +166 -0
- package/vendor/runtime/src/executor/types.ts +27 -7
- package/vendor/runtime/src/executor/usage.ts +58 -0
- package/vendor/runtime/src/harness/index.ts +2 -5
- package/vendor/runtime/src/harness/types.ts +3 -1
- package/vendor/runtime/src/index.ts +7 -1
- package/vendor/runtime/src/prompts/recall.ts +72 -0
- package/vendor/shared/dist/accountDevices.d.ts +62 -0
- package/vendor/shared/dist/accountDevices.d.ts.map +1 -0
- package/vendor/shared/dist/accountDevices.js +25 -0
- package/vendor/shared/dist/activityRecovery.d.ts +37 -0
- package/vendor/shared/dist/activityRecovery.d.ts.map +1 -0
- package/vendor/shared/dist/activityRecovery.js +39 -0
- package/vendor/shared/dist/agentMessages.d.ts +187 -0
- package/vendor/shared/dist/agentMessages.d.ts.map +1 -0
- package/vendor/shared/dist/agentMessages.js +70 -0
- package/vendor/shared/dist/aiUsage.d.ts +30 -0
- package/vendor/shared/dist/aiUsage.d.ts.map +1 -0
- package/vendor/shared/dist/aiUsage.js +14 -0
- package/vendor/shared/dist/artifacts.d.ts +28 -0
- package/vendor/shared/dist/artifacts.d.ts.map +1 -0
- package/vendor/shared/dist/artifacts.js +47 -0
- package/vendor/shared/dist/automationTemplates.d.ts.map +1 -1
- package/vendor/shared/dist/automationTemplates.js +1 -0
- package/vendor/shared/dist/automations.d.ts +61 -14
- package/vendor/shared/dist/automations.d.ts.map +1 -1
- package/vendor/shared/dist/automations.js +10 -3
- package/vendor/shared/dist/cardStudio.d.ts +31 -31
- package/vendor/shared/dist/chatActivity.d.ts +17 -0
- package/vendor/shared/dist/chatActivity.d.ts.map +1 -0
- package/vendor/shared/dist/chatActivity.js +47 -0
- package/vendor/shared/dist/codingActivity.d.ts +60 -0
- package/vendor/shared/dist/codingActivity.d.ts.map +1 -0
- package/vendor/shared/dist/codingActivity.js +33 -0
- package/vendor/shared/dist/commandLocal.d.ts +1 -1
- package/vendor/shared/dist/commandLocal.d.ts.map +1 -1
- package/vendor/shared/dist/commands.d.ts +32 -32
- package/vendor/shared/dist/commands.d.ts.map +1 -1
- package/vendor/shared/dist/commands.js +1 -1
- package/vendor/shared/dist/commentMentions.d.ts +20 -0
- package/vendor/shared/dist/commentMentions.d.ts.map +1 -0
- package/vendor/shared/dist/commentMentions.js +14 -0
- package/vendor/shared/dist/computer.d.ts +48 -8
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +25 -0
- package/vendor/shared/dist/constants.d.ts +1 -1
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +5 -0
- package/vendor/shared/dist/daemonUpdates.d.ts +123 -0
- package/vendor/shared/dist/daemonUpdates.d.ts.map +1 -0
- package/vendor/shared/dist/daemonUpdates.js +106 -0
- package/vendor/shared/dist/deviceInteraction.d.ts +23 -0
- package/vendor/shared/dist/deviceInteraction.d.ts.map +1 -0
- package/vendor/shared/dist/deviceInteraction.js +32 -0
- package/vendor/shared/dist/doctor.d.ts +50 -0
- package/vendor/shared/dist/doctor.d.ts.map +1 -0
- package/vendor/shared/dist/doctor.js +15 -0
- package/vendor/shared/dist/fileUploads.d.ts +39 -0
- package/vendor/shared/dist/fileUploads.d.ts.map +1 -0
- package/vendor/shared/dist/fileUploads.js +24 -0
- package/vendor/shared/dist/files.d.ts +11 -0
- package/vendor/shared/dist/files.d.ts.map +1 -0
- package/vendor/shared/dist/files.js +19 -0
- package/vendor/shared/dist/githubContributions.d.ts +1 -1
- package/vendor/shared/dist/goals.d.ts +7 -7
- package/vendor/shared/dist/index.d.ts +29 -2
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +26 -1
- package/vendor/shared/dist/lucidFollowups.d.ts +95 -0
- package/vendor/shared/dist/lucidFollowups.d.ts.map +1 -0
- package/vendor/shared/dist/lucidFollowups.js +45 -0
- package/vendor/shared/dist/lucidInvocations.d.ts +82 -0
- package/vendor/shared/dist/lucidInvocations.d.ts.map +1 -0
- package/vendor/shared/dist/lucidInvocations.js +47 -0
- package/vendor/shared/dist/memory.d.ts +162 -0
- package/vendor/shared/dist/memory.d.ts.map +1 -0
- package/vendor/shared/dist/memory.js +26 -0
- package/vendor/shared/dist/messagingSafety.d.ts +43 -0
- package/vendor/shared/dist/messagingSafety.d.ts.map +1 -1
- package/vendor/shared/dist/messagingSafety.js +6 -0
- package/vendor/shared/dist/recall.d.ts +803 -0
- package/vendor/shared/dist/recall.d.ts.map +1 -0
- package/vendor/shared/dist/recall.js +56 -0
- package/vendor/shared/dist/releaseCompatibility.d.ts +228 -0
- package/vendor/shared/dist/releaseCompatibility.d.ts.map +1 -0
- package/vendor/shared/dist/releaseCompatibility.js +145 -0
- package/vendor/shared/dist/repositoryRequests.d.ts +173 -0
- package/vendor/shared/dist/repositoryRequests.d.ts.map +1 -0
- package/vendor/shared/dist/repositoryRequests.js +38 -0
- package/vendor/shared/dist/repositoryRouting.d.ts +169 -0
- package/vendor/shared/dist/repositoryRouting.d.ts.map +1 -0
- package/vendor/shared/dist/repositoryRouting.js +102 -0
- package/vendor/shared/dist/roomClient.d.ts +107 -0
- package/vendor/shared/dist/roomClient.d.ts.map +1 -0
- package/vendor/shared/dist/roomClient.js +371 -0
- package/vendor/shared/dist/schemas/comment.d.ts +46 -0
- package/vendor/shared/dist/schemas/comment.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/comment.js +10 -0
- package/vendor/shared/dist/schemas/conversation.d.ts +80 -1
- package/vendor/shared/dist/schemas/conversation.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/conversation.js +12 -1
- package/vendor/shared/dist/schemas/harness.d.ts +1631 -17
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +106 -3
- package/vendor/shared/dist/schemas/notification.d.ts +3 -1
- package/vendor/shared/dist/schemas/notification.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/notification.js +2 -1
- package/vendor/shared/dist/schemas/organization.d.ts +2 -0
- package/vendor/shared/dist/schemas/organization.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/organization.js +2 -0
- package/vendor/shared/dist/schemas/project.d.ts +2 -2
- package/vendor/shared/dist/schemas/request.d.ts +1 -1
- package/vendor/shared/dist/schemas/task.d.ts +1 -1
- package/vendor/shared/dist/smartCapture.js +1 -1
- package/vendor/shared/dist/spokenNames.d.ts +1 -1
- package/vendor/shared/dist/spokenNames.js +1 -1
- package/vendor/shared/dist/taskActivity.d.ts +5 -5
- package/vendor/shared/dist/taskSharing.d.ts +8 -0
- package/vendor/shared/dist/taskSharing.d.ts.map +1 -0
- package/vendor/shared/dist/taskSharing.js +9 -0
- package/vendor/shared/dist/thinking-orb/engine/core.d.ts +31 -0
- package/vendor/shared/dist/thinking-orb/engine/core.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/core.js +62 -0
- package/vendor/shared/dist/thinking-orb/engine/ctx.d.ts +9 -0
- package/vendor/shared/dist/thinking-orb/engine/ctx.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/ctx.js +1 -0
- package/vendor/shared/dist/thinking-orb/engine/lattice.d.ts +5 -0
- package/vendor/shared/dist/thinking-orb/engine/lattice.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/lattice.js +184 -0
- package/vendor/shared/dist/thinking-orb/engine/morph.d.ts +3 -0
- package/vendor/shared/dist/thinking-orb/engine/morph.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/morph.js +117 -0
- package/vendor/shared/dist/thinking-orb/engine/orbits.d.ts +3 -0
- package/vendor/shared/dist/thinking-orb/engine/orbits.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/orbits.js +66 -0
- package/vendor/shared/dist/thinking-orb/engine/profiles.d.ts +8 -0
- package/vendor/shared/dist/thinking-orb/engine/profiles.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/profiles.js +113 -0
- package/vendor/shared/dist/thinking-orb/engine/registry.d.ts +4 -0
- package/vendor/shared/dist/thinking-orb/engine/registry.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/registry.js +14 -0
- package/vendor/shared/dist/thinking-orb/engine/ribbon.d.ts +3 -0
- package/vendor/shared/dist/thinking-orb/engine/ribbon.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/ribbon.js +64 -0
- package/vendor/shared/dist/thinking-orb/engine/types.d.ts +6 -0
- package/vendor/shared/dist/thinking-orb/engine/types.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/engine/types.js +2 -0
- package/vendor/shared/dist/thinking-orb/index.d.ts +7 -0
- package/vendor/shared/dist/thinking-orb/index.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/index.js +2 -0
- package/vendor/shared/dist/thinking-orb/presets.d.ts +12 -0
- package/vendor/shared/dist/thinking-orb/presets.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/presets.js +67 -0
- package/vendor/shared/dist/thinking-orb/types.d.ts +24 -0
- package/vendor/shared/dist/thinking-orb/types.d.ts.map +1 -0
- package/vendor/shared/dist/thinking-orb/types.js +1 -0
- package/vendor/shared/dist/turnTiming.d.ts +13 -0
- package/vendor/shared/dist/turnTiming.d.ts.map +1 -0
- package/vendor/shared/dist/turnTiming.js +18 -0
- package/vendor/shared/dist/types.d.ts +3 -1
- package/vendor/shared/dist/types.d.ts.map +1 -1
- package/vendor/shared/dist/updateControl.d.ts +168 -0
- package/vendor/shared/dist/updateControl.d.ts.map +1 -0
- package/vendor/shared/dist/updateControl.js +43 -0
- package/vendor/shared/dist/videos.d.ts +31 -0
- package/vendor/shared/dist/videos.d.ts.map +1 -0
- package/vendor/shared/dist/videos.js +34 -0
- package/vendor/shared/dist/workspaceIO.d.ts +188 -0
- package/vendor/shared/dist/workspaceIO.d.ts.map +1 -0
- package/vendor/shared/dist/workspaceIO.js +50 -0
- package/vendor/shared/dist/workspaces.d.ts +740 -2
- package/vendor/shared/dist/workspaces.d.ts.map +1 -1
- package/vendor/shared/dist/workspaces.js +108 -2
- package/vendor/shared/package.json +12 -0
- package/vendor/shared/src/accountDevices.ts +28 -0
- package/vendor/shared/src/activityRecovery.ts +42 -0
- package/vendor/shared/src/agentMessages.ts +82 -0
- package/vendor/shared/src/aiUsage.ts +18 -0
- package/vendor/shared/src/artifacts.ts +48 -0
- package/vendor/shared/src/automationTemplates.ts +1 -0
- package/vendor/shared/src/automations.ts +10 -3
- package/vendor/shared/src/chatActivity.ts +56 -0
- package/vendor/shared/src/codingActivity.ts +40 -0
- package/vendor/shared/src/commandLocal.ts +1 -1
- package/vendor/shared/src/commands.ts +1 -1
- package/vendor/shared/src/commentMentions.ts +20 -0
- package/vendor/shared/src/computer.ts +40 -0
- package/vendor/shared/src/constants.ts +5 -0
- package/vendor/shared/src/daemonUpdates.ts +127 -0
- package/vendor/shared/src/deviceInteraction.ts +35 -0
- package/vendor/shared/src/doctor.ts +19 -0
- package/vendor/shared/src/fileUploads.ts +28 -0
- package/vendor/shared/src/files.ts +21 -0
- package/vendor/shared/src/index.ts +35 -1
- package/vendor/shared/src/lucidFollowups.ts +49 -0
- package/vendor/shared/src/lucidInvocations.ts +62 -0
- package/vendor/shared/src/memory.ts +30 -0
- package/vendor/shared/src/messagingSafety.ts +10 -0
- package/vendor/shared/src/recall.ts +69 -0
- package/vendor/shared/src/releaseCompatibility.ts +162 -0
- package/vendor/shared/src/repositoryRequests.ts +44 -0
- package/vendor/shared/src/repositoryRouting.ts +117 -0
- package/vendor/shared/src/roomClient.ts +351 -0
- package/vendor/shared/src/schemas/comment.ts +10 -0
- package/vendor/shared/src/schemas/conversation.ts +12 -1
- package/vendor/shared/src/schemas/harness.ts +120 -3
- package/vendor/shared/src/schemas/notification.ts +2 -1
- package/vendor/shared/src/schemas/organization.ts +2 -0
- package/vendor/shared/src/smartCapture.ts +1 -1
- package/vendor/shared/src/spokenNames.ts +1 -1
- package/vendor/shared/src/taskSharing.ts +13 -0
- package/vendor/shared/src/thinking-orb/ATTRIBUTION.md +36 -0
- package/vendor/shared/src/thinking-orb/engine/core.ts +81 -0
- package/vendor/shared/src/thinking-orb/engine/ctx.ts +15 -0
- package/vendor/shared/src/thinking-orb/engine/lattice.ts +205 -0
- package/vendor/shared/src/thinking-orb/engine/morph.ts +130 -0
- package/vendor/shared/src/thinking-orb/engine/orbits.ts +80 -0
- package/vendor/shared/src/thinking-orb/engine/profiles.ts +119 -0
- package/vendor/shared/src/thinking-orb/engine/registry.ts +18 -0
- package/vendor/shared/src/thinking-orb/engine/ribbon.ts +71 -0
- package/vendor/shared/src/thinking-orb/engine/types.ts +15 -0
- package/vendor/shared/src/thinking-orb/index.ts +6 -0
- package/vendor/shared/src/thinking-orb/presets.ts +88 -0
- package/vendor/shared/src/thinking-orb/types.ts +25 -0
- package/vendor/shared/src/turnTiming.ts +20 -0
- package/vendor/shared/src/types.ts +1 -1
- package/vendor/shared/src/updateControl.ts +45 -0
- package/vendor/shared/src/videos.ts +37 -0
- package/vendor/shared/src/workspaceIO.ts +61 -0
- package/vendor/shared/src/workspaces.ts +119 -2
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { ComputerPresenceSchema, ControlDeviceProfileSchema } from './computer.js';
|
|
2
|
+
import { HarnessRequestSchema, HarnessResponseSchema } from './schemas/harness.js';
|
|
3
|
+
import { WORKSPACE_IO_READ_ACTIONS } from './workspaceIO.js';
|
|
4
|
+
import { interactiveRoomRequest } from './deviceInteraction.js';
|
|
5
|
+
function requestContext(input) {
|
|
6
|
+
if (input.kind === 'repos')
|
|
7
|
+
return { operation: 'repository list', readOnly: true };
|
|
8
|
+
if (input.kind === 'getConfig')
|
|
9
|
+
return { operation: 'computer settings', readOnly: true };
|
|
10
|
+
if (input.kind === 'models')
|
|
11
|
+
return { operation: 'provider model list', readOnly: true };
|
|
12
|
+
if (input.kind === 'mcp-status')
|
|
13
|
+
return { operation: 'MCP status', readOnly: true };
|
|
14
|
+
if (input.kind === 'workspace-io') {
|
|
15
|
+
const action = input.command.operation.action;
|
|
16
|
+
const labels = { info: 'workspace details', files: 'file list', read: 'file preview', search: 'file search',
|
|
17
|
+
changes: 'Git changes', diff: 'file diff', terminalRead: 'terminal output', write: 'file save', commit: 'Git commit', push: 'Git push' };
|
|
18
|
+
return { operation: labels[action] ?? action, readOnly: WORKSPACE_IO_READ_ACTIONS.has(action) };
|
|
19
|
+
}
|
|
20
|
+
if (input.kind === 'workspaces') {
|
|
21
|
+
const action = input.command.action;
|
|
22
|
+
const labels = { list: 'workspace list', history: 'conversation history', settings: 'workspace settings',
|
|
23
|
+
'model-settings': 'model settings', 'message-source': 'original message', 'message-image': 'image preview', 'pasted-text': 'pasted text', 'save-model-settings': 'model settings change',
|
|
24
|
+
create: 'worktree creation', archive: 'worktree archive', delete: 'worktree deletion', 'clear-history': 'history deletion' };
|
|
25
|
+
return { operation: labels[action] ?? action.replaceAll('-', ' '),
|
|
26
|
+
readOnly: ['list', 'settings', 'model-settings', 'message-source', 'message-image', 'pasted-text', 'delivery-status'].includes(action) || (action === 'history' && !input.command.open) };
|
|
27
|
+
}
|
|
28
|
+
return { operation: input.kind.replaceAll('-', ' '), readOnly: false };
|
|
29
|
+
}
|
|
30
|
+
/** Preserve the daemon's stable failure identity alongside its human message. */
|
|
31
|
+
export class RoomRequestError extends Error {
|
|
32
|
+
code;
|
|
33
|
+
constructor(message, code) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.code = code;
|
|
36
|
+
this.name = 'RoomRequestError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** A missing response is not proof that a mutation failed. Keep its identity for diagnostics. */
|
|
40
|
+
export class RoomRequestTimeoutError extends Error {
|
|
41
|
+
requestId;
|
|
42
|
+
operation;
|
|
43
|
+
readOnly;
|
|
44
|
+
constructor(input) {
|
|
45
|
+
const { operation, readOnly } = requestContext(input);
|
|
46
|
+
super(readOnly ? `Could not load ${operation} from your computer. Try again.`
|
|
47
|
+
: `Your computer has not confirmed ${operation}. It may still finish; check the result before trying again.`);
|
|
48
|
+
this.name = 'RoomRequestTimeoutError';
|
|
49
|
+
this.requestId = input.id;
|
|
50
|
+
this.operation = operation;
|
|
51
|
+
this.readOnly = readOnly;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** A view onto the paired computer. Disconnects reject outstanding operations;
|
|
55
|
+
* reconnection replays output only. The caller reloads workspace history on a
|
|
56
|
+
* presence event, including after a computer identity change. */
|
|
57
|
+
export class RoomClient {
|
|
58
|
+
options;
|
|
59
|
+
foreground = true;
|
|
60
|
+
lastInputAt = -Infinity;
|
|
61
|
+
activityAnnounced = false;
|
|
62
|
+
activity(state) {
|
|
63
|
+
if (state !== 'input')
|
|
64
|
+
this.foreground = state === 'foreground';
|
|
65
|
+
if (!this.connected || !this.presence?.automaticControl)
|
|
66
|
+
return;
|
|
67
|
+
if (state === 'input') {
|
|
68
|
+
if (Date.now() - this.lastInputAt < 1000)
|
|
69
|
+
return;
|
|
70
|
+
this.lastInputAt = Date.now();
|
|
71
|
+
}
|
|
72
|
+
this.socket.send(JSON.stringify({ type: 'client_activity', state }));
|
|
73
|
+
}
|
|
74
|
+
presence = null;
|
|
75
|
+
socket;
|
|
76
|
+
stopped = true;
|
|
77
|
+
retry;
|
|
78
|
+
heartbeat;
|
|
79
|
+
opening;
|
|
80
|
+
retries = 0;
|
|
81
|
+
receivedAt = 0;
|
|
82
|
+
computerId;
|
|
83
|
+
listeners = new Set();
|
|
84
|
+
pending = new Map();
|
|
85
|
+
turns = new Map();
|
|
86
|
+
constructor(options) {
|
|
87
|
+
this.options = options;
|
|
88
|
+
}
|
|
89
|
+
get connected() { return this.socket?.readyState === 1; }
|
|
90
|
+
subscribe(listener) {
|
|
91
|
+
this.listeners.add(listener);
|
|
92
|
+
return () => this.listeners.delete(listener);
|
|
93
|
+
}
|
|
94
|
+
start() {
|
|
95
|
+
if (!this.stopped)
|
|
96
|
+
return;
|
|
97
|
+
this.stopped = false;
|
|
98
|
+
this.connect(false);
|
|
99
|
+
}
|
|
100
|
+
takeControl() {
|
|
101
|
+
if (this.connected && this.presence?.automaticControl) {
|
|
102
|
+
this.activity('input');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.disconnect('Switching control. Check saved history before retrying an operation.');
|
|
106
|
+
this.stopped = false;
|
|
107
|
+
this.connect(true);
|
|
108
|
+
}
|
|
109
|
+
renameDevice(name) {
|
|
110
|
+
const profile = ControlDeviceProfileSchema.parse({ ...this.options.deviceProfile, name });
|
|
111
|
+
this.options.deviceProfile = profile;
|
|
112
|
+
try {
|
|
113
|
+
if (this.connected && this.presence?.devices)
|
|
114
|
+
this.socket.send(JSON.stringify({ type: 'client_hello', ...profile }));
|
|
115
|
+
}
|
|
116
|
+
catch { /* The next handshake carries the saved name after a socket closes. */ }
|
|
117
|
+
}
|
|
118
|
+
close() {
|
|
119
|
+
this.stopped = true;
|
|
120
|
+
this.disconnect('Disconnected. An operation already sent may still finish on your computer.');
|
|
121
|
+
this.turns.clear();
|
|
122
|
+
this.computerId = undefined;
|
|
123
|
+
}
|
|
124
|
+
/** Use for streaming turns, pull, and cancel. A successful send is not a
|
|
125
|
+
* durable receipt. Only the computer's accepted event confirms acceptance. */
|
|
126
|
+
send(input) {
|
|
127
|
+
const request = HarnessRequestSchema.parse(input);
|
|
128
|
+
if (!this.connected || !this.presence?.daemonConnected)
|
|
129
|
+
throw new Error('Your computer is unavailable. Your request has not been sent.');
|
|
130
|
+
this.socket.send(JSON.stringify(interactiveRoomRequest(request, this.presence)));
|
|
131
|
+
}
|
|
132
|
+
/** Buffered queries and controls return the correlated response. Nothing is
|
|
133
|
+
* automatically retried, including requests whose response was lost. */
|
|
134
|
+
request(input) {
|
|
135
|
+
if (this.pending.has(input.id))
|
|
136
|
+
return Promise.reject(new Error('Request is already pending.'));
|
|
137
|
+
return new Promise((resolve, reject) => {
|
|
138
|
+
const timer = setTimeout(() => {
|
|
139
|
+
this.pending.delete(input.id);
|
|
140
|
+
reject(new RoomRequestTimeoutError(input));
|
|
141
|
+
}, this.options.requestTimeoutMs ?? (input.kind === 'workspaces' && input.command.action === 'refresh-title' ? 90_000 : 30_000));
|
|
142
|
+
this.pending.set(input.id, { resolve, reject, timer });
|
|
143
|
+
try {
|
|
144
|
+
this.send(input);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
this.finish(input.id, error instanceof Error ? error : new Error(String(error)));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/** Install the cursor from durable history before following live output.
|
|
152
|
+
* Repeated calls may advance it but cannot erase already received frames. */
|
|
153
|
+
watchTurn(requestId, sinceSeq = 0, recover = true) {
|
|
154
|
+
if (!Number.isSafeInteger(sinceSeq) || sinceSeq < 0)
|
|
155
|
+
throw new Error('Invalid output cursor.');
|
|
156
|
+
let turn = this.turns.get(requestId);
|
|
157
|
+
if (!turn) {
|
|
158
|
+
if (this.turns.size >= 64)
|
|
159
|
+
throw new Error('Too many watched turns.');
|
|
160
|
+
turn = { seq: sinceSeq, buffered: new Map(), pulling: false };
|
|
161
|
+
this.turns.set(requestId, turn);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
turn.seq = Math.max(turn.seq, sinceSeq);
|
|
165
|
+
for (const seq of turn.buffered.keys())
|
|
166
|
+
if (seq <= turn.seq)
|
|
167
|
+
turn.buffered.delete(seq);
|
|
168
|
+
this.drain(turn);
|
|
169
|
+
}
|
|
170
|
+
// A caller can install a new turn before sending it. Pulling at that point
|
|
171
|
+
// would ask the daemon for a request that it has not accepted yet.
|
|
172
|
+
if (recover)
|
|
173
|
+
this.pull(requestId, turn);
|
|
174
|
+
}
|
|
175
|
+
unwatchTurn(requestId) { this.turns.delete(requestId); }
|
|
176
|
+
emit(event) {
|
|
177
|
+
for (const listener of this.listeners)
|
|
178
|
+
listener(event);
|
|
179
|
+
}
|
|
180
|
+
finish(id, result) {
|
|
181
|
+
const pending = this.pending.get(id);
|
|
182
|
+
if (!pending)
|
|
183
|
+
return;
|
|
184
|
+
clearTimeout(pending.timer);
|
|
185
|
+
this.pending.delete(id);
|
|
186
|
+
if (result instanceof Error)
|
|
187
|
+
pending.reject(result);
|
|
188
|
+
else
|
|
189
|
+
pending.resolve(result);
|
|
190
|
+
}
|
|
191
|
+
disconnect(reason) {
|
|
192
|
+
clearTimeout(this.retry);
|
|
193
|
+
clearTimeout(this.opening);
|
|
194
|
+
clearInterval(this.heartbeat);
|
|
195
|
+
const socket = this.socket;
|
|
196
|
+
this.socket = undefined;
|
|
197
|
+
// A close from an older connection must not clear a newer connection.
|
|
198
|
+
if (socket) {
|
|
199
|
+
socket.onopen = socket.onmessage = socket.onclose = null;
|
|
200
|
+
socket.onerror = () => { };
|
|
201
|
+
socket.close();
|
|
202
|
+
}
|
|
203
|
+
for (const id of this.pending.keys())
|
|
204
|
+
this.finish(id, new Error(reason));
|
|
205
|
+
for (const turn of this.turns.values())
|
|
206
|
+
turn.pulling = false;
|
|
207
|
+
this.presence = null;
|
|
208
|
+
this.emit({ type: 'connection', connected: false, presence: null, reason });
|
|
209
|
+
}
|
|
210
|
+
connect(takeover) {
|
|
211
|
+
if (this.stopped)
|
|
212
|
+
return;
|
|
213
|
+
const url = new URL(this.options.url);
|
|
214
|
+
if (!['http:', 'https:', 'ws:', 'wss:'].includes(url.protocol))
|
|
215
|
+
throw new Error('Invalid relay URL.');
|
|
216
|
+
url.protocol = url.protocol === 'http:' || url.protocol === 'ws:' ? 'ws:' : 'wss:';
|
|
217
|
+
url.searchParams.set('role', 'phone'); // Existing relay name for any UI client.
|
|
218
|
+
url.searchParams.set('device', this.options.deviceId);
|
|
219
|
+
if (this.options.deviceProfile) {
|
|
220
|
+
url.searchParams.set('deviceName', this.options.deviceProfile.name);
|
|
221
|
+
url.searchParams.set('deviceKind', this.options.deviceProfile.kind);
|
|
222
|
+
}
|
|
223
|
+
url.searchParams.set('observe', '1');
|
|
224
|
+
if (this.options.explicitControl)
|
|
225
|
+
url.searchParams.set('control', 'explicit');
|
|
226
|
+
if (this.options.automaticControl)
|
|
227
|
+
url.searchParams.set('control', 'automatic');
|
|
228
|
+
url.searchParams.delete('takeover');
|
|
229
|
+
if (takeover)
|
|
230
|
+
url.searchParams.set('takeover', '1');
|
|
231
|
+
if (this.options.release)
|
|
232
|
+
url.searchParams.set('release', this.options.release);
|
|
233
|
+
let socket;
|
|
234
|
+
try {
|
|
235
|
+
socket = this.options.socket(url.toString());
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
this.reconnect('Could not connect to Lucidity.');
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
this.socket = socket;
|
|
242
|
+
this.activityAnnounced = false;
|
|
243
|
+
this.lastInputAt = -Infinity;
|
|
244
|
+
this.opening = setTimeout(() => this.reconnect('Connection timed out.'), 15_000);
|
|
245
|
+
socket.onopen = () => {
|
|
246
|
+
if (this.socket !== socket)
|
|
247
|
+
return;
|
|
248
|
+
clearTimeout(this.opening);
|
|
249
|
+
this.receivedAt = Date.now();
|
|
250
|
+
this.heartbeat = setInterval(() => {
|
|
251
|
+
if (Date.now() - this.receivedAt > 30_000)
|
|
252
|
+
this.reconnect('Connection interrupted.');
|
|
253
|
+
else
|
|
254
|
+
try {
|
|
255
|
+
socket.send('{"t":"ka"}');
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
this.reconnect('Connection interrupted.');
|
|
259
|
+
}
|
|
260
|
+
}, 10_000);
|
|
261
|
+
this.emit({ type: 'connection', connected: true, presence: null });
|
|
262
|
+
};
|
|
263
|
+
socket.onmessage = ({ data }) => {
|
|
264
|
+
if (this.socket !== socket)
|
|
265
|
+
return;
|
|
266
|
+
this.receivedAt = Date.now();
|
|
267
|
+
let frame;
|
|
268
|
+
try {
|
|
269
|
+
frame = JSON.parse(String(data));
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (!frame || typeof frame !== 'object' || Array.isArray(frame))
|
|
275
|
+
return;
|
|
276
|
+
this.receive(frame);
|
|
277
|
+
};
|
|
278
|
+
socket.onerror = () => { }; // close or the opening/heartbeat timeout handles recovery.
|
|
279
|
+
socket.onclose = ({ code }) => {
|
|
280
|
+
if (this.socket !== socket)
|
|
281
|
+
return;
|
|
282
|
+
if ([4401, 4403, 4410].includes(code)) {
|
|
283
|
+
this.stopped = true;
|
|
284
|
+
this.disconnect(code === 4401 ? 'Sign in to reconnect.' : 'Connection refused. Reconnect to try again.');
|
|
285
|
+
}
|
|
286
|
+
else
|
|
287
|
+
this.reconnect(code === 4409 ? 'Another device took control.' : 'Connection interrupted.');
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
reconnect(reason) {
|
|
291
|
+
this.disconnect(reason);
|
|
292
|
+
if (this.stopped)
|
|
293
|
+
return;
|
|
294
|
+
const delay = Math.min(15_000, (this.options.retryMs ?? 500) * 2 ** Math.min(this.retries++, 5));
|
|
295
|
+
// Reconnect as an observer even after takeover. Never steal control on retry.
|
|
296
|
+
this.retry = setTimeout(() => this.connect(false), delay);
|
|
297
|
+
}
|
|
298
|
+
receive(frame) {
|
|
299
|
+
if (frame.type === 'presence') {
|
|
300
|
+
const parsed = ComputerPresenceSchema.safeParse(frame);
|
|
301
|
+
if (!parsed.success)
|
|
302
|
+
return;
|
|
303
|
+
const id = parsed.data.computer?.id;
|
|
304
|
+
if (id && this.computerId && id !== this.computerId) {
|
|
305
|
+
this.turns.clear();
|
|
306
|
+
for (const pending of this.pending.keys())
|
|
307
|
+
this.finish(pending, new Error('The paired computer changed. Reload your workspace.'));
|
|
308
|
+
}
|
|
309
|
+
if (id)
|
|
310
|
+
this.computerId = id;
|
|
311
|
+
const wasOnline = this.presence?.daemonConnected;
|
|
312
|
+
this.presence = parsed.data;
|
|
313
|
+
if (!this.activityAnnounced && this.presence.automaticControl) {
|
|
314
|
+
this.activityAnnounced = true;
|
|
315
|
+
this.activity(this.foreground ? 'foreground' : 'background');
|
|
316
|
+
}
|
|
317
|
+
this.retries = 0;
|
|
318
|
+
this.emit({ type: 'connection', connected: true, presence: this.presence });
|
|
319
|
+
if (this.presence.daemonConnected && !wasOnline)
|
|
320
|
+
for (const [requestId, turn] of this.turns) {
|
|
321
|
+
turn.pulling = false;
|
|
322
|
+
this.pull(requestId, turn);
|
|
323
|
+
}
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
if (frame.t === 'kb')
|
|
327
|
+
return;
|
|
328
|
+
const id = typeof frame.requestId === 'string' ? frame.requestId : undefined;
|
|
329
|
+
if (id && frame.type === 'error' && typeof frame.message === 'string')
|
|
330
|
+
this.finish(id, new RoomRequestError(frame.message, typeof frame.code === 'string' ? frame.code : undefined));
|
|
331
|
+
else if (id && this.pending.has(id)) {
|
|
332
|
+
const parsed = HarnessResponseSchema.safeParse(frame);
|
|
333
|
+
if (parsed.success)
|
|
334
|
+
this.finish(id, parsed.data);
|
|
335
|
+
}
|
|
336
|
+
const turn = id ? this.turns.get(id) : undefined;
|
|
337
|
+
const seq = frame.seq;
|
|
338
|
+
if (turn && typeof seq === 'number' && Number.isSafeInteger(seq) && seq > 0) {
|
|
339
|
+
if (seq <= turn.seq)
|
|
340
|
+
return;
|
|
341
|
+
turn.buffered.set(seq, frame);
|
|
342
|
+
this.drain(turn);
|
|
343
|
+
if (turn.buffered.size > 256) {
|
|
344
|
+
this.turns.delete(id);
|
|
345
|
+
this.emit({ type: 'history-required', requestId: id });
|
|
346
|
+
}
|
|
347
|
+
else if (turn.buffered.size)
|
|
348
|
+
this.pull(id, turn);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
this.emit({ type: 'frame', frame });
|
|
352
|
+
}
|
|
353
|
+
drain(turn) {
|
|
354
|
+
while (turn.buffered.has(turn.seq + 1)) {
|
|
355
|
+
const frame = turn.buffered.get(++turn.seq);
|
|
356
|
+
turn.buffered.delete(turn.seq);
|
|
357
|
+
this.emit({ type: 'frame', frame });
|
|
358
|
+
}
|
|
359
|
+
if (!turn.buffered.size)
|
|
360
|
+
turn.pulling = false;
|
|
361
|
+
}
|
|
362
|
+
pull(requestId, turn) {
|
|
363
|
+
if (turn.pulling || !this.connected || !this.presence?.daemonConnected)
|
|
364
|
+
return;
|
|
365
|
+
try {
|
|
366
|
+
this.send({ id: this.options.requestId(), kind: 'pull', targetId: requestId, sinceSeq: turn.seq });
|
|
367
|
+
turn.pulling = true;
|
|
368
|
+
}
|
|
369
|
+
catch { /* Presence/reconnect triggers output recovery again. */ }
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const CreateCommentSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
3
4
|
content: z.ZodString;
|
|
5
|
+
invokeLucid: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
invocationTimeZone: z.ZodOptional<z.ZodString>;
|
|
7
|
+
replyToId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
4
8
|
source: z.ZodDefault<z.ZodEnum<{
|
|
5
9
|
claude: "claude";
|
|
6
10
|
user: "user";
|
|
@@ -14,6 +18,9 @@ export declare const CreateCommentSchema: z.ZodObject<{
|
|
|
14
18
|
}, z.core.$strip>;
|
|
15
19
|
export declare const CommentSchema: z.ZodObject<{
|
|
16
20
|
content: z.ZodString;
|
|
21
|
+
invokeLucid: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
invocationTimeZone: z.ZodOptional<z.ZodString>;
|
|
23
|
+
replyToId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
17
24
|
agentProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
18
25
|
claude: "claude";
|
|
19
26
|
codex: "codex";
|
|
@@ -36,6 +43,45 @@ export declare const CommentSchema: z.ZodObject<{
|
|
|
36
43
|
authorName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
44
|
authorAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
45
|
authorHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
userId: z.ZodUUID;
|
|
48
|
+
handle: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
lucidInvocation: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
id: z.ZodUUID;
|
|
52
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"comment">;
|
|
54
|
+
taskId: z.ZodUUID;
|
|
55
|
+
commentId: z.ZodUUID;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"message">;
|
|
58
|
+
conversationId: z.ZodUUID;
|
|
59
|
+
messageId: z.ZodUUID;
|
|
60
|
+
}, z.core.$strip>], "kind">;
|
|
61
|
+
invokerId: z.ZodUUID;
|
|
62
|
+
status: z.ZodEnum<{
|
|
63
|
+
running: "running";
|
|
64
|
+
completed: "completed";
|
|
65
|
+
failed: "failed";
|
|
66
|
+
stopped: "stopped";
|
|
67
|
+
queued: "queued";
|
|
68
|
+
invalidated: "invalidated";
|
|
69
|
+
}>;
|
|
70
|
+
replyId: z.ZodUUID;
|
|
71
|
+
hasPrivateReply: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
sharedReplyId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
73
|
+
createdAt: z.ZodString;
|
|
74
|
+
updatedAt: z.ZodString;
|
|
75
|
+
detail: z.ZodString;
|
|
76
|
+
routingState: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
code: "code";
|
|
78
|
+
general: "general";
|
|
79
|
+
needs_consent: "needs_consent";
|
|
80
|
+
choosing: "choosing";
|
|
81
|
+
needs_repository: "needs_repository";
|
|
82
|
+
}>>;
|
|
83
|
+
hasFollowup: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
39
85
|
}, z.core.$strip>;
|
|
40
86
|
export declare const UpdateCommentSchema: z.ZodObject<{
|
|
41
87
|
content: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/schemas/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/schemas/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAoB9B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBxB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { RecurrenceTimeZoneSchema } from '../recurrence.js';
|
|
2
3
|
import { COMMENT_SOURCE_VALUES, SENDER_KINDS } from '../constants.js';
|
|
4
|
+
import { LucidInvocationSchema } from '../lucidInvocations.js';
|
|
3
5
|
export const CreateCommentSchema = z.object({
|
|
6
|
+
/** Stable draft id makes retrying a lost response safe. */
|
|
7
|
+
id: z.uuidv7().optional(),
|
|
4
8
|
content: z.string().min(1),
|
|
9
|
+
/** New composer submissions opt in; imports and historical retries never launch work. */
|
|
10
|
+
invokeLucid: z.boolean().optional(),
|
|
11
|
+
invocationTimeZone: RecurrenceTimeZoneSchema.optional(),
|
|
12
|
+
replyToId: z.uuid().nullish(),
|
|
5
13
|
/**
|
|
6
14
|
* A REQUEST, not a fact. The server decides the stored value and only honours a
|
|
7
15
|
* 'claude' claim from an API-key caller — a Clerk-authenticated app session is a person
|
|
@@ -34,6 +42,8 @@ export const CommentSchema = CreateCommentSchema.extend({
|
|
|
34
42
|
/** The author's @handle, joined. Null for a user who hasn't claimed one yet, so the
|
|
35
43
|
* display has to fall back to their name rather than rendering a bare '@'. */
|
|
36
44
|
authorHandle: z.string().nullable().optional(),
|
|
45
|
+
mentions: z.array(z.object({ userId: z.uuidv7(), handle: z.string() })).optional(),
|
|
46
|
+
lucidInvocation: LucidInvocationSchema.optional(),
|
|
37
47
|
});
|
|
38
48
|
export const UpdateCommentSchema = z.object({
|
|
39
49
|
content: z.string().min(1),
|
|
@@ -15,9 +15,50 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
15
15
|
human: "human";
|
|
16
16
|
}>;
|
|
17
17
|
content: z.ZodString;
|
|
18
|
+
replyToId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
19
|
+
taskId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
20
|
+
commentId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
21
|
+
lucidInvocation: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
id: z.ZodUUID;
|
|
23
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"comment">;
|
|
25
|
+
taskId: z.ZodUUID;
|
|
26
|
+
commentId: z.ZodUUID;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"message">;
|
|
29
|
+
conversationId: z.ZodUUID;
|
|
30
|
+
messageId: z.ZodUUID;
|
|
31
|
+
}, z.core.$strip>], "kind">;
|
|
32
|
+
invokerId: z.ZodUUID;
|
|
33
|
+
status: z.ZodEnum<{
|
|
34
|
+
running: "running";
|
|
35
|
+
completed: "completed";
|
|
36
|
+
failed: "failed";
|
|
37
|
+
stopped: "stopped";
|
|
38
|
+
queued: "queued";
|
|
39
|
+
invalidated: "invalidated";
|
|
40
|
+
}>;
|
|
41
|
+
replyId: z.ZodUUID;
|
|
42
|
+
hasPrivateReply: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
sharedReplyId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
44
|
+
createdAt: z.ZodString;
|
|
45
|
+
updatedAt: z.ZodString;
|
|
46
|
+
detail: z.ZodString;
|
|
47
|
+
routingState: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
code: "code";
|
|
49
|
+
general: "general";
|
|
50
|
+
needs_consent: "needs_consent";
|
|
51
|
+
choosing: "choosing";
|
|
52
|
+
needs_repository: "needs_repository";
|
|
53
|
+
}>>;
|
|
54
|
+
hasFollowup: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
18
56
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
19
57
|
}, z.core.$strip>;
|
|
20
58
|
export declare const CreateMessageSchema: z.ZodObject<{
|
|
59
|
+
invokeLucid: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
invocationTimeZone: z.ZodOptional<z.ZodString>;
|
|
61
|
+
replyToId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
21
62
|
content: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
22
63
|
}, z.core.$strip>;
|
|
23
64
|
export declare const MessageWithAuthorSchema: z.ZodObject<{
|
|
@@ -29,6 +70,44 @@ export declare const MessageWithAuthorSchema: z.ZodObject<{
|
|
|
29
70
|
human: "human";
|
|
30
71
|
}>;
|
|
31
72
|
content: z.ZodString;
|
|
73
|
+
replyToId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
74
|
+
taskId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
75
|
+
commentId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
76
|
+
lucidInvocation: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
id: z.ZodUUID;
|
|
78
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"comment">;
|
|
80
|
+
taskId: z.ZodUUID;
|
|
81
|
+
commentId: z.ZodUUID;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
kind: z.ZodLiteral<"message">;
|
|
84
|
+
conversationId: z.ZodUUID;
|
|
85
|
+
messageId: z.ZodUUID;
|
|
86
|
+
}, z.core.$strip>], "kind">;
|
|
87
|
+
invokerId: z.ZodUUID;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
running: "running";
|
|
90
|
+
completed: "completed";
|
|
91
|
+
failed: "failed";
|
|
92
|
+
stopped: "stopped";
|
|
93
|
+
queued: "queued";
|
|
94
|
+
invalidated: "invalidated";
|
|
95
|
+
}>;
|
|
96
|
+
replyId: z.ZodUUID;
|
|
97
|
+
hasPrivateReply: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
sharedReplyId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
99
|
+
createdAt: z.ZodString;
|
|
100
|
+
updatedAt: z.ZodString;
|
|
101
|
+
detail: z.ZodString;
|
|
102
|
+
routingState: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
code: "code";
|
|
104
|
+
general: "general";
|
|
105
|
+
needs_consent: "needs_consent";
|
|
106
|
+
choosing: "choosing";
|
|
107
|
+
needs_repository: "needs_repository";
|
|
108
|
+
}>>;
|
|
109
|
+
hasFollowup: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
32
111
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
33
112
|
authorHandle: z.ZodNullable<z.ZodString>;
|
|
34
113
|
authorName: z.ZodString;
|
|
@@ -36,7 +115,7 @@ export declare const MessageWithAuthorSchema: z.ZodObject<{
|
|
|
36
115
|
}, z.core.$strip>;
|
|
37
116
|
export declare const ConversationSummarySchema: z.ZodObject<{
|
|
38
117
|
id: z.ZodUUID;
|
|
39
|
-
createdAt: z.ZodCoercedDate<unknown
|
|
118
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
119
|
otherUser: z.ZodObject<{
|
|
41
120
|
id: z.ZodUUID;
|
|
42
121
|
handle: z.ZodNullable<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/schemas/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/schemas/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAKH,eAAO,MAAM,wBAAwB;;iBAAqC,CAAC;AAE3E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAexB,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;;;iBAW9B,CAAC;AAIH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAKH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { RecurrenceTimeZoneSchema } from '../recurrence.js';
|
|
2
3
|
import { SENDER_KINDS, MESSAGE_MAX_LENGTH } from '../constants.js';
|
|
3
4
|
import { HandleSchema } from './user.js';
|
|
5
|
+
import { LucidInvocationSchema } from '../lucidInvocations.js';
|
|
4
6
|
// A conversation is just an id plus its participants — no title, no type, no owner.
|
|
5
7
|
// v1 only ever creates 2-participant DMs, but the table is not shaped as "userA/userB"
|
|
6
8
|
// so that group threads don't need a migration, only new rows.
|
|
@@ -24,11 +26,19 @@ export const MessageSchema = z.object({
|
|
|
24
26
|
// migration when it arrives.
|
|
25
27
|
senderKind: z.enum(SENDER_KINDS),
|
|
26
28
|
content: z.string(),
|
|
29
|
+
replyToId: z.uuid().nullish(),
|
|
30
|
+
// Present on assignment notices. Older APIs and ordinary messages may omit it.
|
|
31
|
+
taskId: z.uuidv7().nullish(),
|
|
32
|
+
commentId: z.uuidv7().nullish(),
|
|
33
|
+
lucidInvocation: LucidInvocationSchema.optional(),
|
|
27
34
|
createdAt: z.coerce.date(),
|
|
28
35
|
});
|
|
29
36
|
// Sending a message. Trimmed before the length check so whitespace can't be used to
|
|
30
37
|
// clear the min, and rejected if empty — an empty bubble is never intentional.
|
|
31
38
|
export const CreateMessageSchema = z.object({
|
|
39
|
+
invokeLucid: z.boolean().optional(),
|
|
40
|
+
invocationTimeZone: RecurrenceTimeZoneSchema.optional(),
|
|
41
|
+
replyToId: z.uuid().nullish(),
|
|
32
42
|
content: z
|
|
33
43
|
.string()
|
|
34
44
|
.transform((s) => s.trim())
|
|
@@ -49,7 +59,8 @@ export const MessageWithAuthorSchema = MessageSchema.extend({
|
|
|
49
59
|
// you opened a DM and haven't said anything yet.
|
|
50
60
|
export const ConversationSummarySchema = z.object({
|
|
51
61
|
id: z.uuidv7(),
|
|
52
|
-
|
|
62
|
+
// The list endpoint omits the conversation date; message dates remain required.
|
|
63
|
+
createdAt: z.coerce.date().optional(),
|
|
53
64
|
otherUser: z.object({
|
|
54
65
|
id: z.uuidv7(),
|
|
55
66
|
handle: z.string().nullable(),
|