claude-code-session-manager 0.111.0 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/dist/assets/{AgentLibrary-rBO1daqM.js → AgentLibrary-wvrcLGGS.js} +2 -2
- package/dist/assets/{Button-DsEYRZg0.js → Button-B6h0F0XT.js} +1 -1
- package/dist/assets/{DataModel-D8sbvvBC.js → DataModel-C5pW9E3u.js} +1 -1
- package/dist/assets/{History-BEHLtxia.js → History-BV4e8YOM.js} +2 -2
- package/dist/assets/{Hooks-CKpvlXrg.js → Hooks-CrFSv4x1.js} +3 -3
- package/dist/assets/{Library-CeF4qh9d.js → Library-D-GIt3EY.js} +5 -5
- package/dist/assets/{ListDetail-DcfmxPFk.js → ListDetail-Bco_wfs6.js} +1 -1
- package/dist/assets/{MarkdownEditor-CvK1pyto.js → MarkdownEditor-C-yHSXNV.js} +1 -1
- package/dist/assets/{McpServers-D-h2ihzJ.js → McpServers-CfDekadG.js} +2 -2
- package/dist/assets/{Memory-BnF89x8v.js → Memory-CGGLexkR.js} +4 -4
- package/dist/assets/{Panel-CQY5zano.js → Panel-DGMEuYYG.js} +1 -1
- package/dist/assets/{Permissions-DLukmmsz.js → Permissions-Cx2zjtYZ.js} +3 -3
- package/dist/assets/{Plugins-0Pf0OZ4l.js → Plugins-Bc_W3IyR.js} +2 -2
- package/dist/assets/ProvenanceBadge-DiKAUR1u.js +1 -0
- package/dist/assets/RemoteMachines-8_77-WPD.js +3 -0
- package/dist/assets/{SaveBar-DjijiUb0.js → SaveBar-Blpzdq1R.js} +1 -1
- package/dist/assets/{Scheduler-Cm3EXZvE.js → Scheduler-Bd70AM4X.js} +9 -9
- package/dist/assets/{ScopeSwitcher-B-P-kSfq.js → ScopeSwitcher-wxN0h4YW.js} +1 -1
- package/dist/assets/Settings-CQ7DA3zW.js +4 -0
- package/dist/assets/{SkillReferenceGraph-Epv2GJmj.js → SkillReferenceGraph-DH1NLOiS.js} +1 -1
- package/dist/assets/Skills-CmyRyu4_.js +2 -0
- package/dist/assets/SystemPrompt-KAc3UMCd.js +1 -0
- package/dist/assets/TagLibrary-C8EvHnpg.js +1 -0
- package/dist/assets/{TiptapBody-DAMO3DhO.js → TiptapBody-d423mH6D.js} +1 -1
- package/dist/assets/{Toggle-Ba_f7q_m.js → Toggle-D1wsGE9S.js} +1 -1
- package/dist/assets/{ViewTabs-CGX6MAhc.js → ViewTabs-CjHw3kGY.js} +1 -1
- package/dist/assets/{historyTotals-vgfk8EOL.js → historyTotals-DFHzqLt7.js} +1 -1
- package/dist/assets/{index-CPieAFsl.js → index-Ci1u018F.js} +266 -266
- package/dist/assets/{settingsSchema-D0FxNrTy.js → settingsSchema-Ctf3pZVI.js} +1 -1
- package/dist/assets/{useAgentsDirWatch-DCu6BNYN.js → useAgentsDirWatch-B1NBmOAe.js} +1 -1
- package/dist/assets/{useRemotePeers-D4cdJDyh.js → useRemotePeers-BHjSJs9D.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -2
- package/plugins/CLAUDE.md +5 -8
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +3 -6
- package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +2 -2
- package/plugins/session-manager-dev/skills/builder/SKILL.md +2 -3
- package/plugins/session-manager-dev/skills/develop/SKILL.md +1 -1
- package/plugins/session-manager-dev/skills/develop/standards.md +3 -3
- package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +13 -0
- package/scripts/README.md +3 -3
- package/scripts/audit-ops-hygiene.cjs +4 -4
- package/scripts/hooks/guard-destructive-git.cjs +4 -4
- package/scripts/hooks/guard-inline-implementation.cjs +1 -1
- package/scripts/hooks/guard-prd-writes.cjs +2 -2
- package/scripts/hooks/lib/guard-destructive-git-policy.cjs +1 -1
- package/scripts/mint-epic.cjs +2 -2
- package/scripts/scheduler-mcp-server.cjs +27 -9
- package/src/main/agentLibrary.cjs +5 -5
- package/src/main/agentsIpc.cjs +76 -0
- package/src/main/build-info.json +4 -4
- package/src/main/chatRunner.cjs +30 -13
- package/src/main/config.cjs +20 -3
- package/src/main/crashDiagnostics.cjs +2 -2
- package/src/main/docEdit.cjs +5 -5
- package/src/main/files.cjs +2 -2
- package/src/main/git.cjs +1 -1
- package/src/main/health.cjs +20 -18
- package/src/main/heapSnapshot.cjs +1 -1
- package/src/main/historyAggregator.cjs +2 -2
- package/src/main/index.cjs +50 -132
- package/src/main/ipcSchemas.cjs +13 -10
- package/src/main/lib/CLAUDE.md +48 -0
- package/src/main/lib/activeSessions.cjs +14 -1
- package/src/main/lib/classifyPromptTicket.cjs +2 -2
- package/src/main/lib/{agentModelResolve.cjs → claude/agentModelResolve.cjs} +7 -7
- package/src/main/lib/{claudeBin.cjs → claude/claudeBin.cjs} +4 -4
- package/src/main/lib/{effectiveModelInfo.cjs → claude/effectiveModelInfo.cjs} +9 -9
- package/src/main/lib/{modelCatalog.cjs → claude/modelCatalog.cjs} +3 -3
- package/src/main/lib/claude/rateLimitDetect.cjs +54 -0
- package/src/main/lib/{rateLimitWindow.cjs → claude/rateLimitWindow.cjs} +24 -12
- package/src/main/lib/{runClaudeP.cjs → claude/runClaudeP.cjs} +1 -1
- package/src/main/lib/credentials.cjs +18 -92
- package/src/main/lib/cwdClassify.cjs +1 -1
- package/src/main/lib/{activeIndexMerge.cjs → epic/activeIndexMerge.cjs} +3 -3
- package/src/main/lib/{activeIndexRebuild.cjs → epic/activeIndexRebuild.cjs} +1 -1
- package/src/main/lib/{delegationReadiness.cjs → epic/delegationReadiness.cjs} +21 -29
- package/src/main/lib/{epicContextDigest.cjs → epic/epicContextDigest.cjs} +1 -1
- package/src/main/lib/{epicDelegationStats.cjs → epic/epicDelegationStats.cjs} +2 -2
- package/src/main/lib/{epicMint.cjs → epic/epicMint.cjs} +11 -11
- package/src/main/lib/{epicSpawnPlan.cjs → epic/epicSpawnPlan.cjs} +3 -3
- package/src/main/lib/{epicStatusMirror.cjs → epic/epicStatusMirror.cjs} +2 -2
- package/src/main/lib/{epicTranscriptDiagnostic.cjs → epic/epicTranscriptDiagnostic.cjs} +2 -2
- package/src/main/lib/{epicTranscriptPath.cjs → epic/epicTranscriptPath.cjs} +2 -2
- package/src/main/lib/{epicValidationHook.cjs → epic/epicValidationHook.cjs} +3 -3
- package/src/main/lib/{epicWorktreeBoot.cjs → epic/epicWorktreeBoot.cjs} +1 -1
- package/src/main/lib/{epicWorktreeMerge.cjs → epic/epicWorktreeMerge.cjs} +3 -3
- package/src/main/lib/{epicWorktreeMint.cjs → epic/epicWorktreeMint.cjs} +3 -3
- package/src/main/lib/{epicWorktreeProjectConfig.cjs → epic/epicWorktreeProjectConfig.cjs} +4 -4
- package/src/main/lib/{promptSessionsCreateEpic.cjs → epic/promptSessionsCreateEpic.cjs} +4 -4
- package/src/main/lib/{crossProjectFeedback.cjs → feedback-remote/crossProjectFeedback.cjs} +114 -16
- package/src/main/lib/{customerFeedbackClient.cjs → feedback-remote/customerFeedbackClient.cjs} +3 -3
- package/src/main/lib/{customerFeedbackInbox.cjs → feedback-remote/customerFeedbackInbox.cjs} +2 -2
- package/src/main/lib/{customerFeedbackIpc.cjs → feedback-remote/customerFeedbackIpc.cjs} +1 -1
- package/src/main/lib/feedback-remote/humanPromptLedger.cjs +93 -0
- package/src/main/lib/{localAdminHttp.cjs → feedback-remote/localAdminHttp.cjs} +2 -2
- package/src/main/lib/{macroAdminRoutes.cjs → feedback-remote/macroAdminRoutes.cjs} +1 -1
- package/src/main/lib/{projectHomeAdminRoutes.cjs → feedback-remote/projectHomeAdminRoutes.cjs} +4 -4
- package/src/main/lib/{relayClientAuth.cjs → feedback-remote/relayClientAuth.cjs} +2 -2
- package/src/main/lib/{remoteClientSessions.cjs → feedback-remote/remoteClientSessions.cjs} +1 -1
- package/src/main/lib/{gitWorktree.cjs → git/gitWorktree.cjs} +7 -7
- package/src/main/lib/historyRollup.cjs +1 -1
- package/src/main/lib/importReferences.cjs +1 -1
- package/src/main/lib/machineProfile.cjs +1 -1
- package/src/main/lib/mcpToolCatalog.cjs +9 -3
- package/src/main/lib/openExternalApp.cjs +1 -1
- package/src/main/lib/opsOwnership.cjs +3 -3
- package/src/main/lib/{agentPersonaSchema.cjs → persona-macro/agentPersonaSchema.cjs} +2 -2
- package/src/main/lib/{macroLibrary.cjs → persona-macro/macroLibrary.cjs} +5 -5
- package/src/main/lib/{personaMerge.cjs → persona-macro/personaMerge.cjs} +4 -4
- package/src/main/lib/{depSlugResolve.cjs → prd/depSlugResolve.cjs} +16 -1
- package/src/main/lib/{prdAdminRoutes.cjs → prd/prdAdminRoutes.cjs} +7 -7
- package/src/main/lib/{prdAgentType.cjs → prd/prdAgentType.cjs} +3 -3
- package/src/main/lib/{prdCreate.cjs → prd/prdCreate.cjs} +12 -12
- package/src/main/lib/{prdDeclaredPaths.cjs → prd/prdDeclaredPaths.cjs} +1 -1
- package/src/main/lib/{prdGateFiles.cjs → prd/prdGateFiles.cjs} +1 -1
- package/src/main/lib/{prdLocations.cjs → prd/prdLocations.cjs} +2 -2
- package/src/main/lib/{prdMigration.cjs → prd/prdMigration.cjs} +3 -3
- package/src/main/lib/prereqs.cjs +2 -2
- package/src/main/lib/{instanceLock.cjs → process/instanceLock.cjs} +4 -11
- package/src/main/lib/{pidAlive.cjs → process/pidAlive.cjs} +1 -1
- package/src/main/lib/{procName.cjs → process/procName.cjs} +2 -2
- package/src/main/lib/{timeoutShim.cjs → process/timeoutShim.cjs} +1 -1
- package/src/main/lib/projectRootResolve.cjs +1 -1
- package/src/main/lib/promptSessionSchema.cjs +1 -1
- package/src/main/lib/{definitionOfDone.cjs → scheduler/definitionOfDone.cjs} +6 -12
- package/src/main/lib/scheduler/finalizeReason.cjs +30 -0
- package/src/main/lib/{fixChainDepth.cjs → scheduler/fixChainDepth.cjs} +1 -1
- package/src/main/lib/scheduler/flatSweepThrottle.cjs +17 -0
- package/src/main/lib/{jobDirtFilter.cjs → scheduler/jobDirtFilter.cjs} +1 -1
- package/src/main/lib/{jobSupervisorRecord.cjs → scheduler/jobSupervisorRecord.cjs} +1 -1
- package/src/main/lib/{launchFailure.cjs → scheduler/launchFailure.cjs} +2 -2
- package/src/main/lib/{queueStore.cjs → scheduler/queueStore.cjs} +6 -6
- package/src/main/lib/{quietMachineLease.cjs → scheduler/quietMachineLease.cjs} +1 -1
- package/src/main/lib/{rcaReport.cjs → scheduler/rcaReport.cjs} +4 -4
- package/src/main/lib/{reaperHelpers.cjs → scheduler/reaperHelpers.cjs} +3 -3
- package/src/main/lib/{reservationExpiry.cjs → scheduler/reservationExpiry.cjs} +4 -11
- package/src/main/lib/{reviewNotice.cjs → scheduler/reviewNotice.cjs} +1 -1
- package/src/main/lib/{runLogRetention.cjs → scheduler/runLogRetention.cjs} +34 -13
- package/src/main/lib/{scheduleJobTransitions.cjs → scheduler/scheduleJobTransitions.cjs} +3 -3
- package/src/main/lib/{schedulerBatch.cjs → scheduler/schedulerBatch.cjs} +9 -13
- package/src/main/lib/{schedulerConfig.cjs → scheduler/schedulerConfig.cjs} +1 -1
- package/src/main/lib/{schedulerRuntimeState.cjs → scheduler/schedulerRuntimeState.cjs} +1 -1
- package/src/main/lib/{sessionSlots.cjs → scheduler/sessionSlots.cjs} +2 -2
- package/src/main/lib/{upgradeDrain.cjs → scheduler/upgradeDrain.cjs} +8 -11
- package/src/main/lib/{watchdogHelpers.cjs → scheduler/watchdogHelpers.cjs} +5 -19
- package/src/main/lib/{auditLog.cjs → telemetry/auditLog.cjs} +1 -1
- package/src/main/lib/{opsErrorLog.cjs → telemetry/opsErrorLog.cjs} +4 -4
- package/src/main/lib/{telemetryBacklog.cjs → telemetry/telemetryBacklog.cjs} +4 -4
- package/src/main/lib/{telemetryBoot.cjs → telemetry/telemetryBoot.cjs} +1 -1
- package/src/main/lib/{telemetryClient.cjs → telemetry/telemetryClient.cjs} +12 -8
- package/src/main/lib/{telemetrySettings.cjs → telemetry/telemetrySettings.cjs} +1 -1
- package/src/main/lib/{atomicFs.cjs → util/atomicFs.cjs} +42 -0
- package/src/main/lib/{loopDelay.cjs → util/loopDelay.cjs} +1 -1
- package/src/main/logs.cjs +1 -1
- package/src/main/mcpStatus.cjs +2 -2
- package/src/main/memoryAggregate.cjs +3 -3
- package/src/main/memoryTool.cjs +1 -1
- package/src/main/otel.cjs +2 -2
- package/src/main/pluginInstall.cjs +29 -3
- package/src/main/projectBrief.cjs +6 -6
- package/src/main/projectPages.cjs +1 -1
- package/src/main/promptSessionEvents.cjs +2 -2
- package/src/main/pty.cjs +7 -7
- package/src/main/queueOps.cjs +6 -6
- package/src/main/remoteClient.cjs +4 -4
- package/src/main/remoteClientIpc.cjs +1 -1
- package/src/main/runVerify.cjs +6 -3
- package/src/main/scheduler/CLAUDE.md +26 -0
- package/src/main/scheduler/budget.cjs +576 -0
- package/src/main/scheduler/gitTreeGuard.cjs +672 -0
- package/src/main/scheduler/prdParser.cjs +4 -4
- package/src/main/scheduler/prdPaths.cjs +487 -0
- package/src/main/scheduler/reviewLadder.cjs +1011 -0
- package/src/main/scheduler/starvation.cjs +390 -0
- package/src/main/scheduler.cjs +331 -3320
- package/src/main/seedAgentPersonas.cjs +5 -5
- package/src/main/seedDevPlugin.cjs +70 -3
- package/src/main/seedSchedulerMcp.cjs +2 -2
- package/src/main/supervisor.cjs +50 -27
- package/src/main/telemetryIpc.cjs +51 -0
- package/src/main/transcripts.cjs +3 -3
- package/src/main/updaterIpc.cjs +1 -1
- package/src/main/usage.cjs +1 -1
- package/src/main/watchers.cjs +1 -1
- package/src/main/webRemote.cjs +22 -7
- package/src/preload/api.d.ts +14 -8
- package/src/preload/index.cjs +9 -3
- package/dist/assets/ProvenanceBadge-vC7Tj-JP.js +0 -1
- package/dist/assets/RemoteMachines-CWnKbFHc.js +0 -3
- package/dist/assets/Settings-DYDlp2m_.js +0 -4
- package/dist/assets/Skills-DHO0N0C2.js +0 -2
- package/dist/assets/SystemPrompt-DxeNofL9.js +0 -1
- package/dist/assets/TagLibrary-QOAs7ISO.js +0 -1
- package/plugins/session-manager-dev/skills/blog-for-project-feature/0-select/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/blog-for-project-feature/1-research/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/blog-for-project-feature/2-storyboard/SKILL.md +0 -64
- package/plugins/session-manager-dev/skills/blog-for-project-feature/3-capture/SKILL.md +0 -52
- package/plugins/session-manager-dev/skills/blog-for-project-feature/4-draft-copy/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/blog-for-project-feature/5-illustrate/SKILL.md +0 -50
- package/plugins/session-manager-dev/skills/blog-for-project-feature/6-compose/SKILL.md +0 -51
- package/plugins/session-manager-dev/skills/blog-for-project-feature/7-review/SKILL.md +0 -54
- package/plugins/session-manager-dev/skills/blog-for-project-feature/SKILL.md +0 -144
- package/plugins/session-manager-dev/skills/blog-for-project-feature/feature.config.yaml +0 -90
- package/plugins/session-manager-dev/skills/discover-features/SKILL.md +0 -95
- package/plugins/session-manager-dev/skills/explain-to-me/SKILL.md +0 -205
- package/plugins/session-manager-dev/skills/explain-to-me/assets/style-reference.html +0 -163
- package/plugins/session-manager-dev/skills/find-opportunity/SKILL.md +0 -83
- package/plugins/session-manager-dev/skills/issue-address/0-select/0-fetch-pool/SKILL.md +0 -38
- package/plugins/session-manager-dev/skills/issue-address/0-select/1-reject-fixed/SKILL.md +0 -64
- package/plugins/session-manager-dev/skills/issue-address/0-select/2-reject-claimed/SKILL.md +0 -71
- package/plugins/session-manager-dev/skills/issue-address/0-select/3-rank-impact/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/issue-address/0-select/SKILL.md +0 -75
- package/plugins/session-manager-dev/skills/issue-address/1-confirm-open/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/issue-address/2-claim/SKILL.md +0 -57
- package/plugins/session-manager-dev/skills/issue-address/3-reproduce/SKILL.md +0 -40
- package/plugins/session-manager-dev/skills/issue-address/4-fix/SKILL.md +0 -33
- package/plugins/session-manager-dev/skills/issue-address/5-verify/SKILL.md +0 -40
- package/plugins/session-manager-dev/skills/issue-address/SKILL.md +0 -120
- package/plugins/session-manager-dev/skills/local-project-health/SKILL.md +0 -58
- package/plugins/session-manager-dev/skills/memory-sanitation/SKILL.md +0 -147
- package/plugins/session-manager-dev/skills/ops-sweep/SKILL.md +0 -137
- package/plugins/session-manager-dev/skills/pr-review-sweep/0-fetch/SKILL.md +0 -41
- package/plugins/session-manager-dev/skills/pr-review-sweep/1-classify/SKILL.md +0 -56
- package/plugins/session-manager-dev/skills/pr-review-sweep/2-check-fixed/SKILL.md +0 -49
- package/plugins/session-manager-dev/skills/pr-review-sweep/3-queue/SKILL.md +0 -57
- package/plugins/session-manager-dev/skills/pr-review-sweep/4-land-and-resolve/SKILL.md +0 -60
- package/plugins/session-manager-dev/skills/pr-review-sweep/SKILL.md +0 -124
- package/plugins/session-manager-dev/skills/pr-signal/SKILL.md +0 -67
- package/plugins/session-manager-dev/skills/project-status/SKILL.md +0 -243
- package/plugins/session-manager-dev/skills/requesting-code-review/SKILL.md +0 -98
- package/plugins/session-manager-dev/skills/requesting-code-review/code-reviewer.md +0 -146
- package/src/main/lib/rateLimitDetect.cjs +0 -35
- /package/src/main/lib/{agentEffortResolve.cjs → claude/agentEffortResolve.cjs} +0 -0
- /package/src/main/lib/{claudeCliCaps.cjs → claude/claudeCliCaps.cjs} +0 -0
- /package/src/main/lib/{usageCircuit.cjs → claude/usageCircuit.cjs} +0 -0
- /package/src/main/lib/{epicSpawnCwd.cjs → epic/epicSpawnCwd.cjs} +0 -0
- /package/src/main/lib/{customerFeedbackAdminRoutes.cjs → feedback-remote/customerFeedbackAdminRoutes.cjs} +0 -0
- /package/src/main/lib/{remoteE2eCrypto.cjs → feedback-remote/remoteE2eCrypto.cjs} +0 -0
- /package/src/main/lib/{branchSweep.cjs → git/branchSweep.cjs} +0 -0
- /package/src/main/lib/{gitExec.cjs → git/gitExec.cjs} +0 -0
- /package/src/main/lib/{jobWorktree.cjs → git/jobWorktree.cjs} +0 -0
- /package/src/main/lib/{jobWorktreeBootLive.cjs → git/jobWorktreeBootLive.cjs} +0 -0
- /package/src/main/lib/{jobWorktreeTerminalOrphanLive.cjs → git/jobWorktreeTerminalOrphanLive.cjs} +0 -0
- /package/src/main/lib/{builtinMacros.cjs → persona-macro/builtinMacros.cjs} +0 -0
- /package/src/main/lib/{personaImportHealth.cjs → persona-macro/personaImportHealth.cjs} +0 -0
- /package/src/main/lib/{shippedPersonaSeeds.cjs → persona-macro/shippedPersonaSeeds.cjs} +0 -0
- /package/src/main/lib/{planValidator.cjs → prd/planValidator.cjs} +0 -0
- /package/src/main/lib/{prdAuthoringSeed.cjs → prd/prdAuthoringSeed.cjs} +0 -0
- /package/src/main/lib/{prdDisposition.cjs → prd/prdDisposition.cjs} +0 -0
- /package/src/main/lib/{prdFrontmatter.cjs → prd/prdFrontmatter.cjs} +0 -0
- /package/src/main/lib/{prdSizing.cjs → prd/prdSizing.cjs} +0 -0
- /package/src/main/lib/{workTypeLibrary.cjs → prd/workTypeLibrary.cjs} +0 -0
- /package/src/main/lib/{childWithLog.cjs → process/childWithLog.cjs} +0 -0
- /package/src/main/lib/{cleanEnv.cjs → process/cleanEnv.cjs} +0 -0
- /package/src/main/lib/{defaultShell.cjs → process/defaultShell.cjs} +0 -0
- /package/src/main/lib/{killTree.cjs → process/killTree.cjs} +0 -0
- /package/src/main/lib/{loginShellPath.cjs → process/loginShellPath.cjs} +0 -0
- /package/src/main/lib/{procIdentity.cjs → process/procIdentity.cjs} +0 -0
- /package/src/main/lib/{singleInstanceGuard.cjs → process/singleInstanceGuard.cjs} +0 -0
- /package/src/main/lib/{smProcNames.cjs → process/smProcNames.cjs} +0 -0
- /package/src/main/lib/{timeoutShimScript.cjs → process/timeoutShimScript.cjs} +0 -0
- /package/src/main/lib/{winSpawn.cjs → process/winSpawn.cjs} +0 -0
- /package/src/main/lib/{adoptedRunSupervisor.cjs → scheduler/adoptedRunSupervisor.cjs} +0 -0
- /package/src/main/lib/{dispatchLoop.cjs → scheduler/dispatchLoop.cjs} +0 -0
- /package/src/main/lib/{dodDrainHook.cjs → scheduler/dodDrainHook.cjs} +0 -0
- /package/src/main/lib/{fixPlanSlug.cjs → scheduler/fixPlanSlug.cjs} +0 -0
- /package/src/main/lib/{gateAuthority.cjs → scheduler/gateAuthority.cjs} +0 -0
- /package/src/main/lib/{landedSinceRun.cjs → scheduler/landedSinceRun.cjs} +0 -0
- /package/src/main/lib/{loadGate.cjs → scheduler/loadGate.cjs} +0 -0
- /package/src/main/lib/{needsReviewLedger.cjs → scheduler/needsReviewLedger.cjs} +0 -0
- /package/src/main/lib/{queueHealth.cjs → scheduler/queueHealth.cjs} +0 -0
- /package/src/main/lib/{queueHistory.cjs → scheduler/queueHistory.cjs} +0 -0
- /package/src/main/lib/{scheduleJobSchema.cjs → scheduler/scheduleJobSchema.cjs} +0 -0
- /package/src/main/lib/{schedulerPaths.cjs → scheduler/schedulerPaths.cjs} +0 -0
- /package/src/main/lib/{terminalRunOutcome.cjs → scheduler/terminalRunOutcome.cjs} +0 -0
- /package/src/main/lib/{validationSentinels.cjs → scheduler/validationSentinels.cjs} +0 -0
- /package/src/main/lib/{crashTelemetry.cjs → telemetry/crashTelemetry.cjs} +0 -0
- /package/src/main/lib/{otlpTraceExporter.cjs → telemetry/otlpTraceExporter.cjs} +0 -0
- /package/src/main/lib/{telemetryConsent.cjs → telemetry/telemetryConsent.cjs} +0 -0
- /package/src/main/lib/{telemetryCounters.cjs → telemetry/telemetryCounters.cjs} +0 -0
- /package/src/main/lib/{encodeCwd.cjs → util/encodeCwd.cjs} +0 -0
- /package/src/main/lib/{expandHome.cjs → util/expandHome.cjs} +0 -0
- /package/src/main/lib/{extractJson.cjs → util/extractJson.cjs} +0 -0
- /package/src/main/lib/{fileTail.cjs → util/fileTail.cjs} +0 -0
- /package/src/main/lib/{headTailBuffer.cjs → util/headTailBuffer.cjs} +0 -0
- /package/src/main/lib/{kebabCase.cjs → util/kebabCase.cjs} +0 -0
- /package/src/main/lib/{lruCache.cjs → util/lruCache.cjs} +0 -0
- /package/src/main/lib/{withTimeout.cjs → util/withTimeout.cjs} +0 -0
|
@@ -105,7 +105,49 @@ function readJsonOrSync(file, fallback) {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
function defaultIsPidAlive(pid) {
|
|
109
|
+
try {
|
|
110
|
+
process.kill(pid, 0);
|
|
111
|
+
return true;
|
|
112
|
+
} catch (e) {
|
|
113
|
+
return e?.code === 'EPERM'; // exists but owned by someone else
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Remove orphaned `<file>.tmp-<pid>-<ts>-<rand>` files left by crashed
|
|
119
|
+
* writers. Direct children of `dir` only (no recursion); a file goes only when
|
|
120
|
+
* its mtime is older than `olderThanMs` AND its embedded pid is not alive.
|
|
121
|
+
* `.corrupt-*` / `.bak*` forensics never match. Never throws.
|
|
122
|
+
*/
|
|
123
|
+
function sweepStaleTmpFiles(dir, { olderThanMs = 3600000, isPidAlive = defaultIsPidAlive } = {}) {
|
|
124
|
+
const removed = [];
|
|
125
|
+
let names;
|
|
126
|
+
try {
|
|
127
|
+
names = fs.readdirSync(dir);
|
|
128
|
+
} catch {
|
|
129
|
+
return { removed };
|
|
130
|
+
}
|
|
131
|
+
const now = Date.now();
|
|
132
|
+
for (const name of names) {
|
|
133
|
+
try {
|
|
134
|
+
const m = /\.tmp-(\d+)-/.exec(name);
|
|
135
|
+
if (!m) continue;
|
|
136
|
+
if (/\.(corrupt|bak)/.test(name)) continue;
|
|
137
|
+
const full = path.join(dir, name);
|
|
138
|
+
const st = fs.lstatSync(full);
|
|
139
|
+
if (!st.isFile()) continue;
|
|
140
|
+
if (now - st.mtimeMs <= olderThanMs) continue;
|
|
141
|
+
if (isPidAlive(Number(m[1]))) continue;
|
|
142
|
+
fs.unlinkSync(full);
|
|
143
|
+
removed.push(full);
|
|
144
|
+
} catch { /* per-file errors are skipped */ }
|
|
145
|
+
}
|
|
146
|
+
return { removed };
|
|
147
|
+
}
|
|
148
|
+
|
|
108
149
|
module.exports = {
|
|
150
|
+
sweepStaleTmpFiles,
|
|
109
151
|
tmpPathFor,
|
|
110
152
|
writeTextAtomic,
|
|
111
153
|
writeTextAtomicSync,
|
|
@@ -11,7 +11,7 @@ const { monitorEventLoopDelay } = require('node:perf_hooks');
|
|
|
11
11
|
|
|
12
12
|
const LOOP_DELAY_RESOLUTION_MS = 20;
|
|
13
13
|
// A single beat whose worst loop delay exceeds this is a visible main-thread stall.
|
|
14
|
-
const LOOP_STALL_WARN_MS =
|
|
14
|
+
const LOOP_STALL_WARN_MS = 1000;
|
|
15
15
|
|
|
16
16
|
const NS_PER_MS = 1e6;
|
|
17
17
|
const toMs = (ns) => Math.round(ns / NS_PER_MS * 10) / 10;
|
package/src/main/logs.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { app, ipcMain } = require('electron');
|
|
2
2
|
const fs = require('node:fs');
|
|
3
3
|
const path = require('node:path');
|
|
4
|
-
const opsErrorLog = require('./lib/opsErrorLog.cjs');
|
|
4
|
+
const opsErrorLog = require('./lib/telemetry/opsErrorLog.cjs');
|
|
5
5
|
|
|
6
6
|
// Rolling daily files under <userData>/logs/. Anything mtime'd older than
|
|
7
7
|
// RETENTION_MS is pruned at boot; we never compact mid-session, since the
|
package/src/main/mcpStatus.cjs
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const { spawn } = require('node:child_process');
|
|
13
|
-
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claudeBin.cjs');
|
|
14
|
-
const { withProcRole } = require('./lib/cleanEnv.cjs');
|
|
13
|
+
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claude/claudeBin.cjs');
|
|
14
|
+
const { withProcRole } = require('./lib/process/cleanEnv.cjs');
|
|
15
15
|
|
|
16
16
|
const PROBE_TIMEOUT_MS = 30_000;
|
|
17
17
|
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
const { ipcMain } = require('electron');
|
|
23
23
|
const path = require('node:path');
|
|
24
24
|
const os = require('node:os');
|
|
25
|
-
const { encodeCwd } = require('./lib/encodeCwd.cjs');
|
|
26
|
-
const { extractJson } = require('./lib/extractJson.cjs');
|
|
27
|
-
const { runClaudeP } = require('./lib/runClaudeP.cjs');
|
|
25
|
+
const { encodeCwd } = require('./lib/util/encodeCwd.cjs');
|
|
26
|
+
const { extractJson } = require('./lib/util/extractJson.cjs');
|
|
27
|
+
const { runClaudeP } = require('./lib/claude/runClaudeP.cjs');
|
|
28
28
|
const { writeJson } = require('./config.cjs');
|
|
29
29
|
const config = require('./config.cjs');
|
|
30
30
|
const { opsPath } = require('./lib/opsOwnership.cjs');
|
package/src/main/memoryTool.cjs
CHANGED
|
@@ -36,7 +36,7 @@ const { scoreMemories } = require('./lib/memoryStale.cjs');
|
|
|
36
36
|
const MAX_FILE_BYTES = 1024 * 1024; // 1 MiB
|
|
37
37
|
const MAX_ENTRIES = 1000;
|
|
38
38
|
|
|
39
|
-
const { encodeCwd: encodeWorkspace } = require('./lib/encodeCwd.cjs');
|
|
39
|
+
const { encodeCwd: encodeWorkspace } = require('./lib/util/encodeCwd.cjs');
|
|
40
40
|
|
|
41
41
|
function memoryRoot() {
|
|
42
42
|
return path.join(os.homedir(), '.claude', 'projects');
|
package/src/main/otel.cjs
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* plan text, and agent prompts are excluded unless `includeContent` is on
|
|
9
9
|
* (matches upstream OTEL_LOG_USER_PROMPTS opt-in).
|
|
10
10
|
*
|
|
11
|
-
* Spans are POSTed as OTLP/HTTP JSON by lib/otlpTraceExporter.cjs (zero
|
|
11
|
+
* Spans are POSTed as OTLP/HTTP JSON by lib/telemetry/otlpTraceExporter.cjs (zero
|
|
12
12
|
* dependencies). recordSpan() only queues; the exporter batches/sends on its
|
|
13
13
|
* own unref()'d timer, so we never block the transcript flush. The app must
|
|
14
14
|
* keep working without telemetry: a failed export is surfaced, never thrown.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const otelSettings = require('./otelSettings.cjs');
|
|
18
|
-
const { createOtlpTraceExporter } = require('./lib/otlpTraceExporter.cjs');
|
|
18
|
+
const { createOtlpTraceExporter } = require('./lib/telemetry/otlpTraceExporter.cjs');
|
|
19
19
|
|
|
20
20
|
let exporter = null;
|
|
21
21
|
let enabled = false;
|
|
@@ -30,8 +30,8 @@ try {
|
|
|
30
30
|
const path = require('node:path');
|
|
31
31
|
const os = require('node:os');
|
|
32
32
|
const fs = require('node:fs');
|
|
33
|
-
const { cleanChildEnv, pathWithUserBins } = require('./lib/cleanEnv.cjs');
|
|
34
|
-
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claudeBin.cjs');
|
|
33
|
+
const { cleanChildEnv, pathWithUserBins } = require('./lib/process/cleanEnv.cjs');
|
|
34
|
+
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claude/claudeBin.cjs');
|
|
35
35
|
const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
36
36
|
const { schemas } = require('./ipcSchemas.cjs');
|
|
37
37
|
|
|
@@ -229,6 +229,32 @@ async function install({ slug, marketplace }) {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Refresh an already-installed plugin to the marketplace's current version.
|
|
234
|
+
* Subcommands confirmed from `claude plugin marketplace --help` / `claude plugin --help`:
|
|
235
|
+
* `claude plugin marketplace update <name>` then `claude plugin update <slug>@<name>`.
|
|
236
|
+
* Same pty spawn path as install(); no shell.
|
|
237
|
+
*/
|
|
238
|
+
async function update({ slug, marketplaceName }) {
|
|
239
|
+
if (typeof slug !== 'string' || !SLUG_RE.test(slug) || slug.length > 128 ||
|
|
240
|
+
typeof marketplaceName !== 'string' || !MKT_NAME_RE.test(marketplaceName) || marketplaceName.length > 128) {
|
|
241
|
+
return { ok: false, exitCode: -1, error: 'invalid slug or marketplace' };
|
|
242
|
+
}
|
|
243
|
+
if (inFlight.has(slug)) {
|
|
244
|
+
return { ok: false, exitCode: -1, error: 'install already in progress' };
|
|
245
|
+
}
|
|
246
|
+
inFlight.set(slug, null);
|
|
247
|
+
const register = (proc) => inFlight.set(slug, proc);
|
|
248
|
+
const unregister = () => inFlight.set(slug, null);
|
|
249
|
+
try {
|
|
250
|
+
const refreshed = await runStep({ slug, args: ['plugin', 'marketplace', 'update', marketplaceName], register, unregister });
|
|
251
|
+
if (!refreshed.ok) return refreshed;
|
|
252
|
+
return await runStep({ slug, args: ['plugin', 'update', `${slug}@${marketplaceName}`], register, unregister });
|
|
253
|
+
} finally {
|
|
254
|
+
inFlight.delete(slug);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
232
258
|
function registerPluginInstallHandlers() {
|
|
233
259
|
ipcMain.handle('plugins:install', async (_e, payload) => {
|
|
234
260
|
// safeParse to preserve the existing `{ ok:false, exitCode:-1, error }`
|
|
@@ -257,4 +283,4 @@ function registerPluginInstallHandlers() {
|
|
|
257
283
|
});
|
|
258
284
|
}
|
|
259
285
|
|
|
260
|
-
module.exports = { registerPluginInstallHandlers, attachWindow, install, bundledMarketplaceDir };
|
|
286
|
+
module.exports = { registerPluginInstallHandlers, attachWindow, install, update, bundledMarketplaceDir };
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* surfaces (PRDs 838/840) read it via `projectBrief:get` and trigger
|
|
10
10
|
* synthesis via `projectBrief:refresh`; this file is backend + preload only.
|
|
11
11
|
*
|
|
12
|
-
* Spawn pattern mirrors memoryAggregate.cjs (via the shared lib/runClaudeP.cjs
|
|
12
|
+
* Spawn pattern mirrors memoryAggregate.cjs (via the shared lib/claude/runClaudeP.cjs
|
|
13
13
|
* helper it was extracted from): cost-gated (only fires on explicit
|
|
14
14
|
* `refresh`), stdin closed, model pinned, hard timeout, SM_KG_INTERNAL=1 so
|
|
15
15
|
* the prompt-logging hook skips it, brace-matching JSON extraction. Slot
|
|
16
16
|
* pool: every refresh acquires a machine session slot from
|
|
17
|
-
* lib/sessionSlots.cjs first (the same ≤3 `claude -p` pool scheduler jobs
|
|
17
|
+
* lib/scheduler/sessionSlots.cjs first (the same ≤3 `claude -p` pool scheduler jobs
|
|
18
18
|
* and chat runs already share) and releases it in a finally.
|
|
19
19
|
*/
|
|
20
20
|
|
|
@@ -24,10 +24,10 @@ const { spawn } = require('node:child_process');
|
|
|
24
24
|
const path = require('node:path');
|
|
25
25
|
const os = require('node:os');
|
|
26
26
|
const config = require('./config.cjs');
|
|
27
|
-
const { encodeCwd } = require('./lib/encodeCwd.cjs');
|
|
28
|
-
const { extractJson } = require('./lib/extractJson.cjs');
|
|
29
|
-
const { runClaudeP } = require('./lib/runClaudeP.cjs');
|
|
30
|
-
const sessionSlots = require('./lib/sessionSlots.cjs');
|
|
27
|
+
const { encodeCwd } = require('./lib/util/encodeCwd.cjs');
|
|
28
|
+
const { extractJson } = require('./lib/util/extractJson.cjs');
|
|
29
|
+
const { runClaudeP } = require('./lib/claude/runClaudeP.cjs');
|
|
30
|
+
const sessionSlots = require('./lib/scheduler/sessionSlots.cjs');
|
|
31
31
|
const core = require('./lib/projectBriefCore.cjs');
|
|
32
32
|
|
|
33
33
|
// Pinned explicitly per the automation model-pinning rule — same alias style
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `session-manager-operations/project-pages/`: `home.html` (written by the
|
|
7
7
|
* `project_home_write` admin route) and `demo-video/index.html` (written by
|
|
8
8
|
* the `project_demo_video_write` admin route) — both in
|
|
9
|
-
* lib/projectHomeAdminRoutes.cjs. This module only reads them: get() returns
|
|
9
|
+
* lib/feedback-remote/projectHomeAdminRoutes.cjs. This module only reads them: get() returns
|
|
10
10
|
* home.html's content plus the demo video's { path, mtimeMs }, and a
|
|
11
11
|
* refcounted per-cwd watcher pushes `project-pages:changed` for either. It
|
|
12
12
|
* never writes content (watch()'s mkdir creates an empty directory only).
|
|
@@ -16,10 +16,10 @@ const config = require('./config.cjs');
|
|
|
16
16
|
// activeIndexPath/withPathLock come from epicMint.cjs so this module's
|
|
17
17
|
// read-modify-write of active-index.json (appendResponseEventIfKnown, below)
|
|
18
18
|
// serializes through the EXACT SAME lock instance as ensureEpic/
|
|
19
|
-
// appendPrdCreatedEvent and lib/activeIndexMerge.cjs's mergeActiveIndex — one
|
|
19
|
+
// appendPrdCreatedEvent and lib/epic/activeIndexMerge.cjs's mergeActiveIndex — one
|
|
20
20
|
// lock across all three writers of this file, not three independent maps
|
|
21
21
|
// that could still interleave a stale read-modify-write past each other.
|
|
22
|
-
const { activeIndexPath: promptSessionActiveIndexPath, withPathLock } = require('./lib/epicMint.cjs');
|
|
22
|
+
const { activeIndexPath: promptSessionActiveIndexPath, withPathLock } = require('./lib/epic/epicMint.cjs');
|
|
23
23
|
|
|
24
24
|
// IPC channel broadcast whenever an event is appended to a PromptSession's
|
|
25
25
|
// chain from the main process (currently only the scheduler's response-event
|
package/src/main/pty.cjs
CHANGED
|
@@ -17,15 +17,15 @@ const path = require('node:path');
|
|
|
17
17
|
const os = require('node:os');
|
|
18
18
|
const fs = require('node:fs');
|
|
19
19
|
const { addAllowedRoot } = require('./config.cjs');
|
|
20
|
-
const { aliasedShellBin } = require('./lib/smProcNames.cjs');
|
|
21
|
-
const { cleanChildEnv, pathWithUserBins } = require('./lib/cleanEnv.cjs');
|
|
20
|
+
const { aliasedShellBin } = require('./lib/process/smProcNames.cjs');
|
|
21
|
+
const { cleanChildEnv, pathWithUserBins } = require('./lib/process/cleanEnv.cjs');
|
|
22
22
|
const { checkInsideHome } = require('./lib/insideHome.cjs');
|
|
23
|
-
const { defaultShell } = require('./lib/defaultShell.cjs');
|
|
23
|
+
const { defaultShell } = require('./lib/process/defaultShell.cjs');
|
|
24
24
|
const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
25
|
-
const opsErrorLog = require('./lib/opsErrorLog.cjs');
|
|
26
|
-
const { planEpicSpawn } = require('./lib/epicSpawnPlan.cjs');
|
|
27
|
-
const { resolveEpicSpawnCwd } = require('./lib/epicSpawnCwd.cjs');
|
|
28
|
-
const telemetryCounters = require('./lib/telemetryCounters.cjs');
|
|
25
|
+
const opsErrorLog = require('./lib/telemetry/opsErrorLog.cjs');
|
|
26
|
+
const { planEpicSpawn } = require('./lib/epic/epicSpawnPlan.cjs');
|
|
27
|
+
const { resolveEpicSpawnCwd } = require('./lib/epic/epicSpawnCwd.cjs');
|
|
28
|
+
const telemetryCounters = require('./lib/telemetry/telemetryCounters.cjs');
|
|
29
29
|
|
|
30
30
|
// Absolute path to the installed package root (src/main/ -> ../../), shown in
|
|
31
31
|
// the remediation message so the user can cd there and rebuild.
|
package/src/main/queueOps.cjs
CHANGED
|
@@ -36,11 +36,11 @@ const { ipcMain } = require('electron');
|
|
|
36
36
|
const { SCHEDULE_SLUG_RE: SLUG_RE, schemas } = require('./ipcSchemas.cjs');
|
|
37
37
|
const logs = require('./logs.cjs');
|
|
38
38
|
const config = require('./config.cjs');
|
|
39
|
-
const { expandHome } = require('./lib/expandHome.cjs');
|
|
40
|
-
const { HISTORY_RETENTION_MS } = require('./lib/schedulerConfig.cjs');
|
|
41
|
-
const schedulerPaths = require('./lib/schedulerPaths.cjs');
|
|
39
|
+
const { expandHome } = require('./lib/util/expandHome.cjs');
|
|
40
|
+
const { HISTORY_RETENTION_MS } = require('./lib/scheduler/schedulerConfig.cjs');
|
|
41
|
+
const schedulerPaths = require('./lib/scheduler/schedulerPaths.cjs');
|
|
42
42
|
|
|
43
|
-
// Lazy: resolved via lib/schedulerPaths.cjs at each use (SM_SCHEDULER_HOME).
|
|
43
|
+
// Lazy: resolved via lib/scheduler/schedulerPaths.cjs at each use (SM_SCHEDULER_HOME).
|
|
44
44
|
const prdsArchiveDir = () => path.join(schedulerPaths.scheduledPlansRoot(), 'prds-archived');
|
|
45
45
|
|
|
46
46
|
// ────────────────────────────────────────────── lint rules
|
|
@@ -125,8 +125,8 @@ const INTERACTIVE_AC_PATTERNS = [
|
|
|
125
125
|
},
|
|
126
126
|
];
|
|
127
127
|
|
|
128
|
-
const { splitFrontmatter } = require('./lib/prdFrontmatter.cjs');
|
|
129
|
-
const { resolvePrdsDirs, resolvePrdWriteDir, listEpicPrdDirs } = require('./lib/prdLocations.cjs');
|
|
128
|
+
const { splitFrontmatter } = require('./lib/prd/prdFrontmatter.cjs');
|
|
129
|
+
const { resolvePrdsDirs, resolvePrdWriteDir, listEpicPrdDirs } = require('./lib/prd/prdLocations.cjs');
|
|
130
130
|
|
|
131
131
|
// PRD 808: PRDS_DIR is now the LEGACY global dir — kept as a migration
|
|
132
132
|
// source and search fallback for not-yet-migrated files. Live PRDs resolve
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
const crypto = require('node:crypto');
|
|
9
9
|
const path = require('node:path');
|
|
10
|
-
const { claudeHome } = require('./lib/schedulerPaths.cjs');
|
|
11
|
-
const { writeJsonAtomicSync, readJsonOrSync } = require('./lib/atomicFs.cjs');
|
|
12
|
-
const { generateE2EKeyPair, deriveSessionKey, deriveSas, encryptBox, decryptBox } = require('./lib/remoteE2eCrypto.cjs');
|
|
10
|
+
const { claudeHome } = require('./lib/scheduler/schedulerPaths.cjs');
|
|
11
|
+
const { writeJsonAtomicSync, readJsonOrSync } = require('./lib/util/atomicFs.cjs');
|
|
12
|
+
const { generateE2EKeyPair, deriveSessionKey, deriveSas, encryptBox, decryptBox } = require('./lib/feedback-remote/remoteE2eCrypto.cjs');
|
|
13
13
|
const { ALLOWED_COMMANDS } = require('./ipcSchemas.cjs');
|
|
14
|
-
const { relayClientAuth } = require('./lib/relayClientAuth.cjs');
|
|
14
|
+
const { relayClientAuth } = require('./lib/feedback-remote/relayClientAuth.cjs');
|
|
15
15
|
|
|
16
16
|
// Hard-coded wss:// — same relay URL as webRemote.cjs, no plaintext downgrade.
|
|
17
17
|
const RELAY_WSS_URL = 'wss://bilko.run/projects/session-manager/relay';
|
|
@@ -11,7 +11,7 @@ const os = require('node:os');
|
|
|
11
11
|
const { ipcMain } = require('electron');
|
|
12
12
|
const { z } = require('zod');
|
|
13
13
|
const { remoteClient } = require('./remoteClient.cjs');
|
|
14
|
-
const { relayClientAuth } = require('./lib/relayClientAuth.cjs');
|
|
14
|
+
const { relayClientAuth } = require('./lib/feedback-remote/relayClientAuth.cjs');
|
|
15
15
|
const { ALLOWED_COMMANDS } = require('./ipcSchemas.cjs');
|
|
16
16
|
const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
17
17
|
|
package/src/main/runVerify.cjs
CHANGED
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
const fs = require('node:fs');
|
|
41
41
|
const path = require('node:path');
|
|
42
42
|
const { execFileSync } = require('node:child_process');
|
|
43
|
-
const { parsePrdFile } = require('./lib/prdFrontmatter.cjs');
|
|
43
|
+
const { parsePrdFile } = require('./lib/prd/prdFrontmatter.cjs');
|
|
44
|
+
const { isSatisfiedDepRow } = require('./lib/prd/depSlugResolve.cjs');
|
|
44
45
|
|
|
45
46
|
const VERDICTS_SCHEMA_VERSION = 1;
|
|
46
47
|
|
|
@@ -468,7 +469,9 @@ function checkDeps(queueEntry, allJobs, prdBody) {
|
|
|
468
469
|
// bare dep name that never matched any row, and ended up on disk with no
|
|
469
470
|
// queue row at all.
|
|
470
471
|
if (deps.length === 0) continue;
|
|
471
|
-
|
|
472
|
+
// Same predicate as findBlockingDep — an auto-resolve skip the picker
|
|
473
|
+
// dispatched past must not be re-judged unmet here (same infinite re-run).
|
|
474
|
+
const unfinished = deps.find((d) => !isSatisfiedDepRow(d));
|
|
472
475
|
if (unfinished) {
|
|
473
476
|
return { ok: false, reason: `dependsOn: "${depSlug}" is ${unfinished.status} (need completed)` };
|
|
474
477
|
}
|
|
@@ -488,7 +491,7 @@ function checkDeps(queueEntry, allJobs, prdBody) {
|
|
|
488
491
|
if (matches.length === 0) continue; // unresolvable fragment — skip
|
|
489
492
|
|
|
490
493
|
for (const dep of matches) {
|
|
491
|
-
if (dep
|
|
494
|
+
if (!isSatisfiedDepRow(dep)) {
|
|
492
495
|
return {
|
|
493
496
|
ok: false,
|
|
494
497
|
reason: `PRD body dep "${frag}" → "${dep.slug}" is ${dep.status} (need completed)`,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# src/main/scheduler/ — scoped context
|
|
2
|
+
|
|
3
|
+
Pure, extracted pieces of `../scheduler.cjs` (the most-edited file). Scheduler-family helpers
|
|
4
|
+
(dispatch loop, slots, gates, supervisors, queue store) live in [`../lib/scheduler/`](../lib/CLAUDE.md).
|
|
5
|
+
Runtime diagnosis (stuck queue, `needs_review`, reap gate) is NOT here — see
|
|
6
|
+
[`scheduler-operations.md`](../../../session-manager-operations/architecture/scheduler-operations.md).
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
|
|
10
|
+
- **Spy seam:** call module functions through the module object (`mod.fn()`), never destructure them, so `vi.spyOn` works.
|
|
11
|
+
- **New pure scheduler logic goes in a module here, not in `scheduler.cjs`** (which keeps state, IO and timers).
|
|
12
|
+
|
|
13
|
+
## If you are changing X, edit Y
|
|
14
|
+
|
|
15
|
+
| Changing | Edit |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| PRD file parsing, frontmatter, dir/file mtime cache | `prdParser.cjs` |
|
|
18
|
+
| Per-project PRD dirs, slug containment, archive-on-complete, boot migration, queue-backup sweep | `prdPaths.cjs` |
|
|
19
|
+
| `needs_review` / auto-fix / auto-reset eligibility, verdict sets, thresholds | `reviewLadder.cjs` |
|
|
20
|
+
| Git status/stash/HEAD helpers, shared-tree guard, commit-guard, finalize-drop predicates | `gitTreeGuard.cjs` |
|
|
21
|
+
| Starvation / blocked-chain classifiers, dispatch-idle clock | `starvation.cjs` |
|
|
22
|
+
| Stall / stranded-row / overrun / wall-clock budget selectors, failure backoff, `dependsOn` history lookup | `budget.cjs` |
|
|
23
|
+
| `spawnJob` / execution, `tickQueue`, dead-process reaper, poll loop, IPC handlers, admin routes, queue-mutating ladder rungs and watchdogs | `../scheduler.cjs` (by section banner) |
|
|
24
|
+
|
|
25
|
+
Before adding to `scheduler.cjs`, check the table: a predicate or selector belongs above, the
|
|
26
|
+
mutation that acts on it stays in `scheduler.cjs`.
|