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
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* agentsIpc.cjs — registers the `agents:*` IPC handlers (Agent Library CRUD + persona/model/effort
|
|
5
|
+
* resolvers). Moved verbatim out of index.cjs; handler bodies and zod wrappers are unchanged.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { schemas, validated } = require('./ipcSchemas.cjs');
|
|
9
|
+
const agentLibrary = require('./agentLibrary.cjs');
|
|
10
|
+
const agentModelResolve = require('./lib/claude/agentModelResolve.cjs');
|
|
11
|
+
const agentEffortResolve = require('./lib/claude/agentEffortResolve.cjs');
|
|
12
|
+
const { resolveEffectiveModelInfo } = require('./lib/claude/effectiveModelInfo.cjs');
|
|
13
|
+
const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @param {{ ipcMain: any, getWindow: () => any }} opts
|
|
17
|
+
*/
|
|
18
|
+
function registerAgentsHandlers({ ipcMain, getWindow }) {
|
|
19
|
+
// Agent Library nav page (Home face only): global `~/.claude/agents/*.md`
|
|
20
|
+
// personas plus, per currently-open project tab, whether that project
|
|
21
|
+
// overlays the same agent name at `<cwd>/.claude/agents/<name>.md`. Read-only.
|
|
22
|
+
ipcMain.handle('agents:list-personas', () => agentLibrary.listPersonas());
|
|
23
|
+
// Agent Library CRUD — global personas only (`~/.claude/agents/*.md`); a
|
|
24
|
+
// project's local overlay can only be removed here (removeOverride), never
|
|
25
|
+
// created, since Agent Library is a Home-face, machine-wide surface with no
|
|
26
|
+
// per-tab cwd context of its own. Each mutation broadcasts `agents:changed`
|
|
27
|
+
// so Agent Library and Tag Library — two independently-mounted dockview
|
|
28
|
+
// panels, each with its own component-local `listPersonas()` snapshot —
|
|
29
|
+
// both refresh off the one file on disk instead of one panel going stale
|
|
30
|
+
// after the other edits the agent<->tag relationship.
|
|
31
|
+
function broadcastAgentsChanged() {
|
|
32
|
+
sendIfAlive(getWindow(), 'agents:changed', {});
|
|
33
|
+
}
|
|
34
|
+
ipcMain.handle('agents:save-persona', validated(schemas.agentsSavePersona, async (payload) => {
|
|
35
|
+
const result = await agentLibrary.savePersona(payload);
|
|
36
|
+
broadcastAgentsChanged();
|
|
37
|
+
return result;
|
|
38
|
+
}));
|
|
39
|
+
ipcMain.handle('agents:delete-persona', async (_e, payload) => {
|
|
40
|
+
const result = await agentLibrary.deletePersona(payload);
|
|
41
|
+
broadcastAgentsChanged();
|
|
42
|
+
return result;
|
|
43
|
+
});
|
|
44
|
+
ipcMain.handle('agents:remove-override', async (_e, payload) => {
|
|
45
|
+
const result = await agentLibrary.removeOverride(payload);
|
|
46
|
+
broadcastAgentsChanged();
|
|
47
|
+
return result;
|
|
48
|
+
});
|
|
49
|
+
// New Epic AIM composer (epicIntake.ts's `agentBody`/`agentPath`): unlike
|
|
50
|
+
// list-personas above (global dir only), this honors the project-overlay-
|
|
51
|
+
// then-global precedence so an Epic's opening prompt carries the persona
|
|
52
|
+
// body that actually applies to its cwd. Read-only.
|
|
53
|
+
ipcMain.handle('agents:get-persona-body', validated(schemas.agentsGetPersonaBody, (payload) =>
|
|
54
|
+
agentLibrary.getPersonaBody(payload)));
|
|
55
|
+
|
|
56
|
+
// "What will this Epic's launch actually use for --model?" — the SAME
|
|
57
|
+
// resolver chatRunner.cjs's Chat-view launch calls in-process
|
|
58
|
+
// (agentModelResolve.cjs's resolveEpicModel), reached here so Terminal's
|
|
59
|
+
// launch (EpicTerminalPane.tsx, a renderer module with no fs access) agrees
|
|
60
|
+
// with Chat by calling the identical function rather than a second one that
|
|
61
|
+
// is merely supposed to. Never throws (resolveEpicModel's own contract).
|
|
62
|
+
ipcMain.handle('agents:resolve-epic-model', validated(schemas.agentsResolveEpicModel, (payload) =>
|
|
63
|
+
agentModelResolve.resolveEpicModel(payload)));
|
|
64
|
+
// Effort twin of the above (agentEffortResolve.cjs): Terminal appends
|
|
65
|
+
// `--effort <level>` only when `effort` is non-null. Never throws.
|
|
66
|
+
ipcMain.handle('agents:resolve-epic-effort', validated(schemas.agentsResolveEpicEffort, (payload) =>
|
|
67
|
+
agentEffortResolve.resolveEpicEffort(payload)));
|
|
68
|
+
|
|
69
|
+
// "What will this Epic actually run as?" (PRD: effective-model-resolver) —
|
|
70
|
+
// persona alias + evidence-based concrete model id + provenance, for a given
|
|
71
|
+
// (cwd, agentType). Read-only observer; never affects what a launch resolves.
|
|
72
|
+
ipcMain.handle('agents:resolve-model-info', validated(schemas.agentsResolveModelInfo, (payload) =>
|
|
73
|
+
resolveEffectiveModelInfo(payload)));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
module.exports = { registerAgentsHandlers };
|
package/src/main/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"gitSha": "
|
|
4
|
-
"gitShortSha": "
|
|
2
|
+
"version": "0.113.0",
|
|
3
|
+
"gitSha": "07baa2cc0601e109b6591f57bfb2ced8f34884dd",
|
|
4
|
+
"gitShortSha": "07baa2cc",
|
|
5
5
|
"gitBranch": "HEAD",
|
|
6
|
-
"builtAt": "2026-10-
|
|
6
|
+
"builtAt": "2026-10-12T19:15:00.757Z",
|
|
7
7
|
"dirty": false
|
|
8
8
|
}
|
package/src/main/chatRunner.cjs
CHANGED
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
|
|
45
45
|
const { spawn } = require('node:child_process');
|
|
46
46
|
const { ipcMain } = require('electron');
|
|
47
|
-
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claudeBin.cjs');
|
|
48
|
-
const { cleanChildEnv, pathWithUserBins } = require('./lib/cleanEnv.cjs');
|
|
47
|
+
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claude/claudeBin.cjs');
|
|
48
|
+
const { cleanChildEnv, pathWithUserBins } = require('./lib/process/cleanEnv.cjs');
|
|
49
49
|
const { recordExchange } = require('./exchanges.cjs');
|
|
50
50
|
const { classifyToolUse } = require('./lib/toolUseClassify.cjs');
|
|
51
|
-
const { extractJson } = require('./lib/extractJson.cjs');
|
|
51
|
+
const { extractJson } = require('./lib/util/extractJson.cjs');
|
|
52
52
|
const { classifyPromptTicket } = require('./lib/classifyPromptTicket.cjs');
|
|
53
|
-
const sessionSlots = require('./lib/sessionSlots.cjs');
|
|
54
|
-
const opsErrorLog = require('./lib/opsErrorLog.cjs');
|
|
55
|
-
const { killTree, detachedSpawnOpts } = require('./lib/killTree.cjs');
|
|
56
|
-
const agentModelResolve = require('./lib/agentModelResolve.cjs');
|
|
57
|
-
const { resolveEpicEffort, effortArgs } = require('./lib/agentEffortResolve.cjs');
|
|
58
|
-
const { planEpicSpawn } = require('./lib/epicSpawnPlan.cjs');
|
|
53
|
+
const sessionSlots = require('./lib/scheduler/sessionSlots.cjs');
|
|
54
|
+
const opsErrorLog = require('./lib/telemetry/opsErrorLog.cjs');
|
|
55
|
+
const { killTree, detachedSpawnOpts } = require('./lib/process/killTree.cjs');
|
|
56
|
+
const agentModelResolve = require('./lib/claude/agentModelResolve.cjs');
|
|
57
|
+
const { resolveEpicEffort, effortArgs } = require('./lib/claude/agentEffortResolve.cjs');
|
|
58
|
+
const { planEpicSpawn } = require('./lib/epic/epicSpawnPlan.cjs');
|
|
59
59
|
const logs = require('./logs.cjs');
|
|
60
|
-
const { createHeadTailBuffer } = require('./lib/headTailBuffer.cjs');
|
|
60
|
+
const { createHeadTailBuffer } = require('./lib/util/headTailBuffer.cjs');
|
|
61
61
|
|
|
62
62
|
// Caps on per-run stream buffers (a run can last hours).
|
|
63
63
|
const STDERR_TAIL_MAX = 64 * 1024;
|
|
@@ -424,7 +424,7 @@ function pump() {
|
|
|
424
424
|
if (idx === -1) break;
|
|
425
425
|
// The chat lane cap is a POLICY bound; actual capacity comes from the
|
|
426
426
|
// Session-Manager-wide slot pool shared with the scheduler
|
|
427
|
-
// (lib/sessionSlots.cjs). No slot → everyone keeps waiting; the next
|
|
427
|
+
// (lib/scheduler/sessionSlots.cjs). No slot → everyone keeps waiting; the next
|
|
428
428
|
// settle() in either subsystem re-pumps.
|
|
429
429
|
const slotToken = sessionSlots.acquire(`chat:${waiting[idx].tabId}`);
|
|
430
430
|
if (!slotToken) break;
|
|
@@ -982,7 +982,7 @@ function requestExternalNewSession(payload) {
|
|
|
982
982
|
* job; this only owns route logic + body parsing).
|
|
983
983
|
*/
|
|
984
984
|
function registerAdminRoute(adminHttp) {
|
|
985
|
-
const { readBody, sendJson } = require('./lib/localAdminHttp.cjs');
|
|
985
|
+
const { readBody, sendJson } = require('./lib/feedback-remote/localAdminHttp.cjs');
|
|
986
986
|
const { schemas } = require('./ipcSchemas.cjs');
|
|
987
987
|
|
|
988
988
|
adminHttp.registerRoute('POST', '/admin/chat/send-prompt', async (req, res) => {
|
|
@@ -1008,10 +1008,26 @@ function registerAdminRoute(adminHttp) {
|
|
|
1008
1008
|
|
|
1009
1009
|
// ─── IPC handler registration ─────────────────────────────────────────────
|
|
1010
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* Record a chat prompt into the human prompt ledger, only when the renderer
|
|
1013
|
+
* explicitly declared origin === 'human'. Absent/other origins are not-human
|
|
1014
|
+
* (fail-closed). Never throws.
|
|
1015
|
+
* @param {{ sessionId: string, prompt: string, origin?: string }} args
|
|
1016
|
+
*/
|
|
1017
|
+
function noteChatRunOrigin({ sessionId, prompt, origin }) {
|
|
1018
|
+
try {
|
|
1019
|
+
if (origin !== 'human') return;
|
|
1020
|
+
require('./lib/feedback-remote/humanPromptLedger.cjs').recordHumanPrompt(sessionId, prompt);
|
|
1021
|
+
} catch {
|
|
1022
|
+
/* never throws */
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1011
1026
|
function registerChatHandlers() {
|
|
1012
1027
|
const { schemas, validated } = require('./ipcSchemas.cjs');
|
|
1013
1028
|
|
|
1014
|
-
ipcMain.handle('chat:run', validated(schemas.chatRun, async ({ tabId, sessionId, prompt, cwd, resume, promptId }) => {
|
|
1029
|
+
ipcMain.handle('chat:run', validated(schemas.chatRun, async ({ tabId, sessionId, prompt, cwd, resume, promptId, origin }) => {
|
|
1030
|
+
noteChatRunOrigin({ sessionId, prompt, origin });
|
|
1015
1031
|
// Report what actually happened instead of an unconditional { ok: true }.
|
|
1016
1032
|
// A user send is always accepted now (queued behind the tab's live run if
|
|
1017
1033
|
// one holds it), but the renderer gets the truth either way rather than a
|
|
@@ -1042,6 +1058,7 @@ module.exports = {
|
|
|
1042
1058
|
__liveSessionCount: () => liveSessions.size,
|
|
1043
1059
|
attachWindow,
|
|
1044
1060
|
registerChatHandlers,
|
|
1061
|
+
noteChatRunOrigin,
|
|
1045
1062
|
parseStopSignal,
|
|
1046
1063
|
splitStopSignal,
|
|
1047
1064
|
parseContextUsageMarkdown,
|
package/src/main/config.cjs
CHANGED
|
@@ -23,9 +23,9 @@ const { assertOpsWrite, opsPath, OWNERS } = require('./lib/opsOwnership.cjs');
|
|
|
23
23
|
const chokidar = require('chokidar');
|
|
24
24
|
const logs = require('./logs.cjs');
|
|
25
25
|
const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
26
|
-
const { expandHome } = require('./lib/expandHome.cjs');
|
|
26
|
+
const { expandHome } = require('./lib/util/expandHome.cjs');
|
|
27
27
|
const { listReferencedFiles } = require('./lib/importReferences.cjs');
|
|
28
|
-
const atomicFs = require('./lib/atomicFs.cjs');
|
|
28
|
+
const atomicFs = require('./lib/util/atomicFs.cjs');
|
|
29
29
|
|
|
30
30
|
/** Map<watchKey, {watcher, refCount}> — one chokidar watcher per path (+ depth, see watchKeyOf). */
|
|
31
31
|
const watchers = new Map();
|
|
@@ -392,8 +392,21 @@ function watchKeyOf(key, depth) {
|
|
|
392
392
|
*/
|
|
393
393
|
function watch(paths, senderId, opts) {
|
|
394
394
|
const depth = opts?.depth;
|
|
395
|
+
const watched = [];
|
|
396
|
+
const rejected = [];
|
|
395
397
|
for (const rawPath of paths) {
|
|
396
|
-
|
|
398
|
+
try {
|
|
399
|
+
validatePath(expandHome(rawPath)); // security check — throws if out of bounds
|
|
400
|
+
} catch (err) {
|
|
401
|
+
// Per-path: one bad path must not abort the rest of the batch.
|
|
402
|
+
rejected.push(rawPath);
|
|
403
|
+
if (!warnedRejectedPaths.has(rawPath)) {
|
|
404
|
+
warnedRejectedPaths.add(rawPath);
|
|
405
|
+
logs.writeLine({ level: 'warn', scope: 'config', message: 'config:watch path reject', meta: { path: rawPath, error: err?.message } });
|
|
406
|
+
}
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
watched.push(rawPath);
|
|
397
410
|
const key = normalizePathKey(rawPath);
|
|
398
411
|
const mapKey = watchKeyOf(key, depth);
|
|
399
412
|
if (senderId != null) {
|
|
@@ -430,8 +443,12 @@ function watch(paths, senderId, opts) {
|
|
|
430
443
|
});
|
|
431
444
|
watchers.set(mapKey, { watcher: w, refCount: 1 });
|
|
432
445
|
}
|
|
446
|
+
return { watched, rejected };
|
|
433
447
|
}
|
|
434
448
|
|
|
449
|
+
// Distinct rejected watch paths already warned about (once per process).
|
|
450
|
+
const warnedRejectedPaths = new Set();
|
|
451
|
+
|
|
435
452
|
function unwatch(paths, senderId, opts) {
|
|
436
453
|
for (const rawPath of paths) {
|
|
437
454
|
const key = watchKeyOf(normalizePathKey(rawPath), opts?.depth);
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
const { app, powerSaveBlocker, powerMonitor, crashReporter } = require('electron');
|
|
27
27
|
const fs = require('node:fs');
|
|
28
28
|
const path = require('node:path');
|
|
29
|
-
const { reportCrash } = require('./lib/crashTelemetry.cjs');
|
|
30
|
-
const { createLoopDelayMonitor, stallVerdict } = require('./lib/loopDelay.cjs');
|
|
29
|
+
const { reportCrash } = require('./lib/telemetry/crashTelemetry.cjs');
|
|
30
|
+
const { createLoopDelayMonitor, stallVerdict } = require('./lib/util/loopDelay.cjs');
|
|
31
31
|
|
|
32
32
|
let logs = null;
|
|
33
33
|
let getPowerBlockerId = () => -1;
|
package/src/main/docEdit.cjs
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
const { ipcMain } = require('electron');
|
|
18
18
|
const { spawn } = require('node:child_process');
|
|
19
19
|
const crypto = require('node:crypto');
|
|
20
|
-
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claudeBin.cjs');
|
|
21
|
-
const { headlessPermissionArgs, ensureCliCapsProbed } = require('./lib/claudeCliCaps.cjs');
|
|
22
|
-
const { withProcRole } = require('./lib/cleanEnv.cjs');
|
|
23
|
-
const { extractJson } = require('./lib/extractJson.cjs');
|
|
20
|
+
const { resolveClaudeBin, claudeSpawnTarget } = require('./lib/claude/claudeBin.cjs');
|
|
21
|
+
const { headlessPermissionArgs, ensureCliCapsProbed } = require('./lib/claude/claudeCliCaps.cjs');
|
|
22
|
+
const { withProcRole } = require('./lib/process/cleanEnv.cjs');
|
|
23
|
+
const { extractJson } = require('./lib/util/extractJson.cjs');
|
|
24
24
|
const { assertInsideHome } = require('./lib/insideHome.cjs');
|
|
25
|
-
const { expandHome } = require('./lib/expandHome.cjs');
|
|
25
|
+
const { expandHome } = require('./lib/util/expandHome.cjs');
|
|
26
26
|
const chatRunner = require('./chatRunner.cjs');
|
|
27
27
|
|
|
28
28
|
// System prompt sets the role server-side so the selection is treated as
|
package/src/main/files.cjs
CHANGED
|
@@ -21,8 +21,8 @@ const os = require('node:os');
|
|
|
21
21
|
|
|
22
22
|
const { z } = require('zod');
|
|
23
23
|
const { assertInsideHome } = require('./lib/insideHome.cjs');
|
|
24
|
-
const { expandHome } = require('./lib/expandHome.cjs');
|
|
25
|
-
const atomicFs = require('./lib/atomicFs.cjs');
|
|
24
|
+
const { expandHome } = require('./lib/util/expandHome.cjs');
|
|
25
|
+
const atomicFs = require('./lib/util/atomicFs.cjs');
|
|
26
26
|
const { schemas } = require('./ipcSchemas.cjs');
|
|
27
27
|
|
|
28
28
|
/**
|
package/src/main/git.cjs
CHANGED
|
@@ -23,7 +23,7 @@ const { spawn } = require('node:child_process');
|
|
|
23
23
|
const path = require('node:path');
|
|
24
24
|
const { schemas } = require('./ipcSchemas.cjs');
|
|
25
25
|
const { validatePath } = require('./config.cjs');
|
|
26
|
-
const { LRUCache } = require('./lib/lruCache.cjs');
|
|
26
|
+
const { LRUCache } = require('./lib/util/lruCache.cjs');
|
|
27
27
|
|
|
28
28
|
const GIT_TIMEOUT_MS = 5_000;
|
|
29
29
|
const CACHE_TTL_MS = 5_000;
|
package/src/main/health.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* health.cjs — health check for session-manager Electron app.
|
|
3
3
|
* Verifies: app startup, IPC responsiveness, scheduler health, watchers active.
|
|
4
|
-
* Exported as check()
|
|
4
|
+
* Exported as check(); run via `npm run health`.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const fs = require('node:fs');
|
|
@@ -9,23 +9,25 @@ const fsp = require('node:fs/promises');
|
|
|
9
9
|
const path = require('node:path');
|
|
10
10
|
const os = require('node:os');
|
|
11
11
|
const { execFileSync } = require('node:child_process');
|
|
12
|
-
const { POLL_INTERVAL_MS, loadGateThreshold } = require('./lib/schedulerConfig.cjs');
|
|
12
|
+
const { POLL_INTERVAL_MS, loadGateThreshold } = require('./lib/scheduler/schedulerConfig.cjs');
|
|
13
13
|
const { opsPath } = require('./lib/opsOwnership.cjs');
|
|
14
|
-
const { effectivePaused } = require('./lib/upgradeDrain.cjs');
|
|
15
|
-
const { checkPersonaImports } = require('./lib/personaImportHealth.cjs');
|
|
16
|
-
const { checkDelegationReadiness } = require('./lib/delegationReadiness.cjs');
|
|
17
|
-
const { resolvePrdsDirs } = require('./lib/prdLocations.cjs');
|
|
18
|
-
const { migratePrds } = require('./lib/prdMigration.cjs');
|
|
19
|
-
const queueStore = require('./lib/queueStore.cjs');
|
|
20
|
-
const schedulerPaths = require('./lib/schedulerPaths.cjs');
|
|
21
|
-
const { evaluateDispatchLiveness } = require('./lib/watchdogHelpers.cjs');
|
|
22
|
-
const { computeStallSummary, computeDepHistorySatisfaction, FAILURE_STREAK_ESCALATION_MS
|
|
23
|
-
const {
|
|
24
|
-
const {
|
|
14
|
+
const { effectivePaused } = require('./lib/scheduler/upgradeDrain.cjs');
|
|
15
|
+
const { checkPersonaImports } = require('./lib/persona-macro/personaImportHealth.cjs');
|
|
16
|
+
const { checkDelegationReadiness } = require('./lib/epic/delegationReadiness.cjs');
|
|
17
|
+
const { resolvePrdsDirs } = require('./lib/prd/prdLocations.cjs');
|
|
18
|
+
const { migratePrds } = require('./lib/prd/prdMigration.cjs');
|
|
19
|
+
const queueStore = require('./lib/scheduler/queueStore.cjs');
|
|
20
|
+
const schedulerPaths = require('./lib/scheduler/schedulerPaths.cjs');
|
|
21
|
+
const { evaluateDispatchLiveness } = require('./lib/scheduler/watchdogHelpers.cjs');
|
|
22
|
+
const { computeStallSummary, computeDepHistorySatisfaction, FAILURE_STREAK_ESCALATION_MS } = require('./scheduler/budget.cjs');
|
|
23
|
+
const { classifyQueueStarvation, launchBlockedSlugs, STARVE_ESCALATION_MS } = require('./scheduler/starvation.cjs');
|
|
24
|
+
const { REVERIFY_INTERVAL_MS } = require('./scheduler/reviewLadder.cjs');
|
|
25
|
+
const { findStarvedProjects, findUnresolvableDepRoots, DEFAULT_PROJECT_CWD, DEP_HISTORY_FAIL_OPEN } = require('./lib/scheduler/schedulerBatch.cjs');
|
|
26
|
+
const { auditLogPath, readTail } = require('./lib/telemetry/auditLog.cjs');
|
|
25
27
|
const { resolveBuildIdentity } = require('./lib/buildIdentity.cjs');
|
|
26
|
-
const { computeReport, isRetentionEnabled, liveKeysFromJobs } = require('./lib/runLogRetention.cjs');
|
|
28
|
+
const { computeReport, isRetentionEnabled, liveKeysFromJobs } = require('./lib/scheduler/runLogRetention.cjs');
|
|
27
29
|
const { allProjectCwds } = require('./lib/activeSessions.cjs');
|
|
28
|
-
const { scanEpicTranscripts } = require('./lib/epicTranscriptDiagnostic.cjs');
|
|
30
|
+
const { scanEpicTranscripts } = require('./lib/epic/epicTranscriptDiagnostic.cjs');
|
|
29
31
|
|
|
30
32
|
const MAX_LOG_AGE_MS = 5 * 60_000; // 5 min — warn if no logs this old
|
|
31
33
|
const PROJECT_ROOT = path.resolve(__dirname, '../..');
|
|
@@ -106,7 +108,7 @@ function evaluateTickLiveness(queueState, heartbeat, now, runningCount) {
|
|
|
106
108
|
// sessionSlots pool is the only limit. Read it lazily so this stays a pure
|
|
107
109
|
// function of its args when a caller supplies slotCap explicitly.
|
|
108
110
|
const concurrencyCap = queueState.slotCap
|
|
109
|
-
?? (() => { try { return require('./lib/sessionSlots.cjs').totalSlots(); } catch { return Infinity; } })();
|
|
111
|
+
?? (() => { try { return require('./lib/scheduler/sessionSlots.cjs').totalSlots(); } catch { return Infinity; } })();
|
|
110
112
|
|
|
111
113
|
if (pending.length === 0) return { stalled: false, reason: 'no-pending-jobs' };
|
|
112
114
|
if (effectivePaused(queueState)) return { stalled: false, reason: queueState.paused ? 'paused' : 'draining' };
|
|
@@ -641,7 +643,7 @@ function evaluateBuildFreshness({ running = null, installedOnDisk = null, repoHe
|
|
|
641
643
|
* names the cause and the fix (`claude login`).
|
|
642
644
|
*
|
|
643
645
|
* NON-CRITICAL by design: reported in components.credentials + issues so
|
|
644
|
-
*
|
|
646
|
+
* `npm run health` shows it, but it does not flip status.ok — health must
|
|
645
647
|
* not hard-fail a repo checkout just because THIS machine's token lapsed, and
|
|
646
648
|
* an expired token is an operator action (re-login), not a code defect. Maps:
|
|
647
649
|
* kind 'auth' → not ok, actionable `claude login` message (the real block)
|
|
@@ -897,7 +899,7 @@ async function check(opts = {}) {
|
|
|
897
899
|
path: queuePath,
|
|
898
900
|
jobs: Object.keys(queueState.jobs || {}).length,
|
|
899
901
|
running: runningCount,
|
|
900
|
-
// Deliberate restart drain (lib/upgradeDrain.cjs) — reported so it is never read as a stall.
|
|
902
|
+
// Deliberate restart drain (lib/scheduler/upgradeDrain.cjs) — reported so it is never read as a stall.
|
|
901
903
|
drain: queueState.drain?.active ? { since: queueState.drain.since ?? null, requestedAt: queueState.drain.requestedAt ?? null } : null,
|
|
902
904
|
failed: failedCount,
|
|
903
905
|
needsReview: needsReviewCount,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
const path = require('node:path');
|
|
26
26
|
const fsp = require('node:fs/promises');
|
|
27
|
-
const { heapSnapshotDir } = require('./lib/schedulerPaths.cjs');
|
|
27
|
+
const { heapSnapshotDir } = require('./lib/scheduler/schedulerPaths.cjs');
|
|
28
28
|
|
|
29
29
|
const CHANNEL = 'diagnostics:heap-snapshot';
|
|
30
30
|
const DEFAULT_TIMEOUT_MS = 3 * 60 * 1000; // 3 min — snapshots can be multi-hundred-MB
|
|
@@ -50,8 +50,8 @@ function resolvePricingKey(modelId) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// ── LRU cache ─────────────────────────────────────────────────────────────────
|
|
53
|
-
// Shared implementation: lib/lruCache.cjs (re-exported below for existing callers).
|
|
54
|
-
const { LRUCache } = require('./lib/lruCache.cjs');
|
|
53
|
+
// Shared implementation: lib/util/lruCache.cjs (re-exported below for existing callers).
|
|
54
|
+
const { LRUCache } = require('./lib/util/lruCache.cjs');
|
|
55
55
|
|
|
56
56
|
// ── history:updated broadcast ─────────────────────────────────────────────────
|
|
57
57
|
// Open History pages re-fetch on this event. Throttled leading+trailing so a
|