@memnexus-ai/mx-agent-cli 0.1.206 → 0.1.208

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.
@@ -0,0 +1,331 @@
1
+ /**
2
+ * startup-report.ts — durable capture of everything `mx-agent start` prints
3
+ * (platform v2.58 Phase 1, #4350).
4
+ *
5
+ * PO directive: capture EVERYTHING a start invocation prints — success, info,
6
+ * dim, warning, and error — into ONE structured StartupReport per invocation,
7
+ * and append it as a single JSON line to a durable local log before the process
8
+ * exits, on every exit path (clean success, warning-laden success, refusal
9
+ * exits, and the fail-closed hard-stop throw).
10
+ *
11
+ * Design:
12
+ * - `startupReport.record(level, message, code?)` buffers one entry in memory.
13
+ * - `startupReport.finalize(outcome)` assembles the report and appends one JSON
14
+ * line to `~/.mx-agent/logs/startup/<worktree>.jsonl`. It is idempotent (a
15
+ * second call is a no-op) and MUST NEVER THROW — all I/O is wrapped so a
16
+ * logging failure can never affect the session start.
17
+ * - Two collection surfaces feed `record`:
18
+ * 1. The typed helpers (reportSuccess/reportWarning/reportDim/reportInfo/
19
+ * reportError) record with an EXACT level and print via the ORIGINAL
20
+ * (un-teed) console, so they are never double-counted.
21
+ * 2. `installConsoleCapture()` tees console.log / console.error /
22
+ * process.stderr.write so that EVERY other direct print during a start
23
+ * (the ~70 direct console calls in start.ts, plus warnIfOutdated,
24
+ * checkConfigGeneration, and extractBehavioralContent) is captured with
25
+ * an inferred level. This guarantees no site is silently missed and that
26
+ * future new log lines are captured automatically.
27
+ *
28
+ * The module owns NO chalk styling and NEVER changes what the user sees — it
29
+ * only observes the byte stream and mirrors a plain-text copy into the report.
30
+ */
31
+ import { appendFileSync, mkdirSync, renameSync, statSync } from 'fs';
32
+ import { homedir, hostname } from 'os';
33
+ import { dirname, join } from 'path';
34
+ /** Rotate the JSONL file once it exceeds this size (simple two-generation rotation). */
35
+ const MAX_LOG_BYTES = 5 * 1024 * 1024;
36
+ const ANSI_RE = /\x1b\[[0-9;]*m/g;
37
+ /**
38
+ * Strip `userinfo` (user:password@) from any `scheme://` URL. Covers git fetch
39
+ * stderr that echoes a credentialed remote (e.g.
40
+ * `https://x-access-token:SECRET@github.com/...`) and any future capture site.
41
+ * SSH-style `git@github.com:` remotes have no `scheme://` and are left intact.
42
+ */
43
+ const REDACT_URL_CRED = /([a-z][a-z0-9+.-]*:\/\/)[^/@\s]*@/gi;
44
+ /** Redact credentials from any URL in a message before it is persisted. */
45
+ export function redactUrlCredentials(s) {
46
+ return s.replace(REDACT_URL_CRED, '$1***@');
47
+ }
48
+ /** Strip SGR (color/style) escape sequences so the stored message is plain text. */
49
+ export function stripAnsi(s) {
50
+ return s.replace(ANSI_RE, '');
51
+ }
52
+ /**
53
+ * Infer a log level from a printed line without any call-site cooperation.
54
+ * Glyph markers (✓ / ⚠ / ✗) are the codebase's consistent success/warning/error
55
+ * signal and survive with colors OFF, so they are checked first; ANSI color
56
+ * codes are a fallback that works when colors are ON. `stream` biases the
57
+ * default: stderr writes are informational diagnostics (warning) unless a glyph
58
+ * or red color says otherwise; console.error is error-level by convention.
59
+ */
60
+ export function inferLevel(raw, stream) {
61
+ const t = stripAnsi(raw).trimStart();
62
+ if (t.startsWith('✓'))
63
+ return 'success';
64
+ if (t.startsWith('⚠'))
65
+ return 'warning';
66
+ if (t.startsWith('✗'))
67
+ return 'error';
68
+ // ANSI color fallback (colors on). Match the SGR foreground codes chalk uses,
69
+ // optionally preceded by the bold attribute (e.g. "1;31").
70
+ if (/\[(?:1;)?(?:31|91)m/.test(raw))
71
+ return 'error'; // red / bright-red
72
+ if (/\[(?:1;)?(?:33|93)m/.test(raw))
73
+ return 'warning'; // yellow / bright-yellow
74
+ if (/\[(?:1;)?(?:32|92)m/.test(raw))
75
+ return 'success'; // green / bright-green
76
+ if (/\[(?:2|90)m/.test(raw))
77
+ return 'dim'; // dim / bright-black (gray)
78
+ if (stream === 'error-console')
79
+ return 'error';
80
+ if (stream === 'err')
81
+ return 'warning';
82
+ return 'info';
83
+ }
84
+ class StartupReport {
85
+ entries = [];
86
+ ctx = {};
87
+ startedAt = new Date().toISOString();
88
+ finalized = false;
89
+ // Original (un-teed) console handles, captured on installConsoleCapture().
90
+ // Stored as the RAW references (not bound) so removeConsoleCapture restores the
91
+ // exact same function identity; calls use .apply with the proper receiver.
92
+ origLog = console.log;
93
+ origError = console.error;
94
+ origStderrWrite = process.stderr.write;
95
+ capturing = false;
96
+ exitNetRegistered = false;
97
+ // Re-entrancy guard: Node's native console.error dispatches through the live
98
+ // (teed) process.stderr.write, so without this flag an error line would be
99
+ // recorded twice — once by the console.error tee (error) and again by the
100
+ // stderr tee (warning). We set it around every native origError call so the
101
+ // stderr tee skips the write that originates inside the console.error path.
102
+ inErrorTee = false;
103
+ /** Merge in context as it becomes known (project, worktree, etc.). */
104
+ setContext(partial) {
105
+ this.ctx = { ...this.ctx, ...partial };
106
+ }
107
+ /** Buffer one entry. Never throws. Scrubs URL credentials from every persisted
108
+ * message (blanket coverage for all capture sites, current and future). */
109
+ record(level, message, code) {
110
+ try {
111
+ const entry = { ts: new Date().toISOString(), level, message: redactUrlCredentials(message) };
112
+ if (code)
113
+ entry.code = code;
114
+ this.entries.push(entry);
115
+ }
116
+ catch {
117
+ /* recording must never affect the start */
118
+ }
119
+ }
120
+ /**
121
+ * Assemble the report and append one JSON line to the durable log. Idempotent
122
+ * and never throws. Also removes the console capture so later prints are
123
+ * untouched.
124
+ */
125
+ finalize(outcome) {
126
+ this.removeConsoleCapture();
127
+ if (this.finalized)
128
+ return;
129
+ this.finalized = true;
130
+ try {
131
+ let machine = this.ctx.machine;
132
+ if (!machine) {
133
+ try {
134
+ machine = hostname();
135
+ }
136
+ catch {
137
+ machine = null;
138
+ }
139
+ }
140
+ const report = {
141
+ schema_version: 1,
142
+ project: this.ctx.project ?? null,
143
+ team: this.ctx.team ?? null,
144
+ worktree: this.ctx.worktree ?? null,
145
+ cli_version: this.ctx.cliVersion ?? null,
146
+ machine: machine ?? null,
147
+ started_at: this.startedAt,
148
+ finished_at: new Date().toISOString(),
149
+ outcome,
150
+ entries: this.entries,
151
+ };
152
+ this.appendLine(JSON.stringify(report));
153
+ }
154
+ catch {
155
+ /* a logging failure must never affect the start */
156
+ }
157
+ }
158
+ /** Absolute path to this invocation's JSONL log. */
159
+ logFilePath() {
160
+ const name = this.ctx.worktree || this.ctx.team || 'unknown';
161
+ const safe = name.replace(/[^A-Za-z0-9._-]/g, '_') || 'unknown';
162
+ return join(homedir(), '.mx-agent', 'logs', 'startup', `${safe}.jsonl`);
163
+ }
164
+ /** Append a line, creating dirs and performing two-generation rotation. */
165
+ appendLine(line) {
166
+ const path = this.logFilePath();
167
+ mkdirSync(dirname(path), { recursive: true });
168
+ // Rotate BEFORE appending if the current file is over the size cap.
169
+ try {
170
+ const st = statSync(path);
171
+ if (st.size > MAX_LOG_BYTES)
172
+ renameSync(path, `${path}.1`);
173
+ }
174
+ catch {
175
+ /* file does not exist yet — nothing to rotate */
176
+ }
177
+ appendFileSync(path, line + '\n');
178
+ }
179
+ // ── Console capture (tee) ────────────────────────────────────────────
180
+ /** True while console/stderr are teed into the collector. */
181
+ isCapturing() {
182
+ return this.capturing;
183
+ }
184
+ /** Print via the ORIGINAL console.log — used by the typed helpers so their
185
+ * output is not re-captured by the tee (no double-counting). */
186
+ printOut(formatted) {
187
+ (this.capturing ? this.origLog : console.log).call(console, formatted);
188
+ }
189
+ /** Print via the ORIGINAL console.error — see printOut. The native console.error
190
+ * routes through the teed process.stderr.write, so guard it to avoid a
191
+ * duplicate stderr-tee record (the caller has already recorded exactly once). */
192
+ printErr(formatted) {
193
+ if (!this.capturing) {
194
+ console.error(formatted);
195
+ return;
196
+ }
197
+ this.inErrorTee = true;
198
+ try {
199
+ this.origError.call(console, formatted);
200
+ }
201
+ finally {
202
+ this.inErrorTee = false;
203
+ }
204
+ }
205
+ /**
206
+ * Tee console.log / console.error / process.stderr.write into the collector.
207
+ * Idempotent. Overrides never throw and always delegate to the original
208
+ * stream, so capture can never suppress or corrupt user-visible output.
209
+ */
210
+ installConsoleCapture() {
211
+ if (this.capturing)
212
+ return;
213
+ this.origLog = console.log;
214
+ this.origError = console.error;
215
+ this.origStderrWrite = process.stderr.write;
216
+ this.capturing = true;
217
+ const self = this;
218
+ console.log = ((...args) => {
219
+ try {
220
+ const text = args.map((a) => String(a)).join(' ');
221
+ if (stripAnsi(text).trim() !== '') {
222
+ self.record(inferLevel(text, 'out'), stripAnsi(text));
223
+ }
224
+ }
225
+ catch { /* never let capture break printing */ }
226
+ self.origLog.apply(console, args);
227
+ });
228
+ console.error = ((...args) => {
229
+ try {
230
+ const text = args.map((a) => String(a)).join(' ');
231
+ if (stripAnsi(text).trim() !== '') {
232
+ self.record(inferLevel(text, 'error-console'), stripAnsi(text));
233
+ }
234
+ }
235
+ catch { /* never let capture break printing */ }
236
+ // Native console.error writes via the teed process.stderr.write; guard it
237
+ // so the stderr tee does not record this line a second time.
238
+ self.inErrorTee = true;
239
+ try {
240
+ self.origError.apply(console, args);
241
+ }
242
+ finally {
243
+ self.inErrorTee = false;
244
+ }
245
+ });
246
+ process.stderr.write = ((chunk, ...rest) => {
247
+ try {
248
+ // Skip recording when this write originates inside the console.error tee
249
+ // (or reportError/printErr) — that line was already recorded once.
250
+ if (!self.inErrorTee) {
251
+ const text = typeof chunk === 'string' ? chunk : Buffer.isBuffer(chunk) ? chunk.toString('utf-8') : '';
252
+ if (stripAnsi(text).trim() !== '') {
253
+ self.record(inferLevel(text, 'err'), stripAnsi(text).replace(/\n+$/, ''));
254
+ }
255
+ }
256
+ }
257
+ catch { /* never let capture break printing */ }
258
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
259
+ return self.origStderrWrite.apply(process.stderr, [chunk, ...rest]);
260
+ });
261
+ }
262
+ /** Restore the original console/stderr handles. Idempotent. */
263
+ removeConsoleCapture() {
264
+ if (!this.capturing)
265
+ return;
266
+ console.log = this.origLog;
267
+ console.error = this.origError;
268
+ process.stderr.write = this.origStderrWrite;
269
+ this.capturing = false;
270
+ }
271
+ /**
272
+ * Register a process-exit safety net that finalizes with 'error' if start
273
+ * exits on a path that did not finalize explicitly. Uses synchronous I/O
274
+ * (appendFileSync), which is valid in an 'exit' handler. Idempotent.
275
+ */
276
+ registerExitSafetyNet() {
277
+ if (this.exitNetRegistered)
278
+ return;
279
+ // Under vitest the worker process exits long after any runStart call; letting
280
+ // the net fire then would write a stray report to the real home dir. Explicit
281
+ // finalize (refused/ok/hard_stop) covers every real exit path, so skipping
282
+ // only the belt-and-suspenders auto-write under test changes no prod behavior.
283
+ if (process.env.VITEST)
284
+ return;
285
+ this.exitNetRegistered = true;
286
+ process.on('exit', () => {
287
+ if (!this.finalized)
288
+ this.finalize('error');
289
+ });
290
+ }
291
+ // ── Test hooks ────────────────────────────────────────────────────────
292
+ /** @internal reset all state (tests only). */
293
+ _reset() {
294
+ this.removeConsoleCapture();
295
+ this.entries = [];
296
+ this.ctx = {};
297
+ this.startedAt = new Date().toISOString();
298
+ this.finalized = false;
299
+ }
300
+ /** @internal snapshot of buffered entries (tests only). */
301
+ _entries() {
302
+ return [...this.entries];
303
+ }
304
+ /** @internal whether finalize has run (tests only). */
305
+ _isFinalized() {
306
+ return this.finalized;
307
+ }
308
+ }
309
+ export const startupReport = new StartupReport();
310
+ // ── Typed print+record helpers (exact level, bypass the tee) ────────────
311
+ export function reportInfo(formatted, code) {
312
+ startupReport.printOut(formatted);
313
+ startupReport.record('info', stripAnsi(formatted), code);
314
+ }
315
+ export function reportSuccess(formatted, code) {
316
+ startupReport.printOut(formatted);
317
+ startupReport.record('success', stripAnsi(formatted), code);
318
+ }
319
+ export function reportDim(formatted, code) {
320
+ startupReport.printOut(formatted);
321
+ startupReport.record('dim', stripAnsi(formatted), code);
322
+ }
323
+ export function reportWarning(formatted, code) {
324
+ startupReport.printOut(formatted);
325
+ startupReport.record('warning', stripAnsi(formatted), code);
326
+ }
327
+ export function reportError(formatted, code) {
328
+ startupReport.printErr(formatted);
329
+ startupReport.record('error', stripAnsi(formatted), code);
330
+ }
331
+ //# sourceMappingURL=startup-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startup-report.js","sourceRoot":"","sources":["../../src/lib/startup-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAyBrC,wFAAwF;AACxF,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAElC;;;;;GAKG;AACH,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAE9D,2EAA2E;AAC3E,MAAM,UAAU,oBAAoB,CAAC,CAAS;IAC5C,OAAO,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,MAAuC;IAC7E,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;IACrC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACtC,8EAA8E;IAC9E,2DAA2D;IAC3D,IAAI,q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Aa,CAAC,SAAiB,EAAE,IAAa;IAC5D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,IAAa;IAC1D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,aAAa,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;AAC5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memnexus-ai/mx-agent-cli",
3
- "version": "0.1.206",
3
+ "version": "0.1.208",
4
4
  "description": "CLI for creating and managing AI agent teams",
5
5
  "type": "module",
6
6
  "bin": {