claude-code-session-manager 0.97.0 → 0.100.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/README.md +3 -3
- package/bin/cli.cjs +16 -4
- package/bin/node-floor.cjs +41 -0
- package/dist/assets/{DataModel-D93FoaOm.js → DataModel-HdR0AxFq.js} +1 -1
- package/dist/assets/{History-CXxxqNP1.js → History-Dr4Jr_5z.js} +2 -2
- package/dist/assets/{Hooks-CzeYFQjq.js → Hooks-NhrvH3JP.js} +3 -3
- package/dist/assets/{Library-D2zPkwOC.js → Library-Dv_EtIMr.js} +1 -1
- package/dist/assets/{MarkdownEditor-DbinP78A.js → MarkdownEditor-DTKDWV_n.js} +1 -1
- package/dist/assets/{McpServers-Bu_sVGLr.js → McpServers-M034G9B3.js} +2 -2
- package/dist/assets/{Memory-BgiI6LZ_.js → Memory-DzF1B4gx.js} +6 -6
- package/dist/assets/{Permissions-C1MMzZRm.js → Permissions-DrgbSGWl.js} +3 -3
- package/dist/assets/{Plugins-Dhu6wAZi.js → Plugins-Bd3ef35w.js} +2 -2
- package/dist/assets/{ProvenanceBadge-C3AcWKMG.js → ProvenanceBadge-DcBHT1Iy.js} +1 -1
- package/dist/assets/{SaveBar-plwYm0iO.js → SaveBar-rimJem-Y.js} +1 -1
- package/dist/assets/Scheduler-DjgFJl2w.js +16 -0
- package/dist/assets/{ScopeSwitcher-DFy0vv_o.js → ScopeSwitcher-CnAzTBrl.js} +1 -1
- package/dist/assets/Settings-Dc1F_sSg.js +3 -0
- package/dist/assets/{SkillReferenceGraph-DsI7hRPB.js → SkillReferenceGraph-B9aZDecM.js} +1 -1
- package/dist/assets/{Skills-3E748UfB.js → Skills-DRXd18gu.js} +2 -2
- package/dist/assets/{SystemPrompt-BqmfUJOd.js → SystemPrompt-ahy5-Fwe.js} +1 -1
- package/dist/assets/{TagLibrary-CPz6fO8Q.js → TagLibrary-C_tToDeL.js} +1 -1
- package/dist/assets/{TiptapBody-D9EoBQ1P.js → TiptapBody-DvdefS6K.js} +1 -1
- package/dist/assets/{Toggle-BHAmZNDn.js → Toggle-6Jl5Njc6.js} +1 -1
- package/dist/assets/{index-CKH5Uxik.css → index-Bta-hwud.css} +1 -1
- package/dist/assets/{index-tn5JIVPj.js → index-vx8O73l8.js} +497 -502
- package/dist/assets/{settingsSchema-Crqy_aNz.js → settingsSchema-D6iRguNV.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +26 -29
- package/plugins/CLAUDE.md +6 -6
- package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +23 -19
- package/plugins/session-manager-dev/skills/builder/SKILL.md +3 -3
- package/plugins/session-manager-dev/skills/develop/SKILL.md +254 -510
- package/plugins/session-manager-dev/skills/develop/standards.md +17 -22
- package/scripts/README.md +3 -11
- package/scripts/audit-ops-hygiene.cjs +3 -3
- package/scripts/hooks/lib/guard-prd-writes-policy.cjs +1 -1
- package/scripts/hooks/lib/guard-self-schedule-policy.cjs +1 -1
- package/scripts/mint-epic.cjs +2 -3
- package/scripts/scheduler-mcp-server.cjs +36 -7
- package/src/main/agentLibrary.cjs +22 -2
- package/src/main/build-info.json +4 -4
- package/src/main/config.cjs +41 -38
- package/src/main/docEdit.cjs +4 -1
- package/src/main/files.cjs +2 -5
- package/src/main/health.cjs +1 -1
- package/src/main/index.cjs +23 -10
- package/src/main/ipcSchemas.cjs +28 -35
- package/src/main/lib/agentPersonaSchema.cjs +13 -2
- package/src/main/lib/atomicFs.cjs +116 -0
- package/src/main/lib/branchSweep.cjs +13 -12
- package/src/main/lib/buildTarget.cjs +3 -3
- package/src/main/lib/claudeCliCaps.cjs +129 -0
- package/src/main/lib/credentials.cjs +2 -4
- package/src/main/lib/crossProjectFeedback.cjs +3 -3
- package/src/main/lib/cwdClassify.cjs +15 -3
- package/src/main/lib/definitionOfDone.cjs +207 -125
- package/src/main/lib/dodDrainHook.cjs +11 -5
- package/src/main/lib/epicMint.cjs +2 -4
- package/src/main/lib/epicStatusMirror.cjs +8 -10
- package/src/main/lib/epicWorktreeProjectConfig.cjs +2 -4
- package/src/main/lib/gateAuthority.cjs +96 -0
- package/src/main/lib/gitExec.cjs +69 -0
- package/src/main/lib/gitWorktree.cjs +656 -92
- package/src/main/lib/instanceLock.cjs +5 -8
- package/src/main/lib/launchFailure.cjs +2 -3
- package/src/main/lib/macroLibrary.cjs +386 -0
- package/src/main/lib/mcpToolCatalog.cjs +26 -17
- package/src/main/lib/needsReviewLedger.cjs +1 -1
- package/src/main/lib/opsErrorLog.cjs +11 -1
- package/src/main/lib/opsOwnership.cjs +0 -5
- package/src/main/lib/pidAlive.cjs +32 -0
- package/src/main/lib/prdCreate.cjs +153 -19
- package/src/main/lib/prdDisposition.cjs +2 -2
- package/src/main/lib/prdGateFiles.cjs +284 -0
- package/src/main/lib/prdLocations.cjs +61 -0
- package/src/main/lib/prdMigration.cjs +2 -3
- package/src/main/lib/prdSizing.cjs +2 -1
- package/src/main/lib/promptSessionSchema.cjs +10 -2
- package/src/main/lib/rcaReport.cjs +4 -6
- package/src/main/lib/reaperHelpers.cjs +8 -1
- package/src/main/lib/reservationExpiry.cjs +6 -1
- package/src/main/lib/reviewNotice.cjs +263 -0
- package/src/main/lib/runClaudeP.cjs +4 -1
- package/src/main/lib/schedulerPaths.cjs +22 -2
- package/src/main/lib/sessionSlots.cjs +2 -4
- package/src/main/lib/shippedPersonaSeeds.cjs +179 -0
- package/src/main/lib/timeoutShim.cjs +123 -0
- package/src/main/lib/timeoutShimScript.cjs +275 -0
- package/src/main/lib/upgradeDrain.cjs +4 -10
- package/src/main/lib/watchdogHelpers.cjs +33 -30
- package/src/main/lib/workTypeLibrary.cjs +7 -1
- package/src/main/promptSessionEvents.cjs +37 -13
- package/src/main/queueOps.cjs +17 -6
- package/src/main/scheduler.cjs +975 -203
- package/src/main/seedAgentPersonas.cjs +278 -23
- package/src/main/supervisor.cjs +4 -1
- package/src/main/templates/PRD_AUTHORING.md +126 -406
- package/src/preload/__tests__/preload-surface.test.cjs +68 -0
- package/src/preload/api.d.ts +41 -94
- package/src/preload/index.cjs +14 -9
- package/src/seed/agents/architect.md +1 -0
- package/src/seed/agents/dev-lead.md +17 -18
- package/src/seed/agents/project-home-builder.md +1 -0
- package/src/seed/agents/validator.md +10 -4
- package/dist/assets/HostBilko-nESrTRIg.js +0 -1
- package/dist/assets/Scheduler-BVYTeh39.js +0 -16
- package/dist/assets/Settings-DIhGgdfs.js +0 -3
- package/src/main/__tests__/activeIndexMerge.test.cjs +0 -235
- package/src/main/__tests__/agentEffortResolve.test.cjs +0 -117
- package/src/main/__tests__/agentLibrary.test.cjs +0 -276
- package/src/main/__tests__/agentModelResolve.test.cjs +0 -311
- package/src/main/__tests__/agentOverlayWrite.test.cjs +0 -95
- package/src/main/__tests__/bilkoHost-deriveSlug.test.cjs +0 -26
- package/src/main/__tests__/bilkoHost-integration.test.cjs +0 -118
- package/src/main/__tests__/bilkoHostCore.test.cjs +0 -72
- package/src/main/__tests__/broadcastCoalescer.test.cjs +0 -122
- package/src/main/__tests__/chat-cancel-terminal.test.cjs +0 -120
- package/src/main/__tests__/chat-dead-channels.test.cjs +0 -63
- package/src/main/__tests__/chat-exit-close-race.test.cjs +0 -146
- package/src/main/__tests__/chat-mcp-consent-notice.test.cjs +0 -139
- package/src/main/__tests__/chat-preamble-anchors.test.cjs +0 -100
- package/src/main/__tests__/chat-queue.test.cjs +0 -97
- package/src/main/__tests__/chat-stop-signal.test.cjs +0 -89
- package/src/main/__tests__/chatRunner-epic-worktree-execcwd.test.cjs +0 -125
- package/src/main/__tests__/chatRunner-session-flag-retry.test.cjs +0 -252
- package/src/main/__tests__/classifyPromptTicket.test.cjs +0 -101
- package/src/main/__tests__/classifyTranscriptLine.test.cjs +0 -201
- package/src/main/__tests__/computeDepHistorySatisfaction.test.cjs +0 -66
- package/src/main/__tests__/config-readText-bounded.test.cjs +0 -84
- package/src/main/__tests__/configWriteBoundaryOwners.test.cjs +0 -59
- package/src/main/__tests__/crossProjectFeedback.test.cjs +0 -334
- package/src/main/__tests__/crossProjectFeedbackRoutes.test.cjs +0 -161
- package/src/main/__tests__/dep-orphan-archive-health.test.cjs +0 -77
- package/src/main/__tests__/develop-skill-failure-modes.test.cjs +0 -70
- package/src/main/__tests__/docEdit.test.cjs +0 -244
- package/src/main/__tests__/dod-batchkey.test.cjs +0 -183
- package/src/main/__tests__/dod-drain-hook.test.cjs +0 -302
- package/src/main/__tests__/dod-report.test.cjs +0 -304
- package/src/main/__tests__/dod-reverify.test.cjs +0 -285
- package/src/main/__tests__/epicContextDigest.test.cjs +0 -174
- package/src/main/__tests__/epicMint.test.cjs +0 -332
- package/src/main/__tests__/epicMintTelemetryTap.test.cjs +0 -64
- package/src/main/__tests__/epicStatusMirror.test.cjs +0 -110
- package/src/main/__tests__/epicValidationHook.test.cjs +0 -291
- package/src/main/__tests__/exchanges.test.cjs +0 -122
- package/src/main/__tests__/exchangesPromptId.test.cjs +0 -61
- package/src/main/__tests__/extractJson.test.cjs +0 -51
- package/src/main/__tests__/files-reject-credentials.test.cjs +0 -40
- package/src/main/__tests__/fixtures/1218-fo-01-move-scripts-lib-into-src-main-lib.log +0 -556
- package/src/main/__tests__/flatPrdTickSweep.test.cjs +0 -110
- package/src/main/__tests__/health-build-freshness.test.cjs +0 -39
- package/src/main/__tests__/health-claude-md-budget.test.cjs +0 -57
- package/src/main/__tests__/health-credentials.test.cjs +0 -81
- package/src/main/__tests__/health-delegation-chain.test.cjs +0 -124
- package/src/main/__tests__/health-per-project-stall.test.cjs +0 -84
- package/src/main/__tests__/health-prd-migration.test.cjs +0 -37
- package/src/main/__tests__/health-queue-dispatch.test.cjs +0 -135
- package/src/main/__tests__/health-starve-escalation.test.cjs +0 -94
- package/src/main/__tests__/health-tick-liveness.test.cjs +0 -179
- package/src/main/__tests__/health-usage-poller.test.cjs +0 -144
- package/src/main/__tests__/health-worktree-cap-blocked.test.cjs +0 -65
- package/src/main/__tests__/heapSnapshot.test.cjs +0 -121
- package/src/main/__tests__/historyAggregatorIntraday.test.cjs +0 -313
- package/src/main/__tests__/historyDashboard.test.cjs +0 -163
- package/src/main/__tests__/historyRollup.test.cjs +0 -333
- package/src/main/__tests__/intradayRefresh.test.cjs +0 -39
- package/src/main/__tests__/ipcSchemas-dependsOn.test.cjs +0 -39
- package/src/main/__tests__/kg-augment.test.cjs +0 -195
- package/src/main/__tests__/loadGateDetailTick.test.cjs +0 -31
- package/src/main/__tests__/machineProfile.test.cjs +0 -152
- package/src/main/__tests__/mcpStatus.test.cjs +0 -61
- package/src/main/__tests__/memoryAggregate.test.cjs +0 -109
- package/src/main/__tests__/memoryStale.test.cjs +0 -88
- package/src/main/__tests__/needsReviewLedger.test.cjs +0 -162
- package/src/main/__tests__/openExternalApp-spawn-error.test.cjs +0 -25
- package/src/main/__tests__/opsErrorLog.test.cjs +0 -109
- package/src/main/__tests__/opsErrorLogTelemetryTap.test.cjs +0 -173
- package/src/main/__tests__/personaMerge.test.cjs +0 -169
- package/src/main/__tests__/planValidator.test.cjs +0 -125
- package/src/main/__tests__/pollLoop-dispatch-on-failure.test.cjs +0 -176
- package/src/main/__tests__/prd-group-allocator.test.cjs +0 -119
- package/src/main/__tests__/prdAdminRouteParity.test.cjs +0 -70
- package/src/main/__tests__/prdAdminRoutes.test.cjs +0 -718
- package/src/main/__tests__/prdAgentType.test.cjs +0 -103
- package/src/main/__tests__/prdAuthoringSeed.test.cjs +0 -39
- package/src/main/__tests__/prdCreate.test.cjs +0 -979
- package/src/main/__tests__/prdCreateDisposition.test.cjs +0 -201
- package/src/main/__tests__/prdCreatePlanId.test.cjs +0 -132
- package/src/main/__tests__/prdFrontmatterAgentType.test.cjs +0 -117
- package/src/main/__tests__/prdFrontmatterDependsOn.test.cjs +0 -136
- package/src/main/__tests__/prdFrontmatterDisposition.test.cjs +0 -125
- package/src/main/__tests__/prdFrontmatterQuietMachine.test.cjs +0 -108
- package/src/main/__tests__/prdLocations.test.cjs +0 -195
- package/src/main/__tests__/prdLocationsArchived.test.cjs +0 -201
- package/src/main/__tests__/prdMigration.test.cjs +0 -349
- package/src/main/__tests__/prdMigrationLegacyAdopt.test.cjs +0 -91
- package/src/main/__tests__/prdParserHighWater.test.cjs +0 -74
- package/src/main/__tests__/prdParserSourcePromptId.test.cjs +0 -65
- package/src/main/__tests__/prdSetDisposition.test.cjs +0 -222
- package/src/main/__tests__/prdSizing.test.cjs +0 -106
- package/src/main/__tests__/prdSourcePromptIdBackfill.test.cjs +0 -118
- package/src/main/__tests__/prdUpdateDependsOn.test.cjs +0 -160
- package/src/main/__tests__/proc-role-env.test.cjs +0 -125
- package/src/main/__tests__/procname-claude-spawn-sites.test.cjs +0 -304
- package/src/main/__tests__/procname-sm-processes.test.cjs +0 -127
- package/src/main/__tests__/projectHomeAdminRoutes.test.cjs +0 -177
- package/src/main/__tests__/projectPages.test.cjs +0 -137
- package/src/main/__tests__/promptSessionEvents.test.cjs +0 -234
- package/src/main/__tests__/promptSessionSchema.test.cjs +0 -101
- package/src/main/__tests__/promptSessionTranscript.test.cjs +0 -0
- package/src/main/__tests__/promptSessionsCreateEpicHandler.test.cjs +0 -159
- package/src/main/__tests__/pty-epic-worktree-spawn-cwd.test.cjs +0 -282
- package/src/main/__tests__/pty-session-open-telemetry.test.cjs +0 -96
- package/src/main/__tests__/pty-write-result.test.cjs +0 -46
- package/src/main/__tests__/queue-health-verdict.test.cjs +0 -170
- package/src/main/__tests__/queue-starvation-dispatch-driver.test.cjs +0 -286
- package/src/main/__tests__/queue-starvation-per-project.test.cjs +0 -147
- package/src/main/__tests__/queueHistory.test.cjs +0 -355
- package/src/main/__tests__/queueOps-interactive-ac-lint.test.cjs +0 -65
- package/src/main/__tests__/queueOpsArchiveDestination.test.cjs +0 -65
- package/src/main/__tests__/queueOpsAutoArchive.test.cjs +0 -154
- package/src/main/__tests__/rateLimitPollerStreak.test.cjs +0 -128
- package/src/main/__tests__/rcaReport.test.cjs +0 -266
- package/src/main/__tests__/reconcileFlatPrdSweep.test.cjs +0 -119
- package/src/main/__tests__/reconcileTiming.test.cjs +0 -135
- package/src/main/__tests__/runLogRetention.test.cjs +0 -489
- package/src/main/__tests__/runVerify-atomic-verdicts.test.cjs +0 -26
- package/src/main/__tests__/runVerify-blocked-by-foreign-wip.test.cjs +0 -58
- package/src/main/__tests__/runVerify-landed-commit-outranks.test.cjs +0 -191
- package/src/main/__tests__/runVerify-policy-denial.test.cjs +0 -89
- package/src/main/__tests__/runVerify-transcript-commit-evidence.test.cjs +0 -225
- package/src/main/__tests__/runVerify.test.cjs +0 -1784
- package/src/main/__tests__/scheduleJobSchema.test.cjs +0 -127
- package/src/main/__tests__/scheduleJobStatusDrift.test.cjs +0 -65
- package/src/main/__tests__/scheduleJobTransitions.test.cjs +0 -277
- package/src/main/__tests__/scheduleJobTransitionsGrep.test.cjs +0 -59
- package/src/main/__tests__/scheduleJobTransitionsTelemetryTap.test.cjs +0 -72
- package/src/main/__tests__/scheduler-admin-routes.test.cjs +0 -199
- package/src/main/__tests__/scheduler-adopted-run-supervision.test.cjs +0 -143
- package/src/main/__tests__/scheduler-already-satisfied-on-main.test.cjs +0 -105
- package/src/main/__tests__/scheduler-archive-completed-prd.test.cjs +0 -102
- package/src/main/__tests__/scheduler-archived-twin-guard.test.cjs +0 -155
- package/src/main/__tests__/scheduler-autofix-outcome.test.cjs +0 -188
- package/src/main/__tests__/scheduler-autofix-select.test.cjs +0 -439
- package/src/main/__tests__/scheduler-autopromote.test.cjs +0 -51
- package/src/main/__tests__/scheduler-bash-timeout-env.test.cjs +0 -101
- package/src/main/__tests__/scheduler-blocked-by-foreign-wip.test.cjs +0 -107
- package/src/main/__tests__/scheduler-boot-orphans.test.cjs +0 -153
- package/src/main/__tests__/scheduler-broadcast-reconcile.test.cjs +0 -121
- package/src/main/__tests__/scheduler-clear-queue-history.test.cjs +0 -134
- package/src/main/__tests__/scheduler-commit-guard-noop.test.cjs +0 -244
- package/src/main/__tests__/scheduler-committed-in-window.test.cjs +0 -182
- package/src/main/__tests__/scheduler-cross-project-batch.test.cjs +0 -43
- package/src/main/__tests__/scheduler-default-eligible-heal.test.cjs +0 -168
- package/src/main/__tests__/scheduler-dispatch-loop.test.cjs +0 -58
- package/src/main/__tests__/scheduler-effective-concurrency.test.cjs +0 -81
- package/src/main/__tests__/scheduler-epic-digest.test.cjs +0 -227
- package/src/main/__tests__/scheduler-failed-autoreset.test.cjs +0 -121
- package/src/main/__tests__/scheduler-finalize-dispatch-guards.test.cjs +0 -229
- package/src/main/__tests__/scheduler-find-prd-dir.test.cjs +0 -75
- package/src/main/__tests__/scheduler-fix-plan-path.test.cjs +0 -119
- package/src/main/__tests__/scheduler-force-tick-outcome.test.cjs +0 -46
- package/src/main/__tests__/scheduler-foreign-wip-manifest.test.cjs +0 -78
- package/src/main/__tests__/scheduler-gate-shadow.test.cjs +0 -119
- package/src/main/__tests__/scheduler-guard-verdict-autoresolve.test.cjs +0 -390
- package/src/main/__tests__/scheduler-heal-refusal.test.cjs +0 -61
- package/src/main/__tests__/scheduler-heartbeat-payload.test.cjs +0 -80
- package/src/main/__tests__/scheduler-inplace-salvage.test.cjs +0 -323
- package/src/main/__tests__/scheduler-integration-failure-stamp.test.cjs +0 -41
- package/src/main/__tests__/scheduler-investigation-clean-skip.test.cjs +0 -63
- package/src/main/__tests__/scheduler-investigation-prompt.test.cjs +0 -123
- package/src/main/__tests__/scheduler-job-budget.test.cjs +0 -172
- package/src/main/__tests__/scheduler-job-overrun.test.cjs +0 -175
- package/src/main/__tests__/scheduler-launch-failure.test.cjs +0 -199
- package/src/main/__tests__/scheduler-leftover-fields.test.cjs +0 -52
- package/src/main/__tests__/scheduler-leftover-quarantine.test.cjs +0 -199
- package/src/main/__tests__/scheduler-looks-done.test.cjs +0 -537
- package/src/main/__tests__/scheduler-manual-pause.test.cjs +0 -118
- package/src/main/__tests__/scheduler-mechanical-recovery.test.cjs +0 -245
- package/src/main/__tests__/scheduler-meta-code-sha.test.cjs +0 -46
- package/src/main/__tests__/scheduler-needs-review-autoresolve.test.cjs +0 -197
- package/src/main/__tests__/scheduler-never-stop.test.cjs +0 -157
- package/src/main/__tests__/scheduler-no-dead-end-status.test.cjs +0 -152
- package/src/main/__tests__/scheduler-no-orphan-run-dir.test.cjs +0 -81
- package/src/main/__tests__/scheduler-notify-originating-tab-transcript.test.cjs +0 -87
- package/src/main/__tests__/scheduler-notify-originating-tab.test.cjs +0 -343
- package/src/main/__tests__/scheduler-periodic-reverify-guard.test.cjs +0 -217
- package/src/main/__tests__/scheduler-porcelain-rename.test.cjs +0 -164
- package/src/main/__tests__/scheduler-prd-missing-skip.test.cjs +0 -161
- package/src/main/__tests__/scheduler-prd-persona-spawn.test.cjs +0 -178
- package/src/main/__tests__/scheduler-quarantine-autoresolve.test.cjs +0 -165
- package/src/main/__tests__/scheduler-quiet-machine-lease.test.cjs +0 -257
- package/src/main/__tests__/scheduler-rate-limit-cooldown-freshness.test.cjs +0 -123
- package/src/main/__tests__/scheduler-rate-limit-pause.test.cjs +0 -152
- package/src/main/__tests__/scheduler-rate-limit-spin-guard.test.cjs +0 -156
- package/src/main/__tests__/scheduler-reap-dead-running-jobs.test.cjs +0 -754
- package/src/main/__tests__/scheduler-reaper-helpers-basics.test.cjs +0 -87
- package/src/main/__tests__/scheduler-reconcile-cwd-preserve.test.cjs +0 -100
- package/src/main/__tests__/scheduler-reconcile-history-backfill.test.cjs +0 -105
- package/src/main/__tests__/scheduler-reconcile-invalid-repair.test.cjs +0 -203
- package/src/main/__tests__/scheduler-reconcile-quarantine.test.cjs +0 -247
- package/src/main/__tests__/scheduler-reset-job-fields-guard.test.cjs +0 -77
- package/src/main/__tests__/scheduler-resume-recovery.test.cjs +0 -254
- package/src/main/__tests__/scheduler-shard-quarantine.test.cjs +0 -115
- package/src/main/__tests__/scheduler-shared-tree-guard.test.cjs +0 -380
- package/src/main/__tests__/scheduler-sigterm-commit.test.cjs +0 -43
- package/src/main/__tests__/scheduler-stall-per-project.test.cjs +0 -126
- package/src/main/__tests__/scheduler-starve-escalation.test.cjs +0 -154
- package/src/main/__tests__/scheduler-stranded-autofix-park.test.cjs +0 -252
- package/src/main/__tests__/scheduler-stranded-investigation.test.cjs +0 -185
- package/src/main/__tests__/scheduler-stuck-failed-escalation.test.cjs +0 -136
- package/src/main/__tests__/scheduler-supervisor-record.test.cjs +0 -81
- package/src/main/__tests__/scheduler-tick-cancel-token.test.cjs +0 -54
- package/src/main/__tests__/scheduler-tick-wedge.test.cjs +0 -172
- package/src/main/__tests__/scheduler-transient-failure.test.cjs +0 -141
- package/src/main/__tests__/scheduler-unreadable-queue-guard.test.cjs +0 -62
- package/src/main/__tests__/scheduler-utilization-hold.test.cjs +0 -89
- package/src/main/__tests__/scheduler-verify-prd-path.test.cjs +0 -109
- package/src/main/__tests__/scheduler-worktree-cap-defer.test.cjs +0 -234
- package/src/main/__tests__/scheduler-worktree-exec-cwd.test.cjs +0 -120
- package/src/main/__tests__/scheduler-writeprd-epic-rollback.test.cjs +0 -105
- package/src/main/__tests__/schedulerBatchRootBlocker.test.cjs +0 -117
- package/src/main/__tests__/schedulerStateSidecarRestore.test.cjs +0 -110
- package/src/main/__tests__/seedAgentPersonas.test.cjs +0 -184
- package/src/main/__tests__/seedSchedulerMcp.test.cjs +0 -211
- package/src/main/__tests__/seedStatus.test.cjs +0 -100
- package/src/main/__tests__/seedValidatorPersona.test.cjs +0 -116
- package/src/main/__tests__/stop-signal-anchor.test.cjs +0 -75
- package/src/main/__tests__/telemetryClient.test.cjs +0 -1055
- package/src/main/__tests__/telemetryContract.test.cjs +0 -930
- package/src/main/__tests__/telemetrySettings.test.cjs +0 -210
- package/src/main/__tests__/transcripts-batch-flush.test.cjs +0 -249
- package/src/main/__tests__/transcripts-doFlush-array.test.cjs +0 -124
- package/src/main/__tests__/transcripts-paged-reads.test.cjs +0 -241
- package/src/main/__tests__/transcripts-worktree-epic-path.test.cjs +0 -154
- package/src/main/__tests__/transcriptsUsageFor.test.cjs +0 -206
- package/src/main/__tests__/uniquePrdNumbers.test.cjs +0 -153
- package/src/main/__tests__/usageSingleFlight.test.cjs +0 -169
- package/src/main/__tests__/validationSentinels.test.cjs +0 -84
- package/src/main/__tests__/workTypeLibrary.test.cjs +0 -89
- package/src/main/bilkoHost.cjs +0 -314
- package/src/main/bilkoHostCore.cjs +0 -89
- package/src/main/lib/__tests__/active-sessions.test.cjs +0 -251
- package/src/main/lib/__tests__/activeIndexRebuild.test.cjs +0 -179
- package/src/main/lib/__tests__/agentPersonaSchema.test.cjs +0 -67
- package/src/main/lib/__tests__/auditLog.test.cjs +0 -38
- package/src/main/lib/__tests__/bootSelfHeal.test.cjs +0 -107
- package/src/main/lib/__tests__/branchSweep.test.cjs +0 -164
- package/src/main/lib/__tests__/buildIdentity.test.cjs +0 -121
- package/src/main/lib/__tests__/buildTarget.test.cjs +0 -52
- package/src/main/lib/__tests__/childWithLog.test.cjs +0 -321
- package/src/main/lib/__tests__/coldBootPromptSessionsWrite.test.cjs +0 -87
- package/src/main/lib/__tests__/crashTelemetry.test.cjs +0 -103
- package/src/main/lib/__tests__/credentials-futile-refresh.test.cjs +0 -115
- package/src/main/lib/__tests__/cwdClassify.test.cjs +0 -111
- package/src/main/lib/__tests__/definitionOfDoneSequence.test.cjs +0 -95
- package/src/main/lib/__tests__/delegationReadiness.test.cjs +0 -1175
- package/src/main/lib/__tests__/dispatchLoop.test.cjs +0 -63
- package/src/main/lib/__tests__/effectiveModelInfo.test.cjs +0 -244
- package/src/main/lib/__tests__/ephemeralCwd.test.cjs +0 -91
- package/src/main/lib/__tests__/epicDelegationStats.test.cjs +0 -137
- package/src/main/lib/__tests__/epicSpawnCwd.test.cjs +0 -283
- package/src/main/lib/__tests__/epicSpawnPlan.test.cjs +0 -196
- package/src/main/lib/__tests__/epicTranscriptPath.test.cjs +0 -163
- package/src/main/lib/__tests__/epicWorktreeBoot.test.cjs +0 -136
- package/src/main/lib/__tests__/epicWorktreeMerge.test.cjs +0 -130
- package/src/main/lib/__tests__/epicWorktreeMint.test.cjs +0 -117
- package/src/main/lib/__tests__/epicWorktreeProjectConfig.test.cjs +0 -137
- package/src/main/lib/__tests__/fixChainDepth.test.cjs +0 -40
- package/src/main/lib/__tests__/fixtures/204-mercury-steam-horse.log.txt +0 -13
- package/src/main/lib/__tests__/fixtures/scheduler-machine.json.corrupt-1789147548 +0 -34
- package/src/main/lib/__tests__/gateFixtures.json +0 -20
- package/src/main/lib/__tests__/gitCacheBound.test.cjs +0 -69
- package/src/main/lib/__tests__/gitWorktree.test.cjs +0 -1478
- package/src/main/lib/__tests__/gitWorktreeSalvage.test.cjs +0 -107
- package/src/main/lib/__tests__/gitWorktreeSalvageDelta.test.cjs +0 -153
- package/src/main/lib/__tests__/guardShims.test.cjs +0 -158
- package/src/main/lib/__tests__/importReferences.spec.cjs +0 -56
- package/src/main/lib/__tests__/instanceLock.test.cjs +0 -173
- package/src/main/lib/__tests__/jobSupervisorRecord.test.cjs +0 -78
- package/src/main/lib/__tests__/jobWorktree.test.cjs +0 -199
- package/src/main/lib/__tests__/jobWorktreeBootLive.test.cjs +0 -82
- package/src/main/lib/__tests__/landedSinceRun.test.cjs +0 -133
- package/src/main/lib/__tests__/launchFailure.test.cjs +0 -220
- package/src/main/lib/__tests__/loadGate.test.cjs +0 -303
- package/src/main/lib/__tests__/localAdminHttp.test.cjs +0 -214
- package/src/main/lib/__tests__/loopDelay.test.cjs +0 -68
- package/src/main/lib/__tests__/mcpToolCatalog.test.cjs +0 -107
- package/src/main/lib/__tests__/modelCatalog.test.cjs +0 -202
- package/src/main/lib/__tests__/opsOwnership.test.cjs +0 -113
- package/src/main/lib/__tests__/opsRootAbsoluteCwd.test.cjs +0 -328
- package/src/main/lib/__tests__/opsRootNestedWrite.test.cjs +0 -51
- package/src/main/lib/__tests__/opsRootResolve.test.cjs +0 -149
- package/src/main/lib/__tests__/prdDeclaredPaths.test.cjs +0 -82
- package/src/main/lib/__tests__/prdDisposition.test.cjs +0 -224
- package/src/main/lib/__tests__/procIdentity.test.cjs +0 -119
- package/src/main/lib/__tests__/procName.test.cjs +0 -92
- package/src/main/lib/__tests__/projectBriefCore.test.cjs +0 -216
- package/src/main/lib/__tests__/projectRootResolve.test.cjs +0 -148
- package/src/main/lib/__tests__/queueHealth.test.cjs +0 -58
- package/src/main/lib/__tests__/queueStoreAtomicWrite.test.cjs +0 -88
- package/src/main/lib/__tests__/queueStoreMachineStateRecovery.test.cjs +0 -190
- package/src/main/lib/__tests__/quietMachineLease.test.cjs +0 -39
- package/src/main/lib/__tests__/rateLimitWindow.test.cjs +0 -88
- package/src/main/lib/__tests__/reaperHelpers.test.cjs +0 -577
- package/src/main/lib/__tests__/schedulerBatchDepends.test.cjs +0 -312
- package/src/main/lib/__tests__/schedulerBatchFairness.test.cjs +0 -213
- package/src/main/lib/__tests__/schedulerBatchLaunchHold.test.cjs +0 -125
- package/src/main/lib/__tests__/schedulerBatchProjectCap.test.cjs +0 -127
- package/src/main/lib/__tests__/schedulerBatchQuietMachine.test.cjs +0 -109
- package/src/main/lib/__tests__/schedulerMcpServerHeadlessRefusal.test.cjs +0 -71
- package/src/main/lib/__tests__/schedulerMcpServerHelp.test.cjs +0 -216
- package/src/main/lib/__tests__/schedulerMcpServerProjectHome.test.cjs +0 -183
- package/src/main/lib/__tests__/schedulerPaths.test.cjs +0 -226
- package/src/main/lib/__tests__/schedulerPathsWorktree.test.cjs +0 -133
- package/src/main/lib/__tests__/schedulerRuntimeState.test.cjs +0 -56
- package/src/main/lib/__tests__/sessionSlots.test.cjs +0 -144
- package/src/main/lib/__tests__/telemetryBacklog.test.cjs +0 -626
- package/src/main/lib/__tests__/telemetryBoot.test.cjs +0 -134
- package/src/main/lib/__tests__/telemetryConsent.test.cjs +0 -136
- package/src/main/lib/__tests__/telemetryCounters.test.cjs +0 -57
- package/src/main/lib/__tests__/telemetryCountersMetadataColumn.test.cjs +0 -98
- package/src/main/lib/__tests__/terminalRunOutcome.test.cjs +0 -200
- package/src/main/lib/__tests__/toolUseClassify.test.cjs +0 -53
- package/src/main/lib/__tests__/updateCheck.test.cjs +0 -63
- package/src/main/lib/__tests__/upgradeDrain.test.cjs +0 -130
- package/src/main/lib/__tests__/usageCircuit.test.cjs +0 -354
- package/src/main/lib/__tests__/watchdog-helpers.test.cjs +0 -375
- package/src/main/lib/__tests__/watchdog-relaunch.test.cjs +0 -266
- package/src/main/lib/kgExchangePairing.cjs +0 -75
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* epicWorktreeBoot.test.cjs — unit tests for reconcileEpicWorktreesOnBoot
|
|
3
|
-
* (PRD 1033), which wires gitWorktree.cjs's `isLive` predicate (built but
|
|
4
|
-
* left unwired by PRD 1032) to a project's real active-index.json: a
|
|
5
|
-
* worktree survives boot reconciliation exactly when its owning Epic is
|
|
6
|
-
* still 'active' there.
|
|
7
|
-
*
|
|
8
|
-
* Run: timeout 120 npx vitest run src/main/lib/__tests__/epicWorktreeBoot.test.cjs
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
import { test, expect } from 'vitest';
|
|
14
|
-
const { reconcileEpicWorktreesOnBoot } = require('../epicWorktreeBoot.cjs');
|
|
15
|
-
|
|
16
|
-
test('reaps a worktree whose owning Epic is not active (missing from the index)', async () => {
|
|
17
|
-
const calls = [];
|
|
18
|
-
const reconcileWorktreesOnBoot = async (cwds, opts) => {
|
|
19
|
-
calls.push({ cwds, kind: opts.kind });
|
|
20
|
-
// Simulate gitWorktree.cjs's real loop: it asks isLive per key found on disk.
|
|
21
|
-
expect(await opts.isLive('orphaned-epic')).toBe(false);
|
|
22
|
-
};
|
|
23
|
-
await reconcileEpicWorktreesOnBoot(['/projects/foo'], {
|
|
24
|
-
readActiveIndex: () => ({ sessions: {} }),
|
|
25
|
-
reconcileWorktreesOnBoot,
|
|
26
|
-
});
|
|
27
|
-
expect(calls).toHaveLength(1);
|
|
28
|
-
expect(calls[0].kind).toBe('epic');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
test('a worktree belonging to a currently-active Epic survives (isLive returns true)', async () => {
|
|
32
|
-
const reconcileWorktreesOnBoot = async (cwds, opts) => {
|
|
33
|
-
expect(await opts.isLive('still-active-epic')).toBe(true);
|
|
34
|
-
expect(await opts.isLive('completed-epic')).toBe(false);
|
|
35
|
-
expect(await opts.isLive('unknown-epic')).toBe(false);
|
|
36
|
-
};
|
|
37
|
-
await reconcileEpicWorktreesOnBoot(['/projects/foo'], {
|
|
38
|
-
readActiveIndex: (cwd) => {
|
|
39
|
-
expect(cwd).toBe('/projects/foo');
|
|
40
|
-
return {
|
|
41
|
-
sessions: {
|
|
42
|
-
'still-active-epic': { id: 'still-active-epic', status: 'active' },
|
|
43
|
-
'completed-epic': { id: 'completed-epic', status: 'completed' },
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
reconcileWorktreesOnBoot,
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('sweeps every cwd given, each with its own active-index read', async () => {
|
|
52
|
-
const seenCwds = [];
|
|
53
|
-
await reconcileEpicWorktreesOnBoot(['/projects/a', '/projects/b'], {
|
|
54
|
-
readActiveIndex: (cwd) => {
|
|
55
|
-
seenCwds.push(cwd);
|
|
56
|
-
return { sessions: {} };
|
|
57
|
-
},
|
|
58
|
-
reconcileWorktreesOnBoot: async () => {},
|
|
59
|
-
});
|
|
60
|
-
expect(seenCwds).toEqual(['/projects/a', '/projects/b']);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
test('never throws when a cwd has no active-index.json yet (readActiveIndex throws)', async () => {
|
|
64
|
-
const reconcileWorktreesOnBoot = async (cwds, opts) => {
|
|
65
|
-
expect(await opts.isLive('any-epic')).toBe(false);
|
|
66
|
-
};
|
|
67
|
-
await expect(
|
|
68
|
-
reconcileEpicWorktreesOnBoot(['/projects/no-index-yet'], {
|
|
69
|
-
readActiveIndex: () => { throw new Error('ENOENT'); },
|
|
70
|
-
reconcileWorktreesOnBoot,
|
|
71
|
-
}),
|
|
72
|
-
).resolves.toBeUndefined();
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
test('ignores falsy entries in the cwd list', async () => {
|
|
76
|
-
const seenCwds = [];
|
|
77
|
-
await reconcileEpicWorktreesOnBoot([null, '/projects/a', undefined, ''], {
|
|
78
|
-
readActiveIndex: (cwd) => { seenCwds.push(cwd); return { sessions: {} }; },
|
|
79
|
-
reconcileWorktreesOnBoot: async () => {},
|
|
80
|
-
});
|
|
81
|
-
expect(seenCwds).toEqual(['/projects/a']);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// ─── real git repo + real active-index.json, default (unstubbed) deps ─────
|
|
85
|
-
|
|
86
|
-
test('end-to-end with default deps: a worktree of a still-active Epic survives, an orphaned one is reaped', async () => {
|
|
87
|
-
const fs = require('node:fs');
|
|
88
|
-
const os = require('node:os');
|
|
89
|
-
const path = require('node:path');
|
|
90
|
-
const { execFileSync } = require('node:child_process');
|
|
91
|
-
const gitWorktree = require('../gitWorktree.cjs');
|
|
92
|
-
|
|
93
|
-
const tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sm-epicworktreeboot-e2e-'));
|
|
94
|
-
const repoCwd = path.join(tmpRoot, 'repo');
|
|
95
|
-
const git = (args, cwd) => execFileSync('git', args, { cwd, encoding: 'utf8' });
|
|
96
|
-
fs.mkdirSync(repoCwd, { recursive: true });
|
|
97
|
-
git(['init', '-q'], repoCwd);
|
|
98
|
-
git(['config', 'user.email', 'test@example.com'], repoCwd);
|
|
99
|
-
git(['config', 'user.name', 'Test'], repoCwd);
|
|
100
|
-
fs.writeFileSync(path.join(repoCwd, 'README.md'), 'hello\n', 'utf8');
|
|
101
|
-
git(['add', '-A'], repoCwd);
|
|
102
|
-
git(['commit', '-q', '-m', 'initial'], repoCwd);
|
|
103
|
-
gitWorktree._resetActiveWorktreeCountForTests('epic', 0);
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
const liveEpicId = 'e2e-live-epic';
|
|
107
|
-
const orphanedEpicId = 'e2e-orphaned-epic';
|
|
108
|
-
const live = await gitWorktree.createEpicWorktree({ cwd: repoCwd, epicId: liveEpicId });
|
|
109
|
-
const orphaned = await gitWorktree.createEpicWorktree({ cwd: repoCwd, epicId: orphanedEpicId });
|
|
110
|
-
expect(live.ok).toBe(true);
|
|
111
|
-
expect(orphaned.ok).toBe(true);
|
|
112
|
-
gitWorktree._resetActiveWorktreeCountForTests('epic', 0);
|
|
113
|
-
|
|
114
|
-
const indexDir = path.join(repoCwd, 'session-manager-operations', 'prompt-sessions');
|
|
115
|
-
fs.mkdirSync(indexDir, { recursive: true });
|
|
116
|
-
fs.writeFileSync(
|
|
117
|
-
path.join(indexDir, 'active-index.json'),
|
|
118
|
-
JSON.stringify({
|
|
119
|
-
sessions: {
|
|
120
|
-
[liveEpicId]: { id: liveEpicId, status: 'active' },
|
|
121
|
-
// orphanedEpicId deliberately absent — simulates a completed/deleted Epic.
|
|
122
|
-
},
|
|
123
|
-
events: {},
|
|
124
|
-
}),
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
await reconcileEpicWorktreesOnBoot([repoCwd]);
|
|
128
|
-
|
|
129
|
-
expect(fs.existsSync(live.dir)).toBe(true);
|
|
130
|
-
expect(fs.existsSync(orphaned.dir)).toBe(false);
|
|
131
|
-
|
|
132
|
-
await gitWorktree.cleanupEpicWorktree({ cwd: repoCwd, dir: live.dir, branch: live.branch });
|
|
133
|
-
} finally {
|
|
134
|
-
fs.rmSync(tmpRoot, { recursive: true, force: true });
|
|
135
|
-
}
|
|
136
|
-
});
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* epicWorktreeMerge.test.cjs — unit tests for the
|
|
3
|
-
* 'promptSessions:merge-to-main' IPC handler (lib/epicWorktreeMerge.cjs),
|
|
4
|
-
* PRD 1034: the ONLY point where an Epic's isolated git worktree branch
|
|
5
|
-
* (PRD 1032/1033) resolves back into its owning project's main tree.
|
|
6
|
-
*
|
|
7
|
-
* Exercises the handler the same way index.cjs wires it — schema validation
|
|
8
|
-
* (ipcSchemas.cjs's `validated` wrapper) in front of the business logic,
|
|
9
|
-
* mirroring epicWorktreeMint.test.cjs's pattern.
|
|
10
|
-
*
|
|
11
|
-
* Run: timeout 120 npx vitest run src/main/lib/__tests__/epicWorktreeMerge.test.cjs
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use strict';
|
|
15
|
-
|
|
16
|
-
import { test, expect, afterEach } from 'vitest';
|
|
17
|
-
const fs = require('node:fs');
|
|
18
|
-
const fsp = require('node:fs/promises');
|
|
19
|
-
const os = require('node:os');
|
|
20
|
-
const path = require('node:path');
|
|
21
|
-
const { execFileSync } = require('node:child_process');
|
|
22
|
-
const { schemas, validated } = require('../../ipcSchemas.cjs');
|
|
23
|
-
const { mergeEpicToMainViaIpc } = require('../epicWorktreeMerge.cjs');
|
|
24
|
-
const gitWorktree = require('../gitWorktree.cjs');
|
|
25
|
-
const config = require('../../config.cjs');
|
|
26
|
-
|
|
27
|
-
const handler = validated(schemas.promptSessionsMergeToMain, ({ cwd, epicId, branch, dir }) =>
|
|
28
|
-
mergeEpicToMainViaIpc(cwd, epicId, branch, dir),
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
function git(args, cwd) {
|
|
32
|
-
return execFileSync('git', args, { cwd, encoding: 'utf8' });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function initRepo(dir) {
|
|
36
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
37
|
-
git(['init', '-q'], dir);
|
|
38
|
-
git(['config', 'user.email', 'test@example.com'], dir);
|
|
39
|
-
git(['config', 'user.name', 'Test'], dir);
|
|
40
|
-
fs.writeFileSync(path.join(dir, 'README.md'), 'hello\n', 'utf8');
|
|
41
|
-
git(['add', '-A'], dir);
|
|
42
|
-
git(['commit', '-q', '-m', 'initial'], dir);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const tmpDirs = [];
|
|
46
|
-
afterEach(async () => {
|
|
47
|
-
gitWorktree._resetActiveWorktreeCountForTests('epic', 0);
|
|
48
|
-
while (tmpDirs.length) {
|
|
49
|
-
const d = tmpDirs.pop();
|
|
50
|
-
try { await gitWorktree.reconcileWorktreesOnBoot([d], { kind: 'epic' }); } catch { /* ignore */ }
|
|
51
|
-
await fsp.rm(d, { recursive: true, force: true });
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
async function mkRepoCwd() {
|
|
56
|
-
const cwd = await fsp.mkdtemp(path.join(os.tmpdir(), 'sm-epicworktreemerge-'));
|
|
57
|
-
initRepo(cwd);
|
|
58
|
-
config.addAllowedRoot(cwd);
|
|
59
|
-
tmpDirs.push(cwd);
|
|
60
|
-
return cwd;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
test('a clean ff-only merge succeeds and cleans up the worktree checkout', async () => {
|
|
64
|
-
const cwd = await mkRepoCwd();
|
|
65
|
-
const created = await gitWorktree.createEpicWorktree({ cwd, epicId: 'epic-merge-clean' });
|
|
66
|
-
expect(created.ok).toBe(true);
|
|
67
|
-
|
|
68
|
-
fs.writeFileSync(path.join(created.dir, 'epic-note.txt'), 'epic work\n', 'utf8');
|
|
69
|
-
git(['add', '-A'], created.dir);
|
|
70
|
-
git(['commit', '-q', '-m', 'epic edits'], created.dir);
|
|
71
|
-
|
|
72
|
-
const result = await handler(null, { cwd, epicId: 'epic-merge-clean', branch: created.branch, dir: created.dir });
|
|
73
|
-
|
|
74
|
-
expect(result).toEqual({ ok: true, status: 'merged', integrated: true });
|
|
75
|
-
// Checkout removed, content landed on the main tree.
|
|
76
|
-
expect(fs.existsSync(created.dir)).toBe(false);
|
|
77
|
-
expect(fs.existsSync(path.join(cwd, 'epic-note.txt'))).toBe(true);
|
|
78
|
-
const branches = git(['branch', '--list', created.branch], cwd);
|
|
79
|
-
expect(branches.trim()).toBe('');
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
test('a real conflicting change leaves branch + worktree dir intact and returns needs_merge_resolution', async () => {
|
|
83
|
-
const cwd = await mkRepoCwd();
|
|
84
|
-
const created = await gitWorktree.createEpicWorktree({ cwd, epicId: 'epic-merge-conflict' });
|
|
85
|
-
expect(created.ok).toBe(true);
|
|
86
|
-
|
|
87
|
-
// Same line, two divergent edits — a genuine content conflict.
|
|
88
|
-
fs.writeFileSync(path.join(created.dir, 'README.md'), 'epic changed this line\n', 'utf8');
|
|
89
|
-
git(['add', '-A'], created.dir);
|
|
90
|
-
git(['commit', '-q', '-m', 'epic edits README'], created.dir);
|
|
91
|
-
|
|
92
|
-
fs.writeFileSync(path.join(cwd, 'README.md'), 'main tree changed this line\n', 'utf8');
|
|
93
|
-
git(['add', '-A'], cwd);
|
|
94
|
-
git(['commit', '-q', '-m', 'main tree edits README'], cwd);
|
|
95
|
-
|
|
96
|
-
const result = await handler(null, { cwd, epicId: 'epic-merge-conflict', branch: created.branch, dir: created.dir });
|
|
97
|
-
|
|
98
|
-
expect(result.ok).toBe(false);
|
|
99
|
-
expect(result.status).toBe('needs_merge_resolution');
|
|
100
|
-
expect(result.reason).toMatch(/conflict|merge failed/i);
|
|
101
|
-
|
|
102
|
-
// Never silently discarded: the checkout and its branch both survive.
|
|
103
|
-
expect(fs.existsSync(created.dir)).toBe(true);
|
|
104
|
-
const branches = git(['branch', '--list', created.branch], cwd);
|
|
105
|
-
expect(branches.trim()).not.toBe('');
|
|
106
|
-
// The main tree itself is left clean (no half-applied merge).
|
|
107
|
-
const status = git(['status', '--porcelain'], cwd);
|
|
108
|
-
expect(status.trim()).toBe('');
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
test('a cwd outside every allowed root is rejected before anything is merged', async () => {
|
|
112
|
-
const unregistered = await fsp.mkdtemp(path.join(os.tmpdir(), 'sm-epicworktreemerge-unregistered-'));
|
|
113
|
-
initRepo(unregistered);
|
|
114
|
-
tmpDirs.push(unregistered);
|
|
115
|
-
|
|
116
|
-
await expect(
|
|
117
|
-
handler(null, { cwd: unregistered, epicId: 'epic-merge-x', branch: 'sm-epic/epic-merge-x', dir: '/tmp/whatever' }),
|
|
118
|
-
).rejects.toThrow(/outside allowed boundaries/);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
test('a request with a malformed branch name is rejected by ipcSchemas validation', async () => {
|
|
122
|
-
const cwd = await mkRepoCwd();
|
|
123
|
-
// `validated()` parses BEFORE calling the handler, so a schema rejection is
|
|
124
|
-
// a synchronous throw, not a rejected promise (ipcSchemas.cjs:851-856 —
|
|
125
|
-
// Electron's IPC harness is what turns it into a rejection at the boundary).
|
|
126
|
-
// Same assertion style as promptSessionsCreateEpicHandler.test.cjs:86-106.
|
|
127
|
-
expect(
|
|
128
|
-
() => handler(null, { cwd, epicId: 'epic-merge-y', branch: 'not-an-epic-branch', dir: '/tmp/whatever' }),
|
|
129
|
-
).toThrow();
|
|
130
|
-
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* epicWorktreeMint.test.cjs — unit tests for the
|
|
3
|
-
* 'promptSessions:create-worktree' IPC handler (lib/epicWorktreeMint.cjs),
|
|
4
|
-
* PRD 1033: the main-process entry point the renderer's approveProposed
|
|
5
|
-
* fires (fire-and-forget) at the Epic proposed->active transition to create
|
|
6
|
-
* its isolated git worktree.
|
|
7
|
-
*
|
|
8
|
-
* Exercises the handler the same way index.cjs wires it — schema validation
|
|
9
|
-
* (ipcSchemas.cjs's `validated` wrapper) in front of the business logic,
|
|
10
|
-
* mirroring promptSessionsCreateEpicHandler.test.cjs's pattern.
|
|
11
|
-
*
|
|
12
|
-
* Run: timeout 120 npx vitest run src/main/lib/__tests__/epicWorktreeMint.test.cjs
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
'use strict';
|
|
16
|
-
|
|
17
|
-
import { test, expect, afterEach } from 'vitest';
|
|
18
|
-
const fs = require('node:fs');
|
|
19
|
-
const fsp = require('node:fs/promises');
|
|
20
|
-
const os = require('node:os');
|
|
21
|
-
const path = require('node:path');
|
|
22
|
-
const { execFileSync } = require('node:child_process');
|
|
23
|
-
const { schemas, validated } = require('../../ipcSchemas.cjs');
|
|
24
|
-
const { createEpicWorktreeViaIpc } = require('../epicWorktreeMint.cjs');
|
|
25
|
-
const gitWorktree = require('../gitWorktree.cjs');
|
|
26
|
-
const config = require('../../config.cjs');
|
|
27
|
-
|
|
28
|
-
const handler = validated(schemas.promptSessionsCreateWorktree, ({ cwd, epicId }) => createEpicWorktreeViaIpc(cwd, epicId));
|
|
29
|
-
|
|
30
|
-
function git(args, cwd) {
|
|
31
|
-
return execFileSync('git', args, { cwd, encoding: 'utf8' });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function initRepo(dir) {
|
|
35
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
36
|
-
git(['init', '-q'], dir);
|
|
37
|
-
git(['config', 'user.email', 'test@example.com'], dir);
|
|
38
|
-
git(['config', 'user.name', 'Test'], dir);
|
|
39
|
-
fs.writeFileSync(path.join(dir, 'README.md'), 'hello\n', 'utf8');
|
|
40
|
-
git(['add', '-A'], dir);
|
|
41
|
-
git(['commit', '-q', '-m', 'initial'], dir);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const tmpDirs = [];
|
|
45
|
-
afterEach(async () => {
|
|
46
|
-
gitWorktree._resetActiveWorktreeCountForTests('epic', 0);
|
|
47
|
-
while (tmpDirs.length) {
|
|
48
|
-
const d = tmpDirs.pop();
|
|
49
|
-
try { await gitWorktree.reconcileWorktreesOnBoot([d], { kind: 'epic' }); } catch { /* ignore */ }
|
|
50
|
-
await fsp.rm(d, { recursive: true, force: true });
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
async function mkRepoCwd() {
|
|
55
|
-
const cwd = await fsp.mkdtemp(path.join(os.tmpdir(), 'sm-epicworktreemint-'));
|
|
56
|
-
initRepo(cwd);
|
|
57
|
-
config.addAllowedRoot(cwd);
|
|
58
|
-
tmpDirs.push(cwd);
|
|
59
|
-
return cwd;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
test('a valid request creates the Epic worktree and returns the field shape ready to persist', async () => {
|
|
63
|
-
const cwd = await mkRepoCwd();
|
|
64
|
-
const result = await handler(null, { cwd, epicId: 'epic-mint-1' });
|
|
65
|
-
|
|
66
|
-
expect(result).not.toBeNull();
|
|
67
|
-
expect(result.branch).toBe('sm-epic/epic-mint-1');
|
|
68
|
-
expect(result.baseCwd).toBe(cwd);
|
|
69
|
-
expect(result.status).toBe('active');
|
|
70
|
-
expect(fs.existsSync(result.dir)).toBe(true);
|
|
71
|
-
expect(fs.existsSync(path.join(result.dir, 'README.md'))).toBe(true);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
test('a non-git cwd resolves to null rather than throwing (Epic proceeds unisolated)', async () => {
|
|
75
|
-
const cwd = await fsp.mkdtemp(path.join(os.tmpdir(), 'sm-epicworktreemint-nongit-'));
|
|
76
|
-
config.addAllowedRoot(cwd);
|
|
77
|
-
tmpDirs.push(cwd);
|
|
78
|
-
|
|
79
|
-
const result = await handler(null, { cwd, epicId: 'epic-mint-2' });
|
|
80
|
-
expect(result).toBeNull();
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
test('a dirty base tree still creates the worktree, carrying the uncommitted edit in rather than falling back unisolated', async () => {
|
|
84
|
-
const cwd = await mkRepoCwd();
|
|
85
|
-
fs.writeFileSync(path.join(cwd, 'README.md'), 'uncommitted tracked edit\n', 'utf8');
|
|
86
|
-
|
|
87
|
-
const result = await handler(null, { cwd, epicId: 'epic-mint-3' });
|
|
88
|
-
expect(result).not.toBeNull();
|
|
89
|
-
expect(fs.readFileSync(path.join(result.dir, 'README.md'), 'utf8')).toBe('uncommitted tracked edit\n');
|
|
90
|
-
expect(fs.readFileSync(path.join(cwd, 'README.md'), 'utf8')).toBe('uncommitted tracked edit\n');
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
test('SM_EPIC_WORKTREE_DISABLE=1 resolves to null rather than throwing', async () => {
|
|
94
|
-
const cwd = await mkRepoCwd();
|
|
95
|
-
const original = process.env.SM_EPIC_WORKTREE_DISABLE;
|
|
96
|
-
process.env.SM_EPIC_WORKTREE_DISABLE = '1';
|
|
97
|
-
try {
|
|
98
|
-
const result = await handler(null, { cwd, epicId: 'epic-mint-4' });
|
|
99
|
-
expect(result).toBeNull();
|
|
100
|
-
} finally {
|
|
101
|
-
if (original === undefined) delete process.env.SM_EPIC_WORKTREE_DISABLE;
|
|
102
|
-
else process.env.SM_EPIC_WORKTREE_DISABLE = original;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
test('a cwd outside every allowed root is rejected before anything is created', async () => {
|
|
107
|
-
const unregistered = await fsp.mkdtemp(path.join(os.tmpdir(), 'sm-epicworktreemint-unregistered-'));
|
|
108
|
-
initRepo(unregistered);
|
|
109
|
-
tmpDirs.push(unregistered);
|
|
110
|
-
|
|
111
|
-
await expect(handler(null, { cwd: unregistered, epicId: 'epic-mint-5' })).rejects.toThrow(/outside allowed boundaries/);
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
test('a request missing epicId is rejected by ipcSchemas validation', async () => {
|
|
115
|
-
const cwd = await mkRepoCwd();
|
|
116
|
-
expect(() => handler(null, { cwd })).toThrow();
|
|
117
|
-
});
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* epicWorktreeProjectConfig.test.cjs — PRD 1035/1390: the per-project "disable
|
|
3
|
-
* Epic worktree isolation" UI toggle, now stored at
|
|
4
|
-
* `<cwd>/session-manager-operations/prompt-sessions/epic-worktree-config.json`
|
|
5
|
-
* instead of a single machine-wide map. Uses real mkdtemp'd project cwds (the
|
|
6
|
-
* same convention as epicStatusMirror.test.cjs) since the file location is
|
|
7
|
-
* now derived from `cwd` via opsPath(), not from a single overridable path.
|
|
8
|
-
* SM_EPIC_WORKTREE_PROJECT_CONFIG_PATH still points the LEGACY global map (the
|
|
9
|
-
* one-shot migration source) at a throwaway tmpdir file, so tests never touch
|
|
10
|
-
* the real ~/.claude/session-manager/epic-worktree-project-config.json.
|
|
11
|
-
*
|
|
12
|
-
* Run: timeout 120 npx vitest run src/main/lib/__tests__/epicWorktreeProjectConfig.test.cjs
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
'use strict';
|
|
16
|
-
|
|
17
|
-
import { test, expect, beforeEach, afterEach } from 'vitest';
|
|
18
|
-
const fs = require('node:fs');
|
|
19
|
-
const os = require('node:os');
|
|
20
|
-
const path = require('node:path');
|
|
21
|
-
|
|
22
|
-
let tmpRoot;
|
|
23
|
-
let legacyConfigFile;
|
|
24
|
-
let originalOverride;
|
|
25
|
-
const projectDirs = [];
|
|
26
|
-
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sm-epic-worktree-project-config-'));
|
|
29
|
-
legacyConfigFile = path.join(tmpRoot, 'legacy-config.json');
|
|
30
|
-
originalOverride = process.env.SM_EPIC_WORKTREE_PROJECT_CONFIG_PATH;
|
|
31
|
-
process.env.SM_EPIC_WORKTREE_PROJECT_CONFIG_PATH = legacyConfigFile;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
afterEach(() => {
|
|
35
|
-
if (originalOverride === undefined) delete process.env.SM_EPIC_WORKTREE_PROJECT_CONFIG_PATH;
|
|
36
|
-
else process.env.SM_EPIC_WORKTREE_PROJECT_CONFIG_PATH = originalOverride;
|
|
37
|
-
fs.rmSync(tmpRoot, { recursive: true, force: true });
|
|
38
|
-
while (projectDirs.length) fs.rmSync(projectDirs.pop(), { recursive: true, force: true });
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
function freshModule() {
|
|
42
|
-
return require('../epicWorktreeProjectConfig.cjs');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function mkProjectCwd(name) {
|
|
46
|
-
const dir = fs.mkdtempSync(path.join(os.tmpdir(), `sm-epic-worktree-project-${name}-`));
|
|
47
|
-
projectDirs.push(dir);
|
|
48
|
-
return dir;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function perProjectFile(m, cwd) {
|
|
52
|
-
return m.perProjectConfigPath(cwd);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
test('defaults to not disabled for a project never touched', () => {
|
|
56
|
-
const m = freshModule();
|
|
57
|
-
const cwd = mkProjectCwd('a');
|
|
58
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(false);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
test('setEpicWorktreeDisabledForProject(true) persists across a fresh read, in the per-project ops file', () => {
|
|
62
|
-
const m = freshModule();
|
|
63
|
-
const cwd = mkProjectCwd('a');
|
|
64
|
-
m.setEpicWorktreeDisabledForProject(cwd, true);
|
|
65
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(true);
|
|
66
|
-
const file = perProjectFile(m, cwd);
|
|
67
|
-
expect(fs.existsSync(file)).toBe(true);
|
|
68
|
-
expect(JSON.parse(fs.readFileSync(file, 'utf8'))).toEqual({ disabled: true });
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('is scoped per cwd — a different project is unaffected', () => {
|
|
72
|
-
const m = freshModule();
|
|
73
|
-
const cwdA = mkProjectCwd('a');
|
|
74
|
-
const cwdB = mkProjectCwd('b');
|
|
75
|
-
m.setEpicWorktreeDisabledForProject(cwdA, true);
|
|
76
|
-
expect(m.isEpicWorktreeDisabledForProject(cwdB)).toBe(false);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
test('setEpicWorktreeDisabledForProject(false) writes disabled:false rather than deleting the file', () => {
|
|
80
|
-
const m = freshModule();
|
|
81
|
-
const cwd = mkProjectCwd('a');
|
|
82
|
-
m.setEpicWorktreeDisabledForProject(cwd, true);
|
|
83
|
-
m.setEpicWorktreeDisabledForProject(cwd, false);
|
|
84
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(false);
|
|
85
|
-
const file = perProjectFile(m, cwd);
|
|
86
|
-
expect(JSON.parse(fs.readFileSync(file, 'utf8'))).toEqual({ disabled: false });
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
test('a missing or corrupt per-project config file reads as not-disabled rather than throwing', () => {
|
|
90
|
-
const m = freshModule();
|
|
91
|
-
const cwd = mkProjectCwd('a');
|
|
92
|
-
const file = perProjectFile(m, cwd);
|
|
93
|
-
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
94
|
-
fs.writeFileSync(file, '{ not valid json');
|
|
95
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(false);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
test('isEpicWorktreeDisabledForProject rejects a non-string cwd instead of throwing', () => {
|
|
99
|
-
const m = freshModule();
|
|
100
|
-
expect(m.isEpicWorktreeDisabledForProject(null)).toBe(false);
|
|
101
|
-
expect(m.isEpicWorktreeDisabledForProject(undefined)).toBe(false);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
test('one-shot migration: a legacy global entry seeds the new per-project file on first read', () => {
|
|
105
|
-
const m = freshModule();
|
|
106
|
-
const cwd = mkProjectCwd('a');
|
|
107
|
-
fs.writeFileSync(legacyConfigFile, JSON.stringify({ [cwd]: true }));
|
|
108
|
-
|
|
109
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(true);
|
|
110
|
-
const file = perProjectFile(m, cwd);
|
|
111
|
-
expect(fs.existsSync(file)).toBe(true);
|
|
112
|
-
expect(JSON.parse(fs.readFileSync(file, 'utf8'))).toEqual({ disabled: true });
|
|
113
|
-
|
|
114
|
-
// The legacy file itself is left in place, untouched.
|
|
115
|
-
expect(JSON.parse(fs.readFileSync(legacyConfigFile, 'utf8'))).toEqual({ [cwd]: true });
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
test('migration leaves the legacy map intact for OTHER, still-unmigrated projects', () => {
|
|
119
|
-
const m = freshModule();
|
|
120
|
-
const cwdA = mkProjectCwd('a');
|
|
121
|
-
const cwdB = mkProjectCwd('b');
|
|
122
|
-
fs.writeFileSync(legacyConfigFile, JSON.stringify({ [cwdA]: true, [cwdB]: true }));
|
|
123
|
-
|
|
124
|
-
// Touching cwdA migrates only cwdA's own per-project file.
|
|
125
|
-
expect(m.isEpicWorktreeDisabledForProject(cwdA)).toBe(true);
|
|
126
|
-
expect(fs.existsSync(perProjectFile(m, cwdB))).toBe(false);
|
|
127
|
-
|
|
128
|
-
// cwdB still resolves correctly straight from the untouched legacy map.
|
|
129
|
-
expect(m.isEpicWorktreeDisabledForProject(cwdB)).toBe(true);
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
test('a project with no legacy entry migrates to disabled:false without throwing', () => {
|
|
133
|
-
const m = freshModule();
|
|
134
|
-
const cwd = mkProjectCwd('a');
|
|
135
|
-
fs.writeFileSync(legacyConfigFile, JSON.stringify({ '/some/other/project': true }));
|
|
136
|
-
expect(m.isEpicWorktreeDisabledForProject(cwd)).toBe(false);
|
|
137
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* fixChainDepth.test.cjs — unit tests for the pure fix-chain depth counter
|
|
3
|
-
* (PRD 1113). Run: timeout 120 npx vitest run src/main/lib/__tests__/fixChainDepth.test.cjs
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
import { test, expect } from 'vitest';
|
|
9
|
-
const { fixChainDepthOf, baseSlugOf } = require('../fixChainDepth.cjs');
|
|
10
|
-
|
|
11
|
-
test('fixChainDepthOf counts consecutive -fix- segments after the leading NN- prefix', () => {
|
|
12
|
-
const cases = [
|
|
13
|
-
// [slug, expected depth]
|
|
14
|
-
['113-foo', 0],
|
|
15
|
-
['113-fix-foo', 1],
|
|
16
|
-
['113-fix-fix-foo', 2],
|
|
17
|
-
['113-fix-fix-fix-foo', 3],
|
|
18
|
-
// false-positive bait: a later segment merely reading 'fix' does not
|
|
19
|
-
// extend the run once a non-'fix' segment has broken it.
|
|
20
|
-
['113-fix-loop-extraction-and-round-trip', 1],
|
|
21
|
-
['22-fix-loop-galaxy-round-trip', 1],
|
|
22
|
-
// false-positive bait: a segment that only contains 'fix' as a substring
|
|
23
|
-
// (not an exact 'fix' segment) is never counted at all.
|
|
24
|
-
['113-prefix-foo', 0],
|
|
25
|
-
['113-prefix-fix-foo', 0],
|
|
26
|
-
// no fix chain, multi-digit NN, single-segment slug.
|
|
27
|
-
['1-widget', 0],
|
|
28
|
-
];
|
|
29
|
-
for (const [slug, expected] of cases) {
|
|
30
|
-
expect(fixChainDepthOf(slug)).toBe(expected);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
test('baseSlugOf strips the leading fix chain, keeping the NN prefix', () => {
|
|
35
|
-
expect(baseSlugOf('113-foo')).toBe('113-foo');
|
|
36
|
-
expect(baseSlugOf('113-fix-foo')).toBe('113-foo');
|
|
37
|
-
expect(baseSlugOf('113-fix-fix-foo')).toBe('113-foo');
|
|
38
|
-
expect(baseSlugOf('113-fix-fix-fix-foo')).toBe('113-foo');
|
|
39
|
-
expect(baseSlugOf('113-fix-loop-extraction-and-round-trip')).toBe('113-loop-extraction-and-round-trip');
|
|
40
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[scheduler] starting 204-mercury-steam-horse at 2026-09-05T16:32:31.039Z
|
|
2
|
-
[scheduler] cwd=/home/bilko/Projects/starry-night-ships (running isolated in worktree /tmp/session-manager-job-worktrees/443997d5bbc5f8ab/204-mercury-steam-horse)
|
|
3
|
-
|
|
4
|
-
[scheduler] agentType=dev-lead persona=/home/bilko/.claude/agents/dev-lead.md model=fable
|
|
5
|
-
[scheduler] spawned pid=3537290 sessionId=5cb9d69b-e2e7-49f9-806c-2307f1c94b2b (process group)
|
|
6
|
-
|
|
7
|
-
{"type":"rate_limit_event","rate_limit_info":{"status":"allowed_warning","resetsAt":1789059600,"rateLimitType":"seven_day","utilization":0.59,"isUsingOverage":false,"unifiedWindows":{"five_hour":{"utilization":0,"resetsAt":1788643800},"seven_day":{"utilization":0.59,"resetsAt":1789059600}}},"uuid":"f7ef520a-9c3f-470e-89de-4ba9af7d5968","session_id":"5cb9d69b-e2e7-49f9-806c-2307f1c94b2b"}
|
|
8
|
-
{"type":"system","subtype":"init","cwd":"/tmp/session-manager-job-worktrees/443997d5bbc5f8ab/204-mercury-steam-horse","session_id":"5cb9d69b-e2e7-49f9-806c-2307f1c94b2b","tools":["Task","Bash","CronCreate","CronDelete","CronList","DesignSync","Edit","EnterWorktree","ExitWorktree","ListAgents","ListMcpResourcesTool","Monitor","NotebookEdit","PushNotification","Read","ReadMcpResourceDirTool","ReadMcpResourceTool","RemoteTrigger","ReportFindings","ScheduleWakeup","SendMessage","Skill","TaskOutput","TaskStop","ToolSearch","WebFetch","WebSearch","Workflow","Write","mcp__bilko-host__get_host_contract","mcp__bilko-host__list_projects","mcp__bilko-host__publish_static_project","mcp__bilko-host__register_static_project","mcp__bilko-host__status","mcp__bilko-host__unregister_project","mcp__bilko-host__usage_report","mcp__claude_ai_Gmail__apply_sensitive_message_label","mcp__claude_ai_Gmail__apply_sensitive_thread_label","mcp__claude_ai_Gmail__create_draft","mcp__claude_ai_Gmail__create_label","mcp__claude_ai_Gmail__delete_label","mcp__claude_ai_Gmail__forward","mcp__claude_ai_Gmail__get_draft","mcp__claude_ai_Gmail__get_message","mcp__claude_ai_Gmail__get_thread","mcp__claude_ai_Gmail__label_message","mcp__claude_ai_Gmail__label_thread","mcp__claude_ai_Gmail__list_drafts","mcp__claude_ai_Gmail__list_labels","mcp__claude_ai_Gmail__mark_message_spam","mcp__claude_ai_Gmail__mark_thread_spam","mcp__claude_ai_Gmail__reply","mcp__claude_ai_Gmail__search_threads","mcp__claude_ai_Gmail__send_message","mcp__claude_ai_Gmail__trash_message","mcp__claude_ai_Gmail__trash_thread","mcp__claude_ai_Gmail__unlabel_message","mcp__claude_ai_Gmail__unlabel_thread","mcp__claude_ai_Gmail__unmark_message_spam","mcp__claude_ai_Gmail__unmark_thread_spam","mcp__claude_ai_Gmail__untrash_message","mcp__claude_ai_Gmail__untrash_thread","mcp__claude_ai_Gmail__update_draft","mcp__claude_ai_Gmail__update_label","mcp__claude_ai_Gmail__update_message_labels","mcp__fetch__fetch","mcp__godot__add_node","mcp__godot__create_scene","mcp__godot__export_mesh_library","mcp__godot__get_debug_output","mcp__godot__get_godot_version","mcp__godot__get_project_info","mcp__godot__get_uid","mcp__godot__launch_editor","mcp__godot__list_projects","mcp__godot__load_sprite","mcp__godot__run_project","mcp__godot__save_scene","mcp__godot__stop_project","mcp__godot__update_project_uids","mcp__google-workspace__batch_modify_gmail_message_labels","mcp__google-workspace__batch_update_doc","mcp__google-workspace__check_drive_file_public_access","mcp__google-workspace__copy_drive_file","mcp__google-workspace__create_calendar","mcp__google-workspace__create_doc","mcp__google-workspace__create_drive_file","mcp__google-workspace__create_drive_folder","mcp__google-workspace__create_reaction","mcp__google-workspace__create_table_with_data","mcp__google-workspace__debug_docs_runtime_info","mcp__google-workspace__debug_table_structure","mcp__google-workspace__download_chat_attachment","mcp__google-workspace__draft_gmail_message","mcp__google-workspace__export_doc_to_pdf","mcp__google-workspace__find_and_replace_doc","mcp__google-workspace__get_doc_as_markdown","mcp__google-workspace__get_doc_content","mcp__google-workspace__get_drive_file_content","mcp__google-workspace__get_drive_file_download_url","mcp__google-workspace__get_drive_file_permissions","mcp__google-workspace__get_drive_shareable_link","mcp__google-workspace__get_events","mcp__google-workspace__get_gmail_attachment_content","mcp__google-workspace__get_gmail_message_content","mcp__google-workspace__get_gmail_messages_content_batch","mcp__google-workspace__get_gmail_thread_content","mcp__google-workspace__get_gmail_threads_content_batch","mcp__google-workspace__get_messages","mcp__google-workspace__import_to_google_doc","mcp__google-workspace__import_to_google_sheets","mcp__google-workspace__import_to_google_slides","mcp__google-workspace__insert_doc_elements","mcp__google-workspace__insert_doc_image","mcp__google-workspace__inspect_doc_structure","mcp__google-workspace__list_calendars","mcp__google-workspace__list_docs_in_folder","mcp__google-workspace__list_document_comments","mcp__google-workspace__list_drive_items","mcp__google-workspace__list_gmail_filters","mcp__google-workspace__list_gmail_labels","mcp__google-workspace__list_spaces","mcp__google-workspace__manage_doc_tab","mcp__google-workspace__manage_document_comment","mcp__google-workspace__manage_drive_access","mcp__google-workspace__manage_event","mcp__google-workspace__manage_focus_time","mcp__google-workspace__manage_gmail_filter","mcp__google-workspace__manage_gmail_label","mcp__google-workspace__manage_out_of_office","mcp__google-workspace__modify_doc_text","mcp__google-workspace__modify_gmail_message_labels","mcp__google-workspace__query_freebusy","mcp__google-workspace__search_docs","mcp__google-workspace__search_drive_files","mcp__google-workspace__search_gmail_messages","mcp__google-workspace__search_messages","mcp__google-workspace__send_gmail_message","mcp__google-workspace__send_message","mcp__google-workspace__set_drive_file_permissions","mcp__google-workspace__start_google_auth","mcp__google-workspace__update_doc_headers_footers","mcp__google-workspace__update_drive_file","mcp__google-workspace__update_paragraph_style","mcp__playwright__browser_click","mcp__playwright__browser_close","mcp__playwright__browser_console_messages","mcp__playwright__browser_drag","mcp__playwright__browser_drop","mcp__playwright__browser_evaluate","mcp__playwright__browser_file_upload","mcp__playwright__browser_fill_form","mcp__playwright__browser_handle_dialog","mcp__playwright__browser_hover","mcp__playwright__browser_navigate","mcp__playwright__browser_navigate_back","mcp__playwright__browser_network_request","mcp__playwright__browser_network_requests","mcp__playwright__browser_press_key","mcp__playwright__browser_resize","mcp__playwright__browser_run_code_unsafe","mcp__playwright__browser_select_option","mcp__playwright__browser_snapshot","mcp__playwright__browser_tabs","mcp__playwright__browser_take_screenshot","mcp__playwright__browser_type","mcp__playwright__browser_wait_for","mcp__session-manager-scheduler__chat_send_prompt","mcp__session-manager-scheduler__feedback_list_projects","mcp__session-manager-scheduler__feedback_open_session","mcp__session-manager-scheduler__project_home_get_contract","mcp__session-manager-scheduler__project_home_render","mcp__session-manager-scheduler__project_home_status","mcp__session-manager-scheduler__project_home_validate_summary","mcp__session-manager-scheduler__scheduler_archive_prd","mcp__session-manager-scheduler__scheduler_cancel_job","mcp__session-manager-scheduler__scheduler_create_prd","mcp__session-manager-scheduler__scheduler_get_prd","mcp__session-manager-scheduler__scheduler_list_jobs","mcp__session-manager-scheduler__scheduler_list_prds","mcp__session-manager-scheduler__scheduler_reset_job","mcp__session-manager-scheduler__scheduler_retag_prd","mcp__session-manager-scheduler__scheduler_update_prd","mcp__session-manager-scheduler__session_manager_help"],"mcp_servers":[{"name":"plugin:stripe:stripe","status":"needs-auth"},{"name":"fetch","status":"connected"},{"name":"sqlite","status":"failed"},{"name":"playwright","status":"connected"},{"name":"google-workspace","status":"connected"},{"name":"n8n","status":"failed"},{"name":"session-manager-scheduler","status":"connected"},{"name":"bilko-host","status":"connected"},{"name":"godot","status":"connected"},{"name":"claude.ai Google Calendar","status":"needs-auth"},{"name":"claude.ai Google Drive","status":"needs-auth"},{"name":"claude.ai Gmail","status":"connected"}],"model":"claude-fable-5-1","permissionMode":"bypassPermissions","slash_commands":["refresh-claude-md","deep-research","stripe:explain-error","stripe:test-cards","session-manager-dev:blog-for-project-feature","session-manager-dev:builder","session-manager-dev:develop","session-manager-dev:discover-features","session-manager-dev:explain-to-me","session-manager-dev:find-opportunity","session-manager-dev:issue-address","session-manager-dev:local-project-health","session-manager-dev:memory-sanitation","session-manager-dev:ops-sweep","session-manager-dev:pr-review-sweep","session-manager-dev:pr-signal","session-manager-dev:project-status","session-manager-dev:requesting-code-review","session-manager-dev:send-feedback","stripe:connect-recommend","stripe:connect-required-verification-information","stripe:stripe-apps","stripe:stripe-best-practices","stripe:stripe-directory","stripe:stripe-docs","stripe:stripe-projects","stripe:upgrade-stripe","design-sync","dataviz","update-config","verify","debug","code-review","simplify","batch","fewer-permission-prompts","doctor","loop","schedule","claude-api","workflow-authoring","run","run-skill-generator","advisor","agents","auto-mode-setup","autocompact","clear","color","compact","config","context","effort","fast","heapdump","init","mcp","import","model","__remote-workflow","workflow-launch-exec","reload-plugins","reload-skills","rename","ultrareview","security-review","usage-credits","extra-usage","usage","insights","recap","skill-doctor","goal","design","design-consent","design-revoke","list-agents","team-onboarding","mcp__fetch__fetch"],"terminal_slash_commands":["doctor","color","reload-plugins"],"apiKeySource":"none","claude_code_version":"2.1.261","output_style":"default","agents":["architect","bilko-host-publisher","builder","claude","dev-lead","Explore","general-purpose","Plan","project-home-builder","statusline-setup","stripe:Company Researcher"],"skills":["deep-research","session-manager-dev:blog-for-project-feature","session-manager-dev:builder","session-manager-dev:develop","session-manager-dev:discover-features","session-manager-dev:explain-to-me","session-manager-dev:find-opportunity","session-manager-dev:issue-address","session-manager-dev:local-project-health","session-manager-dev:memory-sanitation","session-manager-dev:ops-sweep","session-manager-dev:pr-review-sweep","session-manager-dev:pr-signal","session-manager-dev:project-status","session-manager-dev:requesting-code-review","session-manager-dev:send-feedback","stripe:connect-recommend","stripe:connect-required-verification-information","stripe:stripe-apps","stripe:stripe-best-practices","stripe:stripe-directory","stripe:stripe-docs","stripe:stripe-projects","stripe:upgrade-stripe","design-sync","dataviz","update-config","verify","debug","code-review","simplify","batch","fewer-permission-prompts","doctor","loop","schedule","claude-api","workflow-authoring","run","run-skill-generator"],"plugins":[{"name":"session-manager-dev","path":"/home/bilko/Projects/session-manager/plugins/session-manager-dev","source":"session-manager-dev@session-manager","version":"0.1.0"},{"name":"stripe","path":"/home/bilko/.claude/plugins/cache/claude-plugins-official/stripe/0.6.4","source":"stripe@claude-plugins-official","version":"0.6.4"}],"capabilities":["interrupt_receipt_v1","interrupt_cancel_queued_v1","msg_lifecycle_v1"],"analytics_disabled":false,"product_feedback_disabled":false,"uuid":"7f8e3566-fc40-427c-a9ad-0c0719d7f3b2","memory_paths":{"auto":"/home/bilko/.claude/projects/-home-bilko-Projects-starry-night-ships/memory/"},"messaging_socket_path":"/run/user/1000/cc-socks/3537290.sock","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required"}
|
|
9
|
-
{"type":"rate_limit_event","rate_limit_info":{"status":"rejected","resetsAt":1789059600,"rateLimitType":"seven_day_overage_included","overageStatus":"rejected","overageDisabledReason":"org_level_disabled","isUsingOverage":false,"unifiedWindows":{"five_hour":{"utilization":0,"resetsAt":1788643800},"seven_day":{"utilization":0.59,"resetsAt":1789059600},"seven_day_overage_included":{"utilization":1,"resetsAt":1789059600}}},"uuid":"faa8b505-db69-4afe-9436-9c812b76569a","session_id":"5cb9d69b-e2e7-49f9-806c-2307f1c94b2b"}
|
|
10
|
-
{"type":"assistant","message":{"diagnostics":null,"id":"dcbde611-72e9-4f07-bc35-c8ec9911f789","container":null,"model":"<synthetic>","role":"assistant","stop_details":null,"stop_reason":"stop_sequence","stop_sequence":"","type":"message","usage":{"output_tokens_details":null,"input_tokens":0,"output_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":null,"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"inference_geo":null,"iterations":null,"speed":null},"content":[{"type":"text","text":"You've reached your Fable limit. Switch to another model, or manage usage credits at claude.ai/settings/usage?from=cc_cli_limit_message, to continue."}],"context_management":null},"parent_tool_use_id":null,"session_id":"5cb9d69b-e2e7-49f9-806c-2307f1c94b2b","uuid":"a651974e-39c4-440f-a34e-eeec87e65fa4","timestamp":"2026-09-05T16:32:35.275Z","error":"rate_limit","request_id":"req_011CekcYKs4mrLVHXVc5xC2X","is_api_error_message":true}
|
|
11
|
-
{"duration_api_ms":1120,"stop_reason":"stop_sequence","session_id":"5cb9d69b-e2e7-49f9-806c-2307f1c94b2b","total_cost_usd":0.005226,"usage":{"output_tokens_details":{"thinking_tokens":0},"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"},"modelUsage":{"claude-haiku-4-5-20251001":{"inputTokens":5161,"outputTokens":13,"cacheReadInputTokens":0,"cacheCreationInputTokens":0,"webSearchRequests":0,"costUSD":0.005226,"contextWindow":200000,"maxOutputTokens":32000,"thinkingTokens":0,"canonicalModel":"claude-haiku-4-5","provider":"firstParty","costBasis":"list"}},"permission_denials":[],"terminal_reason":"api_error","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","subagent_stats":{"spawned":0,"requested":{"background":0,"foreground":0,"unset":0},"started_in_background":0,"max_depth":0,"spawned_by_subagents":0,"completed":0,"failed":0,"killed":{"parent":0,"user":0,"system":0},"refused":{"depth_limit":0,"concurrency_limit":0,"budget":0},"by_type":{}},"is_error":true,"num_turns":1,"subtype":"success","api_error_status":429,"result":"You've reached your Fable limit. Switch to another model, or manage usage credits at claude.ai/settings/usage?from=cc_cli_limit_message, to continue.","type":"result","duration_ms":1036,"uuid":"b729d2fe-95bd-41a0-9558-eb7149222eb3","queued_turn_count":0}
|
|
12
|
-
|
|
13
|
-
[scheduler] exit code=1 (raw code=1 signal=null) duration=5s
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"config": {
|
|
3
|
-
"offsetMinutes": 15,
|
|
4
|
-
"defaultCwd": "/home/bilko/Projects/session-manager",
|
|
5
|
-
"firePolicy": "when-available",
|
|
6
|
-
"utilizationThreshold": 90,
|
|
7
|
-
"schemaVersion": 1,
|
|
8
|
-
"supervisor": {
|
|
9
|
-
"enabled": true,
|
|
10
|
-
"intervalMinutes": 15,
|
|
11
|
-
"maxConcurrentProbes": 2,
|
|
12
|
-
"probeStaleThresholdMinutes": 10
|
|
13
|
-
},
|
|
14
|
-
"concurrencyCap": 4,
|
|
15
|
-
"enabled": true,
|
|
16
|
-
"schedulerRunLogRetention": {
|
|
17
|
-
"enabled": true,
|
|
18
|
-
"policy": {
|
|
19
|
-
"maxAgeDays": 7,
|
|
20
|
-
"keepPerSlug": 1
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"scheduledFor": null,
|
|
25
|
-
"lastRunAt": "2026-09-11T10:00:14.441Z",
|
|
26
|
-
"paused": null,
|
|
27
|
-
"launchBlocks": {},
|
|
28
|
-
"launchMitigations": {}
|
|
29
|
-
}00:22.043Z",
|
|
30
|
-
"resumeAt": "2026-09-11T10:30:18.819Z"
|
|
31
|
-
},
|
|
32
|
-
"launchBlocks": {},
|
|
33
|
-
"launchMitigations": {}
|
|
34
|
-
}
|