claude-code-session-manager 0.139.0 → 0.141.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 +20 -4
- package/dist/assets/AppSettings-DExeJhqQ.js +2 -0
- package/dist/assets/History-DJMiuXyK.js +2 -0
- package/dist/assets/{HomeClaudeConfig-CGD2Onjv.js → HomeClaudeConfig-CTp2tkZ4.js} +2 -2
- package/dist/assets/{Panel-Csyd9HbD.js → Panel-Bf1Cf8UL.js} +1 -1
- package/dist/assets/{ProjectClaudeConfig-C-jlYpC_.js → ProjectClaudeConfig-BWPpypf9.js} +1 -1
- package/dist/assets/Scheduler-cyr61UAC.js +16 -0
- package/dist/assets/{SkillReferenceGraph-DcscPXAG.js → SkillReferenceGraph-Ba4TkX2C.js} +1 -1
- package/dist/assets/{Skills-BpGRKOcY.js → Skills-C1v91GEO.js} +26 -26
- package/dist/assets/{TiptapBody-DSU3769X.js → TiptapBody-BrcWVpiW.js} +1 -1
- package/dist/assets/{ViewTabs-C0PRZx4_.js → ViewTabs-DXhOWFG0.js} +1 -1
- package/dist/assets/{VoiceButton-D2rMurNg.js → VoiceButton-qivnDV6K.js} +1 -1
- package/dist/assets/{historyTotals-TcIQs2sh.js → historyTotals-CMCPTKqC.js} +1 -1
- package/dist/assets/index-B2TQz3nd.js +3121 -0
- package/dist/assets/{index-BCySPdtU.css → index-DKXdXfka.css} +1 -1
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +423 -426
- package/package.json +5 -2
- package/plugins/AGENTS.md +60 -0
- package/plugins/CLAUDE.md +1 -60
- package/plugins/session-manager-dev/skills/builder/SKILL.md +4 -2
- package/plugins/session-manager-dev/skills/develop/SKILL.md +29 -19
- package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +5 -4
- package/plugins/session-manager-dev/skills/maintaining-md-network/audit.md +4 -2
- package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +16 -12
- package/plugins/session-manager-dev/skills/maintaining-md-network/migrate-to-agents-md.md +15 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/placement.md +50 -2
- package/plugins/session-manager-dev/skills/maintaining-md-network/plan.md +10 -10
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +117 -112
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/mdDuplicates.cjs +182 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/mdLinks.cjs +340 -0
- package/scripts/README.md +1 -0
- package/scripts/hooks/guard-tool-risk.cjs +91 -0
- package/scripts/hooks/lib/guard-tool-risk-policy.cjs +217 -0
- package/scripts/ops-sweep.cjs +53 -23
- package/scripts/scheduler-mcp-server.cjs +205 -18
- package/src/main/build-info.json +4 -4
- package/src/main/config.cjs +112 -8
- package/src/main/docEdit.cjs +6 -1
- package/src/main/files.cjs +7 -27
- package/src/main/health.cjs +48 -15
- package/src/main/historyAggregator.cjs +88 -5
- package/src/main/historyDashboard.cjs +69 -4
- package/src/main/index.cjs +56 -2
- package/src/main/ipcSchemas.cjs +122 -16
- package/src/main/lib/AGENTS.md +54 -0
- package/src/main/lib/CLAUDE.md +1 -54
- package/src/main/lib/agent-cli/adapters/codex.cjs +5 -2
- package/src/main/lib/agent-cli/agentCliIpc.cjs +18 -2
- package/src/main/lib/agent-cli/agentCliSessionStore.cjs +1 -0
- package/src/main/lib/agent-cli/agentCliTurn.cjs +20 -2
- package/src/main/lib/agent-cli/geminiContextDefaults.cjs +94 -0
- package/src/main/lib/claude/effectiveModelInfo.cjs +90 -20
- package/src/main/lib/claude/jobSandboxPolicy.cjs +202 -0
- package/src/main/lib/claude/personaToolScope.cjs +12 -6
- package/src/main/lib/claude/rateLimitDetect.cjs +13 -2
- package/src/main/lib/claude/runClaudeP.cjs +6 -1
- package/src/main/lib/claude/toolRiskIpc.cjs +177 -0
- package/src/main/lib/claude/toolRiskMarks.cjs +373 -0
- package/src/main/lib/demo-video-kit/seedKit.cjs +27 -6
- package/src/main/lib/ephemeralCwd.cjs +37 -2
- package/src/main/lib/epic/delegationReadiness.cjs +42 -9
- package/src/main/lib/epic/epicAdminRoutes.cjs +25 -5
- package/src/main/lib/epic/epicOutsideRead.cjs +118 -1
- package/src/main/lib/epic/epicOutsideState.cjs +2 -2
- package/src/main/lib/epic/epicSweepValidator.cjs +7 -2
- package/src/main/lib/epic/epicValidationHook.cjs +24 -4
- package/src/main/lib/epic/guardSpawnSettings.cjs +57 -1
- package/src/main/lib/externalContract.cjs +31 -5
- package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +55 -1
- package/src/main/lib/feedback-remote/crossProjectReply.cjs +106 -11
- package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +47 -19
- package/src/main/lib/feedback-remote/needsYouStore.cjs +6 -2
- package/src/main/lib/feedback-remote/projectHomeAdminRoutes.cjs +98 -1
- package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +5 -0
- package/src/main/lib/git/branchSweep.cjs +209 -4
- package/src/main/lib/git/gitWorktree.cjs +41 -5
- package/src/main/lib/guardShims.cjs +1 -1
- package/src/main/lib/historyRollup.cjs +26 -0
- package/src/main/lib/insideHome.cjs +27 -1
- package/src/main/lib/mcpToolCatalog.cjs +132 -13
- package/src/main/lib/mdDocCensus.cjs +59 -78
- package/src/main/lib/mdDocRefs.cjs +71 -93
- package/src/main/lib/mdNetworkScan.cjs +245 -250
- package/src/main/lib/mdReviewRecord.cjs +22 -9
- package/src/main/lib/memoryMdNetwork.cjs +5 -12
- package/src/main/lib/opsOwnership.cjs +18 -2
- package/src/main/lib/opsRetentionSettings.cjs +28 -4
- package/src/main/lib/persona-macro/macroJobDispatch.cjs +90 -20
- package/src/main/lib/persona-macro/macroJobIpc.cjs +144 -46
- package/src/main/lib/persona-macro/macroJobStatus.cjs +87 -9
- package/src/main/lib/persona-macro/macroLibrary.cjs +95 -5
- package/src/main/lib/persona-macro/personaImportHealth.cjs +78 -17
- package/src/main/lib/persona-macro/projectVideoToolCheck.cjs +96 -0
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +11 -0
- package/src/main/lib/prd/depSlugResolve.cjs +104 -4
- package/src/main/lib/prd/prdAdminRoutes.cjs +35 -2
- package/src/main/lib/prd/prdCreate.cjs +377 -23
- package/src/main/lib/prd/prdDisposition.cjs +11 -2
- package/src/main/lib/prd/prdFrontmatter.cjs +121 -3
- package/src/main/lib/process/loginItem.cjs +171 -0
- package/src/main/lib/process/loginItemPlan.cjs +193 -0
- package/src/main/lib/project-pages/playerBridge.cjs +4 -0
- package/src/main/lib/project-pages/videoReview.cjs +268 -0
- package/src/main/lib/project-pages/videoReviewIpc.cjs +229 -0
- package/src/main/lib/scheduler/cpuSample.cjs +131 -4
- package/src/main/lib/scheduler/fixPlanSlug.cjs +4 -3
- package/src/main/lib/scheduler/loadGate.cjs +24 -6
- package/src/main/lib/scheduler/planRecordHarvest.cjs +108 -0
- package/src/main/lib/scheduler/planRecordRetention.cjs +144 -0
- package/src/main/lib/scheduler/preflightCheck.cjs +97 -0
- package/src/main/lib/scheduler/queueStore.cjs +7 -0
- package/src/main/lib/scheduler/rcaReport.cjs +21 -1
- package/src/main/lib/scheduler/reaperHelpers.cjs +35 -5
- package/src/main/lib/scheduler/reviewNotice.cjs +39 -0
- package/src/main/lib/scheduler/runLogRetention.cjs +104 -3
- package/src/main/lib/scheduler/scheduleJobSchema.cjs +3 -0
- package/src/main/lib/scheduler/schedulerBatch.cjs +25 -48
- package/src/main/lib/scheduler/schedulerPaths.cjs +3 -0
- package/src/main/lib/scheduler/sessionSlots.cjs +176 -21
- package/src/main/lib/scheduler/validationQuality.cjs +282 -0
- package/src/main/lib/scheduler/validatorVerdictSchema.cjs +254 -0
- package/src/main/lib/tasks/taskAdminRoutes.cjs +641 -0
- package/src/main/lib/tasks/taskIpc.cjs +80 -0
- package/src/main/lib/tasks/taskLedger.cjs +502 -0
- package/src/main/lib/tasks/taskRun.cjs +313 -0
- package/src/main/lib/tasks/taskSwitch.cjs +120 -0
- package/src/main/loginItemIpc.cjs +35 -0
- package/src/main/loopEfficiencyHandlers.cjs +10 -1
- package/src/main/projectPages.cjs +6 -15
- package/src/main/promptSessionEvents.cjs +9 -1
- package/src/main/queueOps.cjs +260 -3
- package/src/main/runVerify.cjs +53 -25
- package/src/main/scheduler/AGENTS.md +26 -0
- package/src/main/scheduler/CLAUDE.md +1 -26
- package/src/main/scheduler/budget.cjs +239 -9
- package/src/main/scheduler/cancelDependents.cjs +154 -0
- package/src/main/scheduler/prdParser.cjs +19 -1
- package/src/main/scheduler/reviewLadder.cjs +36 -3
- package/src/main/scheduler/starvation.cjs +89 -18
- package/src/main/scheduler.cjs +1080 -89
- package/src/main/supervisor.cjs +5 -1
- package/src/main/templates/PRD_AUTHORING.md +14 -1
- package/src/main/validationQualityHandlers.cjs +199 -0
- package/src/main/webRemote.cjs +10 -2
- package/src/preload/api.d.ts +364 -21
- package/src/preload/apiSurface.json +89 -10
- package/src/preload/index.cjs +23 -2
- package/src/seed/agents/validator.md +19 -8
- package/dist/assets/AppSettings-CUfWY9vN.js +0 -2
- package/dist/assets/History-DDnqaLyw.js +0 -2
- package/dist/assets/Scheduler-NLs08fx7.js +0 -16
- package/dist/assets/index-C-d0DCre.js +0 -3124
|
@@ -7,10 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
const launchFailure = require('../lib/scheduler/launchFailure.cjs');
|
|
9
9
|
const { findBlockingDep, DEP_HISTORY_FAIL_OPEN } = require('../lib/scheduler/schedulerBatch.cjs');
|
|
10
|
+
const { makeDepResolver, isSatisfiedDepRow } = require('../lib/prd/depSlugResolve.cjs');
|
|
10
11
|
const { STARVE_ESCALATION_MS } = require('../lib/scheduler/schedulerConfig.cjs');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
|
-
* computeBlockedChains(jobs) → [{ cwd, blockedBy, blocked }]
|
|
14
|
+
* computeBlockedChains(jobs, satisfiedSlugsByCwd?) → [{ cwd, blockedBy, blocked }]
|
|
15
|
+
*
|
|
16
|
+
* `satisfiedSlugsByCwd`: optional `Map<cwd, Set<string>|DEP_HISTORY_FAIL_OPEN>`
|
|
17
|
+
* of history/archive completion records (budget.computeDepHistorySatisfaction),
|
|
18
|
+
* fed to the shared dep resolver; default empty (no records known).
|
|
14
19
|
*
|
|
15
20
|
* Pure, no IO. The gap computeStallSummary above cannot see.
|
|
16
21
|
*
|
|
@@ -31,7 +36,7 @@ const { STARVE_ESCALATION_MS } = require('../lib/scheduler/schedulerConfig.cjs')
|
|
|
31
36
|
* Transitive by construction: a row blocked by a row that is itself blocked
|
|
32
37
|
* resolves through the same walk.
|
|
33
38
|
*/
|
|
34
|
-
function computeBlockedChains(jobs) {
|
|
39
|
+
function computeBlockedChains(jobs, satisfiedSlugsByCwd = new Map()) {
|
|
35
40
|
const rows = (Array.isArray(jobs) ? jobs : []).filter(Boolean);
|
|
36
41
|
const byCwd = new Map();
|
|
37
42
|
for (const j of rows) {
|
|
@@ -42,20 +47,14 @@ function computeBlockedChains(jobs) {
|
|
|
42
47
|
|
|
43
48
|
const out = [];
|
|
44
49
|
for (const [cwd, projectJobs] of byCwd) {
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
const rowsForDep = (slug) => {
|
|
55
|
-
const exact = rowBySlug.get(slug);
|
|
56
|
-
if (exact) return [exact];
|
|
57
|
-
return rowsByBareSlug.get(String(slug ?? '').replace(/^\d+-/, '')) ?? [];
|
|
58
|
-
};
|
|
50
|
+
// The ONE run-time dep rule (depSlugResolve.cjs makeDepResolver) — the
|
|
51
|
+
// same resolver schedulerBatch.findBlockingDep dispatches with, so this
|
|
52
|
+
// monitor can never disagree with dispatch (exact row, exact satisfied
|
|
53
|
+
// record, Epic-scoped prefixed fallback, cancelled-duplicate drop).
|
|
54
|
+
const satisfied = satisfiedSlugsByCwd?.get?.(cwd) ?? new Set();
|
|
55
|
+
const { rowsForDep } = satisfied === DEP_HISTORY_FAIL_OPEN
|
|
56
|
+
? makeDepResolver(projectJobs, new Set(), { failOpen: true })
|
|
57
|
+
: makeDepResolver(projectJobs, satisfied);
|
|
59
58
|
|
|
60
59
|
// Memoised walk: does this row's dep closure hit a terminally-stuck row?
|
|
61
60
|
const TERMINAL_STUCK = new Set(['failed', 'skipped']);
|
|
@@ -68,9 +67,12 @@ function computeBlockedChains(jobs) {
|
|
|
68
67
|
visiting.add(job.slug);
|
|
69
68
|
const found = new Set();
|
|
70
69
|
for (const depSlug of job.dependsOn ?? []) {
|
|
71
|
-
for (const dep of rowsForDep(depSlug)) {
|
|
70
|
+
for (const dep of rowsForDep(depSlug, job)) {
|
|
71
|
+
// isSatisfiedDepRow: completed, or an auto-resolve skip — the
|
|
72
|
+
// dispatcher's own predicate, so neither is a terminal blocker.
|
|
73
|
+
if (isSatisfiedDepRow(dep)) continue;
|
|
72
74
|
if (TERMINAL_STUCK.has(dep.status)) found.add(dep.slug);
|
|
73
|
-
else
|
|
75
|
+
else for (const b of blockersFor(dep)) found.add(b);
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
visiting.delete(job.slug);
|
|
@@ -153,6 +155,73 @@ function describeStarveHold({ projectRows = [], launchBlocks = {}, lastTick = nu
|
|
|
153
155
|
return lastHoldTick?.reason ?? 'dispatching-elsewhere';
|
|
154
156
|
}
|
|
155
157
|
|
|
158
|
+
/** Max dependency links findRootBlocker follows before giving up on a chain. */
|
|
159
|
+
const ROOT_BLOCKER_MAX_DEPTH = 50;
|
|
160
|
+
|
|
161
|
+
/** Root row's human reason: heldReason, else its last statusHistory reason, else null. */
|
|
162
|
+
function rootBlockerReason(row) {
|
|
163
|
+
if (typeof row.heldReason === 'string' && row.heldReason) return row.heldReason;
|
|
164
|
+
const h = Array.isArray(row.statusHistory) ? row.statusHistory : [];
|
|
165
|
+
const last = h[h.length - 1];
|
|
166
|
+
return last && typeof last.reason === 'string' && last.reason ? last.reason : null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function rootBlockerRow(job, rows, resolver) {
|
|
170
|
+
const visited = new Set([job.slug]);
|
|
171
|
+
let cur = job;
|
|
172
|
+
for (let depth = 0; depth < ROOT_BLOCKER_MAX_DEPTH; depth++) {
|
|
173
|
+
const depSlug = findBlockingDep(cur, rows, DEP_HISTORY_FAIL_OPEN, resolver);
|
|
174
|
+
if (!depSlug) return cur === job ? null : cur;
|
|
175
|
+
const next = resolver.rowsForDep(depSlug, cur).find((r) => !isSatisfiedDepRow(r));
|
|
176
|
+
if (!next || visited.has(next.slug)) return cur === job ? null : cur; // cycle: stop at last new row
|
|
177
|
+
visited.add(next.slug);
|
|
178
|
+
cur = next;
|
|
179
|
+
}
|
|
180
|
+
return cur === job ? null : cur;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* findRootBlocker(job, rows) → null | { slug, status, reason, preflightHeld }
|
|
185
|
+
*
|
|
186
|
+
* Pure. Walks findBlockingDep (fail-open history, as describeStarveHold does)
|
|
187
|
+
* transitively to the first row that is not itself waiting on a dependency —
|
|
188
|
+
* the row a starved chain actually waits on. Cycle-safe; stops at depth 50
|
|
189
|
+
* and reports the deepest row reached. null when `job` has no blocking dep.
|
|
190
|
+
*/
|
|
191
|
+
function findRootBlocker(job, rows, resolver = null) {
|
|
192
|
+
if (!job) return null;
|
|
193
|
+
const list = (Array.isArray(rows) ? rows : []).filter(Boolean);
|
|
194
|
+
const res = resolver ?? makeDepResolver(list, new Set(), { failOpen: true });
|
|
195
|
+
const root = rootBlockerRow(job, list, res);
|
|
196
|
+
if (!root) return null;
|
|
197
|
+
return {
|
|
198
|
+
slug: root.slug,
|
|
199
|
+
status: root.status,
|
|
200
|
+
reason: rootBlockerReason(root),
|
|
201
|
+
preflightHeld: !!root.preflightHold && typeof root.preflightHold === 'object',
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* rootBlockersForProject(projectRows) → [{ slug, status, reason, preflightHeld, heldSlugs }]
|
|
207
|
+
*
|
|
208
|
+
* Pure. Distinct root blockers over every dependency-blocked pending row,
|
|
209
|
+
* in first-seen order; `heldSlugs` lists the pending rows each one holds.
|
|
210
|
+
*/
|
|
211
|
+
function rootBlockersForProject(projectRows) {
|
|
212
|
+
const rows = (Array.isArray(projectRows) ? projectRows : []).filter(Boolean);
|
|
213
|
+
const resolver = makeDepResolver(rows, new Set(), { failOpen: true });
|
|
214
|
+
const bySlug = new Map();
|
|
215
|
+
for (const j of rows) {
|
|
216
|
+
if (j.status !== 'pending') continue;
|
|
217
|
+
const root = findRootBlocker(j, rows, resolver);
|
|
218
|
+
if (!root) continue;
|
|
219
|
+
if (!bySlug.has(root.slug)) bySlug.set(root.slug, { ...root, heldSlugs: [] });
|
|
220
|
+
bySlug.get(root.slug).heldSlugs.push(j.slug);
|
|
221
|
+
}
|
|
222
|
+
return [...bySlug.values()];
|
|
223
|
+
}
|
|
224
|
+
|
|
156
225
|
/**
|
|
157
226
|
* classifyQueueStarvation({ jobs, paused, runningCount, lastRunAtMs, now, thresholdMs })
|
|
158
227
|
* → null | { kind: 'starved' | 'blocked', pending, dispatchable, blockedChains, idleMs }
|
|
@@ -405,6 +474,8 @@ module.exports = {
|
|
|
405
474
|
dispatchIdleMs,
|
|
406
475
|
launchBlockedSlugs,
|
|
407
476
|
describeStarveHold,
|
|
477
|
+
findRootBlocker,
|
|
478
|
+
rootBlockersForProject,
|
|
408
479
|
classifyQueueStarvation,
|
|
409
480
|
classifyQueueStarvationByProject,
|
|
410
481
|
classifyQueueHealth,
|