@mmnto/cli 1.114.0 → 1.116.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/commands/doctor-compliance.test.js +17 -0
- package/dist/commands/doctor-compliance.test.js.map +1 -1
- package/dist/commands/doctor-seat-identity.d.ts +87 -0
- package/dist/commands/doctor-seat-identity.d.ts.map +1 -0
- package/dist/commands/doctor-seat-identity.js +427 -0
- package/dist/commands/doctor-seat-identity.js.map +1 -0
- package/dist/commands/doctor-seat-identity.test.d.ts +13 -0
- package/dist/commands/doctor-seat-identity.test.d.ts.map +1 -0
- package/dist/commands/doctor-seat-identity.test.js +390 -0
- package/dist/commands/doctor-seat-identity.test.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +3 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +1 -0
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/ecl-gc.d.ts.map +1 -1
- package/dist/commands/ecl-gc.js +18 -7
- package/dist/commands/ecl-gc.js.map +1 -1
- package/dist/commands/ecl-gc.test.js +63 -1
- package/dist/commands/ecl-gc.test.js.map +1 -1
- package/dist/commands/eject.d.ts +62 -3
- package/dist/commands/eject.d.ts.map +1 -1
- package/dist/commands/eject.js +382 -47
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/eject.test.js +557 -7
- package/dist/commands/eject.test.js.map +1 -1
- package/dist/commands/gemini-beforetool-contract.test.d.ts +2 -0
- package/dist/commands/gemini-beforetool-contract.test.d.ts.map +1 -0
- package/dist/commands/gemini-beforetool-contract.test.js +106 -0
- package/dist/commands/gemini-beforetool-contract.test.js.map +1 -0
- package/dist/commands/gemini-sessionstart-contract.test.d.ts +2 -0
- package/dist/commands/gemini-sessionstart-contract.test.d.ts.map +1 -0
- package/dist/commands/gemini-sessionstart-contract.test.js +199 -0
- package/dist/commands/gemini-sessionstart-contract.test.js.map +1 -0
- package/dist/commands/init-templates.d.ts +4 -4
- package/dist/commands/init-templates.d.ts.map +1 -1
- package/dist/commands/init-templates.js +279 -16
- package/dist/commands/init-templates.js.map +1 -1
- package/dist/commands/init.test.js +25 -7
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/install-hooks-exit-contract.test.js +5 -0
- package/dist/commands/install-hooks-exit-contract.test.js.map +1 -1
- package/dist/commands/mail-degraded-e4.test.js +126 -0
- package/dist/commands/mail-degraded-e4.test.js.map +1 -1
- package/dist/commands/mail.d.ts +19 -1
- package/dist/commands/mail.d.ts.map +1 -1
- package/dist/commands/mail.js +195 -30
- package/dist/commands/mail.js.map +1 -1
- package/dist/commands/mail.test.js +291 -3
- package/dist/commands/mail.test.js.map +1 -1
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +82 -0
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/orient.test.js +144 -1
- package/dist/commands/orient.test.js.map +1 -1
- package/dist/commands/retrospect.d.ts.map +1 -1
- package/dist/commands/retrospect.js +7 -3
- package/dist/commands/retrospect.js.map +1 -1
- package/dist/commands/seat-cli-wiring.test.d.ts +20 -0
- package/dist/commands/seat-cli-wiring.test.d.ts.map +1 -0
- package/dist/commands/seat-cli-wiring.test.js +147 -0
- package/dist/commands/seat-cli-wiring.test.js.map +1 -0
- package/dist/commands/seat-poll-chain.test.d.ts +13 -0
- package/dist/commands/seat-poll-chain.test.d.ts.map +1 -0
- package/dist/commands/seat-poll-chain.test.js +103 -0
- package/dist/commands/seat-poll-chain.test.js.map +1 -0
- package/dist/commands/seat.d.ts +92 -0
- package/dist/commands/seat.d.ts.map +1 -0
- package/dist/commands/seat.js +649 -0
- package/dist/commands/seat.js.map +1 -0
- package/dist/commands/seat.test.d.ts +19 -0
- package/dist/commands/seat.test.d.ts.map +1 -0
- package/dist/commands/seat.test.js +532 -0
- package/dist/commands/seat.test.js.map +1 -0
- package/dist/commands/sessionstart-manifest-contract.test.d.ts +2 -0
- package/dist/commands/sessionstart-manifest-contract.test.d.ts.map +1 -0
- package/dist/commands/sessionstart-manifest-contract.test.js +186 -0
- package/dist/commands/sessionstart-manifest-contract.test.js.map +1 -0
- package/dist/commands/triage-pr.d.ts.map +1 -1
- package/dist/commands/triage-pr.js +2 -0
- package/dist/commands/triage-pr.js.map +1 -1
- package/dist/hooks/__tests__/auto-context.test.js +20 -0
- package/dist/hooks/__tests__/auto-context.test.js.map +1 -1
- package/dist/hooks/auto-context.d.ts +19 -0
- package/dist/hooks/auto-context.d.ts.map +1 -1
- package/dist/hooks/auto-context.js +22 -4
- package/dist/hooks/auto-context.js.map +1 -1
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/bot-review-parser.d.ts +8 -1
- package/dist/parsers/bot-review-parser.d.ts.map +1 -1
- package/dist/parsers/bot-review-parser.js +21 -1
- package/dist/parsers/bot-review-parser.js.map +1 -1
- package/dist/parsers/bot-review-parser.test.js +23 -0
- package/dist/parsers/bot-review-parser.test.js.map +1 -1
- package/dist/parsers/triage-severity-mapper.d.ts.map +1 -1
- package/dist/parsers/triage-severity-mapper.js +32 -1
- package/dist/parsers/triage-severity-mapper.js.map +1 -1
- package/dist/parsers/triage-severity-mapper.test.js +57 -0
- package/dist/parsers/triage-severity-mapper.test.js.map +1 -1
- package/package.json +2 -2
|
@@ -158,7 +158,7 @@ export const GEMINI_SESSION_START = `// [totem] auto-generated — Gemini CLI Se
|
|
|
158
158
|
// totem-strategy, totem-substrate, arhgap11, and totem-status, and
|
|
159
159
|
// matches the Claude-side SessionStart hook scaffolded by this same init
|
|
160
160
|
// pass (mmnto-ai/totem#1884).
|
|
161
|
-
const {
|
|
161
|
+
const { spawnSync } = require('child_process');
|
|
162
162
|
|
|
163
163
|
// totem-status refresh-gh — GH-federation snapshot refresh (mmnto-ai/totem-status#127
|
|
164
164
|
// C3 residual; tracking mmnto-ai/totem#2556). Spawn-and-forget, detached+unref, and
|
|
@@ -251,27 +251,180 @@ try {
|
|
|
251
251
|
process.stderr.write('[SessionStart] totem-status refresh-gh unavailable (non-fatal): ' + (err instanceof Error ? err.message : String(err)) + '\\n');
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
// ─── A.3.a: mint session ID + log session_start event ──────────
|
|
255
|
+
// New with mmnto-ai/totem#2468: this template never took over the A.3.a duty
|
|
256
|
+
// its Claude sibling carries, so Gemini-seat sessions had no session UUID and
|
|
257
|
+
// no session_start denominator row — the selection-manifest join key and the
|
|
258
|
+
// recorded-absence contract both need them. Same shape as the Claude template.
|
|
259
|
+
// Fire-and-forget: a ledger failure must NOT block the briefing.
|
|
260
|
+
let mintedSessionId = null;
|
|
254
261
|
try {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
262
|
+
const nodePath = require('path');
|
|
263
|
+
const { mkdirSync, writeFileSync, appendFileSync } = require('fs');
|
|
264
|
+
const { randomUUID } = require('crypto');
|
|
265
|
+
const ledgerDir = nodePath.join(process.cwd(), '.totem', 'ledger');
|
|
266
|
+
mkdirSync(ledgerDir, { recursive: true });
|
|
267
|
+
mintedSessionId = randomUUID();
|
|
268
|
+
writeFileSync(nodePath.join(ledgerDir, '.session-id'), mintedSessionId, 'utf-8');
|
|
269
|
+
const selfAgentEntry = (process.env.TOTEM_SELF_AGENT || '')
|
|
270
|
+
.split(',')
|
|
271
|
+
.map((s) => s.trim())
|
|
272
|
+
.find((s) => s.length > 0);
|
|
273
|
+
const event = {
|
|
274
|
+
timestamp: new Date().toISOString(),
|
|
275
|
+
type: 'session_start',
|
|
276
|
+
activity_name: 'SessionStart',
|
|
277
|
+
source: 'bot',
|
|
278
|
+
...(selfAgentEntry ? { agent_source: selfAgentEntry } : {}),
|
|
279
|
+
justification: '',
|
|
280
|
+
session_id: mintedSessionId,
|
|
281
|
+
};
|
|
282
|
+
appendFileSync(nodePath.join(ledgerDir, 'events.ndjson'), JSON.stringify(event) + '\\n', 'utf-8');
|
|
283
|
+
} catch (err) {
|
|
284
|
+
process.stderr.write(
|
|
285
|
+
'[SessionStart] session-start telemetry unavailable (non-fatal): ' +
|
|
286
|
+
(err instanceof Error ? err.message : String(err)) +
|
|
287
|
+
'\\n',
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Interactive Gemini ingests SessionStart CONTEXT only from the
|
|
292
|
+
// hookSpecificOutput.additionalContext envelope — plain exit-0 stdout wraps as
|
|
293
|
+
// systemMessage, which the interactive startup consumer never injects, so the
|
|
294
|
+
// briefing was absent from model context in the primary dev flow even once
|
|
295
|
+
// registered (mmnto-ai/totem#2613; leg-verified against @google/gemini-cli
|
|
296
|
+
// 0.54.4). systemMessage rides alongside the envelope for the human surfaces:
|
|
297
|
+
// interactive startup and /clear render it as a UI info item and -p echoes it
|
|
298
|
+
// to stderr — so the briefing is VISIBLE to the human on those surfaces and
|
|
299
|
+
// injected as context for the model (one payload, both audiences).
|
|
300
|
+
// The Totem CLI writes its banner and diagnostics to STDERR, so capture takes
|
|
301
|
+
// BOTH streams — the same seam the Claude-side template documents; a
|
|
302
|
+
// stdout-only capture silently drops the describe leg (mmnto-ai/totem#2613
|
|
303
|
+
// falsification round). A leg failure carries any partial stdout plus the
|
|
304
|
+
// fail-soft note; exit is ALWAYS 0 (never blocks boot).
|
|
305
|
+
// Per-leg 20s budgets cut the measured worst-case process exit from 60s to
|
|
306
|
+
// 40s against Gemini's 60s DEFAULT_HOOK_TIMEOUT (which tree-kills at expiry;
|
|
307
|
+
// no descendant inherits this hook's own streams).
|
|
308
|
+
let briefing = '';
|
|
309
|
+
try {
|
|
310
|
+
const describeRun = spawnSync('totem describe', {
|
|
311
|
+
shell: true,
|
|
312
|
+
timeout: 20000,
|
|
313
|
+
encoding: 'utf-8',
|
|
314
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
258
315
|
});
|
|
316
|
+
// spawnSync sets .error (it does NOT throw) on spawn-level failure/timeout.
|
|
317
|
+
briefing += describeRun.stdout || '';
|
|
318
|
+
if (describeRun.error || describeRun.status !== 0) {
|
|
319
|
+
const reason = describeRun.error
|
|
320
|
+
? (describeRun.error.message || String(describeRun.error))
|
|
321
|
+
: ((describeRun.stderr || '').trim() || 'totem describe exited ' + describeRun.status);
|
|
322
|
+
briefing += '[Totem] Briefing unavailable: ' + reason + '\\n';
|
|
323
|
+
} else {
|
|
324
|
+
briefing += describeRun.stderr || '';
|
|
325
|
+
}
|
|
259
326
|
} catch (err) {
|
|
260
|
-
|
|
327
|
+
// Belt for a genuinely throwing spawnSync: same fail-soft note.
|
|
328
|
+
briefing += '[Totem] Briefing unavailable: ' + (err instanceof Error ? err.message : String(err)) + '\\n';
|
|
261
329
|
}
|
|
262
330
|
|
|
331
|
+
// Selection-manifest block boundary (mmnto-ai/totem#2468): everything in
|
|
332
|
+
// \`briefing\` up to here is the describe leg — including its fail-soft note,
|
|
333
|
+
// which IS injected payload when it fires.
|
|
334
|
+
const describeBriefingEnd = briefing.length;
|
|
335
|
+
|
|
263
336
|
// totem orient --session — live derived in-flight state, ADDITIVE to describe
|
|
264
337
|
// (mmnto-ai/totem#2044 PR-3). Own try/catch; orient --session is itself boot-safe.
|
|
265
338
|
try {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
339
|
+
const orientRun = spawnSync('totem orient --session', {
|
|
340
|
+
shell: true,
|
|
341
|
+
timeout: 20000,
|
|
342
|
+
encoding: 'utf-8',
|
|
343
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
269
344
|
});
|
|
345
|
+
briefing += orientRun.stdout || '';
|
|
346
|
+
if (orientRun.error || orientRun.status !== 0) {
|
|
347
|
+
const orientReason = orientRun.error
|
|
348
|
+
? (orientRun.error.message || String(orientRun.error))
|
|
349
|
+
: ((orientRun.stderr || '').trim() || 'totem orient exited ' + orientRun.status);
|
|
350
|
+
// Boot-safe: orient is additive to describe; a failure never blocks session
|
|
351
|
+
// start. The note rides the briefing (both keys) so the model and the human
|
|
352
|
+
// both see the orient gap — a stderr-only note is invisible to the model
|
|
353
|
+
// (CR round on this PR); the parent-stderr breadcrumb stays for hook
|
|
354
|
+
// diagnostics.
|
|
355
|
+
briefing += '[Totem] Orient briefing unavailable: ' + orientReason + '\\n';
|
|
356
|
+
process.stderr.write('[SessionStart] orient briefing unavailable (non-fatal): ' + orientReason + '\\n');
|
|
357
|
+
} else {
|
|
358
|
+
briefing += orientRun.stderr || '';
|
|
359
|
+
}
|
|
270
360
|
} catch (err) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
process.stderr.write('[SessionStart] orient briefing unavailable (non-fatal): ' +
|
|
361
|
+
const orientMsg = err instanceof Error ? err.message : String(err);
|
|
362
|
+
briefing += '[Totem] Orient briefing unavailable: ' + orientMsg + '\\n';
|
|
363
|
+
process.stderr.write('[SessionStart] orient briefing unavailable (non-fatal): ' + orientMsg + '\\n');
|
|
274
364
|
}
|
|
365
|
+
|
|
366
|
+
// ─── selection manifest (mmnto-ai/totem#2468 M1) ────────────────
|
|
367
|
+
// Inline append mirroring the A.3.a write above — this rendered hook runs
|
|
368
|
+
// standalone in consumer repos with no access to @mmnto/totem's writer. The
|
|
369
|
+
// row shape is BOUND to SelectionManifestRowSchema (strict): change both in
|
|
370
|
+
// the same PR; the template contract test parses this row with the real
|
|
371
|
+
// schema. A zero-byte block never becomes a candidate (nothing was injected).
|
|
372
|
+
try {
|
|
373
|
+
const nodePath = require('path');
|
|
374
|
+
const { appendFileSync } = require('fs');
|
|
375
|
+
const { createHash } = require('crypto');
|
|
376
|
+
const measure = (id, content, reason) => {
|
|
377
|
+
const bytes = Buffer.byteLength(content, 'utf-8');
|
|
378
|
+
return {
|
|
379
|
+
id,
|
|
380
|
+
disposition: 'selected',
|
|
381
|
+
reason,
|
|
382
|
+
bytes,
|
|
383
|
+
approxTokens: Math.ceil(bytes / 4),
|
|
384
|
+
fingerprint: createHash('sha256').update(content, 'utf-8').digest('hex').slice(0, 16),
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
const selfAgent = (process.env.TOTEM_SELF_AGENT || '')
|
|
388
|
+
.split(',')
|
|
389
|
+
.map((s) => s.trim())
|
|
390
|
+
.find((s) => s.length > 0);
|
|
391
|
+
const row = {
|
|
392
|
+
schemaVersion: 1,
|
|
393
|
+
timestamp: new Date().toISOString(),
|
|
394
|
+
emitter: 'session-start',
|
|
395
|
+
...(mintedSessionId ? { session_id: mintedSessionId } : {}),
|
|
396
|
+
...(selfAgent ? { agent_source: selfAgent } : {}),
|
|
397
|
+
// mmnto-ai/totem#2629: provenance disclosed on every row (ruled item 1).
|
|
398
|
+
// Self-minted row — the minting seat IS this process's env read, so the
|
|
399
|
+
// core conflict probe is structurally inapplicable; only the two-value
|
|
400
|
+
// provenance enum rides. Mirrors senseAgentAttribution's biconditional.
|
|
401
|
+
agent_source_provenance: selfAgent ? 'env' : 'absent',
|
|
402
|
+
context: { template: 'gemini-managed' },
|
|
403
|
+
universe: 'managed-template blocks: describe + orient --session',
|
|
404
|
+
costBasis: { bytes: 'utf8-length', approxTokens: 'ceil(bytes/4) approximation' },
|
|
405
|
+
candidates: [
|
|
406
|
+
measure('describe', briefing.slice(0, describeBriefingEnd), 'always-injected briefing'),
|
|
407
|
+
measure('orient:session-block', briefing.slice(describeBriefingEnd), 'always-injected briefing'),
|
|
408
|
+
].filter((c) => c.bytes > 0),
|
|
409
|
+
warnings: [],
|
|
410
|
+
};
|
|
411
|
+
appendFileSync(
|
|
412
|
+
nodePath.join(process.cwd(), '.totem', 'ledger', 'selection-manifests.ndjson'),
|
|
413
|
+
JSON.stringify(row) + '\\n',
|
|
414
|
+
'utf-8',
|
|
415
|
+
);
|
|
416
|
+
} catch (err) {
|
|
417
|
+
process.stderr.write(
|
|
418
|
+
'[SessionStart] selection manifest unavailable (non-fatal): ' +
|
|
419
|
+
(err instanceof Error ? err.message : String(err)) +
|
|
420
|
+
'\\n',
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
process.stdout.write(JSON.stringify({
|
|
425
|
+
systemMessage: briefing,
|
|
426
|
+
hookSpecificOutput: { hookEventName: 'SessionStart', additionalContext: briefing },
|
|
427
|
+
}) + '\\n');
|
|
275
428
|
${TOTEM_FILE_END}
|
|
276
429
|
`;
|
|
277
430
|
export const GEMINI_BEFORE_TOOL = `// [totem] auto-generated — Gemini CLI BeforeTool hook
|
|
@@ -443,7 +596,7 @@ function checkXrepoQualifyRefs(toolName, toolInput) {
|
|
|
443
596
|
);
|
|
444
597
|
}
|
|
445
598
|
|
|
446
|
-
|
|
599
|
+
function beforeTool(toolName, toolInput) {
|
|
447
600
|
checkOutboxSubjectQuoting(toolName, toolInput);
|
|
448
601
|
checkAutoCloseKeywords(toolName, toolInput);
|
|
449
602
|
checkXrepoQualifyRefs(toolName, toolInput);
|
|
@@ -457,7 +610,50 @@ module.exports = function beforeTool(toolName, toolInput) {
|
|
|
457
610
|
} catch (err) {
|
|
458
611
|
throw new Error('[Totem Error] Shield check failed. Fix violations before pushing.\\n' + err.message);
|
|
459
612
|
}
|
|
460
|
-
}
|
|
613
|
+
}
|
|
614
|
+
module.exports = beforeTool;
|
|
615
|
+
|
|
616
|
+
// Entry point — Gemini runs this file as a COMMAND hook (\`node BeforeTool.cjs\`)
|
|
617
|
+
// with the hook-input JSON on stdin; without this block the file defines a
|
|
618
|
+
// function and exits 0 = allow, leaving every guard above inert
|
|
619
|
+
// (mmnto-ai/totem#2611). Exit contract (leg-verified against
|
|
620
|
+
// @google/gemini-cli 0.54.4): exit 0 allow · exit 1 ALLOW with warning (an
|
|
621
|
+
// uncaught throw exits 1 — throwing can never deny) · exit >= 2 deny ·
|
|
622
|
+
// structured stdout {"decision":"deny","reason"} deny. A violation emits the
|
|
623
|
+
// structured deny AND exits 2 so either channel suffices. Gemini reads stderr
|
|
624
|
+
// only when stdout is EMPTY, so the stderr copy on the deny path never enters
|
|
625
|
+
// the hook pipeline — it serves hand-run invocations; on the exit-1 paths the
|
|
626
|
+
// stderr breadcrumb IS the payload that surfaces as the warning. Input the
|
|
627
|
+
// guard cannot evaluate (unparseable JSON, missing tool_name) is
|
|
628
|
+
// allow-with-warning (exit 1): denying every call on a vendor shape change
|
|
629
|
+
// would brick the seat, and exiting 0 would hide the outage.
|
|
630
|
+
if (require.main === module) {
|
|
631
|
+
let raw = '';
|
|
632
|
+
process.stdin.setEncoding('utf-8');
|
|
633
|
+
process.stdin.on('data', function (chunk) { raw += chunk; });
|
|
634
|
+
process.stdin.on('end', function () {
|
|
635
|
+
let input;
|
|
636
|
+
try {
|
|
637
|
+
input = JSON.parse(raw);
|
|
638
|
+
} catch (err) {
|
|
639
|
+
process.stderr.write('[totem BeforeTool] hook input is not parseable JSON — guard did not evaluate this call: ' + (err instanceof Error ? err.message : String(err)) + '\\n');
|
|
640
|
+
process.exit(1);
|
|
641
|
+
}
|
|
642
|
+
if (typeof input !== 'object' || input === null || typeof input.tool_name !== 'string') {
|
|
643
|
+
process.stderr.write('[totem BeforeTool] hook input carries no tool_name — guard did not evaluate this call\\n');
|
|
644
|
+
process.exit(1);
|
|
645
|
+
}
|
|
646
|
+
try {
|
|
647
|
+
beforeTool(input.tool_name, input.tool_input);
|
|
648
|
+
} catch (err) {
|
|
649
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
650
|
+
process.stdout.write(JSON.stringify({ decision: 'deny', reason: reason }) + '\\n');
|
|
651
|
+
process.stderr.write(reason + '\\n');
|
|
652
|
+
process.exit(2);
|
|
653
|
+
}
|
|
654
|
+
process.exit(0);
|
|
655
|
+
});
|
|
656
|
+
}
|
|
461
657
|
${TOTEM_FILE_END}
|
|
462
658
|
`;
|
|
463
659
|
export const GEMINI_SKILL = `<!-- [totem] auto-generated — Totem Architect skill -->
|
|
@@ -758,10 +954,14 @@ const { randomUUID } = require('crypto');
|
|
|
758
954
|
const { join } = require('path');
|
|
759
955
|
|
|
760
956
|
// ─── A.3.a: mint session ID + log session_start event ──────────
|
|
957
|
+
// Hoisted so the selection-manifest row below (mmnto-ai/totem#2468) can carry
|
|
958
|
+
// the same session UUID as its join key.
|
|
959
|
+
let mintedSessionId = null;
|
|
761
960
|
try {
|
|
762
961
|
const ledgerDir = join(process.cwd(), '.totem', 'ledger');
|
|
763
962
|
mkdirSync(ledgerDir, { recursive: true });
|
|
764
963
|
const sessionId = randomUUID();
|
|
964
|
+
mintedSessionId = sessionId;
|
|
765
965
|
writeFileSync(join(ledgerDir, '.session-id'), sessionId, 'utf-8');
|
|
766
966
|
// Amended ADR-078 (2026-07-15): agent_source is the env-carried seat-id
|
|
767
967
|
// (TOTEM_SELF_AGENT, first non-empty comma entry), never a vendor class
|
|
@@ -891,6 +1091,9 @@ try {
|
|
|
891
1091
|
}
|
|
892
1092
|
|
|
893
1093
|
// ─── totem describe briefing (existing behavior) ────────────────
|
|
1094
|
+
// Captured (mmnto-ai/totem#2468): the injected block is the selection-manifest
|
|
1095
|
+
// candidate below — the not-installed notice is a notice, not a briefing.
|
|
1096
|
+
let describeText = '';
|
|
894
1097
|
try {
|
|
895
1098
|
const cliPath = join(process.cwd(), 'node_modules', '@mmnto', 'cli', 'dist', 'index.js');
|
|
896
1099
|
if (existsSync(cliPath)) {
|
|
@@ -903,7 +1106,8 @@ try {
|
|
|
903
1106
|
}
|
|
904
1107
|
// Totem CLI writes diagnostic output to stderr; route to stdout so the
|
|
905
1108
|
// session-start context lands in Claude's prompt rather than user-visible noise.
|
|
906
|
-
|
|
1109
|
+
describeText = (result.stdout || '') + (result.stderr || '');
|
|
1110
|
+
process.stdout.write(describeText);
|
|
907
1111
|
} else {
|
|
908
1112
|
process.stdout.write(
|
|
909
1113
|
'[Totem] @mmnto/cli not installed. Run \`pnpm install\` (or your package manager equivalent) to enable session-start orientation.\\n',
|
|
@@ -923,6 +1127,7 @@ try {
|
|
|
923
1127
|
// never replace. Its OWN try/catch so an orient failure never disturbs the describe
|
|
924
1128
|
// briefing or the boot; \`orient --session\` is itself boot-safe (emits nothing when
|
|
925
1129
|
// nothing is high-signal, never exits non-zero, degrades to honest "could not derive").
|
|
1130
|
+
let orientText = '';
|
|
926
1131
|
try {
|
|
927
1132
|
const orientCliPath = join(process.cwd(), 'node_modules', '@mmnto', 'cli', 'dist', 'index.js');
|
|
928
1133
|
if (existsSync(orientCliPath)) {
|
|
@@ -935,7 +1140,8 @@ try {
|
|
|
935
1140
|
if (orientResult.error) {
|
|
936
1141
|
throw orientResult.error;
|
|
937
1142
|
}
|
|
938
|
-
|
|
1143
|
+
orientText = (orientResult.stdout || '') + (orientResult.stderr || '');
|
|
1144
|
+
process.stdout.write(orientText);
|
|
939
1145
|
}
|
|
940
1146
|
} catch (err) {
|
|
941
1147
|
// Boot-safe: orient is additive to describe (already emitted), so a failure never
|
|
@@ -947,6 +1153,62 @@ try {
|
|
|
947
1153
|
'\\n',
|
|
948
1154
|
);
|
|
949
1155
|
}
|
|
1156
|
+
|
|
1157
|
+
// ─── selection manifest (mmnto-ai/totem#2468 M1) ────────────────
|
|
1158
|
+
// Inline append mirroring the session_start write above — this rendered hook
|
|
1159
|
+
// runs standalone in consumer repos with no access to @mmnto/totem's writer.
|
|
1160
|
+
// The row shape is BOUND to SelectionManifestRowSchema (strict): change both
|
|
1161
|
+
// in the same PR; the template contract test parses this row with the real
|
|
1162
|
+
// schema. A zero-byte block never becomes a candidate (nothing was injected).
|
|
1163
|
+
try {
|
|
1164
|
+
const { createHash } = require('crypto');
|
|
1165
|
+
const measure = (id, content, reason) => {
|
|
1166
|
+
const bytes = Buffer.byteLength(content, 'utf-8');
|
|
1167
|
+
return {
|
|
1168
|
+
id,
|
|
1169
|
+
disposition: 'selected',
|
|
1170
|
+
reason,
|
|
1171
|
+
bytes,
|
|
1172
|
+
approxTokens: Math.ceil(bytes / 4),
|
|
1173
|
+
fingerprint: createHash('sha256').update(content, 'utf-8').digest('hex').slice(0, 16),
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
const selfAgent = (process.env.TOTEM_SELF_AGENT || '')
|
|
1177
|
+
.split(',')
|
|
1178
|
+
.map((s) => s.trim())
|
|
1179
|
+
.find((s) => s.length > 0);
|
|
1180
|
+
const row = {
|
|
1181
|
+
schemaVersion: 1,
|
|
1182
|
+
timestamp: new Date().toISOString(),
|
|
1183
|
+
emitter: 'session-start',
|
|
1184
|
+
...(mintedSessionId ? { session_id: mintedSessionId } : {}),
|
|
1185
|
+
...(selfAgent ? { agent_source: selfAgent } : {}),
|
|
1186
|
+
// mmnto-ai/totem#2629: provenance disclosed on every row (ruled item 1).
|
|
1187
|
+
// Self-minted row — the minting seat IS this process's env read, so the
|
|
1188
|
+
// core conflict probe is structurally inapplicable; only the two-value
|
|
1189
|
+
// provenance enum rides. Mirrors senseAgentAttribution's biconditional.
|
|
1190
|
+
agent_source_provenance: selfAgent ? 'env' : 'absent',
|
|
1191
|
+
context: { template: 'claude-managed' },
|
|
1192
|
+
universe: 'managed-template blocks: describe + orient --session',
|
|
1193
|
+
costBasis: { bytes: 'utf8-length', approxTokens: 'ceil(bytes/4) approximation' },
|
|
1194
|
+
candidates: [
|
|
1195
|
+
measure('describe', describeText, 'always-injected briefing'),
|
|
1196
|
+
measure('orient:session-block', orientText, 'always-injected briefing'),
|
|
1197
|
+
].filter((c) => c.bytes > 0),
|
|
1198
|
+
warnings: [],
|
|
1199
|
+
};
|
|
1200
|
+
appendFileSync(
|
|
1201
|
+
join(process.cwd(), '.totem', 'ledger', 'selection-manifests.ndjson'),
|
|
1202
|
+
JSON.stringify(row) + '\\n',
|
|
1203
|
+
'utf-8',
|
|
1204
|
+
);
|
|
1205
|
+
} catch (err) {
|
|
1206
|
+
process.stderr.write(
|
|
1207
|
+
'[SessionStart] selection manifest unavailable (non-fatal): ' +
|
|
1208
|
+
(err instanceof Error ? err.message : String(err)) +
|
|
1209
|
+
'\\n',
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
950
1212
|
${TOTEM_FILE_END}
|
|
951
1213
|
`;
|
|
952
1214
|
export const CLAUDE_SESSION_START_ENTRY = {
|
|
@@ -1543,6 +1805,7 @@ Auto-reply on the PR acknowledging the deferral:
|
|
|
1543
1805
|
|
|
1544
1806
|
- **CodeRabbit items:** Reply inline to each thread with "Tracked in #NNN" or "Deferred — not blocking for this PR."
|
|
1545
1807
|
- **GCA items:** DO NOT reply inline. Batch ALL GCA responses into ONE issue comment: \`@gemini-code-assist\` followed by a numbered list addressing each finding. Use \`gh pr comment $ARGUMENTS --body-file -\` and pipe the comment body via stdin.
|
|
1808
|
+
- **ghcq items:** \`github-code-quality[bot]\` has no known @-listener (attested: no in-org tag attempt has drawn a response and none is documented — mmnto-ai/totem#2626) — do not tag it; treat its dispositions as audit-trail-only.
|
|
1546
1809
|
- **SARIF items:** No reply needed (our own tool).
|
|
1547
1810
|
|
|
1548
1811
|
### \`nit <numbers | category>\`
|
|
@@ -1577,7 +1840,7 @@ totem review --covariate
|
|
|
1577
1840
|
|
|
1578
1841
|
It resolves the current branch lineage exactly as the review fan does, loads the LATEST verdict artifact for that lineage (\`.totem/artifacts/verdicts/\`), and prints the canonical \`local-lane:\` line from the single core-owned renderer — never trust a pasted or hand-copied value. If it reports no verdict for the current lineage, there is no line to carry (note that in the body and continue).
|
|
1579
1842
|
|
|
1580
|
-
2. **Assemble the single body.** One comment: @-tag EVERY bot addressed in the round — exactly ONE tag each (e.g. \`@gemini-code-assist\`, \`@coderabbitai\`, \`@greptileai\`) so each bot registers the disposition, and tags must be present when the comment is POSTED, never edited in (GCA's listener fires on comment-created only). One notification per bot per round: a bot with nothing addressed gets no tag, and a bot already @-tagged in this round's batch comment (the GCA defer/nit batch above) is NOT re-tagged here. Never combine a tag with ANY bot's review trigger — triggers are standalone comments, one trigger and no prose (a trigger embedded in a content-rich comment chat-routes the bot). Then the per-item dispositions (fixed / deferred / nit / extracted) followed by the non-empty \`local-lane:\` line from step 1, verbatim. The local \`review-loop\` holds this line but never posts it, so \`/review-reply\` is the SOLE path that carries it to GitHub.
|
|
1843
|
+
2. **Assemble the single body.** One comment: @-tag EVERY bot addressed in the round — exactly ONE tag each (e.g. \`@gemini-code-assist\`, \`@coderabbitai\`, \`@greptileai\`) so each bot registers the disposition, and tags must be present when the comment is POSTED, never edited in (GCA's listener fires on comment-created only). One notification per bot per round: a bot with nothing addressed gets no tag, and a bot already @-tagged in this round's batch comment (the GCA defer/nit batch above) is NOT re-tagged here. ghcq (\`github-code-quality[bot]\`) has no known listener — it is never tagged; its items are dispositioned in the body for the audit trail only (mmnto-ai/totem#2626). Never combine a tag with ANY bot's review trigger — triggers are standalone comments, one trigger and no prose (a trigger embedded in a content-rich comment chat-routes the bot). Then the per-item dispositions (fixed / deferred / nit / extracted) followed by the non-empty \`local-lane:\` line from step 1, verbatim. The local \`review-loop\` holds this line but never posts it, so \`/review-reply\` is the SOLE path that carries it to GitHub.
|
|
1581
1844
|
|
|
1582
1845
|
3. **Post on an explicit go.** Show the assembled body and wait for the operator; on their go, post the ONE comment with \`gh pr comment $ARGUMENTS --body-file -\` (pipe the body via stdin). Never mutate the PR autonomously.
|
|
1583
1846
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-templates.js","sourceRoot":"","sources":["../../src/commands/init-templates.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,qEAAqE;AAMrE,6DAA6D;AAC7D,+EAA+E;AAC/E,sEAAsE;AAEtE,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,6BAA6B,CAAC;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,uCAAuC,CAAC;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,0CAA0C,CAAC;AAE1E,MAAM,CAAC,MAAM,eAAe,GAAG;EAC7B,YAAY;8BACgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C1C,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,MAAM,C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;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,MAAoB,EACpB,OAAuB,EACvB,aAA4B,EAC5B,GAAW;IAEX,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO;gBACL,OAAO,EAAE,MAAM,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC;gBAC9D,QAAQ,EAAE,YAAY;aACvB,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,OAAO,EAAE,MAAM,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC;gBAC9D,QAAQ,EAAE,YAAY;aACvB,CAAC;QACJ;YACE,OAAO;gBACL,OAAO,EAAE,MAAM,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC;gBAC1D,QAAQ,EAAE,iBAAiB;aAC5B,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -1705,13 +1705,31 @@ describe('GEMINI_SESSION_START template', () => {
|
|
|
1705
1705
|
it('does NOT call `totem status` (the prior drifted shape)', () => {
|
|
1706
1706
|
expect(GEMINI_SESSION_START).not.toContain("'totem status'");
|
|
1707
1707
|
});
|
|
1708
|
-
it('uses
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
//
|
|
1713
|
-
//
|
|
1714
|
-
expect(GEMINI_SESSION_START).toContain(
|
|
1708
|
+
it('uses 20-second per-leg timeouts — measured worst-case exit drops 60s to 40s', () => {
|
|
1709
|
+
// Two sequential legs at the old 30s each could consume Gemini's entire
|
|
1710
|
+
// 60s DEFAULT_HOOK_TIMEOUT on one pathological hang. Post-fix no
|
|
1711
|
+
// descendant inherits the hook's own streams, so the inner budgets are
|
|
1712
|
+
// honored even under a hung grandchild, and the vendor tree-kills at its
|
|
1713
|
+
// own 60s expiry regardless (mmnto-ai/totem#2613 falsification rounds).
|
|
1714
|
+
expect(GEMINI_SESSION_START).toContain('timeout: 20000');
|
|
1715
|
+
expect(GEMINI_SESSION_START).not.toContain('timeout: 30000');
|
|
1716
|
+
});
|
|
1717
|
+
it('captures BOTH streams of the briefing legs and emits envelope + systemMessage', () => {
|
|
1718
|
+
// Interactive Gemini ingests SessionStart output ONLY from
|
|
1719
|
+
// hookSpecificOutput.additionalContext — an 'inherit' stdout wraps as
|
|
1720
|
+
// systemMessage, which the interactive startup consumer never reads
|
|
1721
|
+
// (mmnto-ai/totem#2613; the pre-fix pin here asserted exactly that
|
|
1722
|
+
// dropped channel). The Totem CLI writes its banner to STDERR, so capture
|
|
1723
|
+
// must take both streams — a stdout-only capture silently drops the
|
|
1724
|
+
// describe leg. systemMessage rides alongside for the /clear and -p
|
|
1725
|
+
// surfaces, which read only that key. The runtime contract is pinned
|
|
1726
|
+
// end-to-end by gemini-sessionstart-contract.test.ts; this guards
|
|
1727
|
+
// template drift.
|
|
1728
|
+
expect(GEMINI_SESSION_START).toContain("stdio: ['ignore', 'pipe', 'pipe']");
|
|
1729
|
+
expect(GEMINI_SESSION_START).not.toContain("stdio: ['ignore', 'inherit', 'inherit']");
|
|
1730
|
+
expect(GEMINI_SESSION_START).toContain("hookEventName: 'SessionStart'");
|
|
1731
|
+
expect(GEMINI_SESSION_START).toContain('additionalContext: briefing');
|
|
1732
|
+
expect(GEMINI_SESSION_START).toContain('systemMessage: briefing');
|
|
1715
1733
|
});
|
|
1716
1734
|
it('emits a generic fallback breadcrumb when describe fails', () => {
|
|
1717
1735
|
// No strategy-repo-specific pointers leak; matches the Claude-side
|