claude-code-session-manager 0.130.2 → 0.131.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 +1 -1
- package/bin/cli.cjs +19 -2
- package/dist/assets/AgentLibrary-CYXre0J-.js +2 -0
- package/dist/assets/{AppSettings-Bpwynea4.js → AppSettings-xNSfCj8e.js} +2 -2
- package/dist/assets/{Button-DSoqrxCB.js → Button-BWljh5IK.js} +1 -1
- package/dist/assets/DocumentEditorPane-FUC2hZlp.js +1 -0
- package/dist/assets/Extensions-CsyUoklz.js +2 -0
- package/dist/assets/{History-DzMo9Otn.js → History-BvNmY9OQ.js} +2 -2
- package/dist/assets/{Library-C5wKMTSn.js → Library-DVXk77zA.js} +12 -12
- package/dist/assets/{ListDetail-DDQ1S0yu.js → ListDetail-DAAx__24.js} +1 -1
- package/dist/assets/{Panel-B-3NWUlv.js → Panel-g2D-e-RM.js} +1 -1
- package/dist/assets/ProjectClaudeConfig-BDuHJwaO.js +25 -0
- package/dist/assets/{ProvenanceBadge-CUChwz4Z.js → ProvenanceBadge-wew4_nf3.js} +1 -1
- package/dist/assets/Scheduler-CbeUIqD-.js +16 -0
- package/dist/assets/Settings-B23RsRfm.js +2 -0
- package/dist/assets/{SkillReferenceGraph-C6JEdypC.js → SkillReferenceGraph-BxQPCfsg.js} +1 -1
- package/dist/assets/Skills-4AR2FQrI.js +29 -0
- package/dist/assets/{SourceChip-DcBNYYhe.js → SourceChip-jrC0vjfw.js} +1 -1
- package/dist/assets/SystemPrompt-hHoBEnYb.js +1 -0
- package/dist/assets/{TiptapBody-DiVYC-_O.js → TiptapBody-FkUqxO9u.js} +1 -1
- package/dist/assets/{Toggle-Cs3k6I96.js → Toggle-DQMNWZKT.js} +1 -1
- package/dist/assets/ViewTabs-DGU0ZuxB.js +1 -0
- package/dist/assets/{VoiceButton-C3NLotUZ.js → VoiceButton-BPPvDllh.js} +1 -1
- package/dist/assets/{historyTotals-f-E0L9Xw.js → historyTotals-D8Oc3wUK.js} +1 -1
- package/dist/assets/index-9ajPMXBg.js +3097 -0
- package/dist/assets/{index-Bp8XE9A6.css → index-oXqzajWV.css} +1 -1
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +455 -427
- package/package.json +1 -1
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +15 -5
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +8 -4
- package/scripts/scheduler-mcp-server.cjs +71 -0
- package/src/main/agentLibrary.cjs +81 -29
- package/src/main/agentsIpc.cjs +21 -16
- package/src/main/build-info.json +4 -4
- package/src/main/index.cjs +9 -0
- package/src/main/ipcSchemas.cjs +35 -2
- package/src/main/lib/epic/epicMint.cjs +61 -6
- package/src/main/lib/epic/epicWorktreeMerge.cjs +11 -9
- package/src/main/lib/epic/epicWorktreeMint.cjs +45 -4
- package/src/main/lib/epic/promptSessionsCreateEpic.cjs +32 -5
- package/src/main/lib/epic/restorableSessions.cjs +749 -0
- package/src/main/lib/feedback-remote/projectHomeAdminRoutes.cjs +61 -0
- package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +4 -0
- package/src/main/lib/git/branchSweep.cjs +9 -3
- package/src/main/lib/git/gitExec.cjs +8 -1
- package/src/main/lib/git/gitWorktree.cjs +771 -96
- package/src/main/lib/git/jobWorktree.cjs +3 -0
- package/src/main/lib/git/jobWorktreeBootLive.cjs +14 -2
- package/src/main/lib/mcpToolCatalog.cjs +28 -0
- package/src/main/lib/mcpToolsProbe.cjs +831 -0
- package/src/main/lib/mdNetworkScan.cjs +555 -0
- package/src/main/lib/persona-macro/agentPersonaSchema.cjs +18 -5
- package/src/main/lib/persona-macro/builtinMacros.cjs +22 -4
- package/src/main/lib/persona-macro/macroJobDispatch.cjs +17 -2
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +38 -0
- package/src/main/lib/project-pages/competitiveMatrix.cjs +258 -0
- package/src/main/lib/project-pages/matrixHtml.cjs +239 -0
- package/src/main/lib/project-pages/matrixStore.cjs +112 -0
- package/src/main/lib/promptSessionSchema.cjs +5 -0
- package/src/main/lib/scheduler/fixPlanSlug.cjs +15 -1
- package/src/main/lib/scheduler/reaperHelpers.cjs +35 -0
- package/src/main/lib/scheduler/scheduleJobSchema.cjs +2 -0
- package/src/main/lib/scheduler/scheduleJobTransitions.cjs +8 -7
- package/src/main/lib/scheduler/terminalRunOutcome.cjs +61 -15
- package/src/main/projectPages.cjs +51 -7
- package/src/main/runVerify.cjs +8 -3
- package/src/main/scheduler/budget.cjs +146 -7
- package/src/main/scheduler/gitTreeGuard.cjs +92 -20
- package/src/main/scheduler/reviewLadder.cjs +60 -0
- package/src/main/scheduler.cjs +477 -53
- package/src/main/seedAgentPersonas.cjs +1 -1
- package/src/preload/api.d.ts +250 -7
- package/src/preload/apiSurface.json +28 -0
- package/src/preload/index.cjs +6 -0
- package/src/seed/agents/competitive-analyst.md +69 -0
- package/src/seed/agents/competitive-researcher.md +75 -0
- package/src/seed/agents/validator.md +2 -2
- package/dist/assets/AgentLibrary-Bfj862qf.js +0 -2
- package/dist/assets/Extensions-BziIutWV.js +0 -13
- package/dist/assets/Memory-Bq5T33d2.js +0 -25
- package/dist/assets/Scheduler-CkGHMXvo.js +0 -16
- package/dist/assets/Settings-DGxvyajs.js +0 -2
- package/dist/assets/SystemPrompt-CfozyVQx.js +0 -1
- package/dist/assets/ViewTabs-DFXH03tb.js +0 -1
- package/dist/assets/index-CuAfFXNd.js +0 -3086
|
@@ -68,10 +68,13 @@ module.exports = {
|
|
|
68
68
|
listStrandedPins: gitWorktree.listStrandedPins,
|
|
69
69
|
pinUnlandedWorktreeCommits: gitWorktree.pinUnlandedWorktreeCommits,
|
|
70
70
|
resolveDefaultBranch: gitWorktree.resolveDefaultBranch,
|
|
71
|
+
resolveForkSha: gitWorktree.resolveForkSha,
|
|
71
72
|
parseWorktreeListPorcelain: gitWorktree.parseWorktreeListPorcelain,
|
|
72
73
|
reconcileWorktreesOnBoot: (cwds, opts = {}) => gitWorktree.reconcileWorktreesOnBoot(cwds, { kind: KIND, isLive: opts.isLive }),
|
|
73
74
|
reclaimTerminalJobOrphans: gitWorktree.reclaimTerminalJobOrphans,
|
|
74
75
|
unchangedCarriedPaths: gitWorktree.unchangedCarriedPaths,
|
|
76
|
+
snapshotUncommittedWork: gitWorktree.snapshotUncommittedWork,
|
|
77
|
+
worktreeRunCommitCount: gitWorktree.worktreeRunCommitCount,
|
|
75
78
|
// Test-only escape hatch for the in-memory concurrency counter.
|
|
76
79
|
_resetActiveWorktreeCountForTests(n = 0) { gitWorktree._resetActiveWorktreeCountForTests(KIND, n); },
|
|
77
80
|
_getActiveWorktreeCountForTests() { return gitWorktree._getActiveWorktreeCountForTests(KIND); },
|
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
* written) while the process is still actually running.
|
|
20
20
|
* Either match logs one line naming the slug and which check held it, so a
|
|
21
21
|
* persistently-skipped leak stays visible (RCA: PRD 1108).
|
|
22
|
+
*
|
|
23
|
+
* PRD 2908: scheduler.cjs now runs partitionBootOrphans BEFORE this sweep and
|
|
24
|
+
* passes its adopted slugs in as `adoptedSlugs`, checked first — so the sweep
|
|
25
|
+
* and the partition agree on adoption. A run that printed PASS and exited
|
|
26
|
+
* seconds before the restart (dead pid, no holder, fresh run log) is adopted
|
|
27
|
+
* by the partition; its checkout and sm-job branch must survive so
|
|
28
|
+
* reapDeadRunningJobs can land it instead of parking a stranded pin.
|
|
22
29
|
*/
|
|
23
30
|
|
|
24
31
|
/**
|
|
@@ -26,10 +33,11 @@
|
|
|
26
33
|
* supervisor-record → runtime.pid → run-log ladder partitionBootOrphans uses,
|
|
27
34
|
* so the two boot passes agree. Default: runtime.pid alone.
|
|
28
35
|
*
|
|
29
|
-
* @param {{ bootJobs: Array<object>, claudePidAlive: (pid: number) => boolean, hasLiveHolder: (dir: string, holders?: Set<string>) => boolean, cwdHolders?: Set<string>, rowPid?: (job: object) => number|null }} deps
|
|
36
|
+
* @param {{ bootJobs: Array<object>, claudePidAlive: (pid: number) => boolean, hasLiveHolder: (dir: string, holders?: Set<string>) => boolean, cwdHolders?: Set<string>, rowPid?: (job: object) => number|null, adoptedSlugs?: Set<string>|Array<string> }} deps
|
|
30
37
|
* @returns {(slug: string, entry: { worktree: string, branch: string|null }) => boolean}
|
|
31
38
|
*/
|
|
32
|
-
function buildJobWorktreeIsLive({ bootJobs, claudePidAlive, hasLiveHolder, cwdHolders, rowPid = (j) => j.runtime && j.runtime.pid }) {
|
|
39
|
+
function buildJobWorktreeIsLive({ bootJobs, claudePidAlive, hasLiveHolder, cwdHolders, rowPid = (j) => j.runtime && j.runtime.pid, adoptedSlugs = [] }) {
|
|
40
|
+
const adopted = new Set(adoptedSlugs || []);
|
|
33
41
|
const runningPidBySlug = new Map();
|
|
34
42
|
for (const j of Array.isArray(bootJobs) ? bootJobs : []) {
|
|
35
43
|
if (!j || j.status !== 'running') continue;
|
|
@@ -38,6 +46,10 @@ function buildJobWorktreeIsLive({ bootJobs, claudePidAlive, hasLiveHolder, cwdHo
|
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
return function isLive(slug, entry) {
|
|
49
|
+
if (adopted.has(slug)) {
|
|
50
|
+
console.log(`[gitWorktree] boot sweep: skipping job worktree slug=${slug} — adopted row, the reaper finalizes it`);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
41
53
|
const pid = runningPidBySlug.get(slug);
|
|
42
54
|
if (pid && claudePidAlive(pid)) {
|
|
43
55
|
console.log(`[gitWorktree] boot sweep: skipping job worktree slug=${slug} — running row with live pid=${pid}`);
|
|
@@ -337,6 +337,34 @@ const MCP_TOOL_CATALOG = [
|
|
|
337
337
|
notes: "cwd is optional — defaults to the calling session's own project root (SM_PROJECT_ROOT or process.cwd()) when omitted. "
|
|
338
338
|
+ 'Give exactly one of `html` / `htmlPath` (absolute .html/.htm file, <= 2MB read limit).',
|
|
339
339
|
},
|
|
340
|
+
{
|
|
341
|
+
name: 'project_matrix_read',
|
|
342
|
+
group: 'project-home',
|
|
343
|
+
purpose: "Load this project's saved competitive feature matrix (session-manager-operations/project-pages/matrix/matrix.json) "
|
|
344
|
+
+ "together with its JSON Schema, via the session-manager app's admin API — the warm start for a competitive-analysis run.",
|
|
345
|
+
whenToUse: 'Call FIRST in a competitive-analysis run, before any research: start from the saved products, groups and features '
|
|
346
|
+
+ 'instead of a cold start, and shape every edit to the returned `schema`. `matrix` is null when none has been saved yet.',
|
|
347
|
+
whenNotToUse: 'Do not use to save — use project_matrix_write. Do not read matrix.json from disk yourself: '
|
|
348
|
+
+ 'this call returns the stored copy and the schema it must satisfy in one step.',
|
|
349
|
+
exampleArgs: { cwd: '/home/bilko/Projects/session-manager' },
|
|
350
|
+
notes: "cwd is optional — defaults to the calling session's own project root (SM_PROJECT_ROOT or process.cwd()) when omitted. "
|
|
351
|
+
+ 'Returns { ok, matrix | null, error, path, schema }; a non-null `error` means a stored file exists but did not parse or validate.',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: 'project_matrix_write',
|
|
355
|
+
group: 'project-home',
|
|
356
|
+
purpose: "Save this project's competitive feature matrix — ONE JSON object matching the schema project_matrix_read returns — "
|
|
357
|
+
+ "via the session-manager app's admin API. Each call replaces the whole stored matrix.",
|
|
358
|
+
whenToUse: 'Use once, at the end of a competitive-analysis run, to save the finished matrix. Build the whole object from '
|
|
359
|
+
+ 'project_matrix_read\'s result plus what your research really found, then pass it as `matrix` or — preferred for a large '
|
|
360
|
+
+ 'matrix — write it to a local .json file and pass its absolute path as `matrixPath`. Pass `model` to record which model wrote it.',
|
|
361
|
+
whenNotToUse: 'Never fabricate features, products or sources — every cell must trace to something researched. Do not call it '
|
|
362
|
+
+ 'per feature or per product: it is a single whole-matrix save. Do not use for HTML pages — use project_page_write. '
|
|
363
|
+
+ 'The call is rejected for a matrix that fails the schema or exceeds 1MB.',
|
|
364
|
+
exampleArgs: { matrixPath: '/home/bilko/.cache/competitive-matrix/run/matrix.json', model: 'claude-opus-5-5' },
|
|
365
|
+
notes: "cwd is optional — defaults to the calling session's own project root (SM_PROJECT_ROOT or process.cwd()) when omitted. "
|
|
366
|
+
+ 'Give exactly one of `matrix` (object) / `matrixPath` (absolute .json file, <= 1MB, parsed as JSON).',
|
|
367
|
+
},
|
|
340
368
|
{
|
|
341
369
|
name: 'project_video_write',
|
|
342
370
|
group: 'project-home',
|