gsd-pi 2.47.0 → 2.48.0-dev.2e7390c

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.
Files changed (174) hide show
  1. package/dist/resources/extensions/gsd/auto-start.js +8 -1
  2. package/dist/resources/extensions/gsd/forensics.js +292 -1
  3. package/dist/resources/extensions/gsd/guided-flow.js +85 -3
  4. package/dist/resources/extensions/gsd/prompts/forensics.md +37 -5
  5. package/dist/resources/extensions/gsd/session-forensics.js +10 -1
  6. package/dist/web/standalone/.next/BUILD_ID +1 -1
  7. package/dist/web/standalone/.next/app-path-routes-manifest.json +12 -12
  8. package/dist/web/standalone/.next/build-manifest.json +3 -3
  9. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  10. package/dist/web/standalone/.next/required-server-files.json +3 -3
  11. package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
  12. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  13. package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
  14. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  15. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  16. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  17. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  18. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  19. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  20. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  21. package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
  22. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  24. package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
  25. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  26. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  27. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  28. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  29. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  30. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  31. package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
  32. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  33. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
  34. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  35. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
  36. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  37. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
  38. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  39. package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
  40. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  41. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  42. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  43. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  44. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  45. package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
  46. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  47. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  48. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  49. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  50. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  51. package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
  52. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  53. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  54. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  55. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  56. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  57. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  58. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  59. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  60. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  61. package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
  62. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  63. package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
  64. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  65. package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
  66. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  67. package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
  68. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  69. package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
  70. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  71. package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
  72. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  73. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  74. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  75. package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +5 -5
  76. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  77. package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
  78. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  79. package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
  80. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  81. package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
  82. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  83. package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
  84. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  85. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  86. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  87. package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
  88. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  89. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  90. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  91. package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
  92. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  93. package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
  94. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  95. package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
  96. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  97. package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
  98. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  99. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
  100. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  101. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
  102. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  103. package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
  104. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  105. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  106. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  107. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  108. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  109. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  110. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  111. package/dist/web/standalone/.next/server/app/index.html +1 -1
  112. package/dist/web/standalone/.next/server/app/index.rsc +4 -4
  113. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  114. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
  115. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  116. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  117. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  118. package/dist/web/standalone/.next/server/app/page.js +2 -2
  119. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  120. package/dist/web/standalone/.next/server/app-paths-manifest.json +12 -12
  121. package/dist/web/standalone/.next/server/chunks/229.js +1 -1
  122. package/dist/web/standalone/.next/server/chunks/471.js +3 -3
  123. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  124. package/dist/web/standalone/.next/server/middleware.js +2 -2
  125. package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
  126. package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
  127. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  128. package/dist/web/standalone/.next/server/pages/500.html +2 -2
  129. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  130. package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
  131. package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
  132. package/dist/web/standalone/.next/static/chunks/app/page-6654a8cca61a3d1c.js +1 -0
  133. package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
  134. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
  135. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  136. package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
  137. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  138. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
  139. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
  140. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
  141. package/dist/web/standalone/server.js +1 -1
  142. package/package.json +1 -1
  143. package/packages/pi-agent-core/dist/agent-loop.js +3 -2
  144. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  145. package/packages/pi-agent-core/src/agent-loop.ts +3 -2
  146. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +43 -0
  147. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
  148. package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  149. package/packages/pi-coding-agent/dist/core/model-registry.js +26 -3
  150. package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  151. package/packages/pi-coding-agent/package.json +1 -1
  152. package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +70 -0
  153. package/packages/pi-coding-agent/src/core/model-registry.ts +29 -2
  154. package/packages/pi-tui/dist/components/box.d.ts +1 -0
  155. package/packages/pi-tui/dist/components/box.d.ts.map +1 -1
  156. package/packages/pi-tui/dist/components/box.js +10 -0
  157. package/packages/pi-tui/dist/components/box.js.map +1 -1
  158. package/packages/pi-tui/src/components/box.ts +10 -0
  159. package/pkg/package.json +1 -1
  160. package/src/resources/extensions/gsd/auto-start.ts +7 -1
  161. package/src/resources/extensions/gsd/forensics.ts +329 -2
  162. package/src/resources/extensions/gsd/guided-flow.ts +105 -3
  163. package/src/resources/extensions/gsd/prompts/forensics.md +37 -5
  164. package/src/resources/extensions/gsd/session-forensics.ts +11 -1
  165. package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +241 -0
  166. package/src/resources/extensions/gsd/tests/forensics-error-filter.test.ts +121 -0
  167. package/src/resources/extensions/gsd/tests/forensics-journal.test.ts +162 -0
  168. package/src/resources/extensions/gsd/tests/preflight-context-draft-filter.test.ts +115 -0
  169. package/src/resources/extensions/gsd/tests/stale-milestone-id-reservation.test.ts +79 -0
  170. package/dist/web/standalone/.next/static/chunks/app/page-12dd5ece0df4badc.js +0 -1
  171. package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
  172. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
  173. /package/dist/web/standalone/.next/static/{VPcLnRF4BL8VoJEilBwlB → uTZ196cPUij3KcIDCweR6}/_buildManifest.js +0 -0
  174. /package/dist/web/standalone/.next/static/{VPcLnRF4BL8VoJEilBwlB → uTZ196cPUij3KcIDCweR6}/_ssgManifest.js +0 -0
@@ -30,7 +30,7 @@ import { initRoutingHistory } from "./routing-history.js";
30
30
  import { restoreHookState, resetHookState } from "./post-unit-hooks.js";
31
31
  import { resetProactiveHealing, setLevelChangeCallback } from "./doctor-proactive.js";
32
32
  import { snapshotSkills } from "./skill-discovery.js";
33
- import { isDbAvailable } from "./gsd-db.js";
33
+ import { isDbAvailable, getMilestone } from "./gsd-db.js";
34
34
  import { hideFooter } from "./auto-dashboard.js";
35
35
  import { debugLog, enableDebug, isDebugEnabled, getDebugLogPath, } from "./debug-logger.js";
36
36
  import { existsSync, mkdirSync, readdirSync, statSync, unlinkSync, } from "node:fs";
@@ -503,6 +503,13 @@ export async function bootstrapAutoSession(s, ctx, pi, base, verboseMode, reques
503
503
  if (milestoneIds.length > 1) {
504
504
  const issues = [];
505
505
  for (const id of milestoneIds) {
506
+ // Skip completed/parked milestones — a leftover CONTEXT-DRAFT.md
507
+ // on a finished milestone is harmless residue, not an actionable warning.
508
+ if (isDbAvailable()) {
509
+ const ms = getMilestone(id);
510
+ if (ms?.status === "complete" || ms?.status === "parked")
511
+ continue;
512
+ }
506
513
  const draft = resolveMilestoneFile(base, id, "CONTEXT-DRAFT");
507
514
  if (draft)
508
515
  issues.push(`${id}: has CONTEXT-DRAFT.md (will pause for discussion)`);
@@ -197,7 +197,11 @@ export async function buildForensicReport(basePath) {
197
197
  // Extensions run from ~/.gsd/agent/extensions/gsd/ at runtime, so path-traversal
198
198
  // from import.meta.url would resolve to ~/package.json (wrong on every system).
199
199
  const gsdVersion = process.env.GSD_VERSION || "unknown";
200
- // 9. Run anomaly detectors
200
+ // 9. Scan journal for flow timeline and structured events
201
+ const journalSummary = scanJournalForForensics(basePath);
202
+ // 10. Gather activity log directory metadata
203
+ const activityLogMeta = gatherActivityLogMeta(basePath, activeMilestone);
204
+ // 11. Run anomaly detectors
201
205
  if (metrics?.units)
202
206
  detectStuckLoops(metrics.units, anomalies);
203
207
  if (metrics?.units)
@@ -207,6 +211,7 @@ export async function buildForensicReport(basePath) {
207
211
  detectCrash(crashLock, anomalies);
208
212
  detectDoctorIssues(doctorIssues, anomalies);
209
213
  detectErrorTraces(unitTraces, anomalies);
214
+ detectJournalAnomalies(journalSummary, anomalies);
210
215
  return {
211
216
  gsdVersion,
212
217
  timestamp: new Date().toISOString(),
@@ -221,10 +226,14 @@ export async function buildForensicReport(basePath) {
221
226
  doctorIssues,
222
227
  anomalies,
223
228
  recentUnits,
229
+ journalSummary,
230
+ activityLogMeta,
224
231
  };
225
232
  }
226
233
  // ─── Activity Log Scanner ─────────────────────────────────────────────────────
227
234
  const ACTIVITY_FILENAME_RE = /^(\d+)-(.+?)-(.+)\.jsonl$/;
235
+ /** Threshold below which iteration cadence is considered rapid (thrashing). */
236
+ const RAPID_ITERATION_THRESHOLD_MS = 5000;
228
237
  function scanActivityLogs(basePath, activeMilestone) {
229
238
  const activityDirs = resolveActivityDirs(basePath, activeMilestone);
230
239
  const allTraces = [];
@@ -292,6 +301,152 @@ function resolveActivityDirs(basePath, activeMilestone) {
292
301
  dirs.push(rootActivityDir);
293
302
  return dirs;
294
303
  }
304
+ // ─── Journal Scanner ──────────────────────────────────────────────────────────
305
+ /**
306
+ * Max recent journal files to fully parse for event counts and recent events.
307
+ * Older files are line-counted only to avoid loading huge amounts of data.
308
+ */
309
+ const MAX_JOURNAL_RECENT_FILES = 3;
310
+ /** Max recent events to extract for the forensic report timeline. */
311
+ const MAX_JOURNAL_RECENT_EVENTS = 20;
312
+ /**
313
+ * Intelligently scan journal files for forensic summary.
314
+ *
315
+ * Journal files can be huge (thousands of JSONL entries over weeks of auto-mode).
316
+ * Instead of loading all entries into memory:
317
+ * - Only fully parse the most recent N daily files (event counts, flow tracking)
318
+ * - Line-count older files for approximate totals (no JSON parsing)
319
+ * - Extract only the last 20 events for the timeline
320
+ */
321
+ function scanJournalForForensics(basePath) {
322
+ try {
323
+ const journalDir = join(gsdRoot(basePath), "journal");
324
+ if (!existsSync(journalDir))
325
+ return null;
326
+ const files = readdirSync(journalDir).filter(f => f.endsWith(".jsonl")).sort();
327
+ if (files.length === 0)
328
+ return null;
329
+ // Split into recent (fully parsed) and older (line-counted only)
330
+ const recentFiles = files.slice(-MAX_JOURNAL_RECENT_FILES);
331
+ const olderFiles = files.slice(0, -MAX_JOURNAL_RECENT_FILES);
332
+ // Line-count older files without parsing — avoids loading megabytes of JSON
333
+ let olderEntryCount = 0;
334
+ let oldestEntry = null;
335
+ for (const file of olderFiles) {
336
+ try {
337
+ const raw = readFileSync(join(journalDir, file), "utf-8");
338
+ const lines = raw.split("\n");
339
+ for (const line of lines) {
340
+ if (!line.trim())
341
+ continue;
342
+ olderEntryCount++;
343
+ // Extract only the timestamp from the first non-empty line of the oldest file
344
+ if (!oldestEntry) {
345
+ try {
346
+ const parsed = JSON.parse(line);
347
+ if (parsed.ts)
348
+ oldestEntry = parsed.ts;
349
+ }
350
+ catch { /* skip malformed */ }
351
+ }
352
+ }
353
+ }
354
+ catch { /* skip unreadable files */ }
355
+ }
356
+ // Fully parse recent files for event counts and timeline
357
+ const eventCounts = {};
358
+ const flowIds = new Set();
359
+ const recentParsedEntries = [];
360
+ let recentEntryCount = 0;
361
+ for (const file of recentFiles) {
362
+ try {
363
+ const raw = readFileSync(join(journalDir, file), "utf-8");
364
+ for (const line of raw.split("\n")) {
365
+ if (!line.trim())
366
+ continue;
367
+ try {
368
+ const entry = JSON.parse(line);
369
+ recentEntryCount++;
370
+ eventCounts[entry.eventType] = (eventCounts[entry.eventType] ?? 0) + 1;
371
+ flowIds.add(entry.flowId);
372
+ if (!oldestEntry)
373
+ oldestEntry = entry.ts;
374
+ // Keep a rolling window of last N events — avoids accumulating unbounded arrays
375
+ recentParsedEntries.push({
376
+ ts: entry.ts,
377
+ flowId: entry.flowId,
378
+ eventType: entry.eventType,
379
+ rule: entry.rule,
380
+ unitId: entry.data?.unitId,
381
+ });
382
+ if (recentParsedEntries.length > MAX_JOURNAL_RECENT_EVENTS) {
383
+ recentParsedEntries.shift();
384
+ }
385
+ }
386
+ catch { /* skip malformed lines */ }
387
+ }
388
+ }
389
+ catch { /* skip unreadable files */ }
390
+ }
391
+ const totalEntries = olderEntryCount + recentEntryCount;
392
+ if (totalEntries === 0)
393
+ return null;
394
+ const newestEntry = recentParsedEntries.length > 0
395
+ ? recentParsedEntries[recentParsedEntries.length - 1].ts
396
+ : null;
397
+ return {
398
+ totalEntries,
399
+ flowCount: flowIds.size,
400
+ eventCounts,
401
+ recentEvents: recentParsedEntries,
402
+ oldestEntry,
403
+ newestEntry,
404
+ fileCount: files.length,
405
+ };
406
+ }
407
+ catch {
408
+ return null;
409
+ }
410
+ }
411
+ // ─── Activity Log Metadata ────────────────────────────────────────────────────
412
+ function gatherActivityLogMeta(basePath, activeMilestone) {
413
+ try {
414
+ const activityDirs = resolveActivityDirs(basePath, activeMilestone);
415
+ let fileCount = 0;
416
+ let totalSizeBytes = 0;
417
+ let oldestFile = null;
418
+ let newestFile = null;
419
+ let oldestMtime = Infinity;
420
+ let newestMtime = 0;
421
+ for (const activityDir of activityDirs) {
422
+ if (!existsSync(activityDir))
423
+ continue;
424
+ const files = readdirSync(activityDir).filter(f => f.endsWith(".jsonl"));
425
+ for (const file of files) {
426
+ const filePath = join(activityDir, file);
427
+ const stat = statSync(filePath, { throwIfNoEntry: false });
428
+ if (!stat)
429
+ continue;
430
+ fileCount++;
431
+ totalSizeBytes += stat.size;
432
+ if (stat.mtimeMs < oldestMtime) {
433
+ oldestMtime = stat.mtimeMs;
434
+ oldestFile = file;
435
+ }
436
+ if (stat.mtimeMs > newestMtime) {
437
+ newestMtime = stat.mtimeMs;
438
+ newestFile = file;
439
+ }
440
+ }
441
+ }
442
+ if (fileCount === 0)
443
+ return null;
444
+ return { fileCount, totalSizeBytes, oldestFile, newestFile };
445
+ }
446
+ catch {
447
+ return null;
448
+ }
449
+ }
295
450
  // ─── Completed Keys Loader ────────────────────────────────────────────────────
296
451
  function loadCompletedKeys(basePath) {
297
452
  const file = join(gsdRoot(basePath), "completed-units.json");
@@ -423,6 +578,64 @@ function detectErrorTraces(traces, anomalies) {
423
578
  }
424
579
  }
425
580
  }
581
+ function detectJournalAnomalies(journal, anomalies) {
582
+ if (!journal)
583
+ return;
584
+ // Detect stuck-detected events from the journal
585
+ const stuckCount = journal.eventCounts["stuck-detected"] ?? 0;
586
+ if (stuckCount > 0) {
587
+ anomalies.push({
588
+ type: "journal-stuck",
589
+ severity: stuckCount >= 3 ? "error" : "warning",
590
+ summary: `Journal recorded ${stuckCount} stuck-detected event(s)`,
591
+ details: `The auto-mode loop detected it was stuck ${stuckCount} time(s). Check journal events for flow IDs and causal chains to trace the root cause.`,
592
+ });
593
+ }
594
+ // Detect guard-block events (dispatch was blocked by a guard)
595
+ const guardCount = journal.eventCounts["guard-block"] ?? 0;
596
+ if (guardCount > 0) {
597
+ anomalies.push({
598
+ type: "journal-guard-block",
599
+ severity: guardCount >= 5 ? "warning" : "info",
600
+ summary: `Journal recorded ${guardCount} guard-block event(s)`,
601
+ details: `Dispatch was blocked by a guard condition ${guardCount} time(s). This may indicate a persistent blocking condition preventing progress.`,
602
+ });
603
+ }
604
+ // Detect rapid iterations (many flows in short time = likely thrashing)
605
+ if (journal.flowCount > 0 && journal.oldestEntry && journal.newestEntry) {
606
+ const oldest = new Date(journal.oldestEntry).getTime();
607
+ const newest = new Date(journal.newestEntry).getTime();
608
+ const spanMs = newest - oldest;
609
+ if (spanMs > 0 && journal.flowCount > 10) {
610
+ const avgMs = spanMs / journal.flowCount;
611
+ if (avgMs < RAPID_ITERATION_THRESHOLD_MS) {
612
+ anomalies.push({
613
+ type: "journal-rapid-iterations",
614
+ severity: "warning",
615
+ summary: `${journal.flowCount} iterations in ${formatDuration(spanMs)} (avg ${formatDuration(avgMs)}/iteration)`,
616
+ details: `Unusually rapid iteration cadence suggests the loop may be thrashing without making progress. Review recent journal events for dispatch-stop or terminal events.`,
617
+ });
618
+ }
619
+ }
620
+ }
621
+ // Detect worktree failures from journal events
622
+ const wtCreateFailed = journal.eventCounts["worktree-create-failed"] ?? 0;
623
+ const wtMergeFailed = journal.eventCounts["worktree-merge-failed"] ?? 0;
624
+ const wtFailures = wtCreateFailed + wtMergeFailed;
625
+ if (wtFailures > 0) {
626
+ const parts = [];
627
+ if (wtCreateFailed > 0)
628
+ parts.push(`${wtCreateFailed} create failure(s)`);
629
+ if (wtMergeFailed > 0)
630
+ parts.push(`${wtMergeFailed} merge failure(s)`);
631
+ anomalies.push({
632
+ type: "journal-worktree-failure",
633
+ severity: "warning",
634
+ summary: `Worktree failures: ${parts.join(", ")}`,
635
+ details: `Journal recorded worktree operation failures. These may indicate git state corruption or conflicting branches.`,
636
+ });
637
+ }
638
+ }
426
639
  // ─── Report Persistence ───────────────────────────────────────────────────────
427
640
  function saveForensicReport(basePath, report, problemDescription) {
428
641
  const dir = join(gsdRoot(basePath), "forensics");
@@ -491,6 +704,48 @@ function saveForensicReport(basePath, report, problemDescription) {
491
704
  sections.push(`## Crash Lock`, ``);
492
705
  sections.push(redact(formatCrashInfo(report.crashLock)), ``);
493
706
  }
707
+ // Activity log metadata
708
+ if (report.activityLogMeta) {
709
+ const meta = report.activityLogMeta;
710
+ sections.push(`## Activity Log Metadata`, ``);
711
+ sections.push(`- Files: ${meta.fileCount}`);
712
+ sections.push(`- Total size: ${(meta.totalSizeBytes / 1024).toFixed(1)} KB`);
713
+ if (meta.oldestFile)
714
+ sections.push(`- Oldest: ${meta.oldestFile}`);
715
+ if (meta.newestFile)
716
+ sections.push(`- Newest: ${meta.newestFile}`);
717
+ sections.push(``);
718
+ }
719
+ // Journal summary
720
+ if (report.journalSummary) {
721
+ const js = report.journalSummary;
722
+ sections.push(`## Journal Summary`, ``);
723
+ sections.push(`- Total entries: ${js.totalEntries}`);
724
+ sections.push(`- Distinct flows (iterations): ${js.flowCount}`);
725
+ sections.push(`- Daily files: ${js.fileCount}`);
726
+ if (js.oldestEntry)
727
+ sections.push(`- Date range: ${js.oldestEntry} — ${js.newestEntry}`);
728
+ sections.push(``);
729
+ sections.push(`### Event Type Distribution`, ``);
730
+ sections.push(`| Event Type | Count |`);
731
+ sections.push(`|------------|-------|`);
732
+ for (const [evType, count] of Object.entries(js.eventCounts).sort((a, b) => b[1] - a[1])) {
733
+ sections.push(`| ${evType} | ${count} |`);
734
+ }
735
+ sections.push(``);
736
+ if (js.recentEvents.length > 0) {
737
+ sections.push(`### Recent Journal Events (last ${js.recentEvents.length})`, ``);
738
+ for (const ev of js.recentEvents) {
739
+ const parts = [`${ev.ts} [${ev.eventType}] flow=${ev.flowId.slice(0, 8)}`];
740
+ if (ev.rule)
741
+ parts.push(`rule=${ev.rule}`);
742
+ if (ev.unitId)
743
+ parts.push(`unit=${ev.unitId}`);
744
+ sections.push(`- ${parts.join(" ")}`);
745
+ }
746
+ sections.push(``);
747
+ }
748
+ }
494
749
  writeFileSync(filePath, sections.join("\n"), "utf-8");
495
750
  return filePath;
496
751
  }
@@ -565,6 +820,42 @@ function formatReportForPrompt(report) {
565
820
  sections.push(`- Total duration: ${formatDuration(totals.duration)}`);
566
821
  sections.push("");
567
822
  }
823
+ // Activity log metadata
824
+ if (report.activityLogMeta) {
825
+ const meta = report.activityLogMeta;
826
+ sections.push("### Activity Log Overview");
827
+ sections.push(`- Files: ${meta.fileCount}, Total size: ${(meta.totalSizeBytes / 1024).toFixed(1)} KB`);
828
+ if (meta.oldestFile)
829
+ sections.push(`- Oldest: ${meta.oldestFile}`);
830
+ if (meta.newestFile)
831
+ sections.push(`- Newest: ${meta.newestFile}`);
832
+ sections.push("");
833
+ }
834
+ // Journal summary — structured event timeline
835
+ if (report.journalSummary) {
836
+ const js = report.journalSummary;
837
+ sections.push("### Journal Summary (Iteration Event Log)");
838
+ sections.push(`- Total entries: ${js.totalEntries}, Distinct flows: ${js.flowCount}, Daily files: ${js.fileCount}`);
839
+ if (js.oldestEntry)
840
+ sections.push(`- Date range: ${js.oldestEntry} — ${js.newestEntry}`);
841
+ // Event type distribution (compact)
842
+ const eventPairs = Object.entries(js.eventCounts).sort((a, b) => b[1] - a[1]);
843
+ sections.push(`- Events: ${eventPairs.map(([t, c]) => `${t}(${c})`).join(", ")}`);
844
+ // Recent events timeline (for tracing what just happened)
845
+ if (js.recentEvents.length > 0) {
846
+ sections.push("");
847
+ sections.push(`**Recent Journal Events (last ${js.recentEvents.length}):**`);
848
+ for (const ev of js.recentEvents) {
849
+ const parts = [`${ev.ts} [${ev.eventType}] flow=${ev.flowId.slice(0, 8)}`];
850
+ if (ev.rule)
851
+ parts.push(`rule=${ev.rule}`);
852
+ if (ev.unitId)
853
+ parts.push(`unit=${ev.unitId}`);
854
+ sections.push(`- ${parts.join(" ")}`);
855
+ }
856
+ }
857
+ sections.push("");
858
+ }
568
859
  // Completed keys count
569
860
  sections.push(`### Completed Keys: ${report.completedKeys.length}`);
570
861
  sections.push(`### GSD Version: ${report.gsdVersion}`);
@@ -29,7 +29,7 @@ import { showProjectInit, offerMigration } from "./init-wizard.js";
29
29
  import { validateDirectory } from "./validate-directory.js";
30
30
  import { showConfirm } from "../shared/tui.js";
31
31
  import { debugLog } from "./debug-logger.js";
32
- import { findMilestoneIds, nextMilestoneId, reserveMilestoneId, getReservedMilestoneIds } from "./milestone-ids.js";
32
+ import { findMilestoneIds, nextMilestoneId, reserveMilestoneId, getReservedMilestoneIds, clearReservedMilestoneIds } from "./milestone-ids.js";
33
33
  import { parkMilestone, discardMilestone } from "./milestone-actions.js";
34
34
  import { resolveModelWithFallbacksForUnit } from "./preferences-models.js";
35
35
  // ─── Re-exports (preserve public API for existing importers) ────────────────
@@ -296,6 +296,8 @@ function bootstrapGsdProject(basePath) {
296
296
  * and dispatches the headless discuss prompt (no Q&A rounds).
297
297
  */
298
298
  export async function showHeadlessMilestoneCreation(ctx, pi, basePath, seedContext) {
299
+ // Clear stale reservations from previous cancelled sessions (#2488)
300
+ clearReservedMilestoneIds();
299
301
  // Ensure .gsd/ is bootstrapped
300
302
  bootstrapGsdProject(basePath);
301
303
  // Generate next milestone ID
@@ -403,9 +405,14 @@ export async function showDiscuss(ctx, pi, basePath) {
403
405
  // Invalidate caches to pick up artifacts written by a just-completed discuss/plan
404
406
  invalidateAllCaches();
405
407
  const state = await deriveState(basePath);
406
- // Guard: no active milestone
408
+ // No active milestone — check for pending milestones to discuss instead
407
409
  if (!state.activeMilestone) {
408
- ctx.ui.notify("No active milestone. Run /gsd to create one first.", "warning");
410
+ const pendingMilestones = state.registry.filter(m => m.status === "pending");
411
+ if (pendingMilestones.length === 0) {
412
+ ctx.ui.notify("No active milestone. Run /gsd to create one first.", "warning");
413
+ return;
414
+ }
415
+ await showDiscussQueuedMilestone(ctx, pi, basePath, pendingMilestones);
409
416
  return;
410
417
  }
411
418
  const mid = state.activeMilestone.id;
@@ -526,6 +533,16 @@ export async function showDiscuss(ctx, pi, basePath) {
526
533
  recommended: s.id === firstUndiscussedId,
527
534
  };
528
535
  });
536
+ // Offer access to queued milestones when any exist
537
+ const pendingMilestones = state.registry.filter(m => m.status === "pending");
538
+ if (pendingMilestones.length > 0) {
539
+ actions.push({
540
+ id: "discuss_queued_milestone",
541
+ label: "Discuss a queued milestone",
542
+ description: `Refine context for ${pendingMilestones.length} queued milestone(s). Does not affect current execution.`,
543
+ recommended: false,
544
+ });
545
+ }
529
546
  const choice = await showNextAction(ctx, {
530
547
  title: "GSD — Discuss a slice",
531
548
  summary: [
@@ -537,6 +554,10 @@ export async function showDiscuss(ctx, pi, basePath) {
537
554
  });
538
555
  if (choice === "not_yet")
539
556
  return;
557
+ if (choice === "discuss_queued_milestone") {
558
+ await showDiscussQueuedMilestone(ctx, pi, basePath, pendingMilestones);
559
+ return;
560
+ }
540
561
  const chosen = pendingSlices.find(s => s.id === choice);
541
562
  if (!chosen)
542
563
  return;
@@ -564,6 +585,63 @@ export async function showDiscuss(ctx, pi, basePath) {
564
585
  invalidateAllCaches();
565
586
  }
566
587
  }
588
+ // ─── Queued Milestone Discussion ─────────────────────────────────────────────
589
+ /**
590
+ * Show a picker of queued (pending) milestones and dispatch a discuss flow for
591
+ * the chosen one. Discussing a queued milestone does NOT activate it — it only
592
+ * refines the CONTEXT.md artifact so it is better prepared when auto-mode
593
+ * eventually reaches it.
594
+ */
595
+ async function showDiscussQueuedMilestone(ctx, pi, basePath, pendingMilestones) {
596
+ const actions = pendingMilestones.map((m, i) => {
597
+ const hasContext = !!resolveMilestoneFile(basePath, m.id, "CONTEXT");
598
+ const hasDraft = !hasContext && !!resolveMilestoneFile(basePath, m.id, "CONTEXT-DRAFT");
599
+ const contextStatus = hasContext ? "context ✓" : hasDraft ? "draft context" : "no context yet";
600
+ return {
601
+ id: m.id,
602
+ label: `${m.id}: ${m.title}`,
603
+ description: `[queued] · ${contextStatus}`,
604
+ recommended: i === 0,
605
+ };
606
+ });
607
+ const choice = await showNextAction(ctx, {
608
+ title: "GSD — Discuss a queued milestone",
609
+ summary: [
610
+ "Select a queued milestone to discuss.",
611
+ "Discussing will update its context file. It will not be activated.",
612
+ ],
613
+ actions,
614
+ notYetMessage: "Run /gsd discuss when ready.",
615
+ });
616
+ if (choice === "not_yet")
617
+ return;
618
+ const chosen = pendingMilestones.find(m => m.id === choice);
619
+ if (!chosen)
620
+ return;
621
+ await dispatchDiscussForMilestone(ctx, pi, basePath, chosen.id, chosen.title);
622
+ }
623
+ /**
624
+ * Dispatch the guided-discuss-milestone prompt for a milestone without
625
+ * setting pendingAutoStart — so discussing a queued milestone does not
626
+ * implicitly activate it when the session ends.
627
+ */
628
+ async function dispatchDiscussForMilestone(ctx, pi, basePath, mid, milestoneTitle) {
629
+ const draftFile = resolveMilestoneFile(basePath, mid, "CONTEXT-DRAFT");
630
+ const draftContent = draftFile ? await loadFile(draftFile) : null;
631
+ const discussMilestoneTemplates = inlineTemplate("context", "Context");
632
+ const structuredQuestionsAvailable = pi.getActiveTools().includes("ask_user_questions") ? "true" : "false";
633
+ const basePrompt = loadPrompt("guided-discuss-milestone", {
634
+ milestoneId: mid,
635
+ milestoneTitle,
636
+ inlinedTemplates: discussMilestoneTemplates,
637
+ structuredQuestionsAvailable,
638
+ commitInstruction: buildDocsCommitInstruction(`docs(${mid}): milestone context from discuss`),
639
+ });
640
+ const prompt = draftContent
641
+ ? `${basePrompt}\n\n## Prior Discussion (Draft Seed)\n\n${draftContent}`
642
+ : basePrompt;
643
+ await dispatchWorkflow(pi, prompt, "gsd-discuss", ctx, "plan-milestone");
644
+ }
567
645
  // ─── Smart Entry Point ────────────────────────────────────────────────────────
568
646
  /**
569
647
  * The one wizard. Reads state, shows contextual options, dispatches into the workflow doc.
@@ -693,6 +771,10 @@ async function handleMilestoneActions(ctx, pi, basePath, milestoneId, milestoneT
693
771
  }
694
772
  export async function showSmartEntry(ctx, pi, basePath, options) {
695
773
  const stepMode = options?.step;
774
+ // ── Clear stale milestone ID reservations from previous cancelled sessions ──
775
+ // Reservations only need to survive within a single /gsd interaction.
776
+ // Without this, each cancelled session permanently bumps the next ID. (#2488)
777
+ clearReservedMilestoneIds();
696
778
  // ── Directory safety check — refuse to operate in system/home dirs ───
697
779
  const dirCheck = validateDirectory(basePath);
698
780
  if (dirCheck.severity === "blocked") {
@@ -36,6 +36,8 @@ GSD extension source code is at: `{{gsdSourceDir}}`
36
36
  ├── doctor-history.jsonl — doctor check history
37
37
  ├── activity/ — session activity logs (JSONL per unit)
38
38
  │ └── {seq}-{unitType}-{unitId}.jsonl
39
+ ├── journal/ — structured event journal (JSONL per day)
40
+ │ └── YYYY-MM-DD.jsonl
39
41
  ├── runtime/
40
42
  │ ├── paused-session.json — serialized session when auto pauses
41
43
  │ └── headless-context.md — headless resume context
@@ -60,6 +62,32 @@ GSD extension source code is at: `{{gsdSourceDir}}`
60
62
  - `usage` field on assistant messages: `input`, `output`, `cacheRead`, `cacheWrite`, `totalTokens`, `cost`
61
63
  - **To trace a failure**: find the last activity log, search for `isError: true` tool results, then read the agent's reasoning text preceding that error
62
64
 
65
+ ### Journal Format (`.gsd/journal/`)
66
+
67
+ The journal is a structured event log for auto-mode iterations. Each daily file contains JSONL entries:
68
+
69
+ ```
70
+ { ts: "ISO-8601", flowId: "UUID", seq: 0, eventType: "iteration-start", rule?: "rule-name", causedBy?: { flowId, seq }, data?: { unitId, status, ... } }
71
+ ```
72
+
73
+ **Key event types:**
74
+ - `iteration-start` / `iteration-end` — marks loop iteration boundaries
75
+ - `dispatch-match` / `dispatch-stop` — what the auto-mode decided to do (or not do)
76
+ - `unit-start` / `unit-end` — lifecycle of individual work units
77
+ - `terminal` — auto-mode reached a terminal state (all done, budget exceeded, etc.)
78
+ - `guard-block` — dispatch was blocked by a guard condition (e.g. needs user input)
79
+ - `stuck-detected` — the loop detected it was stuck (same unit repeatedly dispatched)
80
+ - `milestone-transition` — a milestone was promoted or completed
81
+ - `worktree-enter` / `worktree-create-failed` / `worktree-merge-start` / `worktree-merge-failed` — worktree operations
82
+
83
+ **Key concepts:**
84
+ - **flowId**: UUID grouping all events in one iteration. Use to reconstruct what happened in a single loop pass.
85
+ - **causedBy**: Cross-reference to a prior event (same or different flow). Enables causal chain tracing.
86
+ - **seq**: Monotonically increasing within a flow. Reconstruct event order within an iteration.
87
+
88
+ **To trace a stuck loop**: filter for `stuck-detected` events, then follow `flowId` to see the surrounding dispatch and unit events.
89
+ **To trace a guard block**: filter for `guard-block` events, check `data.reason` for why dispatch was blocked.
90
+
63
91
  ### Crash Lock Format (`auto.lock`)
64
92
 
65
93
  JSON with fields: `pid`, `startedAt`, `unitType`, `unitId`, `unitStartedAt`, `completedUnits`, `sessionFile`
@@ -78,20 +106,24 @@ A unit dispatched more than once (`type/id` appears multiple times) indicates a
78
106
 
79
107
  1. **Start with the pre-parsed forensic report** above. The anomaly section contains automated findings — treat these as leads, not conclusions.
80
108
 
81
- 2. **Form hypotheses** about which module and code path is responsible. Use the source map to identify candidate files.
109
+ 2. **Check the journal timeline** if present. The journal events show the auto-mode's decision sequence (dispatches, guards, stuck detection, worktree operations). Use flow IDs to group related events and trace causal chains.
110
+
111
+ 3. **Cross-reference activity logs and journal**. Activity logs show *what the LLM did* (tool calls, reasoning, errors). Journal events show *what auto-mode decided* (dispatch rules, iteration boundaries, state transitions). Together they reveal the full picture.
112
+
113
+ 4. **Form hypotheses** about which module and code path is responsible. Use the source map to identify candidate files.
82
114
 
83
- 3. **Read the actual GSD source code** at `{{gsdSourceDir}}` to confirm or deny each hypothesis. Do not guess what code does — read it.
115
+ 5. **Read the actual GSD source code** at `{{gsdSourceDir}}` to confirm or deny each hypothesis. Do not guess what code does — read it.
84
116
 
85
- 4. **Trace the code path** from the entry point (usually `auto-loop.ts` dispatch or `auto-dispatch.ts`) through to the failure point. Follow function calls across files.
117
+ 6. **Trace the code path** from the entry point (usually `auto-loop.ts` dispatch or `auto-dispatch.ts`) through to the failure point. Follow function calls across files.
86
118
 
87
- 5. **Identify the specific file and line** where the bug lives. Determine what kind of defect it is:
119
+ 7. **Identify the specific file and line** where the bug lives. Determine what kind of defect it is:
88
120
  - Missing edge case / unhandled condition
89
121
  - Wrong boolean logic or comparison
90
122
  - Race condition or ordering issue
91
123
  - State corruption (e.g. completed-units.json out of sync with artifacts)
92
124
  - Timeout / recovery logic not triggering correctly
93
125
 
94
- 6. **Clarify if needed.** Use ask_user_questions (max 2 questions) only if the report is genuinely insufficient. Do not ask questions you can answer from the data or source code.
126
+ 8. **Clarify if needed.** Use ask_user_questions (max 2 questions) only if the report is genuinely insufficient. Do not ask questions you can answer from the data or source code.
95
127
 
96
128
  ## Output
97
129
 
@@ -126,7 +126,16 @@ export function extractTrace(entries) {
126
126
  }
127
127
  }
128
128
  if (isError && resultText) {
129
- errors.push(resultText.slice(0, 300));
129
+ // Filter out benign "errors" that are normal during code exploration:
130
+ // - grep/rg/find returning exit code 1 (no matches) is expected POSIX behavior
131
+ // - User interrupts (Escape/skip) are intentional, not failures
132
+ const trimmed = resultText.trim();
133
+ const isBenignNoMatch = pending?.name === "bash" &&
134
+ /^\(no output\)\s*\n\s*Command exited with code 1$/m.test(trimmed);
135
+ const isUserSkip = /^Skipped due to queued user message/i.test(trimmed);
136
+ if (!isBenignNoMatch && !isUserSkip) {
137
+ errors.push(resultText.slice(0, 300));
138
+ }
130
139
  }
131
140
  }
132
141
  }
@@ -1 +1 @@
1
- VPcLnRF4BL8VoJEilBwlB
1
+ uTZ196cPUij3KcIDCweR6
@@ -4,42 +4,42 @@
4
4
  "/api/bridge-terminal/resize/route": "/api/bridge-terminal/resize",
5
5
  "/api/bridge-terminal/input/route": "/api/bridge-terminal/input",
6
6
  "/api/boot/route": "/api/boot",
7
- "/api/bridge-terminal/stream/route": "/api/bridge-terminal/stream",
8
- "/api/cleanup/route": "/api/cleanup",
9
7
  "/api/dev-mode/route": "/api/dev-mode",
10
- "/api/browse-directories/route": "/api/browse-directories",
11
- "/api/captures/route": "/api/captures",
12
- "/api/export-data/route": "/api/export-data",
8
+ "/api/cleanup/route": "/api/cleanup",
9
+ "/api/bridge-terminal/stream/route": "/api/bridge-terminal/stream",
13
10
  "/api/doctor/route": "/api/doctor",
14
- "/api/forensics/route": "/api/forensics",
11
+ "/api/export-data/route": "/api/export-data",
12
+ "/api/browse-directories/route": "/api/browse-directories",
13
+ "/api/history/route": "/api/history",
15
14
  "/api/git/route": "/api/git",
16
15
  "/api/hooks/route": "/api/hooks",
17
- "/api/history/route": "/api/history",
18
- "/api/knowledge/route": "/api/knowledge",
19
16
  "/api/inspect/route": "/api/inspect",
17
+ "/api/captures/route": "/api/captures",
18
+ "/api/knowledge/route": "/api/knowledge",
20
19
  "/api/live-state/route": "/api/live-state",
21
20
  "/api/preferences/route": "/api/preferences",
22
21
  "/api/recovery/route": "/api/recovery",
23
22
  "/api/onboarding/route": "/api/onboarding",
24
- "/api/session/browser/route": "/api/session/browser",
25
23
  "/api/projects/route": "/api/projects",
24
+ "/api/session/browser/route": "/api/session/browser",
26
25
  "/api/session/command/route": "/api/session/command",
27
26
  "/api/session/events/route": "/api/session/events",
27
+ "/api/forensics/route": "/api/forensics",
28
28
  "/api/settings-data/route": "/api/settings-data",
29
29
  "/api/session/manage/route": "/api/session/manage",
30
30
  "/api/shutdown/route": "/api/shutdown",
31
31
  "/api/skill-health/route": "/api/skill-health",
32
32
  "/api/steer/route": "/api/steer",
33
33
  "/api/terminal/input/route": "/api/terminal/input",
34
+ "/api/terminal/resize/route": "/api/terminal/resize",
34
35
  "/api/switch-root/route": "/api/switch-root",
35
36
  "/api/files/route": "/api/files",
36
- "/api/terminal/resize/route": "/api/terminal/resize",
37
37
  "/api/terminal/sessions/route": "/api/terminal/sessions",
38
38
  "/api/terminal/stream/route": "/api/terminal/stream",
39
39
  "/api/undo/route": "/api/undo",
40
- "/api/visualizer/route": "/api/visualizer",
41
- "/api/update/route": "/api/update",
42
40
  "/api/terminal/upload/route": "/api/terminal/upload",
41
+ "/api/update/route": "/api/update",
43
42
  "/api/remote-questions/route": "/api/remote-questions",
43
+ "/api/visualizer/route": "/api/visualizer",
44
44
  "/page": "/"
45
45
  }