gsd-pi 2.53.0-dev.07ffe51 → 2.53.0-dev.a67436f

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 (57) hide show
  1. package/dist/headless-ui.d.ts +2 -2
  2. package/dist/headless-ui.js +18 -15
  3. package/dist/headless.d.ts +11 -0
  4. package/dist/headless.js +178 -38
  5. package/dist/web/standalone/.next/BUILD_ID +1 -1
  6. package/dist/web/standalone/.next/app-path-routes-manifest.json +18 -18
  7. package/dist/web/standalone/.next/build-manifest.json +2 -2
  8. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  9. package/dist/web/standalone/.next/required-server-files.json +1 -1
  10. package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
  11. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  12. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  19. package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
  20. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  21. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  22. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  23. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  24. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  25. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  26. package/dist/web/standalone/.next/server/app/index.html +1 -1
  27. package/dist/web/standalone/.next/server/app/index.rsc +1 -1
  28. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  29. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  30. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  31. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  32. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  33. package/dist/web/standalone/.next/server/app-paths-manifest.json +18 -18
  34. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  35. package/dist/web/standalone/.next/server/pages/500.html +2 -2
  36. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  37. package/dist/web/standalone/server.js +1 -1
  38. package/package.json +1 -1
  39. package/packages/mcp-server/README.md +6 -6
  40. package/packages/mcp-server/package.json +14 -4
  41. package/packages/mcp-server/src/cli.ts +1 -1
  42. package/packages/mcp-server/src/index.ts +1 -1
  43. package/packages/mcp-server/src/mcp-server.test.ts +2 -2
  44. package/packages/mcp-server/src/session-manager.ts +2 -2
  45. package/packages/mcp-server/src/types.ts +1 -1
  46. package/packages/rpc-client/README.md +125 -0
  47. package/packages/rpc-client/examples/basic-usage.ts +13 -0
  48. package/packages/rpc-client/package.json +17 -3
  49. package/packages/rpc-client/src/index.ts +10 -0
  50. package/packages/rpc-client/src/jsonl.ts +64 -0
  51. package/packages/rpc-client/src/rpc-client.test.ts +568 -0
  52. package/packages/rpc-client/src/rpc-client.ts +666 -0
  53. package/packages/rpc-client/src/rpc-types.ts +399 -0
  54. package/packages/rpc-client/tsconfig.examples.json +17 -0
  55. package/packages/rpc-client/tsconfig.json +24 -0
  56. /package/dist/web/standalone/.next/static/{Q5pfrfJIvgUKR3LJLVB0T → YO-PWFRitlHM-L-dotlmm}/_buildManifest.js +0 -0
  57. /package/dist/web/standalone/.next/static/{Q5pfrfJIvgUKR3LJLVB0T → YO-PWFRitlHM-L-dotlmm}/_ssgManifest.js +0 -0
@@ -18,6 +18,6 @@ interface ExtensionUIRequest {
18
18
  [key: string]: unknown;
19
19
  }
20
20
  export type { ExtensionUIRequest };
21
- export declare function handleExtensionUIRequest(event: ExtensionUIRequest, writeToStdin: (data: string) => void): void;
21
+ export declare function handleExtensionUIRequest(event: ExtensionUIRequest, client: RpcClient): void;
22
22
  export declare function formatProgress(event: Record<string, unknown>, verbose: boolean): string | null;
23
- export declare function startSupervisedStdinReader(stdinWriter: (data: string) => void, client: RpcClient, onResponse: (id: string) => void): () => void;
23
+ export declare function startSupervisedStdinReader(client: RpcClient, onResponse: (id: string) => void): () => void;
@@ -5,13 +5,12 @@
5
5
  * formats progress events for stderr output, and reads orchestrator
6
6
  * commands from stdin in supervised mode.
7
7
  */
8
- import { attachJsonlLineReader, serializeJsonLine } from '@gsd/pi-coding-agent';
8
+ import { attachJsonlLineReader } from '@gsd/pi-coding-agent';
9
9
  // ---------------------------------------------------------------------------
10
10
  // Extension UI Auto-Responder
11
11
  // ---------------------------------------------------------------------------
12
- export function handleExtensionUIRequest(event, writeToStdin) {
12
+ export function handleExtensionUIRequest(event, client) {
13
13
  const { id, method } = event;
14
- let response;
15
14
  switch (method) {
16
15
  case 'select': {
17
16
  // Lock-guard prompts list "View status" first, but headless needs "Force start"
@@ -23,31 +22,30 @@ export function handleExtensionUIRequest(event, writeToStdin) {
23
22
  if (forceOption)
24
23
  selected = forceOption;
25
24
  }
26
- response = { type: 'extension_ui_response', id, value: selected };
25
+ client.sendUIResponse(id, { value: selected });
27
26
  break;
28
27
  }
29
28
  case 'confirm':
30
- response = { type: 'extension_ui_response', id, confirmed: true };
29
+ client.sendUIResponse(id, { confirmed: true });
31
30
  break;
32
31
  case 'input':
33
- response = { type: 'extension_ui_response', id, value: '' };
32
+ client.sendUIResponse(id, { value: '' });
34
33
  break;
35
34
  case 'editor':
36
- response = { type: 'extension_ui_response', id, value: event.prefill ?? '' };
35
+ client.sendUIResponse(id, { value: event.prefill ?? '' });
37
36
  break;
38
37
  case 'notify':
39
38
  case 'setStatus':
40
39
  case 'setWidget':
41
40
  case 'setTitle':
42
41
  case 'set_editor_text':
43
- response = { type: 'extension_ui_response', id, value: '' };
42
+ client.sendUIResponse(id, { value: '' });
44
43
  break;
45
44
  default:
46
45
  process.stderr.write(`[headless] Warning: unknown extension_ui_request method "${method}", cancelling\n`);
47
- response = { type: 'extension_ui_response', id, cancelled: true };
46
+ client.sendUIResponse(id, { cancelled: true });
48
47
  break;
49
48
  }
50
- writeToStdin(serializeJsonLine(response));
51
49
  }
52
50
  // ---------------------------------------------------------------------------
53
51
  // Progress Formatter
@@ -78,7 +76,7 @@ export function formatProgress(event, verbose) {
78
76
  // ---------------------------------------------------------------------------
79
77
  // Supervised Stdin Reader
80
78
  // ---------------------------------------------------------------------------
81
- export function startSupervisedStdinReader(stdinWriter, client, onResponse) {
79
+ export function startSupervisedStdinReader(client, onResponse) {
82
80
  return attachJsonlLineReader(process.stdin, (line) => {
83
81
  let msg;
84
82
  try {
@@ -90,12 +88,17 @@ export function startSupervisedStdinReader(stdinWriter, client, onResponse) {
90
88
  }
91
89
  const type = String(msg.type ?? '');
92
90
  switch (type) {
93
- case 'extension_ui_response':
94
- stdinWriter(line + '\n');
95
- if (typeof msg.id === 'string') {
96
- onResponse(msg.id);
91
+ case 'extension_ui_response': {
92
+ const id = String(msg.id ?? '');
93
+ const value = msg.value !== undefined ? String(msg.value) : undefined;
94
+ const confirmed = typeof msg.confirmed === 'boolean' ? msg.confirmed : undefined;
95
+ const cancelled = typeof msg.cancelled === 'boolean' ? msg.cancelled : undefined;
96
+ client.sendUIResponse(id, { value, confirmed, cancelled });
97
+ if (id) {
98
+ onResponse(id);
97
99
  }
98
100
  break;
101
+ }
99
102
  case 'prompt':
100
103
  client.prompt(String(msg.message ?? ''));
101
104
  break;
@@ -11,6 +11,7 @@
11
11
  * 10 — blocked (command reported a blocker)
12
12
  * 11 — cancelled (SIGINT/SIGTERM received)
13
13
  */
14
+ import type { SessionInfo } from '@gsd/pi-coding-agent';
14
15
  import type { OutputFormat } from './headless-types.js';
15
16
  export interface HeadlessOptions {
16
17
  timeout: number;
@@ -31,5 +32,15 @@ export interface HeadlessOptions {
31
32
  resumeSession?: string;
32
33
  bare?: boolean;
33
34
  }
35
+ export interface ResumeSessionResult {
36
+ session?: SessionInfo;
37
+ error?: string;
38
+ }
39
+ /**
40
+ * Resolve a session prefix to a single session.
41
+ * Exact id match is preferred over prefix match.
42
+ * Returns `{ session }` on unique match or `{ error }` on 0/ambiguous matches.
43
+ */
44
+ export declare function resolveResumeSession(sessions: SessionInfo[], prefix: string): ResumeSessionResult;
34
45
  export declare function parseHeadlessArgs(argv: string[]): HeadlessOptions;
35
46
  export declare function runHeadless(options: HeadlessOptions): Promise<void>;
package/dist/headless.js CHANGED
@@ -14,12 +14,35 @@
14
14
  import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
15
15
  import { join } from 'node:path';
16
16
  import { resolve } from 'node:path';
17
- import { RpcClient } from '@gsd/pi-coding-agent';
17
+ import { RpcClient, SessionManager } from '@gsd/pi-coding-agent';
18
+ import { getProjectSessionsDir } from './project-sessions.js';
18
19
  import { loadAndValidateAnswerFile, AnswerInjector } from './headless-answers.js';
19
- import { isTerminalNotification, isBlockedNotification, isMilestoneReadyNotification, isQuickCommand, FIRE_AND_FORGET_METHODS, IDLE_TIMEOUT_MS, NEW_MILESTONE_IDLE_TIMEOUT_MS, EXIT_SUCCESS, EXIT_ERROR, EXIT_BLOCKED, EXIT_CANCELLED, } from './headless-events.js';
20
+ import { isTerminalNotification, isBlockedNotification, isMilestoneReadyNotification, isQuickCommand, FIRE_AND_FORGET_METHODS, IDLE_TIMEOUT_MS, NEW_MILESTONE_IDLE_TIMEOUT_MS, EXIT_SUCCESS, EXIT_ERROR, EXIT_BLOCKED, EXIT_CANCELLED, mapStatusToExitCode, } from './headless-events.js';
20
21
  import { VALID_OUTPUT_FORMATS } from './headless-types.js';
21
22
  import { handleExtensionUIRequest, formatProgress, startSupervisedStdinReader, } from './headless-ui.js';
22
23
  import { loadContext, bootstrapGsdProject, } from './headless-context.js';
24
+ /**
25
+ * Resolve a session prefix to a single session.
26
+ * Exact id match is preferred over prefix match.
27
+ * Returns `{ session }` on unique match or `{ error }` on 0/ambiguous matches.
28
+ */
29
+ export function resolveResumeSession(sessions, prefix) {
30
+ // Exact match takes priority
31
+ const exact = sessions.find(s => s.id === prefix);
32
+ if (exact) {
33
+ return { session: exact };
34
+ }
35
+ // Prefix match
36
+ const matches = sessions.filter(s => s.id.startsWith(prefix));
37
+ if (matches.length === 0) {
38
+ return { error: `No session matching '${prefix}' found` };
39
+ }
40
+ if (matches.length > 1) {
41
+ const list = matches.map(s => ` ${s.id}`).join('\n');
42
+ return { error: `Ambiguous session prefix '${prefix}' matches ${matches.length} sessions:\n${list}` };
43
+ }
44
+ return { session: matches[0] };
45
+ }
23
46
  // ---------------------------------------------------------------------------
24
47
  // CLI Argument Parser
25
48
  // ---------------------------------------------------------------------------
@@ -256,6 +279,39 @@ async function runHeadlessOnce(options, restartCount) {
256
279
  let exitCode = 0;
257
280
  let milestoneReady = false; // tracks "Milestone X ready." for auto-chaining
258
281
  const recentEvents = [];
282
+ // JSON batch mode: cost aggregation (cumulative-max pattern per K004)
283
+ let cumulativeCostUsd = 0;
284
+ let cumulativeInputTokens = 0;
285
+ let cumulativeOutputTokens = 0;
286
+ let cumulativeCacheReadTokens = 0;
287
+ let cumulativeCacheWriteTokens = 0;
288
+ let lastSessionId;
289
+ // Emit HeadlessJsonResult to stdout for --output-format json batch mode
290
+ function emitBatchJsonResult() {
291
+ if (options.outputFormat !== 'json')
292
+ return;
293
+ const duration = Date.now() - startTime;
294
+ const status = blocked ? 'blocked'
295
+ : exitCode === EXIT_CANCELLED ? 'cancelled'
296
+ : exitCode === EXIT_ERROR ? (totalEvents === 0 ? 'error' : 'timeout')
297
+ : 'success';
298
+ const result = {
299
+ status,
300
+ exitCode,
301
+ sessionId: lastSessionId,
302
+ duration,
303
+ cost: {
304
+ total: cumulativeCostUsd,
305
+ input_tokens: cumulativeInputTokens,
306
+ output_tokens: cumulativeOutputTokens,
307
+ cache_read_tokens: cumulativeCacheReadTokens,
308
+ cache_write_tokens: cumulativeCacheWriteTokens,
309
+ },
310
+ toolCalls: toolCallCount,
311
+ events: totalEvents,
312
+ };
313
+ process.stdout.write(JSON.stringify(result) + '\n');
314
+ }
259
315
  function trackEvent(event) {
260
316
  totalEvents++;
261
317
  const type = String(event.type ?? 'unknown');
@@ -272,8 +328,11 @@ async function runHeadlessOnce(options, restartCount) {
272
328
  if (recentEvents.length > 20)
273
329
  recentEvents.shift();
274
330
  }
275
- // Stdin writer for sending extension_ui_response to child
276
- let stdinWriter = null;
331
+ // Client started flag replaces old stdinWriter null-check
332
+ let clientStarted = false;
333
+ // Adapter for AnswerInjector — wraps client.sendUIResponse in a writeToStdin-compatible callback
334
+ // Initialized after client.start(); events won't fire before then
335
+ let injectorStdinAdapter = () => { };
277
336
  // Supervised mode state
278
337
  const pendingResponseTimers = new Map();
279
338
  let supervisedFallback = false;
@@ -320,21 +379,54 @@ async function runHeadlessOnce(options, restartCount) {
320
379
  resetIdleTimer();
321
380
  // Answer injector: observe events for question metadata
322
381
  injector?.observeEvent(eventObj);
323
- // --json mode: forward events as JSONL to stdout (filtered if --events)
324
- if (options.json) {
382
+ // --json / --output-format stream-json: forward events as JSONL to stdout (filtered if --events)
383
+ // --output-format json (batch mode): suppress streaming, track cost for final result
384
+ if (options.json && options.outputFormat === 'stream-json') {
325
385
  const eventType = String(eventObj.type ?? '');
326
386
  if (!options.eventFilter || options.eventFilter.has(eventType)) {
327
387
  process.stdout.write(JSON.stringify(eventObj) + '\n');
328
388
  }
329
389
  }
330
- else {
390
+ else if (options.outputFormat === 'json') {
391
+ // Batch mode: silently track cost_update events (cumulative-max per K004)
392
+ const eventType = String(eventObj.type ?? '');
393
+ if (eventType === 'cost_update') {
394
+ const data = eventObj;
395
+ const cumCost = data.cumulativeCost;
396
+ if (cumCost) {
397
+ cumulativeCostUsd = Math.max(cumulativeCostUsd, Number(cumCost.costUsd ?? 0));
398
+ const tokens = data.tokens;
399
+ if (tokens) {
400
+ cumulativeInputTokens = Math.max(cumulativeInputTokens, tokens.input ?? 0);
401
+ cumulativeOutputTokens = Math.max(cumulativeOutputTokens, tokens.output ?? 0);
402
+ cumulativeCacheReadTokens = Math.max(cumulativeCacheReadTokens, tokens.cacheRead ?? 0);
403
+ cumulativeCacheWriteTokens = Math.max(cumulativeCacheWriteTokens, tokens.cacheWrite ?? 0);
404
+ }
405
+ }
406
+ }
407
+ // Track sessionId from init_result
408
+ if (eventType === 'init_result') {
409
+ lastSessionId = String(eventObj.sessionId ?? '');
410
+ }
411
+ }
412
+ else if (!options.json) {
331
413
  // Progress output to stderr
332
414
  const line = formatProgress(eventObj, !!options.verbose);
333
415
  if (line)
334
416
  process.stderr.write(line + '\n');
335
417
  }
418
+ // Handle execution_complete (v2 structured completion)
419
+ if (eventObj.type === 'execution_complete' && !completed) {
420
+ completed = true;
421
+ const status = String(eventObj.status ?? 'success');
422
+ exitCode = mapStatusToExitCode(status);
423
+ if (eventObj.status === 'blocked')
424
+ blocked = true;
425
+ resolveCompletion();
426
+ return;
427
+ }
336
428
  // Handle extension_ui_request
337
- if (eventObj.type === 'extension_ui_request' && stdinWriter) {
429
+ if (eventObj.type === 'extension_ui_request' && clientStarted) {
338
430
  // Check for terminal notification before auto-responding
339
431
  if (isBlockedNotification(eventObj)) {
340
432
  blocked = true;
@@ -348,7 +440,7 @@ async function runHeadlessOnce(options, restartCount) {
348
440
  }
349
441
  // Answer injection: try to handle with pre-supplied answers before supervised/auto
350
442
  if (injector && !FIRE_AND_FORGET_METHODS.has(String(eventObj.method ?? ''))) {
351
- if (injector.tryHandle(eventObj, stdinWriter)) {
443
+ if (injector.tryHandle(eventObj, injectorStdinAdapter)) {
352
444
  if (completed) {
353
445
  exitCode = blocked ? EXIT_BLOCKED : EXIT_SUCCESS;
354
446
  resolveCompletion();
@@ -364,13 +456,13 @@ async function runHeadlessOnce(options, restartCount) {
364
456
  const eventId = String(eventObj.id ?? '');
365
457
  const timer = setTimeout(() => {
366
458
  pendingResponseTimers.delete(eventId);
367
- handleExtensionUIRequest(eventObj, stdinWriter);
459
+ handleExtensionUIRequest(eventObj, client);
368
460
  process.stdout.write(JSON.stringify({ type: 'supervised_timeout', id: eventId, method }) + '\n');
369
461
  }, responseTimeout);
370
462
  pendingResponseTimers.set(eventId, timer);
371
463
  }
372
464
  else {
373
- handleExtensionUIRequest(eventObj, stdinWriter);
465
+ handleExtensionUIRequest(eventObj, client);
374
466
  }
375
467
  // If we detected a terminal notification, resolve after responding
376
468
  if (completed) {
@@ -393,13 +485,22 @@ async function runHeadlessOnce(options, restartCount) {
393
485
  process.stderr.write('\n[headless] Interrupted, stopping child process...\n');
394
486
  interrupted = true;
395
487
  exitCode = EXIT_CANCELLED;
396
- client.stop().finally(() => {
397
- if (timeoutTimer)
398
- clearTimeout(timeoutTimer);
399
- if (idleTimer)
400
- clearTimeout(idleTimer);
401
- process.exit(exitCode);
402
- });
488
+ // Kill child process — don't await, just fire and exit.
489
+ // The main flow may be awaiting a promise that resolves when the child dies,
490
+ // which would race with this handler. Exit synchronously to ensure correct exit code.
491
+ try {
492
+ client.stop().catch(() => { });
493
+ }
494
+ catch { }
495
+ if (timeoutTimer)
496
+ clearTimeout(timeoutTimer);
497
+ if (idleTimer)
498
+ clearTimeout(idleTimer);
499
+ // Emit batch JSON result if in json mode before exiting
500
+ if (options.outputFormat === 'json') {
501
+ emitBatchJsonResult();
502
+ }
503
+ process.exit(exitCode);
403
504
  };
404
505
  process.on('SIGINT', signalHandler);
405
506
  process.on('SIGTERM', signalHandler);
@@ -413,21 +514,55 @@ async function runHeadlessOnce(options, restartCount) {
413
514
  clearTimeout(timeoutTimer);
414
515
  process.exit(1);
415
516
  }
416
- // Access stdin writer from the internal process
417
- const internalProcess = client.process;
418
- if (!internalProcess?.stdin) {
419
- process.stderr.write('[headless] Error: Cannot access child process stdin\n');
420
- await client.stop();
421
- if (timeoutTimer)
422
- clearTimeout(timeoutTimer);
423
- process.exit(1);
517
+ // v2 protocol negotiation attempt init for structured completion events
518
+ let v2Enabled = false;
519
+ try {
520
+ await client.init({ clientId: 'gsd-headless' });
521
+ v2Enabled = true;
424
522
  }
425
- stdinWriter = (data) => {
426
- internalProcess.stdin.write(data);
523
+ catch {
524
+ process.stderr.write('[headless] Warning: v2 init failed, falling back to v1 string-matching\n');
525
+ }
526
+ clientStarted = true;
527
+ // --resume: resolve session ID and switch to it
528
+ if (options.resumeSession) {
529
+ const projectSessionsDir = getProjectSessionsDir(process.cwd());
530
+ const sessions = await SessionManager.list(process.cwd(), projectSessionsDir);
531
+ const result = resolveResumeSession(sessions, options.resumeSession);
532
+ if (result.error) {
533
+ process.stderr.write(`[headless] Error: ${result.error}\n`);
534
+ await client.stop();
535
+ if (timeoutTimer)
536
+ clearTimeout(timeoutTimer);
537
+ process.exit(1);
538
+ }
539
+ const matched = result.session;
540
+ const switchResult = await client.switchSession(matched.path);
541
+ if (switchResult.cancelled) {
542
+ process.stderr.write(`[headless] Error: Session switch to '${matched.id}' was cancelled by an extension\n`);
543
+ await client.stop();
544
+ if (timeoutTimer)
545
+ clearTimeout(timeoutTimer);
546
+ process.exit(1);
547
+ }
548
+ process.stderr.write(`[headless] Resuming session ${matched.id}\n`);
549
+ }
550
+ // Build injector adapter — wraps client.sendUIResponse for AnswerInjector's writeToStdin interface
551
+ injectorStdinAdapter = (data) => {
552
+ try {
553
+ const parsed = JSON.parse(data.trim());
554
+ if (parsed.type === 'extension_ui_response' && parsed.id) {
555
+ const { id, value, values, confirmed, cancelled } = parsed;
556
+ client.sendUIResponse(id, { value, values, confirmed, cancelled });
557
+ }
558
+ }
559
+ catch {
560
+ process.stderr.write('[headless] Warning: injector adapter received unparseable data\n');
561
+ }
427
562
  };
428
563
  // Start supervised stdin reader for orchestrator commands
429
564
  if (options.supervised) {
430
- stopSupervisedReader = startSupervisedStdinReader(stdinWriter, client, (id) => {
565
+ stopSupervisedReader = startSupervisedStdinReader(client, (id) => {
431
566
  const timer = pendingResponseTimers.get(id);
432
567
  if (timer) {
433
568
  clearTimeout(timer);
@@ -437,15 +572,18 @@ async function runHeadlessOnce(options, restartCount) {
437
572
  // Ensure stdin is in flowing mode for JSONL reading
438
573
  process.stdin.resume();
439
574
  }
440
- // Detect child process crash
441
- internalProcess.on('exit', (code) => {
442
- if (!completed) {
443
- const msg = `[headless] Child process exited unexpectedly with code ${code ?? 'null'}\n`;
444
- process.stderr.write(msg);
445
- exitCode = EXIT_ERROR;
446
- resolveCompletion();
447
- }
448
- });
575
+ // Detect child process crash (read-only exit event subscription — not stdin access)
576
+ const internalProcess = client.process;
577
+ if (internalProcess) {
578
+ internalProcess.on('exit', (code) => {
579
+ if (!completed) {
580
+ const msg = `[headless] Child process exited unexpectedly with code ${code ?? 'null'}\n`;
581
+ process.stderr.write(msg);
582
+ exitCode = EXIT_ERROR;
583
+ resolveCompletion();
584
+ }
585
+ });
586
+ }
449
587
  if (!options.json) {
450
588
  process.stderr.write(`[headless] Running /gsd ${options.command}${options.commandArgs.length > 0 ? ' ' + options.commandArgs.join(' ') : ''}...\n`);
451
589
  }
@@ -530,5 +668,7 @@ async function runHeadlessOnce(options, restartCount) {
530
668
  }
531
669
  }
532
670
  }
671
+ // Emit structured JSON result in batch mode
672
+ emitBatchJsonResult();
533
673
  return { exitCode, interrupted };
534
674
  }
@@ -1 +1 @@
1
- Q5pfrfJIvgUKR3LJLVB0T
1
+ YO-PWFRitlHM-L-dotlmm
@@ -1,46 +1,46 @@
1
1
  {
2
- "/_not-found/page": "/_not-found",
3
2
  "/_global-error/page": "/_global-error",
4
- "/api/boot/route": "/api/boot",
3
+ "/_not-found/page": "/_not-found",
5
4
  "/api/bridge-terminal/input/route": "/api/bridge-terminal/input",
5
+ "/api/boot/route": "/api/boot",
6
6
  "/api/bridge-terminal/resize/route": "/api/bridge-terminal/resize",
7
- "/api/dev-mode/route": "/api/dev-mode",
8
7
  "/api/bridge-terminal/stream/route": "/api/bridge-terminal/stream",
9
8
  "/api/cleanup/route": "/api/cleanup",
10
- "/api/doctor/route": "/api/doctor",
11
9
  "/api/export-data/route": "/api/export-data",
12
- "/api/forensics/route": "/api/forensics",
13
- "/api/git/route": "/api/git",
10
+ "/api/doctor/route": "/api/doctor",
14
11
  "/api/browse-directories/route": "/api/browse-directories",
12
+ "/api/dev-mode/route": "/api/dev-mode",
13
+ "/api/captures/route": "/api/captures",
15
14
  "/api/history/route": "/api/history",
15
+ "/api/forensics/route": "/api/forensics",
16
+ "/api/git/route": "/api/git",
16
17
  "/api/hooks/route": "/api/hooks",
17
18
  "/api/inspect/route": "/api/inspect",
19
+ "/api/live-state/route": "/api/live-state",
18
20
  "/api/knowledge/route": "/api/knowledge",
19
21
  "/api/experimental/route": "/api/experimental",
20
22
  "/api/preferences/route": "/api/preferences",
21
- "/api/live-state/route": "/api/live-state",
22
- "/api/onboarding/route": "/api/onboarding",
23
23
  "/api/recovery/route": "/api/recovery",
24
- "/api/projects/route": "/api/projects",
24
+ "/api/onboarding/route": "/api/onboarding",
25
25
  "/api/session/browser/route": "/api/session/browser",
26
+ "/api/projects/route": "/api/projects",
27
+ "/api/session/manage/route": "/api/session/manage",
26
28
  "/api/session/command/route": "/api/session/command",
27
- "/api/settings-data/route": "/api/settings-data",
29
+ "/api/skill-health/route": "/api/skill-health",
28
30
  "/api/session/events/route": "/api/session/events",
31
+ "/api/settings-data/route": "/api/settings-data",
29
32
  "/api/shutdown/route": "/api/shutdown",
30
- "/api/skill-health/route": "/api/skill-health",
31
- "/api/session/manage/route": "/api/session/manage",
32
33
  "/api/steer/route": "/api/steer",
34
+ "/api/terminal/resize/route": "/api/terminal/resize",
35
+ "/api/switch-root/route": "/api/switch-root",
33
36
  "/api/files/route": "/api/files",
34
37
  "/api/terminal/input/route": "/api/terminal/input",
35
- "/api/switch-root/route": "/api/switch-root",
36
- "/api/terminal/sessions/route": "/api/terminal/sessions",
38
+ "/api/visualizer/route": "/api/visualizer",
37
39
  "/api/terminal/stream/route": "/api/terminal/stream",
38
- "/api/captures/route": "/api/captures",
39
- "/api/terminal/resize/route": "/api/terminal/resize",
40
+ "/api/undo/route": "/api/undo",
41
+ "/api/terminal/sessions/route": "/api/terminal/sessions",
40
42
  "/api/update/route": "/api/update",
41
43
  "/api/remote-questions/route": "/api/remote-questions",
42
- "/api/visualizer/route": "/api/visualizer",
43
- "/api/undo/route": "/api/undo",
44
44
  "/api/terminal/upload/route": "/api/terminal/upload",
45
45
  "/page": "/"
46
46
  }
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "devFiles": [],
6
6
  "lowPriorityFiles": [
7
- "static/Q5pfrfJIvgUKR3LJLVB0T/_buildManifest.js",
8
- "static/Q5pfrfJIvgUKR3LJLVB0T/_ssgManifest.js"
7
+ "static/YO-PWFRitlHM-L-dotlmm/_buildManifest.js",
8
+ "static/YO-PWFRitlHM-L-dotlmm/_ssgManifest.js"
9
9
  ],
10
10
  "rootMainFiles": [
11
11
  "static/chunks/webpack-bca0e732db0dcec3.js",
@@ -78,8 +78,8 @@
78
78
  "dynamicRoutes": {},
79
79
  "notFoundRoutes": [],
80
80
  "preview": {
81
- "previewModeId": "3c1ccc5f0fbc5939a95c3c6277549ea5",
82
- "previewModeSigningKey": "6d75c8df696cc8b0ecd01e4ad9b1772096025c6fdba7cf517e3273a510d0bea6",
83
- "previewModeEncryptionKey": "9676ade6718cef8b36952f442a709b1215802c8d0c801266575b61c6b8227ba6"
81
+ "previewModeId": "01331f5d86acc7be1d3ecc8d5855e334",
82
+ "previewModeSigningKey": "8b6653cdd01c63bde017b6a42df870bc138ec94025546cdb71ac3548cfea7fa6",
83
+ "previewModeEncryptionKey": "2d7b20c003d03450d2f327b36c6e5db81437c825c1417b0299956d4083d83ea7"
84
84
  }
85
85
  }
@@ -157,7 +157,7 @@
157
157
  "proxyPrefetch": "flexible",
158
158
  "optimisticClientCache": true,
159
159
  "manualClientBasePath": false,
160
- "cpus": 9,
160
+ "cpus": 5,
161
161
  "memoryBasedWorkersCount": false,
162
162
  "imgOptConcurrency": null,
163
163
  "imgOptTimeoutInSeconds": 7,
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><!--Q5pfrfJIvgUKR3LJLVB0T--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-bca0e732db0dcec3.js"/><script src="/_next/static/chunks/4bd1b696-e5d7c65570c947b7.js" async=""></script><script src="/_next/static/chunks/3794-337d1ca25ad99a89.js" async=""></script><script src="/_next/static/chunks/main-app-fdab67f7802d7832.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
- @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-bca0e732db0dcec3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"Q5pfrfJIvgUKR3LJLVB0T\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--YO_PWFRitlHM_L_dotlmm--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-bca0e732db0dcec3.js"/><script src="/_next/static/chunks/4bd1b696-e5d7c65570c947b7.js" async=""></script><script src="/_next/static/chunks/3794-337d1ca25ad99a89.js" async=""></script><script src="/_next/static/chunks/main-app-fdab67f7802d7832.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
+ @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-bca0e732db0dcec3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"YO-PWFRitlHM-L-dotlmm\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
@@ -6,7 +6,7 @@
6
6
  7:I[90484,[],"ViewportBoundary"]
7
7
  9:I[90484,[],"MetadataBoundary"]
8
8
  b:I[27123,[],""]
9
- 0:{"P":null,"b":"Q5pfrfJIvgUKR3LJLVB0T","c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["_global-error",{"children":["__PAGE__",{}]}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":["$","title",null,{"children":"500: Internal Server Error."}]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"lineHeight":"48px"},"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","paddingRight":23,"fontSize":24,"fontWeight":500,"verticalAlign":"top"},"children":"500"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"28px"},"children":"Internal Server Error."}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b",[]],"S":true}
9
+ 0:{"P":null,"b":"YO-PWFRitlHM-L-dotlmm","c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["_global-error",{"children":["__PAGE__",{}]}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":["$","title",null,{"children":"500: Internal Server Error."}]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"lineHeight":"48px"},"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","paddingRight":23,"fontSize":24,"fontWeight":500,"verticalAlign":"top"},"children":"500"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"28px"},"children":"Internal Server Error."}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b",[]],"S":true}
10
10
  8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
11
11
  6:null
12
12
  a:[]
@@ -6,7 +6,7 @@
6
6
  7:I[90484,[],"ViewportBoundary"]
7
7
  9:I[90484,[],"MetadataBoundary"]
8
8
  b:I[27123,[],""]
9
- 0:{"P":null,"b":"Q5pfrfJIvgUKR3LJLVB0T","c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["_global-error",{"children":["__PAGE__",{}]}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":["$","title",null,{"children":"500: Internal Server Error."}]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"lineHeight":"48px"},"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","paddingRight":23,"fontSize":24,"fontWeight":500,"verticalAlign":"top"},"children":"500"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"28px"},"children":"Internal Server Error."}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b",[]],"S":true}
9
+ 0:{"P":null,"b":"YO-PWFRitlHM-L-dotlmm","c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["_global-error",{"children":["__PAGE__",{}]}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":["$","title",null,{"children":"500: Internal Server Error."}]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"lineHeight":"48px"},"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","paddingRight":23,"fontSize":24,"fontWeight":500,"verticalAlign":"top"},"children":"500"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"28px"},"children":"Internal Server Error."}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b",[]],"S":true}
10
10
  8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
11
11
  6:null
12
12
  a:[]