@opencorelabs/lucidity 0.8.0 → 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 +8 -0
- package/dist/automations/service.d.ts.map +1 -1
- package/dist/automations/service.js +84 -25
- 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/store.d.ts +9 -3
- package/dist/automations/store.d.ts.map +1 -1
- package/dist/automations/store.js +45 -32
- package/dist/automations/workflow.d.ts +14 -0
- package/dist/automations/workflow.d.ts.map +1 -0
- package/dist/automations/workflow.js +57 -0
- package/dist/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 +6 -0
- package/dist/coding/listPrs.d.ts.map +1 -1
- package/dist/coding/listPrs.js +11 -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 +28 -22
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +109 -158
- package/dist/coding/runReview.d.ts +10 -0
- package/dist/coding/runReview.d.ts.map +1 -0
- package/dist/coding/runReview.js +87 -0
- package/dist/coding/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 +278 -4
- package/dist/coding/workspaceRegistry.d.ts.map +1 -1
- package/dist/coding/workspaceRegistry.js +1008 -27
- 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 +62 -19
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +152 -19
- package/dist/coding/worktreeSetup.d.ts +7 -0
- package/dist/coding/worktreeSetup.d.ts.map +1 -0
- package/dist/coding/worktreeSetup.js +82 -0
- 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 +249 -80
- 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 +2 -16
- package/dist/jobs/briefing.d.ts.map +1 -1
- package/dist/jobs/briefing.js +57 -102
- 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/logTimestamps.d.ts +10 -0
- package/dist/logTimestamps.d.ts.map +1 -0
- package/dist/logTimestamps.js +12 -0
- 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 +65 -0
- package/dist/providerRecovery.d.ts.map +1 -0
- package/dist/providerRecovery.js +102 -0
- 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 +43 -20
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +242 -54
- 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 -4
- 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/incidents.d.ts +3 -0
- package/dist/room/incidents.d.ts.map +1 -1
- package/dist/room/incidents.js +1 -0
- package/dist/room/turnQueue.d.ts +24 -2
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +123 -51
- package/dist/runtimeStore.d.ts +19 -0
- package/dist/runtimeStore.d.ts.map +1 -1
- package/dist/runtimeStore.js +49 -3
- 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/vault.d.ts +6 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +18 -4
- 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 +72 -24
- package/src/automations/skill.ts +5 -37
- package/src/automations/store.ts +41 -50
- package/src/automations/workflow.ts +49 -0
- 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 +15 -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 +127 -182
- package/src/coding/runReview.ts +83 -0
- package/src/coding/workspaceOverview.ts +99 -0
- package/src/coding/workspaceRegistry.ts +921 -28
- package/src/coding/workspaceTitle.ts +10 -0
- package/src/coding/worktree.ts +164 -22
- package/src/coding/worktreeSetup.ts +73 -0
- 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 +242 -77
- package/src/install.ts +4 -2
- package/src/jobs/briefing.ts +56 -114
- 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/logTimestamps.ts +14 -0
- 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 +101 -0
- 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 +257 -85
- package/src/room/codingActivity.ts +70 -0
- package/src/room/computer.ts +19 -4
- package/src/room/context.ts +7 -2
- package/src/room/desktop-live.integration.ts +203 -0
- package/src/room/incidents.ts +4 -0
- package/src/room/turnQueue.ts +117 -62
- package/src/runtimeStore.ts +53 -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/vault.ts +16 -7
- 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 +42 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +22 -1
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +199 -28
- 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 +25 -4
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +181 -22
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts +24 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts +14 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts +29 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts +20 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts +16 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts +100 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts +216 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts +19 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts +36 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.js +2 -0
- package/vendor/runtime/dist/executor/codexRpc.d.ts +3 -1
- package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.js +3 -2
- package/vendor/runtime/dist/executor/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 +25 -2
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +23 -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 +24 -2
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/ownership.js +10 -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 +55 -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 +3 -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 +7 -2
- 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 +189 -31
- 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 +187 -26
- package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationFailure.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationItem.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/LegacyAppPathString.ts +27 -0
- package/vendor/runtime/src/executor/codexProtocol/MessagePhase.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/SleepItem.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/SubAgentSource.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/ThreadId.ts +10 -0
- package/vendor/runtime/src/executor/codexProtocol/WebSearchItem.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AgentMessageDelivery.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CodexErrorInfo.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentState.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentTool.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandAction.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionSource.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/FileUpdateChange.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GitInfo.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/HookPromptFragment.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppDisplayMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppUi.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallAppContext.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallError.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallResult.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitation.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitationEntry.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentErrorDetails.ts +18 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentSteer.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/NonSteerableTurnKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchApplyStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchChangeKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SessionSource.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SubAgentActivityKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Thread.ts +104 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadActiveFlag.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadHistoryMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadItem.ts +125 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadParams.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadResponse.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSection.ts +21 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSectionAppearance.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStatus.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Turn.ts +37 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnError.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnItemsView.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
- package/vendor/runtime/src/executor/codexRpc.ts +4 -2
- package/vendor/runtime/src/executor/codexSessions.ts +18 -82
- package/vendor/runtime/src/executor/fallback.ts +63 -0
- package/vendor/runtime/src/executor/health.ts +21 -3
- 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 +11 -2
- 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 +45 -8
- package/vendor/runtime/src/executor/usage.ts +58 -0
- package/vendor/runtime/src/harness/index.ts +3 -5
- package/vendor/runtime/src/harness/types.ts +3 -1
- package/vendor/runtime/src/index.ts +8 -2
- 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 +95 -14
- package/vendor/shared/dist/automations.d.ts.map +1 -1
- package/vendor/shared/dist/automations.js +22 -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 +26 -2
- package/vendor/shared/dist/constants.d.ts +1 -1
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +8 -10
- 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 +32 -3
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +28 -1
- package/vendor/shared/dist/journal-vault.d.ts +1 -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 +64 -0
- package/vendor/shared/dist/messagingSafety.d.ts.map +1 -0
- package/vendor/shared/dist/messagingSafety.js +14 -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 +1724 -181
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +125 -127
- 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.d.ts +24 -0
- package/vendor/shared/dist/smartCapture.d.ts.map +1 -1
- package/vendor/shared/dist/smartCapture.js +16 -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/taskSync.d.ts +342 -0
- package/vendor/shared/dist/taskSync.d.ts.map +1 -0
- package/vendor/shared/dist/taskSync.js +111 -0
- package/vendor/shared/dist/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 +4 -5
- 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/voiceCapture.d.ts +1 -1
- 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 +857 -2
- package/vendor/shared/dist/workspaces.d.ts.map +1 -1
- package/vendor/shared/dist/workspaces.js +156 -1
- 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 +22 -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 +43 -3
- package/vendor/shared/src/constants.ts +8 -10
- 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 +38 -7
- 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 +21 -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 +138 -133
- package/vendor/shared/src/schemas/notification.ts +2 -1
- package/vendor/shared/src/schemas/organization.ts +2 -0
- package/vendor/shared/src/smartCapture.ts +28 -1
- package/vendor/shared/src/spokenNames.ts +1 -1
- package/vendor/shared/src/taskSharing.ts +13 -0
- package/vendor/shared/src/taskSync.ts +81 -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 -7
- 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 +173 -1
- package/dist/coding/conduct.d.ts +0 -48
- package/dist/coding/conduct.d.ts.map +0 -1
- package/dist/coding/conduct.js +0 -263
- package/dist/coding/fleetPlan.d.ts +0 -20
- package/dist/coding/fleetPlan.d.ts.map +0 -1
- package/dist/coding/fleetPlan.js +0 -125
- package/dist/coding/fleetTasks.d.ts +0 -33
- package/dist/coding/fleetTasks.d.ts.map +0 -1
- package/dist/coding/fleetTasks.js +0 -75
- package/src/coding/conduct.ts +0 -325
- package/src/coding/fleetPlan.ts +0 -135
- package/src/coding/fleetTasks.ts +0 -109
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { lstat, readdir, rename, rm } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { InstallationStore, inspectTree, inside, owned, readMetadata, writeMetadata } from './installationStore.js';
|
|
5
|
+
|
|
6
|
+
export type InstallationReferences = {
|
|
7
|
+
/** A caller must have verified readiness before allowing automatic retention. */
|
|
8
|
+
healthy: boolean;
|
|
9
|
+
active: string;
|
|
10
|
+
rollback?: string;
|
|
11
|
+
references: Array<{ path: string; reason: string }>;
|
|
12
|
+
};
|
|
13
|
+
export type RetentionReport = {
|
|
14
|
+
at: string; dryRun: boolean; deleted: string[]; eligible: string[];
|
|
15
|
+
retained: Array<{ name: string; reasons: string[] }>;
|
|
16
|
+
reclaimedBytes: number; errors: string[];
|
|
17
|
+
};
|
|
18
|
+
type Deletion = { name: string; trash: string; device: number; inode: number; allocatedBytes: number };
|
|
19
|
+
type Journal = { schema: 1; entries: Deletion[] };
|
|
20
|
+
const TRASH = /^\.trash-[a-f0-9-]{36}$/;
|
|
21
|
+
const STAGE = /^\.prepare-[A-Za-z0-9-]+$/;
|
|
22
|
+
|
|
23
|
+
function reasons(path: string, refs: InstallationReferences): string[] {
|
|
24
|
+
return [
|
|
25
|
+
{ path: refs.active, reason: 'active installation' },
|
|
26
|
+
...(refs.rollback ? [{ path: refs.rollback, reason: 'verified rollback' }] : []),
|
|
27
|
+
...refs.references,
|
|
28
|
+
].filter(ref => inside(path, ref.path) || inside(ref.path, path)).map(ref => ref.reason);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function exists(path: string): Promise<boolean> {
|
|
32
|
+
try { await lstat(path); return true; }
|
|
33
|
+
catch (error) { if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false; throw error; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Only known package slots or explicitly owned preparation directories are removed.
|
|
37
|
+
* The journal survives interruption between rename and removal, including partial removal.
|
|
38
|
+
* All callers (installer, activator, inventory and cleanup) share the store lease.
|
|
39
|
+
*/
|
|
40
|
+
export async function retainInstallations(store: InstallationStore,
|
|
41
|
+
readReferences: () => Promise<InstallationReferences>, options: {
|
|
42
|
+
dryRun?: boolean; remove?: (path: string) => Promise<void>;
|
|
43
|
+
} = {}): Promise<RetentionReport> {
|
|
44
|
+
await store.assertLocked();
|
|
45
|
+
const report: RetentionReport = { at: new Date().toISOString(), dryRun: options.dryRun ?? false,
|
|
46
|
+
deleted: [], eligible: [], retained: [], reclaimedBytes: 0, errors: [] };
|
|
47
|
+
const journalPath = join(store.metadata, 'deletions.json');
|
|
48
|
+
let journal: Journal = { schema: 1, entries: [] };
|
|
49
|
+
const save = () => writeMetadata(journalPath, journal);
|
|
50
|
+
const snapshot = async () => {
|
|
51
|
+
await store.assertLocked();
|
|
52
|
+
const refs = await readReferences();
|
|
53
|
+
if (!refs.healthy || !refs.active || !inside(store.root, refs.active) || refs.active === store.root)
|
|
54
|
+
throw new Error('Cleanup requires a verified healthy active installation in this store');
|
|
55
|
+
await owned(refs.active, true);
|
|
56
|
+
return refs;
|
|
57
|
+
};
|
|
58
|
+
const retained = (name: string, why: string[]) => report.retained.push({ name, reasons: [...new Set(why)] });
|
|
59
|
+
try {
|
|
60
|
+
if (!process.getuid) throw new Error('Automatic installation cleanup requires a verified owner ACL implementation on this platform');
|
|
61
|
+
await snapshot();
|
|
62
|
+
if (await exists(journalPath)) journal = await readMetadata<Journal>(journalPath);
|
|
63
|
+
if (journal.schema !== 1 || !Array.isArray(journal.entries) || journal.entries.length > 1000)
|
|
64
|
+
throw new Error('Invalid deletion journal');
|
|
65
|
+
for (const entry of journal.entries) {
|
|
66
|
+
if (!TRASH.test(entry.trash) || !Number.isSafeInteger(entry.device) || !Number.isSafeInteger(entry.inode) ||
|
|
67
|
+
!Number.isFinite(entry.allocatedBytes) || entry.allocatedBytes < 0) throw new Error('Unsafe deletion journal');
|
|
68
|
+
if (!STAGE.test(entry.name)) store.slot(entry.name);
|
|
69
|
+
}
|
|
70
|
+
const remove = options.remove ?? (path => rm(path, { recursive: true, force: false }));
|
|
71
|
+
async function finish(entry: Deletion): Promise<void> {
|
|
72
|
+
const source = join(store.root, entry.name), trash = join(store.root, entry.trash);
|
|
73
|
+
if (!await exists(trash)) {
|
|
74
|
+
// Intent persisted before rename, or removal finished before the journal update.
|
|
75
|
+
if (!await exists(source)) report.deleted.push(entry.name);
|
|
76
|
+
if (!report.dryRun) { journal.entries = journal.entries.filter(item => item !== entry); await save(); }
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const info = await owned(trash, true);
|
|
80
|
+
if (info.dev !== entry.device || info.ino !== entry.inode) throw new Error('Quarantined installation identity changed');
|
|
81
|
+
const refs = await snapshot();
|
|
82
|
+
const protectedBy = [...reasons(source, refs), ...reasons(trash, refs)];
|
|
83
|
+
if (protectedBy.length) {
|
|
84
|
+
if (!report.dryRun && !await exists(source)) {
|
|
85
|
+
await rename(trash, source);
|
|
86
|
+
journal.entries = journal.entries.filter(item => item !== entry); await save();
|
|
87
|
+
}
|
|
88
|
+
retained(entry.name, protectedBy); return;
|
|
89
|
+
}
|
|
90
|
+
// A partially removed tree need no longer contain its package, but ownership,
|
|
91
|
+
// internal links, original inode and the durable intent must still validate.
|
|
92
|
+
const remaining = await inspectTree(trash, source);
|
|
93
|
+
const latest = await snapshot();
|
|
94
|
+
const changed = [...reasons(source, latest), ...reasons(trash, latest)];
|
|
95
|
+
if (changed.length) {
|
|
96
|
+
if (!report.dryRun && !await exists(source)) {
|
|
97
|
+
await rename(trash, source);
|
|
98
|
+
journal.entries = journal.entries.filter(item => item !== entry); await save();
|
|
99
|
+
}
|
|
100
|
+
retained(entry.name, changed); return;
|
|
101
|
+
}
|
|
102
|
+
const finalIdentity = await owned(trash, true);
|
|
103
|
+
if (finalIdentity.dev !== entry.device || finalIdentity.ino !== entry.inode) throw new Error('Deletion target changed');
|
|
104
|
+
report.eligible.push(entry.name);
|
|
105
|
+
if (report.dryRun) return;
|
|
106
|
+
await remove(trash);
|
|
107
|
+
report.deleted.push(entry.name); report.reclaimedBytes += remaining.allocatedBytes;
|
|
108
|
+
journal.entries = journal.entries.filter(item => item !== entry); await save();
|
|
109
|
+
}
|
|
110
|
+
for (const entry of [...journal.entries]) {
|
|
111
|
+
try { await finish(entry); } catch (error) { report.errors.push(`${entry.name}: ${(error as Error).message}`); }
|
|
112
|
+
}
|
|
113
|
+
const pending = new Set(journal.entries.flatMap(item => [item.name, item.trash]));
|
|
114
|
+
for (const name of await readdir(store.root)) {
|
|
115
|
+
if (name === '.maintenance' || pending.has(name)) continue;
|
|
116
|
+
try {
|
|
117
|
+
const path = join(store.root, name), refs = await snapshot();
|
|
118
|
+
const protectedBy = reasons(path, refs);
|
|
119
|
+
if (protectedBy.length) { retained(name, protectedBy); continue; }
|
|
120
|
+
let candidate: { device: number; inode: number; allocatedBytes: number };
|
|
121
|
+
if (STAGE.test(name)) {
|
|
122
|
+
const marker = await readMetadata<{ schema: number; kind: string }>(join(path, '.lucidity-stage.json'));
|
|
123
|
+
if (marker.schema !== 1 || marker.kind !== store.kind) throw new Error('Unowned staging directory');
|
|
124
|
+
const info = await owned(path, true);
|
|
125
|
+
candidate = { device: info.dev, inode: info.ino, ...await inspectTree(path) };
|
|
126
|
+
} else candidate = await store.inspect(name);
|
|
127
|
+
// References can change while scanning a large dependency tree.
|
|
128
|
+
const changed = reasons(path, await snapshot());
|
|
129
|
+
if (changed.length) { retained(name, changed); continue; }
|
|
130
|
+
if (report.dryRun) { report.eligible.push(name); continue; }
|
|
131
|
+
const entry: Deletion = { name, trash: `.trash-${randomUUID()}`, device: candidate.device,
|
|
132
|
+
inode: candidate.inode, allocatedBytes: candidate.allocatedBytes };
|
|
133
|
+
journal.entries.push(entry); await save();
|
|
134
|
+
const identity = await owned(path, true);
|
|
135
|
+
if (identity.dev !== entry.device || identity.ino !== entry.inode) throw new Error('Installation changed before quarantine');
|
|
136
|
+
const lastCheck = reasons(path, await snapshot());
|
|
137
|
+
if (lastCheck.length) {
|
|
138
|
+
journal.entries = journal.entries.filter(item => item !== entry); await save();
|
|
139
|
+
retained(name, lastCheck); continue;
|
|
140
|
+
}
|
|
141
|
+
await rename(path, join(store.root, entry.trash));
|
|
142
|
+
await finish(entry);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
retained(name, ['inspection or cleanup failed']); report.errors.push(`${name}: ${(error as Error).message}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
} catch (error) { report.errors.push((error as Error).message); }
|
|
148
|
+
// Never turn successful activation into a rollback because retention failed.
|
|
149
|
+
if (!report.dryRun) {
|
|
150
|
+
try { await writeMetadata(join(store.metadata, 'cleanup-report.json'), report); }
|
|
151
|
+
catch (error) { report.errors.push(`Could not save cleanup report: ${(error as Error).message}`); }
|
|
152
|
+
}
|
|
153
|
+
return report;
|
|
154
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { writeFileSync, renameSync } from 'node:fs';
|
|
2
|
+
import { isAbsolute, join } from 'node:path';
|
|
3
|
+
import { DAEMON_UPDATE_PROTOCOL } from '@lucidity/shared';
|
|
4
|
+
import { CONFIG_DIR, loadConfig } from '../config.js';
|
|
5
|
+
import { computerId } from '../room/computer.js';
|
|
6
|
+
import { DaemonLease } from '../daemonLease.js';
|
|
7
|
+
import { UpdateJournal } from './journal.js';
|
|
8
|
+
import { ProcessRuntimeHost } from './processHost.js';
|
|
9
|
+
import { prepareDaemonRuntime, preparedDaemonRuntime } from './installer.js';
|
|
10
|
+
import { daemonRolloutBucket } from './releases.js';
|
|
11
|
+
import { fetchReleaseCatalog } from './feed.js';
|
|
12
|
+
import { readUpdateBootstrap } from './bootstrapConfig.js';
|
|
13
|
+
export { UpdateBootstrapSchema } from './bootstrapConfig.js';
|
|
14
|
+
import { UpdateService } from './service.js';
|
|
15
|
+
import { connectUpdateControl } from './connection.js';
|
|
16
|
+
import { InstallationStore, withInstallationStore } from './installationStore.js';
|
|
17
|
+
import { installationReferences } from './installationReferences.js';
|
|
18
|
+
import { retainInstallations } from './retention.js';
|
|
19
|
+
|
|
20
|
+
/** The bootstrap installer must prepare its initial slot before invoking this service. */
|
|
21
|
+
export function startUpdateService(configPath: string) {
|
|
22
|
+
if (!isAbsolute(configPath)) throw new Error('Expected an absolute bootstrap configuration path');
|
|
23
|
+
const config = readUpdateBootstrap(configPath);
|
|
24
|
+
const identity = computerId(join(CONFIG_DIR, 'computer-id'));
|
|
25
|
+
const journal = new UpdateJournal(join(config.directory, 'journal'), {
|
|
26
|
+
version: config.release.version, stateEpoch: config.release.stateEpoch, channel: config.channel,
|
|
27
|
+
});
|
|
28
|
+
const runtimes = join(config.directory, 'runtimes');
|
|
29
|
+
let installationLease: InstallationStore | undefined;
|
|
30
|
+
const host = new ProcessRuntimeHost({
|
|
31
|
+
assertStopped: () => { const lease = new DaemonLease(CONFIG_DIR); lease.close(); },
|
|
32
|
+
resolveRuntime: async (version) => {
|
|
33
|
+
const policy = journal.read().policy;
|
|
34
|
+
const release = (policy?.schema === 2 ? policy.daemons.find((entry) => entry.artifact.version === version)?.artifact : undefined)
|
|
35
|
+
?? (config.release.version === version ? config.release : undefined);
|
|
36
|
+
if (!release) throw new Error('No trusted declaration for the selected daemon runtime');
|
|
37
|
+
if (!installationLease) throw new Error('Runtime activation requires the installation lease');
|
|
38
|
+
await installationLease.inspect(version);
|
|
39
|
+
return preparedDaemonRuntime(runtimes, release);
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
let binding: { accountId: string; computerId: string } | undefined;
|
|
43
|
+
let connection: ReturnType<typeof connectUpdateControl> | undefined;
|
|
44
|
+
const service = new UpdateService({
|
|
45
|
+
journal, host, keys: config.keys, binding: () => binding, liveCapabilities: () => host.capabilities,
|
|
46
|
+
environment: () => ({ managed: true, platform: `${process.platform}-${process.arch}`, nodeVersion: process.versions.node,
|
|
47
|
+
updateProtocol: DAEMON_UPDATE_PROTOCOL, rolloutBucket: daemonRolloutBucket(identity, journal.read().policy?.rollout.salt ?? 'bootstrap') }),
|
|
48
|
+
fetchCatalog: (signal) => fetchReleaseCatalog(config.feedUrl, { signal }),
|
|
49
|
+
transaction: operation => withInstallationStore(runtimes, 'managed', async lease => {
|
|
50
|
+
installationLease = lease;
|
|
51
|
+
try { await operation(); } finally { installationLease = undefined; }
|
|
52
|
+
}),
|
|
53
|
+
prepare: async (release, signal) => {
|
|
54
|
+
await prepareDaemonRuntime(release, runtimes, { npmCli: config.npmCli, signal, lease: installationLease });
|
|
55
|
+
},
|
|
56
|
+
maintain: async () => {
|
|
57
|
+
if (!installationLease || !host.ready) return;
|
|
58
|
+
const lease = installationLease;
|
|
59
|
+
const report = await retainInstallations(lease, async () => {
|
|
60
|
+
const state = journal.read();
|
|
61
|
+
const pending = state.pending;
|
|
62
|
+
return { healthy: host.ready && (!pending || pending.phase === 'staged'), active: lease.slot(state.current.version),
|
|
63
|
+
rollback: state.previous ? lease.slot(state.previous.version) : undefined,
|
|
64
|
+
references: [
|
|
65
|
+
{ path: lease.slot(config.release.version), reason: 'pinned updater bootstrap' },
|
|
66
|
+
...(pending ? [pending.previous.version, pending.release.version].map(version =>
|
|
67
|
+
({ path: lease.slot(version), reason: 'update in progress' })) : []),
|
|
68
|
+
...await installationReferences(runtimes, { configDirectory: CONFIG_DIR, extraFiles: [configPath] }),
|
|
69
|
+
] };
|
|
70
|
+
});
|
|
71
|
+
if (report.deleted.length || report.errors.length) console.error('[updater] Installation retention', JSON.stringify(report));
|
|
72
|
+
},
|
|
73
|
+
onStatus: (status) => {
|
|
74
|
+
const path = join(config.directory, 'status.json');
|
|
75
|
+
try {
|
|
76
|
+
writeFileSync(`${path}.tmp`, JSON.stringify(status), { mode: 0o600 });
|
|
77
|
+
renameSync(`${path}.tmp`, path);
|
|
78
|
+
} finally { connection?.publish({ type: 'update_status', protocol: DAEMON_UPDATE_PROTOCOL, status, devices: service.deviceStates(), doctor: binding ? service.doctorStates() : undefined }); }
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
connection = connectUpdateControl({
|
|
82
|
+
computerId: identity,
|
|
83
|
+
credentials: () => { const { apiUrl, apiKey } = loadConfig(); return { apiUrl, apiKey }; },
|
|
84
|
+
onBinding: value => { binding = value; },
|
|
85
|
+
onDoctor: request => { void service.receiveDoctor(request).catch(() => console.error('[doctor] Capability recovery could not finish')); },
|
|
86
|
+
onClient: (client) => {
|
|
87
|
+
void service.receiveClient(client).catch(() => { console.error('[updater] Device release check failed'); });
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
let timer: NodeJS.Timeout | undefined, stopped = false;
|
|
91
|
+
const tick = () => {
|
|
92
|
+
void service.poll().catch((error) => { console.error('[updater]', error instanceof Error ? error.message : 'Update check failed'); })
|
|
93
|
+
.finally(() => { if (!stopped) timer = setTimeout(tick, config.pollSeconds * 1000); });
|
|
94
|
+
};
|
|
95
|
+
tick();
|
|
96
|
+
return {
|
|
97
|
+
async stop() {
|
|
98
|
+
stopped = true; clearTimeout(timer);
|
|
99
|
+
connection.stop();
|
|
100
|
+
await service.stop();
|
|
101
|
+
journal.close();
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { DAEMON_UPDATE_PROTOCOL, ComputerClientSchema, computerClientCompatibility,
|
|
2
|
+
DoctorRelayRequestSchema, DOCTOR_SHELL_FEATURES, type DoctorRelayRequest, type DoctorProgress,
|
|
3
|
+
type ComputerClient, type DeviceCompatibility, type DaemonRelease, type DaemonUpdateStatus } from '@lucidity/shared';
|
|
4
|
+
import { UpdateJournal } from './journal.js';
|
|
5
|
+
import type { RuntimeHost } from './processHost.js';
|
|
6
|
+
import { verifyReleaseManifest } from './releases.js';
|
|
7
|
+
import { UpdateSupervisor } from './supervisor.js';
|
|
8
|
+
|
|
9
|
+
/** One serialized poll/activation loop. Device enrollment remains a separate authenticated input. */
|
|
10
|
+
export class UpdateService {
|
|
11
|
+
private pending?: Promise<void>;
|
|
12
|
+
private stopping = false;
|
|
13
|
+
private controller = new AbortController();
|
|
14
|
+
private stopped?: Promise<void>;
|
|
15
|
+
private observed = new Map<string, ComputerClient>();
|
|
16
|
+
private lastStatus?: DaemonUpdateStatus;
|
|
17
|
+
constructor(private readonly options: {
|
|
18
|
+
journal: UpdateJournal;
|
|
19
|
+
host: RuntimeHost & { readonly hasProcess: boolean; readonly ready: boolean };
|
|
20
|
+
keys: Readonly<Record<string, string>>;
|
|
21
|
+
environment: () => Parameters<UpdateJournal['decision']>[0];
|
|
22
|
+
fetchCatalog: (signal: AbortSignal) => Promise<string>;
|
|
23
|
+
prepare: (release: DaemonRelease, signal: AbortSignal) => Promise<void>;
|
|
24
|
+
transaction?: (operation: () => Promise<void>) => Promise<void>;
|
|
25
|
+
maintain?: () => Promise<void>;
|
|
26
|
+
now?: () => number;
|
|
27
|
+
binding?: () => { accountId: string; computerId: string } | undefined;
|
|
28
|
+
liveCapabilities?: () => { computerId: string; features: readonly string[] } | undefined;
|
|
29
|
+
onStatus?: (status: DaemonUpdateStatus) => void;
|
|
30
|
+
}) {}
|
|
31
|
+
|
|
32
|
+
private repairs(): DoctorProgress[] {
|
|
33
|
+
const binding = this.options.binding?.();
|
|
34
|
+
return binding ? this.options.journal.read().doctor.filter(entry =>
|
|
35
|
+
entry.accountId === binding.accountId && entry.computerId === binding.computerId) : [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
doctorStates(): DoctorProgress[] { return this.repairs(); }
|
|
39
|
+
|
|
40
|
+
private environment() {
|
|
41
|
+
return { ...this.options.environment(), ...(this.repairs().some(entry => entry.phase !== 'needs_action')
|
|
42
|
+
? { requiredFeatures: DOCTOR_SHELL_FEATURES } : {}) };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
receiveDoctor(input: DoctorRelayRequest): Promise<void> {
|
|
46
|
+
if (this.stopping) return Promise.resolve();
|
|
47
|
+
const request = DoctorRelayRequestSchema.parse(input), binding = this.options.binding?.();
|
|
48
|
+
if (!binding || request.accountId !== binding.accountId || request.computerId !== binding.computerId)
|
|
49
|
+
return Promise.reject(new Error('Repair does not match this paired computer'));
|
|
50
|
+
// Enrollment uses the same authenticated build report as normal update checks.
|
|
51
|
+
if (this.observed.size >= 256 && !this.observed.has(JSON.stringify({ deviceId: request.deviceId, releaseId: request.releaseId })))
|
|
52
|
+
return Promise.reject(new Error('Too many observed device releases'));
|
|
53
|
+
const old = this.options.journal.read().doctor.find(entry => entry.id === request.id);
|
|
54
|
+
this.options.journal.saveDoctor({ ...request, phase: old?.phase ?? 'preparing', ...(old?.problem ? { problem: old.problem } : {}) });
|
|
55
|
+
this.observed.set(JSON.stringify({ deviceId: request.deviceId, releaseId: request.releaseId }),
|
|
56
|
+
{ deviceId: request.deviceId, releaseId: request.releaseId });
|
|
57
|
+
this.enrollKnownClients();
|
|
58
|
+
const state = this.options.journal.read();
|
|
59
|
+
if (state.policy?.schema !== 2 || !state.policy.clients.some(entry => entry.id === request.releaseId && entry.supported) ||
|
|
60
|
+
!state.clients.some(entry => entry.deviceId === request.deviceId && entry.releaseId === request.releaseId)) {
|
|
61
|
+
this.options.journal.saveDoctor({ ...request, phase: 'needs_action', problem: 'unknown_client' });
|
|
62
|
+
if (this.lastStatus) this.emit(this.lastStatus);
|
|
63
|
+
return Promise.resolve();
|
|
64
|
+
}
|
|
65
|
+
if (old?.phase === 'ready') {
|
|
66
|
+
if (this.lastStatus) this.emit(this.lastStatus);
|
|
67
|
+
return Promise.resolve();
|
|
68
|
+
}
|
|
69
|
+
// New signed metadata or restored permissions can resolve a previous blocker.
|
|
70
|
+
// Recheck the same immutable intent; never require a replacement command ID.
|
|
71
|
+
if (old?.phase === 'needs_action') this.options.journal.saveDoctor({ ...request, phase: 'preparing' });
|
|
72
|
+
return this.pending ? this.pending.catch(() => {}).then(() => this.poll()) : this.poll();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private progress(status: DaemonUpdateStatus) {
|
|
76
|
+
const state = this.options.journal.read();
|
|
77
|
+
for (const repair of this.repairs().filter(entry => entry.phase !== 'needs_action' || status.phase === 'rolled_back')) {
|
|
78
|
+
let phase: DoctorProgress['phase'] = 'preparing', problem: DoctorProgress['problem'];
|
|
79
|
+
if (['waiting_for_work', 'restarting', 'verifying'].includes(status.phase))
|
|
80
|
+
phase = status.phase as DoctorProgress['phase'];
|
|
81
|
+
else if (status.phase === 'rolled_back') { phase = 'needs_action'; problem = 'startup'; }
|
|
82
|
+
else if (status.phase === 'blocked') { phase = status.problem === 'network' ? 'preparing' : 'needs_action'; problem = status.problem === 'verification' ? 'verification' : status.problem === 'network' ? 'network' : 'no_release'; }
|
|
83
|
+
else if (status.phase === 'current') {
|
|
84
|
+
const device = state.policy?.schema === 2 ? computerClientCompatibility(state.policy, state.current.version, state.clients)
|
|
85
|
+
.find(entry => entry.deviceId === repair.deviceId && entry.releaseId === repair.releaseId) : undefined;
|
|
86
|
+
const declared = state.policy?.schema === 2 && state.policy.daemons.find(entry => entry.artifact.version === state.current.version);
|
|
87
|
+
const live = this.options.liveCapabilities?.();
|
|
88
|
+
if (device?.state !== 'ready') { phase = 'needs_action'; problem = 'unknown_client'; }
|
|
89
|
+
else if (!declared || !DOCTOR_SHELL_FEATURES.every(feature => declared.features.includes(feature))) { phase = 'needs_action'; problem = 'no_release'; }
|
|
90
|
+
else if (!live || live.computerId !== repair.computerId || !DOCTOR_SHELL_FEATURES.every(feature => live.features.includes(feature))) { phase = 'needs_action'; problem = 'live_capability'; }
|
|
91
|
+
else phase = 'ready';
|
|
92
|
+
}
|
|
93
|
+
this.options.journal.saveDoctor({ ...repair, phase, problem });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private emit = (status: DaemonUpdateStatus) => {
|
|
98
|
+
this.progress(status);
|
|
99
|
+
this.lastStatus = status;
|
|
100
|
+
try { this.options.onStatus?.(status); } catch {}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** The independent authenticated relay supplies these reports, never the AI room. */
|
|
104
|
+
receiveClient(report: ComputerClient): Promise<void> {
|
|
105
|
+
if (this.stopping) return Promise.resolve();
|
|
106
|
+
const client = ComputerClientSchema.parse(report);
|
|
107
|
+
const key = JSON.stringify(client);
|
|
108
|
+
if (this.observed.has(key)) return Promise.resolve();
|
|
109
|
+
if (this.observed.size >= 256) throw new Error('Too many observed device releases');
|
|
110
|
+
this.observed.set(key, client);
|
|
111
|
+
this.enrollKnownClients();
|
|
112
|
+
if (this.lastStatus) this.emit(this.lastStatus);
|
|
113
|
+
// A report arriving during download/startup must get another selection pass,
|
|
114
|
+
// including when it invalidated the in-flight candidate.
|
|
115
|
+
return this.pending ? this.pending.catch(() => {}).then(() => this.poll()) : this.poll();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
private enrollKnownClients() {
|
|
119
|
+
const { journal } = this.options, state = journal.read();
|
|
120
|
+
if (state.policy?.schema !== 2) return;
|
|
121
|
+
const releases = state.policy.clients;
|
|
122
|
+
for (const report of this.observed.values()) {
|
|
123
|
+
const release = releases.find((entry) => entry.id === report.releaseId);
|
|
124
|
+
const enrolled = journal.read().clients.find((entry) => entry.deviceId === report.deviceId);
|
|
125
|
+
const previous = enrolled && releases.find((entry) => entry.id === enrolled.releaseId);
|
|
126
|
+
if (release && (!previous || previous.platform === release.platform)) journal.recordClient(report);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
deviceStates(): DeviceCompatibility[] {
|
|
131
|
+
const { journal } = this.options, state = journal.read();
|
|
132
|
+
const clients = [...this.observed.values()];
|
|
133
|
+
if (state.policy?.schema !== 2) return clients.map((client) => ({ ...client, state: 'unknown_release', protocol: null }));
|
|
134
|
+
return computerClientCompatibility(state.policy, state.current.version, clients).map((device) => {
|
|
135
|
+
if (device.state !== 'ready') return device;
|
|
136
|
+
if (!state.clients.some((entry) => entry.deviceId === device.deviceId && entry.releaseId === device.releaseId))
|
|
137
|
+
return { ...device, state: 'update_app', protocol: null };
|
|
138
|
+
return journal.allowNewWork(device) ? device : { ...device, state: 'update_computer', protocol: null };
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
private status(phase: DaemonUpdateStatus['phase'], problem?: DaemonUpdateStatus['problem'], target?: string) {
|
|
143
|
+
const { journal } = this.options;
|
|
144
|
+
let required = !journal.allowNewWork();
|
|
145
|
+
try { required = journal.decision(this.environment(), this.options.now?.()).required; } catch {}
|
|
146
|
+
this.emit({ protocol: DAEMON_UPDATE_PROTOCOL, installedVersion: journal.read().current.version,
|
|
147
|
+
phase, required, ...(problem ? { problem } : {}), ...(target ? { targetVersion: target } : {}) });
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Repeated poll requests share the same transaction instead of queuing stale work. */
|
|
151
|
+
poll(): Promise<void> {
|
|
152
|
+
if (this.stopping) return Promise.resolve();
|
|
153
|
+
if (this.pending) return this.pending;
|
|
154
|
+
const operation = async () => {
|
|
155
|
+
try { await this.cycle(); }
|
|
156
|
+
finally {
|
|
157
|
+
// Retention must never roll back a healthy runtime or hide an update failure.
|
|
158
|
+
try { await this.options.maintain?.(); }
|
|
159
|
+
catch { console.error('[updater] Installation cleanup failed; see the installation maintenance report'); }
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return this.pending = (this.options.transaction ? this.options.transaction(operation) : operation())
|
|
163
|
+
.finally(() => { this.pending = undefined; });
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
private async cycle(): Promise<void> {
|
|
167
|
+
const { journal, host, keys, now, prepare } = this.options;
|
|
168
|
+
const environment = () => this.environment();
|
|
169
|
+
this.status('checking');
|
|
170
|
+
let policyError: unknown;
|
|
171
|
+
let fetched = false;
|
|
172
|
+
let accepted = false;
|
|
173
|
+
try {
|
|
174
|
+
const raw = await this.options.fetchCatalog(this.controller.signal);
|
|
175
|
+
fetched = true;
|
|
176
|
+
// New managed installations require the coordinated, immutable catalog.
|
|
177
|
+
const verified = verifyReleaseManifest(raw, { keys, channel: journal.read().channel, now: now?.() });
|
|
178
|
+
if (verified.manifest.schema !== 2) throw new Error('Managed service requires a version-2 release catalog');
|
|
179
|
+
journal.acceptManifest(raw, keys, now?.());
|
|
180
|
+
this.enrollKnownClients();
|
|
181
|
+
accepted = true;
|
|
182
|
+
} catch (error) { policyError = error; }
|
|
183
|
+
if (this.stopping) return;
|
|
184
|
+
const verifiedEnvironment = environment();
|
|
185
|
+
const supervisor = new UpdateSupervisor(journal, host, { environment: verifiedEnvironment, now, onStatus: this.emit,
|
|
186
|
+
verifyCandidate: () => {
|
|
187
|
+
if (!verifiedEnvironment.requiredFeatures?.length) return;
|
|
188
|
+
const live = this.options.liveCapabilities?.(), binding = this.options.binding?.();
|
|
189
|
+
if (!live || !binding || live.computerId !== binding.computerId || !DOCTOR_SHELL_FEATURES.every(feature => live.features.includes(feature)))
|
|
190
|
+
throw new Error('Candidate did not prove live capability and computer identity');
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
if (!host.ready || (journal.read().pending && journal.read().pending!.phase !== 'staged')) await supervisor.boot();
|
|
194
|
+
if (this.stopping) return;
|
|
195
|
+
if (journal.read().pending?.phase === 'staged') journal.discardStaged();
|
|
196
|
+
|
|
197
|
+
// Apply cached mandatory restrictions even when fetching or verification failed.
|
|
198
|
+
const blocked = !journal.allowNewWork();
|
|
199
|
+
const draining = blocked ? host.quiesce().then(() => undefined, (error: unknown) => error) : undefined;
|
|
200
|
+
if (!accepted) {
|
|
201
|
+
const drainError = await draining;
|
|
202
|
+
this.status('blocked', fetched ? 'verification' : 'network');
|
|
203
|
+
throw drainError ?? policyError ?? new Error('Release catalog unavailable');
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
const decision = journal.decision(environment(), now?.());
|
|
207
|
+
if (decision.action !== 'stage' || !decision.target) {
|
|
208
|
+
const drainError = await draining;
|
|
209
|
+
if (drainError) throw drainError;
|
|
210
|
+
if (!blocked) await host.resume();
|
|
211
|
+
this.status(blocked || decision.action === 'blocked' ? 'blocked' : 'current');
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.status('downloading', undefined, decision.target.version);
|
|
215
|
+
// Required updates close new admission immediately, while download and active
|
|
216
|
+
// work drain concurrently. Ordinary downloads leave the current daemon working.
|
|
217
|
+
await prepare(decision.target, this.controller.signal);
|
|
218
|
+
const drainError = await draining;
|
|
219
|
+
if (drainError) throw drainError;
|
|
220
|
+
if (this.stopping) return;
|
|
221
|
+
journal.recordStaged(decision.target, environment(), now?.());
|
|
222
|
+
await supervisor.activateStaged();
|
|
223
|
+
} catch (error) {
|
|
224
|
+
await draining;
|
|
225
|
+
this.status('blocked');
|
|
226
|
+
throw error;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/** Abort preparation, finish any activation, then drain and prove child exit. */
|
|
231
|
+
stop(): Promise<void> {
|
|
232
|
+
if (this.stopped) return this.stopped;
|
|
233
|
+
this.stopping = true;
|
|
234
|
+
this.controller.abort();
|
|
235
|
+
return this.stopped = (async () => {
|
|
236
|
+
await this.pending?.catch(() => {});
|
|
237
|
+
if (this.options.host.ready) await this.options.host.quiesce();
|
|
238
|
+
await this.options.host.stop();
|
|
239
|
+
})();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { windowsUpdateServicePlan } from './windowsService.js';
|
|
2
|
+
import { dirname, isAbsolute, join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
export const UPDATE_SERVICE_LABEL = 'my.lucidity.updater';
|
|
5
|
+
export const UPDATE_SERVICE_UNIT = 'lucidity-updater.service';
|
|
6
|
+
export type ServiceCommand = { command: string; args: string[] };
|
|
7
|
+
export type ServiceFile = { path: string; contents: string; encoding?: 'utf8' | 'utf16le' };
|
|
8
|
+
export type UpdateServicePlan = ServiceFile & { register: ServiceCommand[]; start: ServiceCommand; exists?: ServiceCommand; supportFiles?: ServiceFile[] };
|
|
9
|
+
|
|
10
|
+
const xml = (value: string) => value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
11
|
+
// systemd interprets specifiers and environment expansion even without a shell.
|
|
12
|
+
const unit = (value: string, expand = false) => `"${value.replace(/%/g, '%%').replace(/\$/g, () => expand ? '$$' : '$').replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
13
|
+
|
|
14
|
+
export function updateServicePlan(options: {
|
|
15
|
+
platform: string; home: string; node: string; supervisorEntry: string; configPath: string; logs: string; uid: number; userSid?: string; systemRoot?: string;
|
|
16
|
+
}): UpdateServicePlan {
|
|
17
|
+
if (options.platform === 'win32') return windowsUpdateServicePlan({ ...options, userSid: options.userSid ?? '', systemRoot: options.systemRoot ?? '' });
|
|
18
|
+
for (const value of [options.home, options.node, options.supervisorEntry, options.configPath, options.logs])
|
|
19
|
+
if (!isAbsolute(value) || /[\0\r\n]/.test(value)) throw new Error('Service paths must be absolute single-line paths');
|
|
20
|
+
const args = [options.node, options.supervisorEntry, options.configPath];
|
|
21
|
+
const path = [dirname(options.node), join(options.home, '.local/bin'), '/opt/homebrew/bin', '/usr/local/bin', '/usr/bin', '/bin'].join(':');
|
|
22
|
+
if (options.platform === 'darwin') {
|
|
23
|
+
if (!Number.isSafeInteger(options.uid) || options.uid < 1) throw new Error('Install the updater as a signed-in user');
|
|
24
|
+
const destination = join(options.home, 'Library/LaunchAgents', `${UPDATE_SERVICE_LABEL}.plist`);
|
|
25
|
+
return { path: destination, contents: `<?xml version="1.0" encoding="UTF-8"?>
|
|
26
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
27
|
+
<plist version="1.0"><dict>
|
|
28
|
+
<key>Label</key><string>${UPDATE_SERVICE_LABEL}</string>
|
|
29
|
+
<key>ProgramArguments</key><array>${args.map((value) => `<string>${xml(value)}</string>`).join('')}</array>
|
|
30
|
+
<key>WorkingDirectory</key><string>${xml(options.home)}</string>
|
|
31
|
+
<key>RunAtLoad</key><true/><key>KeepAlive</key><true/>
|
|
32
|
+
<key>ThrottleInterval</key><integer>60</integer>
|
|
33
|
+
<key>ExitTimeOut</key><integer>180</integer>
|
|
34
|
+
<key>AbandonProcessGroup</key><true/>
|
|
35
|
+
<key>EnvironmentVariables</key><dict><key>PATH</key><string>${xml(path)}</string></dict>
|
|
36
|
+
<key>StandardOutPath</key><string>${xml(join(options.logs, 'updater.out.log'))}</string>
|
|
37
|
+
<key>StandardErrorPath</key><string>${xml(join(options.logs, 'updater.err.log'))}</string>
|
|
38
|
+
</dict></plist>
|
|
39
|
+
`, register: [], start: { command: 'launchctl', args: ['bootstrap', `gui/${options.uid}`, destination] } };
|
|
40
|
+
}
|
|
41
|
+
if (options.platform === 'linux') {
|
|
42
|
+
return { path: join(options.home, '.config/systemd/user', UPDATE_SERVICE_UNIT), contents: `[Unit]
|
|
43
|
+
Description=Lucidity computer updater
|
|
44
|
+
After=network-online.target
|
|
45
|
+
|
|
46
|
+
[Service]
|
|
47
|
+
Type=simple
|
|
48
|
+
ExecStart=${args.map((value) => unit(value, true)).join(' ')}
|
|
49
|
+
WorkingDirectory=${unit(options.home)}
|
|
50
|
+
Environment=${unit(`PATH=${path}`)}
|
|
51
|
+
Restart=on-failure
|
|
52
|
+
RestartSec=60
|
|
53
|
+
KillMode=mixed
|
|
54
|
+
SendSIGKILL=no
|
|
55
|
+
TimeoutStopSec=180
|
|
56
|
+
|
|
57
|
+
[Install]
|
|
58
|
+
WantedBy=default.target
|
|
59
|
+
`, register: [{ command: 'systemctl', args: ['--user', 'daemon-reload'] }],
|
|
60
|
+
start: { command: 'systemctl', args: ['--user', 'enable', '--now', UPDATE_SERVICE_UNIT] } };
|
|
61
|
+
}
|
|
62
|
+
throw new Error('Background updater installation supports macOS, Windows and systemd Linux; use updates run on this platform');
|
|
63
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createHash, createPrivateKey, createPublicKey, sign } from 'node:crypto';
|
|
2
|
+
import { readFile, stat } from 'node:fs/promises';
|
|
3
|
+
import { ReleaseCatalogSchema, assertCatalogEvolution } from '@lucidity/shared';
|
|
4
|
+
import { verifyReleaseManifest } from './releases.js';
|
|
5
|
+
|
|
6
|
+
/** Local release tooling only. Runtime installations receive public keys, never this key. */
|
|
7
|
+
export async function signReleaseCatalog(input: unknown, options: {
|
|
8
|
+
keyId: string; privateKey: string; keys: Record<string, string>;
|
|
9
|
+
artifacts: Record<string, string>; previous?: string; now?: number;
|
|
10
|
+
}): Promise<string> {
|
|
11
|
+
const catalog = ReleaseCatalogSchema.parse(input);
|
|
12
|
+
const key = createPrivateKey(options.privateKey);
|
|
13
|
+
const trusted = options.keys[options.keyId];
|
|
14
|
+
if (key.asymmetricKeyType !== 'ed25519' || !trusted || !createPublicKey(key).export({ type: 'spki', format: 'der' })
|
|
15
|
+
.equals(createPublicKey(trusted).export({ type: 'spki', format: 'der' })))
|
|
16
|
+
throw new Error('Signing key must match a trusted Ed25519 bootstrap key');
|
|
17
|
+
let previous;
|
|
18
|
+
if (options.previous) {
|
|
19
|
+
// Historical catalogs may have expired. Verify their signature and full schema at
|
|
20
|
+
// their issue time; the newly signed catalog must still be fresh now.
|
|
21
|
+
if (Buffer.byteLength(options.previous) > 128 * 1024) throw new Error('Previous catalog exceeds size limit');
|
|
22
|
+
const envelope = JSON.parse(options.previous);
|
|
23
|
+
const issuedAt = JSON.parse(Buffer.from(envelope.payload, 'base64').toString('utf8')).issuedAt;
|
|
24
|
+
previous = verifyReleaseManifest(options.previous, { keys: options.keys, channel: catalog.channel, now: Date.parse(issuedAt) }).manifest;
|
|
25
|
+
if (previous.schema !== 2 || catalog.sequence <= previous.sequence) throw new Error('Catalog sequence must advance from a version-2 predecessor');
|
|
26
|
+
assertCatalogEvolution(previous, catalog);
|
|
27
|
+
} else if (catalog.sequence !== 1) throw new Error('Supply the previous signed catalog after the first sequence');
|
|
28
|
+
for (const daemon of catalog.daemons) {
|
|
29
|
+
if (previous?.daemons.some((entry) => entry.artifact.version === daemon.artifact.version)) continue;
|
|
30
|
+
const release = daemon.artifact, path = options.artifacts[release.version];
|
|
31
|
+
if (!path) throw new Error(`Missing verified archive for ${release.version}`);
|
|
32
|
+
if ((await stat(path)).size !== release.bytes) throw new Error(`Archive size differs for ${release.version}`);
|
|
33
|
+
const digest = createHash('sha512').update(await readFile(path)).digest('base64');
|
|
34
|
+
if (`sha512-${digest}` !== release.integrity) throw new Error(`Archive integrity differs for ${release.version}`);
|
|
35
|
+
}
|
|
36
|
+
const payload = Buffer.from(JSON.stringify(catalog));
|
|
37
|
+
const output = JSON.stringify({ keyId: options.keyId, payload: payload.toString('base64'), signature: sign(null, payload, key).toString('base64') });
|
|
38
|
+
verifyReleaseManifest(output, { keys: options.keys, channel: catalog.channel, now: options.now });
|
|
39
|
+
return output;
|
|
40
|
+
}
|