claude-code-session-manager 0.130.3 → 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/dist/assets/{AgentLibrary-BmrXNwK8.js → AgentLibrary-CYXre0J-.js} +2 -2
- package/dist/assets/{AppSettings-Cs4POznd.js → AppSettings-xNSfCj8e.js} +2 -2
- package/dist/assets/{Button-UUr5giu8.js → Button-BWljh5IK.js} +1 -1
- package/dist/assets/{DocumentEditorPane-C46Hj0lz.js → DocumentEditorPane-FUC2hZlp.js} +1 -1
- package/dist/assets/Extensions-CsyUoklz.js +2 -0
- package/dist/assets/{History-Bndupj87.js → History-BvNmY9OQ.js} +2 -2
- package/dist/assets/{Library-DFn0YPIW.js → Library-DVXk77zA.js} +12 -12
- package/dist/assets/{ListDetail-DjMn8a_3.js → ListDetail-DAAx__24.js} +1 -1
- package/dist/assets/{Panel-CIvb-XXN.js → Panel-g2D-e-RM.js} +1 -1
- package/dist/assets/{ProjectClaudeConfig-BQQRtMdK.js → ProjectClaudeConfig-BDuHJwaO.js} +7 -7
- package/dist/assets/{ProvenanceBadge-ej8W2ZIK.js → ProvenanceBadge-wew4_nf3.js} +1 -1
- package/dist/assets/Scheduler-CbeUIqD-.js +16 -0
- package/dist/assets/{Settings-DqxUna06.js → Settings-B23RsRfm.js} +1 -1
- package/dist/assets/{SkillReferenceGraph-BEMTdxdD.js → SkillReferenceGraph-BxQPCfsg.js} +1 -1
- package/dist/assets/Skills-4AR2FQrI.js +29 -0
- package/dist/assets/{SourceChip-BrPci8FX.js → SourceChip-jrC0vjfw.js} +1 -1
- package/dist/assets/{SystemPrompt-B43hNP0X.js → SystemPrompt-hHoBEnYb.js} +1 -1
- package/dist/assets/{TiptapBody-B-R2Bpda.js → TiptapBody-FkUqxO9u.js} +1 -1
- package/dist/assets/{Toggle-DKb4x1BP.js → Toggle-DQMNWZKT.js} +1 -1
- package/dist/assets/{ViewTabs-CcJdFZgv.js → ViewTabs-DGU0ZuxB.js} +1 -1
- package/dist/assets/{VoiceButton-BSH0UI3u.js → VoiceButton-BPPvDllh.js} +1 -1
- package/dist/assets/{historyTotals-5oUEu_fe.js → historyTotals-D8Oc3wUK.js} +1 -1
- package/dist/assets/{index-C9w-dVzo.js → index-9ajPMXBg.js} +1031 -1024
- package/dist/assets/{index-CMCcT2yg.css → index-oXqzajWV.css} +1 -1
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +414 -390
- package/package.json +1 -1
- package/scripts/scheduler-mcp-server.cjs +71 -0
- package/src/main/build-info.json +4 -4
- package/src/main/index.cjs +9 -0
- package/src/main/ipcSchemas.cjs +28 -1
- package/src/main/lib/epic/epicMint.cjs +61 -6
- 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 +2 -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 +564 -62
- 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/persona-macro/builtinMacros.cjs +16 -0
- package/src/main/lib/persona-macro/macroJobDispatch.cjs +8 -0
- 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/projectPages.cjs +20 -1
- package/src/main/runVerify.cjs +8 -3
- package/src/main/scheduler/budget.cjs +146 -7
- package/src/main/scheduler/gitTreeGuard.cjs +10 -11
- package/src/main/scheduler/reviewLadder.cjs +60 -0
- package/src/main/scheduler.cjs +461 -48
- package/src/main/seedAgentPersonas.cjs +1 -1
- package/src/preload/api.d.ts +159 -1
- package/src/preload/apiSurface.json +21 -0
- package/src/preload/index.cjs +5 -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/Extensions-B9QdiNOV.js +0 -2
- package/dist/assets/Scheduler-DSVBWqRK.js +0 -16
- package/dist/assets/Skills-DTXehVS7.js +0 -12
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* POST /admin/project-home/videos/write -> project-pages/videos/<videoId>/{index.html,meta.json}
|
|
5
5
|
* POST /admin/project-home/write alias: {cwd, html} -> knowledge/overview/
|
|
6
6
|
* POST /admin/project-home/demo-video/write alias: {cwd, html} -> a new videos/vid-<id>/ project-demo entry
|
|
7
|
+
* POST /admin/project-home/matrix/read {cwd} -> project-pages/matrix/matrix.json (+ its JSON Schema)
|
|
8
|
+
* POST /admin/project-home/matrix/write {cwd, matrix, model?} -> matrixStore.writeMatrix
|
|
7
9
|
* all owned by writer 'project-home' (see opsOwnership.cjs). Registered
|
|
8
10
|
* against the same injected localAdminHttp.cjs transport as
|
|
9
11
|
* prdAdminRoutes.cjs.
|
|
@@ -32,6 +34,8 @@ const { schemas, ENTRY_ID_RE } = require('../../ipcSchemas.cjs');
|
|
|
32
34
|
const { validateCharacterJson, validateCharacterJs, readCharacter, characterDir, MAX_JS_BYTES: MAX_CHARACTER_JS_BYTES } = require('../demo-video-kit/character.cjs');
|
|
33
35
|
const { checkHtmlLimits } = require('../demo-video-kit/checks.cjs');
|
|
34
36
|
const { injectPlayerBridge } = require('../project-pages/playerBridge.cjs');
|
|
37
|
+
const { readMatrix, matrixJsonSchema, MAX_MATRIX_BYTES } = require('../project-pages/competitiveMatrix.cjs');
|
|
38
|
+
const { writeMatrix } = require('../project-pages/matrixStore.cjs');
|
|
35
39
|
|
|
36
40
|
const MAX_HTML_BYTES = 1024 * 1024;
|
|
37
41
|
const MAX_DEMO_VIDEO_BYTES = 2 * 1024 * 1024;
|
|
@@ -228,8 +232,14 @@ function maxVideoBytes(lengthS) {
|
|
|
228
232
|
return Math.ceil(lengthS / 30) * MAX_DEMO_VIDEO_BYTES;
|
|
229
233
|
}
|
|
230
234
|
|
|
235
|
+
// Owned by the Competitor matrix store (project-pages/matrixStore.cjs writes
|
|
236
|
+
// knowledge/<id>/ directly). Kept local on purpose; macroJobDispatch.cjs holds
|
|
237
|
+
// the same constant so the builder never derives this id.
|
|
238
|
+
const MATRIX_PAGE_ID = 'competitive-matrix';
|
|
239
|
+
|
|
231
240
|
function buildPage(input, { pageId, title, topic }) {
|
|
232
241
|
if (!ENTRY_ID_RE.test(pageId)) return { error: 'invalid pageId' };
|
|
242
|
+
if (pageId === MATRIX_PAGE_ID) return { error: `pageId '${MATRIX_PAGE_ID}' is reserved for the Competitor matrix (written by project_matrix_write)` };
|
|
233
243
|
const rejection = validateHomeHtml(input.html);
|
|
234
244
|
if (rejection) return { error: rejection };
|
|
235
245
|
return {
|
|
@@ -330,6 +340,57 @@ function registerAdminRoute(adminHttp) {
|
|
|
330
340
|
|
|
331
341
|
// POST /admin/project-home/character/write {cwd, json, js, replace?} -> videos/_character/
|
|
332
342
|
adminHttp.registerRoute('POST', '/admin/project-home/character/write', characterWriteHandler);
|
|
343
|
+
|
|
344
|
+
// POST /admin/project-home/matrix/read {cwd?} -> {ok, matrix|null, error, path, schema}
|
|
345
|
+
adminHttp.registerRoute('POST', '/admin/project-home/matrix/read', makeMatrixHandler(async (cwd) => {
|
|
346
|
+
const r = await readMatrix(cwd);
|
|
347
|
+
return { status: 200, body: { ok: true, matrix: r.matrix, error: r.error, path: r.path, schema: matrixJsonSchema() } };
|
|
348
|
+
}));
|
|
349
|
+
|
|
350
|
+
// POST /admin/project-home/matrix/write {cwd?, matrix, model?} -> writeMatrix's result
|
|
351
|
+
adminHttp.registerRoute('POST', '/admin/project-home/matrix/write', makeMatrixHandler(async (cwd, body) => {
|
|
352
|
+
if (body.model !== undefined && typeof body.model !== 'string') {
|
|
353
|
+
return { status: 400, body: { ok: false, error: 'model must be a string' } };
|
|
354
|
+
}
|
|
355
|
+
config.addAllowedRoot(cwd);
|
|
356
|
+
const r = await writeMatrix(cwd, body.matrix, { model: body.model ?? '' });
|
|
357
|
+
return { status: r.ok ? 200 : 400, body: r };
|
|
358
|
+
}));
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** JSON body (capped at MAX_MATRIX_BYTES + 64 KB) + resolveCwd, then `run(cwd, body)` -> {status, body}. */
|
|
362
|
+
function makeMatrixHandler(run) {
|
|
363
|
+
return async (req, res) => {
|
|
364
|
+
let raw;
|
|
365
|
+
try {
|
|
366
|
+
raw = await readBody(req, MAX_MATRIX_BYTES + 64 * 1024);
|
|
367
|
+
} catch (e) {
|
|
368
|
+
sendJson(res, 413, { ok: false, error: `request body rejected: ${e?.message ?? 'unreadable'} (matrix limit is ${MAX_MATRIX_BYTES} bytes)` });
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
let body;
|
|
372
|
+
try {
|
|
373
|
+
body = raw ? JSON.parse(raw) : {};
|
|
374
|
+
} catch {
|
|
375
|
+
sendJson(res, 400, { ok: false, error: 'invalid JSON body' });
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (!body || typeof body !== 'object' || Array.isArray(body)) {
|
|
379
|
+
sendJson(res, 400, { ok: false, error: 'invalid payload' });
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const resolved = resolveCwd(body.cwd);
|
|
383
|
+
if (!resolved.ok) {
|
|
384
|
+
sendJson(res, resolved.status, { ok: false, error: resolved.error });
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
try {
|
|
388
|
+
const out = await run(resolved.cwd, body);
|
|
389
|
+
sendJson(res, out.status, out.body);
|
|
390
|
+
} catch (e) {
|
|
391
|
+
sendJson(res, 500, { ok: false, error: e?.message ?? 'matrix route failed' });
|
|
392
|
+
}
|
|
393
|
+
};
|
|
333
394
|
}
|
|
334
395
|
|
|
335
396
|
async function characterWriteHandler(req, res) {
|
|
@@ -62,6 +62,8 @@ const PATH_FENCED_CHANNELS = Object.freeze({
|
|
|
62
62
|
'promptSessions:read-session-transcript': { field: 'cwd', mode: 'root' },
|
|
63
63
|
// Project Home > Tools > Review MD network link map (main/projectPages.cjs): cwd inside a registered root.
|
|
64
64
|
'project-pages:md-network': { field: 'cwd', mode: 'root' },
|
|
65
|
+
// Project Home ▸ Tools ▸ Competitor matrix (main/projectPages.cjs): read-only, cwd inside a registered root.
|
|
66
|
+
'project-pages:matrix': { field: 'cwd', mode: 'root' },
|
|
65
67
|
})
|
|
66
68
|
|
|
67
69
|
const SECRET_DIRS = new Set(['.ssh', '.gnupg', '.aws', '.kube', '.docker', '.password-store', '.azure', '.terraform.d'])
|
|
@@ -90,12 +90,18 @@ async function sweepStrandedJobBranches({ cwd, jobs, attemptedBranches }) {
|
|
|
90
90
|
results.push({ branch, slug, action: 'skip-checked-out' });
|
|
91
91
|
continue;
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const row = slug ? jobsBySlug.get(slug) : null;
|
|
94
|
+
// forkSha bounds both the merged check and integration at the branch's own
|
|
95
|
+
// commits: after main is rebased/reset, the pre-rewrite commits it inherited
|
|
96
|
+
// must neither be replayed back nor keep a replay-landed branch "unmerged".
|
|
97
|
+
const forkSha = await gitWorktree.resolveForkSha({
|
|
98
|
+
cwd, branch, recorded: (row && row.worktreeForkSha) || null,
|
|
99
|
+
});
|
|
100
|
+
const merged = await gitWorktree.isBranchMergedIntoHead(cwd, branch, forkSha);
|
|
94
101
|
if (merged) {
|
|
95
102
|
results.push({ branch, slug, action: 'no-op-merged' });
|
|
96
103
|
continue;
|
|
97
104
|
}
|
|
98
|
-
const row = slug ? jobsBySlug.get(slug) : null;
|
|
99
105
|
const terminalOrMissing = !row || TERMINAL_JOB_STATUSES.has(row.status);
|
|
100
106
|
if (!terminalOrMissing) {
|
|
101
107
|
results.push({ branch, slug, action: 'skip-active-row' });
|
|
@@ -114,7 +120,7 @@ async function sweepStrandedJobBranches({ cwd, jobs, attemptedBranches }) {
|
|
|
114
120
|
// branch (no row at all) has nothing to read, so it falls back to
|
|
115
121
|
// resolveDefaultBranch(cwd), same as before.
|
|
116
122
|
const integration = await gitWorktree.integrateJobBranch({
|
|
117
|
-
cwd, branch, slug: slug || branch, baseBranch: (row && row.worktreeBaseBranch) || null,
|
|
123
|
+
cwd, branch, slug: slug || branch, baseBranch: (row && row.worktreeBaseBranch) || null, forkSha,
|
|
118
124
|
});
|
|
119
125
|
results.push({ branch, slug, action: integration.ok ? 'integrated' : 'conflict', integration });
|
|
120
126
|
}
|
|
@@ -76,4 +76,11 @@ function parseWorktreePorcelain(text) {
|
|
|
76
76
|
*/
|
|
77
77
|
const STRANDED_REF_PREFIX = 'refs/sm-stranded/';
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Namespace for snapshot commits of a checkout's UNCOMMITTED work, taken just
|
|
81
|
+
* before the checkout is removed (gitWorktree.snapshotUncommittedWork). Same
|
|
82
|
+
* outside-refs/heads reasoning as STRANDED_REF_PREFIX.
|
|
83
|
+
*/
|
|
84
|
+
const UNCOMMITTED_REF_PREFIX = 'refs/sm-uncommitted/';
|
|
85
|
+
|
|
86
|
+
module.exports = { execGit, parseWorktreePorcelain, STRANDED_REF_PREFIX, UNCOMMITTED_REF_PREFIX };
|