claude-code-session-manager 0.111.0 → 0.112.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-RwPvEgqm.js} +2 -2
- package/dist/assets/{Button-DsEYRZg0.js → Button-36j3PzYv.js} +1 -1
- package/dist/assets/{DataModel-D8sbvvBC.js → DataModel-DUhANo4l.js} +1 -1
- package/dist/assets/{History-BEHLtxia.js → History-BeZzNjmv.js} +2 -2
- package/dist/assets/{Hooks-CKpvlXrg.js → Hooks-iQ8845Hp.js} +3 -3
- package/dist/assets/{Library-CeF4qh9d.js → Library-DPE1h-1L.js} +6 -6
- package/dist/assets/{ListDetail-DcfmxPFk.js → ListDetail-PStOuQAo.js} +1 -1
- package/dist/assets/{MarkdownEditor-CvK1pyto.js → MarkdownEditor-DPw-N2-m.js} +1 -1
- package/dist/assets/{McpServers-D-h2ihzJ.js → McpServers-CUyRTNep.js} +2 -2
- package/dist/assets/{Memory-BnF89x8v.js → Memory-bZ2xjBGy.js} +3 -3
- package/dist/assets/{Panel-CQY5zano.js → Panel-_VZ_uXNg.js} +1 -1
- package/dist/assets/{Permissions-DLukmmsz.js → Permissions-PPRmfNbK.js} +3 -3
- package/dist/assets/{Plugins-0Pf0OZ4l.js → Plugins-BFcvfvlx.js} +2 -2
- package/dist/assets/{ProvenanceBadge-vC7Tj-JP.js → ProvenanceBadge-B1WUknak.js} +1 -1
- package/dist/assets/RemoteMachines-D5V0lzgW.js +3 -0
- package/dist/assets/{SaveBar-DjijiUb0.js → SaveBar-Dw64FVdM.js} +1 -1
- package/dist/assets/{Scheduler-Cm3EXZvE.js → Scheduler-C8s_pJ3I.js} +9 -9
- package/dist/assets/{ScopeSwitcher-B-P-kSfq.js → ScopeSwitcher-D-nKDMAE.js} +1 -1
- package/dist/assets/{Settings-DYDlp2m_.js → Settings-CQSrR4mO.js} +4 -4
- package/dist/assets/{SkillReferenceGraph-Epv2GJmj.js → SkillReferenceGraph-BbZFMHim.js} +1 -1
- package/dist/assets/{Skills-DHO0N0C2.js → Skills-Bzyrh6EQ.js} +1 -1
- package/dist/assets/SystemPrompt-DP6i3Dx0.js +1 -0
- package/dist/assets/TagLibrary-iip0C6Bl.js +1 -0
- package/dist/assets/{TiptapBody-DAMO3DhO.js → TiptapBody-Cr-hxX8L.js} +1 -1
- package/dist/assets/Toggle-7WpPzcZH.js +1 -0
- package/dist/assets/{ViewTabs-CGX6MAhc.js → ViewTabs-9lQCRwWJ.js} +1 -1
- package/dist/assets/{historyTotals-vgfk8EOL.js → historyTotals-BrFxw5J1.js} +1 -1
- package/dist/assets/{index-CPieAFsl.js → index-CTBpf-26.js} +250 -250
- package/dist/assets/{settingsSchema-D0FxNrTy.js → settingsSchema-Dh5Kl7VO.js} +1 -1
- package/dist/assets/{useAgentsDirWatch-DCu6BNYN.js → useAgentsDirWatch-CMpx0d04.js} +1 -1
- package/dist/assets/{useRemotePeers-D4cdJDyh.js → useRemotePeers-CI2axd-L.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/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 +4 -4
- 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 +12 -12
- package/src/main/config.cjs +2 -2
- 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 +44 -132
- package/src/main/ipcSchemas.cjs +10 -10
- package/src/main/lib/CLAUDE.md +48 -0
- package/src/main/lib/activeSessions.cjs +1 -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/{rateLimitDetect.cjs → claude/rateLimitDetect.cjs} +1 -1
- package/src/main/lib/{rateLimitWindow.cjs → claude/rateLimitWindow.cjs} +1 -1
- package/src/main/lib/{runClaudeP.cjs → claude/runClaudeP.cjs} +1 -1
- package/src/main/lib/credentials.cjs +3 -3
- 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} +7 -7
- 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/{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/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/{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/{fixChainDepth.cjs → scheduler/fixChainDepth.cjs} +1 -1
- 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/{scheduleJobTransitions.cjs → scheduler/scheduleJobTransitions.cjs} +3 -3
- package/src/main/lib/{schedulerBatch.cjs → scheduler/schedulerBatch.cjs} +2 -2
- 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} +4 -4
- package/src/main/lib/{telemetrySettings.cjs → telemetry/telemetrySettings.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 +1 -1
- 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 +289 -3311
- 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 +5 -5
- 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 +7 -7
- package/src/preload/api.d.ts +8 -8
- package/src/preload/index.cjs +3 -3
- package/dist/assets/RemoteMachines-CWnKbFHc.js +0 -3
- package/dist/assets/SystemPrompt-DxeNofL9.js +0 -1
- package/dist/assets/TagLibrary-QOAs7ISO.js +0 -1
- package/dist/assets/Toggle-Ba_f7q_m.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/{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/{depSlugResolve.cjs → prd/depSlugResolve.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/{runLogRetention.cjs → scheduler/runLogRetention.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/{atomicFs.cjs → util/atomicFs.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/{loopDelay.cjs → util/loopDelay.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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* VERIFIED or REFUTED with evidence. The job's self-reported status is an
|
|
16
16
|
* input to that check, never a substitute for it.
|
|
17
17
|
*
|
|
18
|
-
* Shape mirrors lib/dodDrainHook.cjs: fire-and-forget (never throws to the
|
|
18
|
+
* Shape mirrors lib/scheduler/dodDrainHook.cjs: fire-and-forget (never throws to the
|
|
19
19
|
* caller — errors are logged), kill-switched, idempotent.
|
|
20
20
|
*
|
|
21
21
|
* Kill-switch: SM_EPIC_VALIDATION_DISABLE=1 (mirrors the SM_DOD_DISABLE
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* SESSION SLOT POOL: this module spawns NOTHING. The prompt is enqueued via
|
|
25
25
|
* chatRunner.cjs's enqueueExternalPrompt → `chat:external-send` → the
|
|
26
26
|
* renderer's chat queue → chatRunner's pump, which acquires a slot from the
|
|
27
|
-
* machine-wide lib/sessionSlots.cjs pool (chatRunner.cjs pump()) before any
|
|
27
|
+
* machine-wide lib/scheduler/sessionSlots.cjs pool (chatRunner.cjs pump()) before any
|
|
28
28
|
* `claude -p` process starts. So the validation session cannot start outside
|
|
29
29
|
* the pool — if the pool is exhausted the prompt simply waits in the chat
|
|
30
30
|
* lane's FIFO, it never fans out into an extra parallel process (the
|
|
@@ -62,7 +62,7 @@ function pairKey(epicId, prdSlug) {
|
|
|
62
62
|
*/
|
|
63
63
|
function defaultReadActiveIndex(cwd) {
|
|
64
64
|
try {
|
|
65
|
-
const { opsPath } = require('
|
|
65
|
+
const { opsPath } = require('../opsOwnership.cjs');
|
|
66
66
|
const p = opsPath(cwd, 'prompt-sessions', 'active-index.json');
|
|
67
67
|
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
68
68
|
} catch {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
* them from the command line.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
const { integrateEpicBranch, cleanupEpicWorktree } = require('
|
|
29
|
-
const { validatePath } = require('
|
|
28
|
+
const { integrateEpicBranch, cleanupEpicWorktree } = require('../git/gitWorktree.cjs');
|
|
29
|
+
const { validatePath } = require('../../config.cjs');
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* mergeEpicToMainViaIpc(cwd, epicId, branch, dir) → Promise<MergeOutcome>
|
|
@@ -54,7 +54,7 @@ async function mergeEpicToMainViaIpc(cwd, epicId, branch, dir, carriedPaths) {
|
|
|
54
54
|
|
|
55
55
|
function registerEpicWorktreeMergeHandlers() {
|
|
56
56
|
const { ipcMain } = require('electron');
|
|
57
|
-
const { schemas: s, validated: v } = require('
|
|
57
|
+
const { schemas: s, validated: v } = require('../../ipcSchemas.cjs');
|
|
58
58
|
ipcMain.handle(
|
|
59
59
|
'promptSessions:merge-to-main',
|
|
60
60
|
v(s.promptSessionsMergeToMain, ({ cwd, epicId, branch, dir, carriedPaths }) => mergeEpicToMainViaIpc(cwd, epicId, branch, dir, carriedPaths)),
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* since this is likewise reachable from the renderer over IPC.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
const { createEpicWorktree } = require('
|
|
28
|
-
const { validatePath } = require('
|
|
27
|
+
const { createEpicWorktree } = require('../git/gitWorktree.cjs');
|
|
28
|
+
const { validatePath } = require('../../config.cjs');
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* createEpicWorktreeViaIpc(cwd, epicId) → Promise<EpicWorktree | null>
|
|
@@ -59,7 +59,7 @@ async function createEpicWorktreeViaIpc(cwd, epicId) {
|
|
|
59
59
|
|
|
60
60
|
function registerEpicWorktreeMintHandlers() {
|
|
61
61
|
const { ipcMain } = require('electron');
|
|
62
|
-
const { schemas: s, validated: v } = require('
|
|
62
|
+
const { schemas: s, validated: v } = require('../../ipcSchemas.cjs');
|
|
63
63
|
ipcMain.handle(
|
|
64
64
|
'promptSessions:create-worktree',
|
|
65
65
|
v(s.promptSessionsCreateWorktree, ({ cwd, epicId }) => createEpicWorktreeViaIpc(cwd, epicId)),
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
const fs = require('node:fs');
|
|
36
36
|
const path = require('node:path');
|
|
37
37
|
const os = require('node:os');
|
|
38
|
-
const { assertOpsWrite, opsPath } = require('
|
|
39
|
-
const atomicFs = require('
|
|
38
|
+
const { assertOpsWrite, opsPath } = require('../opsOwnership.cjs');
|
|
39
|
+
const atomicFs = require('../util/atomicFs.cjs');
|
|
40
40
|
|
|
41
41
|
// The old machine-wide map. Read-only from here on (migration source only) —
|
|
42
42
|
// never written again, and deliberately never deleted so unmigrated projects
|
|
@@ -116,8 +116,8 @@ function setEpicWorktreeDisabledForProject(cwd, disabled, writer = 'epics') {
|
|
|
116
116
|
|
|
117
117
|
function registerEpicWorktreeProjectConfigHandlers() {
|
|
118
118
|
const { ipcMain } = require('electron');
|
|
119
|
-
const { schemas: s, validated: v } = require('
|
|
120
|
-
const { validatePath } = require('
|
|
119
|
+
const { schemas: s, validated: v } = require('../../ipcSchemas.cjs');
|
|
120
|
+
const { validatePath } = require('../../config.cjs');
|
|
121
121
|
ipcMain.handle(
|
|
122
122
|
'promptSessions:get-worktree-disabled',
|
|
123
123
|
v(s.promptSessionsGetWorktreeDisabled, ({ cwd }) => {
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Step 1 of a two-PRD chain (PRD 953 here; PRD 954 routes createPromptSession
|
|
9
9
|
* through it): purely additive today — nothing calls this handler yet. Kept
|
|
10
|
-
* as a sibling module (mirrors lib/activeIndexMerge.cjs, which does the same
|
|
10
|
+
* as a sibling module (mirrors lib/epic/activeIndexMerge.cjs, which does the same
|
|
11
11
|
* "own file, own register*Handlers export, wired from index.cjs" shape for
|
|
12
12
|
* the neighboring active-index merge IPC) rather than growing epicMint.cjs
|
|
13
13
|
* itself, since this is IPC-registration plumbing, not Epic-minting logic.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
const { ensureEpic, readActiveIndex, MINT_AUTHORITY_NEW_EPIC_UI } = require('./epicMint.cjs');
|
|
17
|
-
const { validatePath } = require('
|
|
17
|
+
const { validatePath } = require('../../config.cjs');
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* createEpicViaIpc(cwd, { goalText, tag?, agentType?, source? }) → Promise<{ epicId, session }>
|
|
@@ -38,7 +38,7 @@ const { validatePath } = require('../config.cjs');
|
|
|
38
38
|
* + every cwd a TAB has opened) closes the gap so this handler can't be used
|
|
39
39
|
* to make main write session-manager-operations/ into an arbitrary
|
|
40
40
|
* filesystem location — the same boundary every other renderer-facing path
|
|
41
|
-
* IPC (config:read-json/write-json, lib/activeIndexMerge.cjs's own merge) is
|
|
41
|
+
* IPC (config:read-json/write-json, lib/epic/activeIndexMerge.cjs's own merge) is
|
|
42
42
|
* already required to pass through.
|
|
43
43
|
*/
|
|
44
44
|
async function createEpicViaIpc(cwd, { goalText, tag, agentType, model, effort, source, openingPrompt, sections } = {}) {
|
|
@@ -61,7 +61,7 @@ async function createEpicViaIpc(cwd, { goalText, tag, agentType, model, effort,
|
|
|
61
61
|
|
|
62
62
|
function registerPromptSessionsCreateEpicHandlers() {
|
|
63
63
|
const { ipcMain } = require('electron');
|
|
64
|
-
const { schemas: s, validated: v } = require('
|
|
64
|
+
const { schemas: s, validated: v } = require('../../ipcSchemas.cjs');
|
|
65
65
|
ipcMain.handle(
|
|
66
66
|
'promptSessions:create-epic',
|
|
67
67
|
v(s.promptSessionsCreateEpic, ({ cwd, goalText, tag, agentType, model, effort, source, openingPrompt, sections }) =>
|
|
@@ -57,16 +57,16 @@ const fsp = require('node:fs/promises');
|
|
|
57
57
|
const os = require('node:os');
|
|
58
58
|
const path = require('node:path');
|
|
59
59
|
|
|
60
|
-
const config = require('
|
|
60
|
+
const config = require('../../config.cjs');
|
|
61
61
|
const { readBody, sendJson } = require('./localAdminHttp.cjs');
|
|
62
62
|
const {
|
|
63
63
|
ensureEpic,
|
|
64
64
|
readActiveIndex,
|
|
65
65
|
MINT_AUTHORITY_CROSS_PROJECT_FEEDBACK,
|
|
66
|
-
} = require('
|
|
67
|
-
const { appendAuditEvent } = require('
|
|
68
|
-
const { OPS_ROOT_DIR } = require('
|
|
69
|
-
const { resolveProjectContext } = require('
|
|
66
|
+
} = require('../epic/epicMint.cjs');
|
|
67
|
+
const { appendAuditEvent } = require('../telemetry/auditLog.cjs');
|
|
68
|
+
const { OPS_ROOT_DIR } = require('../opsOwnership.cjs');
|
|
69
|
+
const { resolveProjectContext } = require('../projectRootResolve.cjs');
|
|
70
70
|
|
|
71
71
|
/** Only these three Epic tags make sense for an inbound report — they are
|
|
72
72
|
* exactly the tags that route through /develop (tagLibrary.ts). 'build' and
|
|
@@ -437,7 +437,7 @@ async function openFeedbackSession(input, deps = {}) {
|
|
|
437
437
|
// Required lazily: promptSessionEvents.cjs pulls in config.cjs's watcher
|
|
438
438
|
// machinery, and this module is also required from unit tests that never
|
|
439
439
|
// boot the main process.
|
|
440
|
-
|| ((...args) => require('
|
|
440
|
+
|| ((...args) => require('../../promptSessionEvents.cjs').appendResponseEventIfKnown(...args));
|
|
441
441
|
|
|
442
442
|
const checked = validateFeedbackInput(input);
|
|
443
443
|
if (!checked.ok) return checked;
|
|
@@ -449,7 +449,7 @@ async function openFeedbackSession(input, deps = {}) {
|
|
|
449
449
|
// the same lookup (required lazily: prdCreate pulls in ipcSchemas/config).
|
|
450
450
|
if (!v.fromEpicId && input.originClaudeSessionId) {
|
|
451
451
|
try {
|
|
452
|
-
const { resolveSourcePromptIdFromClaudeSession } = require('
|
|
452
|
+
const { resolveSourcePromptIdFromClaudeSession } = require('../prd/prdCreate.cjs');
|
|
453
453
|
v.fromEpicId = resolveSourcePromptIdFromClaudeSession(v.fromCwd, String(input.originClaudeSessionId)) || null;
|
|
454
454
|
} catch { /* unresolvable — the proposal still delivers, just without a receipt */ }
|
|
455
455
|
}
|
package/src/main/lib/{customerFeedbackClient.cjs → feedback-remote/customerFeedbackClient.cjs}
RENAMED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
const path = require('node:path');
|
|
16
16
|
const fsp = require('node:fs/promises');
|
|
17
|
-
const atomicFs = require('
|
|
18
|
-
const schedulerPaths = require('
|
|
17
|
+
const atomicFs = require('../util/atomicFs.cjs');
|
|
18
|
+
const schedulerPaths = require('../scheduler/schedulerPaths.cjs');
|
|
19
19
|
|
|
20
20
|
const FEEDBACK_SLUG = 'session-manager';
|
|
21
21
|
const TAGS = /** @type {const} */ (['bug', 'feature', 'discussion']);
|
|
@@ -77,7 +77,7 @@ function defaultVersion() {
|
|
|
77
77
|
if (electron && electron.app && typeof electron.app.getVersion === 'function') return electron.app.getVersion();
|
|
78
78
|
} catch { /* not running under Electron */ }
|
|
79
79
|
try {
|
|
80
|
-
return String(require('
|
|
80
|
+
return String(require('../../../../package.json').version || 'unknown');
|
|
81
81
|
} catch {
|
|
82
82
|
return 'unknown';
|
|
83
83
|
}
|
package/src/main/lib/{customerFeedbackInbox.cjs → feedback-remote/customerFeedbackInbox.cjs}
RENAMED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
const path = require('node:path');
|
|
14
14
|
const fsp = require('node:fs/promises');
|
|
15
|
-
const atomicFs = require('
|
|
16
|
-
const schedulerPaths = require('
|
|
15
|
+
const atomicFs = require('../util/atomicFs.cjs');
|
|
16
|
+
const schedulerPaths = require('../scheduler/schedulerPaths.cjs');
|
|
17
17
|
const { resolveFeedbackBase, fromWireType, FEEDBACK_SLUG } = require('./customerFeedbackClient.cjs');
|
|
18
18
|
|
|
19
19
|
const STATUSES = /** @type {const} */ (['open', 'in_progress', 'resolved', 'wontfix']);
|
|
@@ -10,7 +10,7 @@ const REFRESH_DELAY_MS = 30_000;
|
|
|
10
10
|
*/
|
|
11
11
|
function registerCustomerFeedbackHandlers(deps = {}) {
|
|
12
12
|
const ipcMain = deps.ipcMain || require('electron').ipcMain;
|
|
13
|
-
const { schemas: s, validated: v } = require('
|
|
13
|
+
const { schemas: s, validated: v } = require('../../ipcSchemas.cjs');
|
|
14
14
|
const client = deps.client || require('./customerFeedbackClient.cjs');
|
|
15
15
|
const inbox = deps.inbox || require('./customerFeedbackInbox.cjs');
|
|
16
16
|
const timer = deps.setTimeoutImpl || setTimeout;
|
|
@@ -35,8 +35,8 @@ const http = require('node:http');
|
|
|
35
35
|
const path = require('node:path');
|
|
36
36
|
const crypto = require('node:crypto');
|
|
37
37
|
const fsp = require('node:fs/promises');
|
|
38
|
-
const config = require('
|
|
39
|
-
const schedulerPaths = require('
|
|
38
|
+
const config = require('../../config.cjs');
|
|
39
|
+
const schedulerPaths = require('../scheduler/schedulerPaths.cjs');
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Mode-aware token file path, resolved fresh on every call (never cached at
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
const { readBody, sendJson } = require('./localAdminHttp.cjs');
|
|
21
21
|
const { resolveCwd } = require('./projectHomeAdminRoutes.cjs');
|
|
22
|
-
const macroLibrary = require('
|
|
22
|
+
const macroLibrary = require('../persona-macro/macroLibrary.cjs');
|
|
23
23
|
|
|
24
24
|
function listHandler(onChanged, libOpts) {
|
|
25
25
|
return async (_req, res, query) => {
|
package/src/main/lib/{projectHomeAdminRoutes.cjs → feedback-remote/projectHomeAdminRoutes.cjs}
RENAMED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
const fs = require('node:fs');
|
|
24
24
|
const path = require('node:path');
|
|
25
25
|
const { readBody, sendJson } = require('./localAdminHttp.cjs');
|
|
26
|
-
const { resolveProjectContext } = require('
|
|
27
|
-
const { opsPath, OPS_ROOT_DIR } = require('
|
|
28
|
-
const config = require('
|
|
29
|
-
const { schemas } = require('
|
|
26
|
+
const { resolveProjectContext } = require('../projectRootResolve.cjs');
|
|
27
|
+
const { opsPath, OPS_ROOT_DIR } = require('../opsOwnership.cjs');
|
|
28
|
+
const config = require('../../config.cjs');
|
|
29
|
+
const { schemas } = require('../../ipcSchemas.cjs');
|
|
30
30
|
|
|
31
31
|
const MAX_HTML_BYTES = 1024 * 1024;
|
|
32
32
|
const MAX_DEMO_VIDEO_BYTES = 2 * 1024 * 1024;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
const fs = require('node:fs');
|
|
9
9
|
const https = require('node:https');
|
|
10
10
|
const path = require('node:path');
|
|
11
|
-
const { claudeHome } = require('
|
|
12
|
-
const { writeJsonAtomicSync, readJsonOrSync } = require('
|
|
11
|
+
const { claudeHome } = require('../scheduler/schedulerPaths.cjs');
|
|
12
|
+
const { writeJsonAtomicSync, readJsonOrSync } = require('../util/atomicFs.cjs');
|
|
13
13
|
|
|
14
14
|
const RELAY_CLIENT_API_BASE = 'https://bilko.run/api/sm-relay';
|
|
15
15
|
const REQUEST_TIMEOUT_MS = 15_000;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* `<cwd>/session-manager-operations/` (PRDs, queue state, run logs, the
|
|
18
18
|
* active-index.json Epic store) is resolved from a project's cwd by
|
|
19
|
-
* lib/prdLocations.cjs, lib/queueStore.cjs, and every prompt-sessions IPC
|
|
19
|
+
* lib/prd/prdLocations.cjs, lib/scheduler/queueStore.cjs, and every prompt-sessions IPC
|
|
20
20
|
* handler — all of them take `cwd` as an explicit parameter, never
|
|
21
21
|
* `process.cwd()`. That means the ops root follows WHATEVER cwd value the
|
|
22
22
|
* caller passes in. A prior incident (recorded in this project's memory as
|
|
@@ -53,8 +53,8 @@ const fsp = require('node:fs/promises');
|
|
|
53
53
|
const path = require('node:path');
|
|
54
54
|
const os = require('node:os');
|
|
55
55
|
const crypto = require('node:crypto');
|
|
56
|
-
const { OPS_ROOT_DIR } = require('
|
|
57
|
-
const schedulerPaths = require('
|
|
56
|
+
const { OPS_ROOT_DIR } = require('../opsOwnership.cjs');
|
|
57
|
+
const schedulerPaths = require('../scheduler/schedulerPaths.cjs');
|
|
58
58
|
const sharedGitExec = require('./gitExec.cjs');
|
|
59
59
|
|
|
60
60
|
// Per-kind configuration. Roots are kept OUTSIDE any project's own tree
|
|
@@ -148,7 +148,7 @@ function worktreeRootFor(kind) {
|
|
|
148
148
|
function isWorktreeDisabled(kind, cwd) {
|
|
149
149
|
if (process.env[configFor(kind).disableEnv] === '1') return true;
|
|
150
150
|
if (kind === 'epic' && cwd) {
|
|
151
|
-
const { isEpicWorktreeDisabledForProject } = require('
|
|
151
|
+
const { isEpicWorktreeDisabledForProject } = require('../epic/epicWorktreeProjectConfig.cjs');
|
|
152
152
|
if (isEpicWorktreeDisabledForProject(cwd)) return true;
|
|
153
153
|
}
|
|
154
154
|
return false;
|
|
@@ -169,7 +169,7 @@ function getMaxConcurrentWorktrees(kind) {
|
|
|
169
169
|
const raw = Number(process.env[cfg.maxEnv]);
|
|
170
170
|
if (Number.isFinite(raw) && raw > 0) return Math.floor(raw);
|
|
171
171
|
if (kind === 'job') {
|
|
172
|
-
const sessionSlots = require('
|
|
172
|
+
const sessionSlots = require('../scheduler/sessionSlots.cjs');
|
|
173
173
|
return Math.max(cfg.defaultMax, sessionSlots.totalSlots());
|
|
174
174
|
}
|
|
175
175
|
return cfg.defaultMax;
|
|
@@ -1546,7 +1546,7 @@ async function salvageWorktreeDiff({ cwd, outFile }) {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
const patch = await execGit(['diff', 'HEAD', '--binary'], { cwd, timeout: 30_000 });
|
|
1548
1548
|
if (!patch || !patch.trim()) return { ok: false };
|
|
1549
|
-
const { writeTextAtomic } = require('
|
|
1549
|
+
const { writeTextAtomic } = require('../../config.cjs');
|
|
1550
1550
|
await writeTextAtomic(outFile, patch);
|
|
1551
1551
|
return { ok: true, bytes: Buffer.byteLength(patch, 'utf8') };
|
|
1552
1552
|
} catch {
|
|
@@ -1628,7 +1628,7 @@ async function salvageDirtyDelta({ cwd, paths, outFile }) {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
1630
|
if (!patch.trim()) return { ok: false };
|
|
1631
|
-
const { writeTextAtomic } = require('
|
|
1631
|
+
const { writeTextAtomic } = require('../../config.cjs');
|
|
1632
1632
|
await writeTextAtomic(outFile, patch);
|
|
1633
1633
|
return { ok: true, bytes: Buffer.byteLength(patch, 'utf8') };
|
|
1634
1634
|
} catch {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
const path = require('node:path');
|
|
29
29
|
const config = require('../config.cjs');
|
|
30
30
|
|
|
31
|
-
const { historyRollupPath } = require('./schedulerPaths.cjs');
|
|
31
|
+
const { historyRollupPath } = require('./scheduler/schedulerPaths.cjs');
|
|
32
32
|
const COMPACT_THRESHOLD_BYTES = 5 * 1024 * 1024;
|
|
33
33
|
|
|
34
34
|
const TOTALS_MODEL_ID = '';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
const fs = require('node:fs');
|
|
10
|
-
const { walkImports } = require('./personaImportHealth.cjs');
|
|
10
|
+
const { walkImports } = require('./persona-macro/personaImportHealth.cjs');
|
|
11
11
|
|
|
12
12
|
// Maps walkImports' result shape to what the renderer panel needs per file:
|
|
13
13
|
// resolved path, existence, size, a rough token estimate, and overall health.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const os = require('node:os');
|
|
16
16
|
const crypto = require('node:crypto');
|
|
17
17
|
const path = require('node:path');
|
|
18
|
-
const claudeBin = require('./claudeBin.cjs');
|
|
18
|
+
const claudeBin = require('./claude/claudeBin.cjs');
|
|
19
19
|
const { isPackagedApp } = require('./appRuntime.cjs');
|
|
20
20
|
|
|
21
21
|
function resolveElectronApp() {
|
|
@@ -14,7 +14,7 @@ const { execFileSync, spawn } = require('node:child_process');
|
|
|
14
14
|
const path = require('node:path');
|
|
15
15
|
const fsp = require('node:fs/promises');
|
|
16
16
|
const { shell } = require('electron');
|
|
17
|
-
const { cleanChildEnv } = require('./cleanEnv.cjs');
|
|
17
|
+
const { cleanChildEnv } = require('./process/cleanEnv.cjs');
|
|
18
18
|
|
|
19
19
|
// IMAGE_RE — extensions opened in the OS default viewer, not a code editor.
|
|
20
20
|
// Keep in sync with the comment in index.cjs open-file-in-editor handler.
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
*
|
|
25
25
|
* Enforcement points (every write path into the ops root calls assertOpsWrite):
|
|
26
26
|
* - config.cjs writeTextAtomic / writeBinaryAtomic / writeJson / writeJsonSync
|
|
27
|
-
* - lib/epicMint.cjs (raw fs tmp+rename)
|
|
28
|
-
* - lib/queueStore.cjs (raw fs tmp+rename)
|
|
29
|
-
* - lib/opsErrorLog.cjs (raw fs append, JSONL error log)
|
|
27
|
+
* - lib/epic/epicMint.cjs (raw fs tmp+rename)
|
|
28
|
+
* - lib/scheduler/queueStore.cjs (raw fs tmp+rename)
|
|
29
|
+
* - lib/telemetry/opsErrorLog.cjs (raw fs append, JSONL error log)
|
|
30
30
|
* Renderer callers declare their writer id through the IPC payload.
|
|
31
31
|
*/
|
|
32
32
|
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
const path = require('node:path');
|
|
26
26
|
const { z } = require('zod');
|
|
27
|
-
const { WorkTypeSchema, LEGACY_WORK_TYPES } = require('
|
|
28
|
-
const { PERSONA_NAME_RE, ALL_PROJECTS } = require('
|
|
27
|
+
const { WorkTypeSchema, LEGACY_WORK_TYPES } = require('../prd/workTypeLibrary.cjs');
|
|
28
|
+
const { PERSONA_NAME_RE, ALL_PROJECTS } = require('../../agentLibrary.cjs');
|
|
29
29
|
|
|
30
30
|
// Bounded free-text fields — generous for legitimate persona authoring while
|
|
31
31
|
// still blocking a renderer from writing an effectively-unbounded frontmatter
|
|
@@ -38,11 +38,11 @@ const fsp = require('node:fs/promises');
|
|
|
38
38
|
const path = require('node:path');
|
|
39
39
|
const crypto = require('node:crypto');
|
|
40
40
|
const { z } = require('zod');
|
|
41
|
-
const { writeJsonAtomic } = require('
|
|
42
|
-
const { EpicTagSchema } = require('
|
|
43
|
-
const { WORK_TYPES } = require('
|
|
41
|
+
const { writeJsonAtomic } = require('../util/atomicFs.cjs');
|
|
42
|
+
const { EpicTagSchema } = require('../promptSessionSchema.cjs');
|
|
43
|
+
const { WORK_TYPES } = require('../prd/workTypeLibrary.cjs');
|
|
44
44
|
const { PERSONA_NAME_RE } = require('./personaMerge.cjs');
|
|
45
|
-
const { schedulerHome } = require('
|
|
45
|
+
const { schedulerHome } = require('../scheduler/schedulerPaths.cjs');
|
|
46
46
|
const { BUILTIN_MACROS } = require('./builtinMacros.cjs');
|
|
47
47
|
|
|
48
48
|
const ALL_PROJECTS = '*';
|
|
@@ -306,7 +306,7 @@ function personasToMacros(personas, now) {
|
|
|
306
306
|
/** Returns the migrated macros, or `null` on failure (caller must NOT write). */
|
|
307
307
|
async function migrateFromPersonas(opts) {
|
|
308
308
|
try {
|
|
309
|
-
const listPersonas = (opts && opts.listPersonas) || require('
|
|
309
|
+
const listPersonas = (opts && opts.listPersonas) || require('../../agentLibrary.cjs').listPersonas;
|
|
310
310
|
const personas = await listPersonas();
|
|
311
311
|
return personasToMacros(personas, new Date().toISOString());
|
|
312
312
|
} catch (err) {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
const fs = require('node:fs');
|
|
36
|
-
const { splitFrontmatter } = require('
|
|
37
|
-
const { resolvePersonaPaths } = require('
|
|
38
|
-
const configMgr = require('
|
|
36
|
+
const { splitFrontmatter } = require('../prd/prdFrontmatter.cjs');
|
|
37
|
+
const { resolvePersonaPaths } = require('../epic/epicMint.cjs');
|
|
38
|
+
const configMgr = require('../../config.cjs');
|
|
39
39
|
|
|
40
40
|
/** Filename-safe persona name: lowercase, hyphenated, matches the `.md` files on disk. */
|
|
41
41
|
const PERSONA_NAME_RE = /^[a-z][a-z0-9-]*$/;
|
|
@@ -47,7 +47,7 @@ function reportOverlayIssueOnce(cwd, agentType, overlayPath, message) {
|
|
|
47
47
|
if (reportedIssues.has(key)) return;
|
|
48
48
|
reportedIssues.add(key);
|
|
49
49
|
try {
|
|
50
|
-
const { appendError } = require('
|
|
50
|
+
const { appendError } = require('../telemetry/opsErrorLog.cjs');
|
|
51
51
|
appendError({
|
|
52
52
|
cwd,
|
|
53
53
|
scope: 'personaMerge',
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
*/
|
|
26
26
|
'use strict';
|
|
27
27
|
|
|
28
|
-
const { schemas } = require('
|
|
29
|
-
const { readBody, sendJson } = require('
|
|
30
|
-
const { appendAuditEvent } = require('
|
|
31
|
-
const queueOps = require('
|
|
32
|
-
const { MCP_TOOL_CATALOG, MCP_RECIPES } = require('
|
|
33
|
-
const { checkDelegationReadiness } = require('
|
|
34
|
-
const { resolveProjectContext } = require('
|
|
28
|
+
const { schemas } = require('../../ipcSchemas.cjs');
|
|
29
|
+
const { readBody, sendJson } = require('../feedback-remote/localAdminHttp.cjs');
|
|
30
|
+
const { appendAuditEvent } = require('../telemetry/auditLog.cjs');
|
|
31
|
+
const queueOps = require('../../queueOps.cjs');
|
|
32
|
+
const { MCP_TOOL_CATALOG, MCP_RECIPES } = require('../mcpToolCatalog.cjs');
|
|
33
|
+
const { checkDelegationReadiness } = require('../epic/delegationReadiness.cjs');
|
|
34
|
+
const { resolveProjectContext } = require('../projectRootResolve.cjs');
|
|
35
35
|
|
|
36
36
|
function parseJsonBody(raw) {
|
|
37
37
|
try {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* "available personas" name list surfaced in the write-time rejection error.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
const { personaFileExists, resolvePersonaPaths } = require('
|
|
17
|
-
const { listPersonas } = require('
|
|
16
|
+
const { personaFileExists, resolvePersonaPaths } = require('../epic/epicMint.cjs');
|
|
17
|
+
const { listPersonas } = require('../../agentLibrary.cjs');
|
|
18
18
|
|
|
19
19
|
/** PRD execution's documented default persona (dev-lead.md's own frontmatter role). */
|
|
20
20
|
const DEFAULT_PRD_AGENT_TYPE = 'dev-lead';
|
|
@@ -41,7 +41,7 @@ function reportDanglingAgentTypeOnce(cwd, agentType, deps = {}) {
|
|
|
41
41
|
// Required lazily, same rationale as agentModelResolve.cjs's
|
|
42
42
|
// logDanglingPersonaOnce: pay for this leaf module only on the (rare)
|
|
43
43
|
// miss path.
|
|
44
|
-
const { appendError } = require('
|
|
44
|
+
const { appendError } = require('../telemetry/opsErrorLog.cjs');
|
|
45
45
|
appendError({
|
|
46
46
|
cwd,
|
|
47
47
|
scope: 'prdAgentType',
|
|
@@ -18,22 +18,22 @@
|
|
|
18
18
|
|
|
19
19
|
const fsp = require('node:fs/promises');
|
|
20
20
|
const path = require('node:path');
|
|
21
|
-
const { schemas, PRD_CREATE_SLUG_RE } = require('
|
|
22
|
-
const { kebabCase } = require('
|
|
23
|
-
const config = require('
|
|
24
|
-
const { expandHome } = require('
|
|
25
|
-
const { readBody, sendJson } = require('
|
|
26
|
-
const { readActiveIndex } = require('
|
|
27
|
-
const { appendAuditEvent } = require('
|
|
28
|
-
const { resolveProjectContext } = require('
|
|
29
|
-
const { fixChainDepthOf, baseSlugOf } = require('
|
|
21
|
+
const { schemas, PRD_CREATE_SLUG_RE } = require('../../ipcSchemas.cjs');
|
|
22
|
+
const { kebabCase } = require('../util/kebabCase.cjs');
|
|
23
|
+
const config = require('../../config.cjs');
|
|
24
|
+
const { expandHome } = require('../util/expandHome.cjs');
|
|
25
|
+
const { readBody, sendJson } = require('../feedback-remote/localAdminHttp.cjs');
|
|
26
|
+
const { readActiveIndex } = require('../epic/epicMint.cjs');
|
|
27
|
+
const { appendAuditEvent } = require('../telemetry/auditLog.cjs');
|
|
28
|
+
const { resolveProjectContext } = require('../projectRootResolve.cjs');
|
|
29
|
+
const { fixChainDepthOf, baseSlugOf } = require('../scheduler/fixChainDepth.cjs');
|
|
30
30
|
const { DEFAULT_PRD_AGENT_TYPE, assertAgentTypeWritable } = require('./prdAgentType.cjs');
|
|
31
31
|
const { resolveDepSlug, findNearMatches } = require('./depSlugResolve.cjs');
|
|
32
|
-
const { isFixPlanSlug } = require('
|
|
32
|
+
const { isFixPlanSlug } = require('../scheduler/fixPlanSlug.cjs');
|
|
33
33
|
const { isIncomplete, resolveChainTerminals, isValidPlanId, mintPlanId, resolveInheritedPlanId } = require('./prdDisposition.cjs');
|
|
34
34
|
const { sizingWarnings } = require('./prdSizing.cjs');
|
|
35
35
|
const { validateGate, validateFiles, renderFilesSection, renderGateSection } = require('./prdGateFiles.cjs');
|
|
36
|
-
const { resolveGate, parseChain, isNoneGate } = require('
|
|
36
|
+
const { resolveGate, parseChain, isNoneGate } = require('../scheduler/definitionOfDone.cjs');
|
|
37
37
|
|
|
38
38
|
// A caller-supplied slug that already starts with its own `NN-` (e.g.
|
|
39
39
|
// "254-perf-x") used to silently become the double-prefixed row
|
|
@@ -55,7 +55,7 @@ const SLUG_HAS_NN_PREFIX_RE = /^(\d+)-/;
|
|
|
55
55
|
const FIX_CHAIN_DEPTH_CAP = 1;
|
|
56
56
|
|
|
57
57
|
const STANDARDS_PATH = path.join(
|
|
58
|
-
__dirname, '..', '..', '..',
|
|
58
|
+
__dirname, '..', '..', '..', '..',
|
|
59
59
|
'plugins', 'session-manager-dev', 'skills', 'develop', 'standards.md',
|
|
60
60
|
);
|
|
61
61
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
const fs = require('node:fs');
|
|
13
13
|
const { splitFrontmatter } = require('./prdFrontmatter.cjs');
|
|
14
|
-
const { extractSection } = require('
|
|
14
|
+
const { extractSection } = require('../scheduler/definitionOfDone.cjs');
|
|
15
15
|
|
|
16
16
|
// Backtick-quoted, extension-bearing relative paths, e.g. `src/main/scheduler.cjs`
|
|
17
17
|
// or `src/main/scheduler.cjs:490` (trailing :line dropped). Requires at least
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* No I/O, no scheduler imports — pure string-in, string/array-out.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
const { parseChain, explainChain, isNoneGate } = require('
|
|
18
|
+
const { parseChain, explainChain, isNoneGate } = require('../scheduler/definitionOfDone.cjs');
|
|
19
19
|
|
|
20
20
|
const GATE_MIN_ENTRIES = 1;
|
|
21
21
|
const GATE_MAX_ENTRIES = 10;
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
const fs = require('node:fs');
|
|
29
29
|
const path = require('node:path');
|
|
30
|
-
const { activeProjectCwds, allProjectCwds } = require('
|
|
30
|
+
const { activeProjectCwds, allProjectCwds } = require('../activeSessions.cjs');
|
|
31
31
|
|
|
32
|
-
const { opsPath, OPS_ROOT_DIR } = require('
|
|
32
|
+
const { opsPath, OPS_ROOT_DIR } = require('../opsOwnership.cjs');
|
|
33
33
|
|
|
34
34
|
// Segments UNDER the ops root; the ops root itself is resolved by
|
|
35
35
|
// opsOwnership.opsPath (PRD 1082) — never joined onto a raw cwd here.
|
|
@@ -18,9 +18,9 @@ const fsp = require('node:fs/promises');
|
|
|
18
18
|
const path = require('node:path');
|
|
19
19
|
const { splitFrontmatter, parsePrdFile, serializePrdFile } = require('./prdFrontmatter.cjs');
|
|
20
20
|
const { resolvePrdWriteDir, resolvePrdsDirs } = require('./prdLocations.cjs');
|
|
21
|
-
const { projectQueuePath } = require('
|
|
22
|
-
const { expandHome } = require('
|
|
23
|
-
const atomicFs = require('
|
|
21
|
+
const { projectQueuePath } = require('../scheduler/queueStore.cjs');
|
|
22
|
+
const { expandHome } = require('../util/expandHome.cjs');
|
|
23
|
+
const atomicFs = require('../util/atomicFs.cjs');
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Move every `.md` file in legacyPrdsDir whose frontmatter `cwd` resolves to
|
package/src/main/lib/prereqs.cjs
CHANGED
|
@@ -11,8 +11,8 @@ const fs = require('node:fs');
|
|
|
11
11
|
const path = require('node:path');
|
|
12
12
|
const { promisify } = require('node:util');
|
|
13
13
|
const childProcess = require('node:child_process');
|
|
14
|
-
const { pathWithUserBins } = require('./cleanEnv.cjs');
|
|
15
|
-
const { resolveClaudeBin } = require('./claudeBin.cjs');
|
|
14
|
+
const { pathWithUserBins } = require('./process/cleanEnv.cjs');
|
|
15
|
+
const { resolveClaudeBin } = require('./claude/claudeBin.cjs');
|
|
16
16
|
const { readCredentials } = require('./credentials.cjs');
|
|
17
17
|
|
|
18
18
|
const PROBE_TIMEOUT_MS = 5000;
|