oh-my-codex 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +5 -5
- package/Cargo.toml +1 -1
- package/README.md +14 -8
- package/crates/omx-explore/src/main.rs +94 -1
- package/crates/omx-sparkshell/src/codex_bridge.rs +59 -12
- package/crates/omx-sparkshell/tests/execution.rs +48 -0
- package/dist/cli/__tests__/explore.test.js +33 -1
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +11 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +5 -0
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +139 -25
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +30 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +32 -7
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +8 -6
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +23 -0
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +65 -5
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +360 -26
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/explore.d.ts.map +1 -1
- package/dist/cli/explore.js +18 -3
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +7 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +25 -3
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +11 -1
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +159 -394
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +3 -1
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/update.d.ts +37 -9
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +204 -26
- package/dist/cli/update.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +51 -14
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +35 -10
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/generator.d.ts +1 -0
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +61 -7
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.js +56 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js +31 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js +43 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js +38 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +108 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js +16 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +34 -8
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +7 -25
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +60 -0
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +177 -0
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +36 -18
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-server.d.ts +17 -0
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +55 -1
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/notifications/__tests__/index.test.js +0 -3
- package/dist/notifications/__tests__/index.test.js.map +1 -1
- package/dist/notifications/__tests__/session-status.test.js +90 -0
- package/dist/notifications/__tests__/session-status.test.js.map +1 -1
- package/dist/notifications/session-status.d.ts +2 -0
- package/dist/notifications/session-status.d.ts.map +1 -1
- package/dist/notifications/session-status.js +19 -4
- package/dist/notifications/session-status.js.map +1 -1
- package/dist/question/__tests__/deep-interview.test.js +44 -0
- package/dist/question/__tests__/deep-interview.test.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +192 -12
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/state.test.js +21 -1
- package/dist/question/__tests__/state.test.js.map +1 -1
- package/dist/question/deep-interview.d.ts +3 -0
- package/dist/question/deep-interview.d.ts.map +1 -1
- package/dist/question/deep-interview.js +18 -1
- package/dist/question/deep-interview.js.map +1 -1
- package/dist/question/renderer.d.ts +4 -2
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +87 -18
- package/dist/question/renderer.js.map +1 -1
- package/dist/runtime/__tests__/run-outcome.test.js +38 -0
- package/dist/runtime/__tests__/run-outcome.test.js.map +1 -1
- package/dist/runtime/__tests__/run-state.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-state.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-state.test.js +37 -0
- package/dist/runtime/__tests__/run-state.test.js.map +1 -0
- package/dist/runtime/run-loop.d.ts +5 -1
- package/dist/runtime/run-loop.d.ts.map +1 -1
- package/dist/runtime/run-loop.js +8 -3
- package/dist/runtime/run-loop.js.map +1 -1
- package/dist/runtime/run-outcome.d.ts +18 -0
- package/dist/runtime/run-outcome.d.ts.map +1 -1
- package/dist/runtime/run-outcome.js +156 -7
- package/dist/runtime/run-outcome.js.map +1 -1
- package/dist/runtime/run-state.d.ts +5 -1
- package/dist/runtime/run-state.d.ts.map +1 -1
- package/dist/runtime/run-state.js +13 -3
- package/dist/runtime/run-state.js.map +1 -1
- package/dist/runtime/terminal-lifecycle.d.ts +11 -0
- package/dist/runtime/terminal-lifecycle.d.ts.map +1 -0
- package/dist/runtime/terminal-lifecycle.js +52 -0
- package/dist/runtime/terminal-lifecycle.js.map +1 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js +370 -56
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.d.ts +2 -0
- package/dist/scripts/__tests__/postinstall.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/postinstall.test.js +178 -0
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts +1 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +115 -56
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/postinstall.d.ts +22 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +105 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/state/__tests__/operations.test.js +60 -0
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +18 -1
- package/dist/state/operations.js.map +1 -1
- package/dist/team/__tests__/role-router.test.js +6 -0
- package/dist/team/__tests__/role-router.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +108 -2
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +18 -4
- package/dist/team/runtime.js.map +1 -1
- package/dist/utils/__tests__/dep-versions.test.js +25 -8
- package/dist/utils/__tests__/dep-versions.test.js.map +1 -1
- package/dist/utils/__tests__/paths.test.js +45 -0
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +22 -7
- package/dist/utils/paths.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/package.json +3 -2
- package/prompts/architect.md +4 -0
- package/prompts/code-reviewer.md +3 -0
- package/skills/code-review/SKILL.md +94 -28
- package/skills/deep-interview/SKILL.md +91 -0
- package/src/scripts/__tests__/codex-native-hook.test.ts +468 -64
- package/src/scripts/__tests__/postinstall.test.ts +210 -0
- package/src/scripts/codex-native-hook.ts +136 -53
- package/src/scripts/postinstall-bootstrap.js +23 -0
- package/src/scripts/postinstall.ts +161 -0
- package/templates/AGENTS.md +1 -1
- package/templates/model-instructions/explore-lightweight-AGENTS.md +11 -0
- package/templates/model-instructions/sparkshell-lightweight-AGENTS.md +10 -0
package/dist/cli/team.js
CHANGED
|
@@ -367,6 +367,163 @@ function buildDeadWorkerAwaitEvent(teamName, snapshot) {
|
|
|
367
367
|
source_type: 'await_snapshot',
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
+
function logInspectEntries(prefix, entries, shouldLog, formatValue = (value) => String(value)) {
|
|
371
|
+
for (const [target, value] of Object.entries(entries)) {
|
|
372
|
+
if (shouldLog(value)) {
|
|
373
|
+
console.log(`${prefix}_${target}: ${formatValue(value)}`);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function logInspectEntryDescriptors(descriptors) {
|
|
378
|
+
for (const descriptor of descriptors) {
|
|
379
|
+
logInspectEntries(descriptor.prefix, descriptor.entries, descriptor.shouldLog, descriptor.formatValue);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function inspectEntryDescriptors(paneStatus) {
|
|
383
|
+
const isPresentString = (value) => typeof value === 'string' && value.length > 0;
|
|
384
|
+
const isNumber = (value) => typeof value === 'number';
|
|
385
|
+
const isBoolean = (value) => typeof value === 'boolean';
|
|
386
|
+
const hasItems = (value) => Array.isArray(value) && value.length > 0;
|
|
387
|
+
const joinSpace = (value) => Array.isArray(value) ? value.join(' ') : String(value);
|
|
388
|
+
return [
|
|
389
|
+
{ prefix: 'inspect_reason', entries: paneStatus.recommended_inspect_reasons, shouldLog: isPresentString },
|
|
390
|
+
{ prefix: 'inspect_cli', entries: paneStatus.recommended_inspect_clis, shouldLog: isPresentString },
|
|
391
|
+
{ prefix: 'inspect_role', entries: paneStatus.recommended_inspect_roles, shouldLog: isPresentString },
|
|
392
|
+
{ prefix: 'inspect_index', entries: paneStatus.recommended_inspect_indexes, shouldLog: isNumber },
|
|
393
|
+
{ prefix: 'inspect_alive', entries: paneStatus.recommended_inspect_alive, shouldLog: isBoolean },
|
|
394
|
+
{ prefix: 'inspect_turn_count', entries: paneStatus.recommended_inspect_turn_counts, shouldLog: isNumber },
|
|
395
|
+
{ prefix: 'inspect_turns_without_progress', entries: paneStatus.recommended_inspect_turns_without_progress, shouldLog: isNumber },
|
|
396
|
+
{ prefix: 'inspect_last_turn_at', entries: paneStatus.recommended_inspect_last_turn_at, shouldLog: isPresentString },
|
|
397
|
+
{ prefix: 'inspect_status_updated_at', entries: paneStatus.recommended_inspect_status_updated_at, shouldLog: isPresentString },
|
|
398
|
+
{ prefix: 'inspect_pid', entries: paneStatus.recommended_inspect_pids, shouldLog: isNumber },
|
|
399
|
+
{ prefix: 'inspect_worktree_path', entries: paneStatus.recommended_inspect_worktree_paths, shouldLog: isPresentString },
|
|
400
|
+
{ prefix: 'inspect_worktree_repo_root', entries: paneStatus.recommended_inspect_worktree_repo_roots, shouldLog: isPresentString },
|
|
401
|
+
{ prefix: 'inspect_worktree_branch', entries: paneStatus.recommended_inspect_worktree_branches, shouldLog: isPresentString },
|
|
402
|
+
{ prefix: 'inspect_worktree_detached', entries: paneStatus.recommended_inspect_worktree_detached, shouldLog: isBoolean },
|
|
403
|
+
{ prefix: 'inspect_worktree_created', entries: paneStatus.recommended_inspect_worktree_created, shouldLog: isBoolean },
|
|
404
|
+
{ prefix: 'inspect_team_state_root', entries: paneStatus.recommended_inspect_team_state_roots, shouldLog: isPresentString },
|
|
405
|
+
{ prefix: 'inspect_workdir', entries: paneStatus.recommended_inspect_workdirs, shouldLog: isPresentString },
|
|
406
|
+
{ prefix: 'inspect_assigned_tasks', entries: paneStatus.recommended_inspect_assigned_tasks, shouldLog: hasItems, formatValue: joinSpace },
|
|
407
|
+
{ prefix: 'inspect_task_status', entries: paneStatus.recommended_inspect_task_statuses, shouldLog: isPresentString },
|
|
408
|
+
{ prefix: 'inspect_task_result', entries: paneStatus.recommended_inspect_task_results, shouldLog: isPresentString },
|
|
409
|
+
{ prefix: 'inspect_task_error', entries: paneStatus.recommended_inspect_task_errors, shouldLog: isPresentString },
|
|
410
|
+
{ prefix: 'inspect_task_version', entries: paneStatus.recommended_inspect_task_versions, shouldLog: isNumber },
|
|
411
|
+
{ prefix: 'inspect_task_created_at', entries: paneStatus.recommended_inspect_task_created_at, shouldLog: isPresentString },
|
|
412
|
+
{ prefix: 'inspect_task_completed_at', entries: paneStatus.recommended_inspect_task_completed_at, shouldLog: isPresentString },
|
|
413
|
+
{ prefix: 'inspect_task_depends_on', entries: paneStatus.recommended_inspect_task_depends_on, shouldLog: hasItems, formatValue: joinSpace },
|
|
414
|
+
{ prefix: 'inspect_task_claim_present', entries: paneStatus.recommended_inspect_task_claim_present, shouldLog: isBoolean },
|
|
415
|
+
{ prefix: 'inspect_task_claim_owner', entries: paneStatus.recommended_inspect_task_claim_owners, shouldLog: isPresentString },
|
|
416
|
+
{ prefix: 'inspect_task_claim_token', entries: paneStatus.recommended_inspect_task_claim_tokens, shouldLog: isPresentString },
|
|
417
|
+
{ prefix: 'inspect_task_claim_leased_until', entries: paneStatus.recommended_inspect_task_claim_leases, shouldLog: isPresentString },
|
|
418
|
+
{ prefix: 'inspect_task_claim_lock_path', entries: paneStatus.recommended_inspect_task_claim_lock_paths, shouldLog: isPresentString },
|
|
419
|
+
{ prefix: 'inspect_approval_required', entries: paneStatus.recommended_inspect_approval_required, shouldLog: isBoolean },
|
|
420
|
+
{ prefix: 'inspect_requires_code_change', entries: paneStatus.recommended_inspect_requires_code_change, shouldLog: isBoolean },
|
|
421
|
+
{ prefix: 'inspect_description', entries: paneStatus.recommended_inspect_descriptions, shouldLog: isPresentString },
|
|
422
|
+
{ prefix: 'inspect_blocked_by', entries: paneStatus.recommended_inspect_blocked_by, shouldLog: hasItems, formatValue: joinSpace },
|
|
423
|
+
{ prefix: 'inspect_task_role', entries: paneStatus.recommended_inspect_task_roles, shouldLog: isPresentString },
|
|
424
|
+
{ prefix: 'inspect_task_owner', entries: paneStatus.recommended_inspect_task_owners, shouldLog: isPresentString },
|
|
425
|
+
{ prefix: 'inspect_approval_status', entries: paneStatus.recommended_inspect_approval_statuses, shouldLog: isPresentString },
|
|
426
|
+
{ prefix: 'inspect_approval_reviewer', entries: paneStatus.recommended_inspect_approval_reviewers, shouldLog: isPresentString },
|
|
427
|
+
{ prefix: 'inspect_approval_reason', entries: paneStatus.recommended_inspect_approval_reasons, shouldLog: isPresentString },
|
|
428
|
+
{ prefix: 'inspect_approval_decided_at', entries: paneStatus.recommended_inspect_approval_decided_at, shouldLog: isPresentString },
|
|
429
|
+
{ prefix: 'inspect_approval_record_present', entries: paneStatus.recommended_inspect_approval_record_present, shouldLog: isBoolean },
|
|
430
|
+
{ prefix: 'inspect_state', entries: paneStatus.recommended_inspect_states, shouldLog: isPresentString },
|
|
431
|
+
{ prefix: 'inspect_state_reason', entries: paneStatus.recommended_inspect_state_reasons, shouldLog: isPresentString },
|
|
432
|
+
{ prefix: 'inspect_task', entries: paneStatus.recommended_inspect_tasks, shouldLog: isPresentString },
|
|
433
|
+
{ prefix: 'inspect_subject', entries: paneStatus.recommended_inspect_subjects, shouldLog: isPresentString },
|
|
434
|
+
{ prefix: 'inspect_task_path', entries: paneStatus.recommended_inspect_task_paths, shouldLog: isPresentString },
|
|
435
|
+
{ prefix: 'inspect_approval_path', entries: paneStatus.recommended_inspect_approval_paths, shouldLog: isPresentString },
|
|
436
|
+
{ prefix: 'inspect_worker_state_dir', entries: paneStatus.recommended_inspect_worker_state_dirs, shouldLog: isPresentString },
|
|
437
|
+
{ prefix: 'inspect_worker_status_path', entries: paneStatus.recommended_inspect_worker_status_paths, shouldLog: isPresentString },
|
|
438
|
+
{ prefix: 'inspect_worker_heartbeat_path', entries: paneStatus.recommended_inspect_worker_heartbeat_paths, shouldLog: isPresentString },
|
|
439
|
+
{ prefix: 'inspect_worker_identity_path', entries: paneStatus.recommended_inspect_worker_identity_paths, shouldLog: isPresentString },
|
|
440
|
+
{ prefix: 'inspect_worker_inbox_path', entries: paneStatus.recommended_inspect_worker_inbox_paths, shouldLog: isPresentString },
|
|
441
|
+
{ prefix: 'inspect_worker_mailbox_path', entries: paneStatus.recommended_inspect_worker_mailbox_paths, shouldLog: isPresentString },
|
|
442
|
+
{ prefix: 'inspect_worker_shutdown_request_path', entries: paneStatus.recommended_inspect_worker_shutdown_request_paths, shouldLog: isPresentString },
|
|
443
|
+
{ prefix: 'inspect_worker_shutdown_ack_path', entries: paneStatus.recommended_inspect_worker_shutdown_ack_paths, shouldLog: isPresentString },
|
|
444
|
+
{ prefix: 'inspect_team_dir_path', entries: paneStatus.recommended_inspect_team_dir_paths, shouldLog: isPresentString },
|
|
445
|
+
{ prefix: 'inspect_team_config_path', entries: paneStatus.recommended_inspect_team_config_paths, shouldLog: isPresentString },
|
|
446
|
+
{ prefix: 'inspect_team_manifest_path', entries: paneStatus.recommended_inspect_team_manifest_paths, shouldLog: isPresentString },
|
|
447
|
+
{ prefix: 'inspect_team_events_path', entries: paneStatus.recommended_inspect_team_events_paths, shouldLog: isPresentString },
|
|
448
|
+
{ prefix: 'inspect_team_dispatch_path', entries: paneStatus.recommended_inspect_team_dispatch_paths, shouldLog: isPresentString },
|
|
449
|
+
{ prefix: 'inspect_team_phase_path', entries: paneStatus.recommended_inspect_team_phase_paths, shouldLog: isPresentString },
|
|
450
|
+
{ prefix: 'inspect_team_monitor_snapshot_path', entries: paneStatus.recommended_inspect_team_monitor_snapshot_paths, shouldLog: isPresentString },
|
|
451
|
+
{ prefix: 'inspect_team_summary_snapshot_path', entries: paneStatus.recommended_inspect_team_summary_snapshot_paths, shouldLog: isPresentString },
|
|
452
|
+
{ prefix: 'inspect_pane', entries: paneStatus.recommended_inspect_panes, shouldLog: isPresentString },
|
|
453
|
+
];
|
|
454
|
+
}
|
|
455
|
+
function formatInspectItemLine(index, item) {
|
|
456
|
+
const parts = [
|
|
457
|
+
`inspect_item_${index + 1}:`,
|
|
458
|
+
`target=${item.target}`,
|
|
459
|
+
item.pane_id ? `pane=${item.pane_id}` : '',
|
|
460
|
+
item.worker_cli ? `cli=${item.worker_cli}` : '',
|
|
461
|
+
item.role ? `role=${item.role}` : '',
|
|
462
|
+
typeof item.index === 'number' ? `index=${item.index}` : '',
|
|
463
|
+
typeof item.alive === 'boolean' ? `alive=${item.alive}` : '',
|
|
464
|
+
typeof item.turn_count === 'number' ? `turn_count=${item.turn_count}` : '',
|
|
465
|
+
typeof item.turns_without_progress === 'number' ? `turns_without_progress=${item.turns_without_progress}` : '',
|
|
466
|
+
item.last_turn_at ? `last_turn_at=${item.last_turn_at}` : '',
|
|
467
|
+
item.status_updated_at ? `status_updated_at=${item.status_updated_at}` : '',
|
|
468
|
+
typeof item.pid === 'number' ? `pid=${item.pid}` : '',
|
|
469
|
+
item.worktree_repo_root ? `worktree_repo_root=${item.worktree_repo_root}` : '',
|
|
470
|
+
item.worktree_path ? `worktree_path=${item.worktree_path}` : '',
|
|
471
|
+
item.worktree_branch ? `worktree_branch=${item.worktree_branch}` : '',
|
|
472
|
+
typeof item.worktree_detached === 'boolean' ? `worktree_detached=${item.worktree_detached}` : '',
|
|
473
|
+
typeof item.worktree_created === 'boolean' ? `worktree_created=${item.worktree_created}` : '',
|
|
474
|
+
item.team_state_root ? `team_state_root=${item.team_state_root}` : '',
|
|
475
|
+
item.working_dir ? `workdir=${item.working_dir}` : '',
|
|
476
|
+
item.assigned_tasks.length > 0 ? `assigned_tasks=${item.assigned_tasks.join(',')}` : '',
|
|
477
|
+
item.task_status ? `task_status=${item.task_status}` : '',
|
|
478
|
+
item.task_result ? `task_result=${item.task_result}` : '',
|
|
479
|
+
item.task_error ? `task_error=${item.task_error}` : '',
|
|
480
|
+
typeof item.task_version === 'number' ? `task_version=${item.task_version}` : '',
|
|
481
|
+
item.task_created_at ? `task_created_at=${item.task_created_at}` : '',
|
|
482
|
+
item.task_completed_at ? `task_completed_at=${item.task_completed_at}` : '',
|
|
483
|
+
item.task_depends_on.length > 0 ? `task_depends_on=${item.task_depends_on.join(',')}` : '',
|
|
484
|
+
typeof item.task_claim_present === 'boolean' ? `task_claim_present=${item.task_claim_present}` : '',
|
|
485
|
+
item.task_claim_owner ? `task_claim_owner=${item.task_claim_owner}` : '',
|
|
486
|
+
item.task_claim_token ? `task_claim_token=${item.task_claim_token}` : '',
|
|
487
|
+
item.task_claim_leased_until ? `task_claim_leased_until=${item.task_claim_leased_until}` : '',
|
|
488
|
+
item.task_claim_lock_path ? `task_claim_lock_path=${item.task_claim_lock_path}` : '',
|
|
489
|
+
typeof item.approval_required === 'boolean' ? `approval_required=${item.approval_required}` : '',
|
|
490
|
+
typeof item.requires_code_change === 'boolean' ? `requires_code_change=${item.requires_code_change}` : '',
|
|
491
|
+
item.task_description ? `description=${item.task_description}` : '',
|
|
492
|
+
item.blocked_by.length > 0 ? `blocked_by=${item.blocked_by.join(',')}` : '',
|
|
493
|
+
item.task_role ? `task_role=${item.task_role}` : '',
|
|
494
|
+
item.task_owner ? `task_owner=${item.task_owner}` : '',
|
|
495
|
+
item.approval_status ? `approval_status=${item.approval_status}` : '',
|
|
496
|
+
item.approval_reviewer ? `approval_reviewer=${item.approval_reviewer}` : '',
|
|
497
|
+
item.approval_reason ? `approval_reason=${item.approval_reason}` : '',
|
|
498
|
+
item.approval_decided_at ? `approval_decided_at=${item.approval_decided_at}` : '',
|
|
499
|
+
typeof item.approval_record_present === 'boolean' ? `approval_record_present=${item.approval_record_present}` : '',
|
|
500
|
+
item.state_reason ? `state_reason=${item.state_reason}` : '',
|
|
501
|
+
item.task_id ? `task=${item.task_id}` : '',
|
|
502
|
+
item.task_subject ? `subject=${item.task_subject}` : '',
|
|
503
|
+
item.task_path ? `task_path=${item.task_path}` : '',
|
|
504
|
+
item.approval_path ? `approval_path=${item.approval_path}` : '',
|
|
505
|
+
item.worker_state_dir ? `worker_state_dir=${item.worker_state_dir}` : '',
|
|
506
|
+
item.worker_status_path ? `worker_status_path=${item.worker_status_path}` : '',
|
|
507
|
+
item.worker_heartbeat_path ? `worker_heartbeat_path=${item.worker_heartbeat_path}` : '',
|
|
508
|
+
item.worker_identity_path ? `worker_identity_path=${item.worker_identity_path}` : '',
|
|
509
|
+
item.worker_inbox_path ? `worker_inbox_path=${item.worker_inbox_path}` : '',
|
|
510
|
+
item.worker_mailbox_path ? `worker_mailbox_path=${item.worker_mailbox_path}` : '',
|
|
511
|
+
item.worker_shutdown_request_path ? `worker_shutdown_request_path=${item.worker_shutdown_request_path}` : '',
|
|
512
|
+
item.worker_shutdown_ack_path ? `worker_shutdown_ack_path=${item.worker_shutdown_ack_path}` : '',
|
|
513
|
+
item.team_dir_path ? `team_dir_path=${item.team_dir_path}` : '',
|
|
514
|
+
item.team_config_path ? `team_config_path=${item.team_config_path}` : '',
|
|
515
|
+
item.team_manifest_path ? `team_manifest_path=${item.team_manifest_path}` : '',
|
|
516
|
+
item.team_events_path ? `team_events_path=${item.team_events_path}` : '',
|
|
517
|
+
item.team_dispatch_path ? `team_dispatch_path=${item.team_dispatch_path}` : '',
|
|
518
|
+
item.team_phase_path ? `team_phase_path=${item.team_phase_path}` : '',
|
|
519
|
+
item.team_monitor_snapshot_path ? `team_monitor_snapshot_path=${item.team_monitor_snapshot_path}` : '',
|
|
520
|
+
item.team_summary_snapshot_path ? `team_summary_snapshot_path=${item.team_summary_snapshot_path}` : '',
|
|
521
|
+
`reason=${item.reason}`,
|
|
522
|
+
item.state ? `state=${item.state}` : '',
|
|
523
|
+
`command=${item.command}`,
|
|
524
|
+
];
|
|
525
|
+
return parts.filter(Boolean).join(' ');
|
|
526
|
+
}
|
|
370
527
|
function renderTeamPaneStatus(paneStatus) {
|
|
371
528
|
if (paneStatus.leader_pane_id || paneStatus.hud_pane_id) {
|
|
372
529
|
console.log(`panes: leader=${paneStatus.leader_pane_id || '-'} hud=${paneStatus.hud_pane_id || '-'}`);
|
|
@@ -381,324 +538,7 @@ function renderTeamPaneStatus(paneStatus) {
|
|
|
381
538
|
if (paneStatus.recommended_inspect_targets.length > 0) {
|
|
382
539
|
console.log(`recommended_inspect_targets: ${paneStatus.recommended_inspect_targets.join(' ')}`);
|
|
383
540
|
}
|
|
384
|
-
|
|
385
|
-
console.log(`inspect_reason_${target}: ${reason}`);
|
|
386
|
-
}
|
|
387
|
-
for (const [target, workerCli] of Object.entries(paneStatus.recommended_inspect_clis)) {
|
|
388
|
-
if (workerCli) {
|
|
389
|
-
console.log(`inspect_cli_${target}: ${workerCli}`);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
for (const [target, role] of Object.entries(paneStatus.recommended_inspect_roles)) {
|
|
393
|
-
if (role) {
|
|
394
|
-
console.log(`inspect_role_${target}: ${role}`);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
for (const [target, index] of Object.entries(paneStatus.recommended_inspect_indexes)) {
|
|
398
|
-
if (typeof index === 'number') {
|
|
399
|
-
console.log(`inspect_index_${target}: ${index}`);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
for (const [target, alive] of Object.entries(paneStatus.recommended_inspect_alive)) {
|
|
403
|
-
if (typeof alive === 'boolean') {
|
|
404
|
-
console.log(`inspect_alive_${target}: ${alive}`);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
for (const [target, turnCount] of Object.entries(paneStatus.recommended_inspect_turn_counts)) {
|
|
408
|
-
if (typeof turnCount === 'number') {
|
|
409
|
-
console.log(`inspect_turn_count_${target}: ${turnCount}`);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
for (const [target, turnsWithoutProgress] of Object.entries(paneStatus.recommended_inspect_turns_without_progress)) {
|
|
413
|
-
if (typeof turnsWithoutProgress === 'number') {
|
|
414
|
-
console.log(`inspect_turns_without_progress_${target}: ${turnsWithoutProgress}`);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
for (const [target, lastTurnAt] of Object.entries(paneStatus.recommended_inspect_last_turn_at)) {
|
|
418
|
-
if (lastTurnAt) {
|
|
419
|
-
console.log(`inspect_last_turn_at_${target}: ${lastTurnAt}`);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
for (const [target, statusUpdatedAt] of Object.entries(paneStatus.recommended_inspect_status_updated_at)) {
|
|
423
|
-
if (statusUpdatedAt) {
|
|
424
|
-
console.log(`inspect_status_updated_at_${target}: ${statusUpdatedAt}`);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
for (const [target, pid] of Object.entries(paneStatus.recommended_inspect_pids)) {
|
|
428
|
-
if (typeof pid === 'number') {
|
|
429
|
-
console.log(`inspect_pid_${target}: ${pid}`);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
for (const [target, worktreePath] of Object.entries(paneStatus.recommended_inspect_worktree_paths)) {
|
|
433
|
-
if (worktreePath) {
|
|
434
|
-
console.log(`inspect_worktree_path_${target}: ${worktreePath}`);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
for (const [target, worktreeRepoRoot] of Object.entries(paneStatus.recommended_inspect_worktree_repo_roots)) {
|
|
438
|
-
if (worktreeRepoRoot) {
|
|
439
|
-
console.log(`inspect_worktree_repo_root_${target}: ${worktreeRepoRoot}`);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
for (const [target, worktreeBranch] of Object.entries(paneStatus.recommended_inspect_worktree_branches)) {
|
|
443
|
-
if (worktreeBranch) {
|
|
444
|
-
console.log(`inspect_worktree_branch_${target}: ${worktreeBranch}`);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
for (const [target, worktreeDetached] of Object.entries(paneStatus.recommended_inspect_worktree_detached)) {
|
|
448
|
-
if (typeof worktreeDetached === 'boolean') {
|
|
449
|
-
console.log(`inspect_worktree_detached_${target}: ${worktreeDetached}`);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
for (const [target, worktreeCreated] of Object.entries(paneStatus.recommended_inspect_worktree_created)) {
|
|
453
|
-
if (typeof worktreeCreated === 'boolean') {
|
|
454
|
-
console.log(`inspect_worktree_created_${target}: ${worktreeCreated}`);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
for (const [target, teamStateRoot] of Object.entries(paneStatus.recommended_inspect_team_state_roots)) {
|
|
458
|
-
if (teamStateRoot) {
|
|
459
|
-
console.log(`inspect_team_state_root_${target}: ${teamStateRoot}`);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
for (const [target, workdir] of Object.entries(paneStatus.recommended_inspect_workdirs)) {
|
|
463
|
-
if (workdir) {
|
|
464
|
-
console.log(`inspect_workdir_${target}: ${workdir}`);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
for (const [target, assignedTasks] of Object.entries(paneStatus.recommended_inspect_assigned_tasks)) {
|
|
468
|
-
if (assignedTasks.length > 0) {
|
|
469
|
-
console.log(`inspect_assigned_tasks_${target}: ${assignedTasks.join(' ')}`);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
for (const [target, taskStatus] of Object.entries(paneStatus.recommended_inspect_task_statuses)) {
|
|
473
|
-
if (taskStatus) {
|
|
474
|
-
console.log(`inspect_task_status_${target}: ${taskStatus}`);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
for (const [target, taskResult] of Object.entries(paneStatus.recommended_inspect_task_results)) {
|
|
478
|
-
if (taskResult) {
|
|
479
|
-
console.log(`inspect_task_result_${target}: ${taskResult}`);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
for (const [target, taskError] of Object.entries(paneStatus.recommended_inspect_task_errors)) {
|
|
483
|
-
if (taskError) {
|
|
484
|
-
console.log(`inspect_task_error_${target}: ${taskError}`);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
for (const [target, taskVersion] of Object.entries(paneStatus.recommended_inspect_task_versions)) {
|
|
488
|
-
if (typeof taskVersion === 'number') {
|
|
489
|
-
console.log(`inspect_task_version_${target}: ${taskVersion}`);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
for (const [target, taskCreatedAt] of Object.entries(paneStatus.recommended_inspect_task_created_at)) {
|
|
493
|
-
if (taskCreatedAt) {
|
|
494
|
-
console.log(`inspect_task_created_at_${target}: ${taskCreatedAt}`);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
for (const [target, taskCompletedAt] of Object.entries(paneStatus.recommended_inspect_task_completed_at)) {
|
|
498
|
-
if (taskCompletedAt) {
|
|
499
|
-
console.log(`inspect_task_completed_at_${target}: ${taskCompletedAt}`);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
for (const [target, taskDependsOn] of Object.entries(paneStatus.recommended_inspect_task_depends_on)) {
|
|
503
|
-
if (taskDependsOn.length > 0) {
|
|
504
|
-
console.log(`inspect_task_depends_on_${target}: ${taskDependsOn.join(' ')}`);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
for (const [target, taskClaimPresent] of Object.entries(paneStatus.recommended_inspect_task_claim_present)) {
|
|
508
|
-
if (typeof taskClaimPresent === 'boolean') {
|
|
509
|
-
console.log(`inspect_task_claim_present_${target}: ${taskClaimPresent}`);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
for (const [target, taskClaimOwner] of Object.entries(paneStatus.recommended_inspect_task_claim_owners)) {
|
|
513
|
-
if (taskClaimOwner) {
|
|
514
|
-
console.log(`inspect_task_claim_owner_${target}: ${taskClaimOwner}`);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
for (const [target, taskClaimToken] of Object.entries(paneStatus.recommended_inspect_task_claim_tokens)) {
|
|
518
|
-
if (taskClaimToken) {
|
|
519
|
-
console.log(`inspect_task_claim_token_${target}: ${taskClaimToken}`);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
for (const [target, taskClaimLease] of Object.entries(paneStatus.recommended_inspect_task_claim_leases)) {
|
|
523
|
-
if (taskClaimLease) {
|
|
524
|
-
console.log(`inspect_task_claim_leased_until_${target}: ${taskClaimLease}`);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
for (const [target, taskClaimLockPath] of Object.entries(paneStatus.recommended_inspect_task_claim_lock_paths)) {
|
|
528
|
-
if (taskClaimLockPath) {
|
|
529
|
-
console.log(`inspect_task_claim_lock_path_${target}: ${taskClaimLockPath}`);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
for (const [target, approvalRequired] of Object.entries(paneStatus.recommended_inspect_approval_required)) {
|
|
533
|
-
if (typeof approvalRequired === 'boolean') {
|
|
534
|
-
console.log(`inspect_approval_required_${target}: ${approvalRequired}`);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
for (const [target, requiresCodeChange] of Object.entries(paneStatus.recommended_inspect_requires_code_change)) {
|
|
538
|
-
if (typeof requiresCodeChange === 'boolean') {
|
|
539
|
-
console.log(`inspect_requires_code_change_${target}: ${requiresCodeChange}`);
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
for (const [target, description] of Object.entries(paneStatus.recommended_inspect_descriptions)) {
|
|
543
|
-
if (description) {
|
|
544
|
-
console.log(`inspect_description_${target}: ${description}`);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
for (const [target, blockedBy] of Object.entries(paneStatus.recommended_inspect_blocked_by)) {
|
|
548
|
-
if (blockedBy.length > 0) {
|
|
549
|
-
console.log(`inspect_blocked_by_${target}: ${blockedBy.join(' ')}`);
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
for (const [target, taskRole] of Object.entries(paneStatus.recommended_inspect_task_roles)) {
|
|
553
|
-
if (taskRole) {
|
|
554
|
-
console.log(`inspect_task_role_${target}: ${taskRole}`);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
for (const [target, taskOwner] of Object.entries(paneStatus.recommended_inspect_task_owners)) {
|
|
558
|
-
if (taskOwner) {
|
|
559
|
-
console.log(`inspect_task_owner_${target}: ${taskOwner}`);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
for (const [target, approvalStatus] of Object.entries(paneStatus.recommended_inspect_approval_statuses)) {
|
|
563
|
-
if (approvalStatus) {
|
|
564
|
-
console.log(`inspect_approval_status_${target}: ${approvalStatus}`);
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
for (const [target, approvalReviewer] of Object.entries(paneStatus.recommended_inspect_approval_reviewers)) {
|
|
568
|
-
if (approvalReviewer) {
|
|
569
|
-
console.log(`inspect_approval_reviewer_${target}: ${approvalReviewer}`);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
for (const [target, approvalReason] of Object.entries(paneStatus.recommended_inspect_approval_reasons)) {
|
|
573
|
-
if (approvalReason) {
|
|
574
|
-
console.log(`inspect_approval_reason_${target}: ${approvalReason}`);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
for (const [target, approvalDecidedAt] of Object.entries(paneStatus.recommended_inspect_approval_decided_at)) {
|
|
578
|
-
if (approvalDecidedAt) {
|
|
579
|
-
console.log(`inspect_approval_decided_at_${target}: ${approvalDecidedAt}`);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
for (const [target, approvalRecordPresent] of Object.entries(paneStatus.recommended_inspect_approval_record_present)) {
|
|
583
|
-
if (typeof approvalRecordPresent === 'boolean') {
|
|
584
|
-
console.log(`inspect_approval_record_present_${target}: ${approvalRecordPresent}`);
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
for (const [target, state] of Object.entries(paneStatus.recommended_inspect_states)) {
|
|
588
|
-
if (state) {
|
|
589
|
-
console.log(`inspect_state_${target}: ${state}`);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
for (const [target, stateReason] of Object.entries(paneStatus.recommended_inspect_state_reasons)) {
|
|
593
|
-
if (stateReason) {
|
|
594
|
-
console.log(`inspect_state_reason_${target}: ${stateReason}`);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
for (const [target, taskId] of Object.entries(paneStatus.recommended_inspect_tasks)) {
|
|
598
|
-
if (taskId) {
|
|
599
|
-
console.log(`inspect_task_${target}: ${taskId}`);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
for (const [target, subject] of Object.entries(paneStatus.recommended_inspect_subjects)) {
|
|
603
|
-
if (subject) {
|
|
604
|
-
console.log(`inspect_subject_${target}: ${subject}`);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
for (const [target, taskPath] of Object.entries(paneStatus.recommended_inspect_task_paths)) {
|
|
608
|
-
if (taskPath) {
|
|
609
|
-
console.log(`inspect_task_path_${target}: ${taskPath}`);
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
for (const [target, approvalPath] of Object.entries(paneStatus.recommended_inspect_approval_paths)) {
|
|
613
|
-
if (approvalPath) {
|
|
614
|
-
console.log(`inspect_approval_path_${target}: ${approvalPath}`);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
for (const [target, workerStateDir] of Object.entries(paneStatus.recommended_inspect_worker_state_dirs)) {
|
|
618
|
-
if (workerStateDir) {
|
|
619
|
-
console.log(`inspect_worker_state_dir_${target}: ${workerStateDir}`);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
for (const [target, workerStatusPath] of Object.entries(paneStatus.recommended_inspect_worker_status_paths)) {
|
|
623
|
-
if (workerStatusPath) {
|
|
624
|
-
console.log(`inspect_worker_status_path_${target}: ${workerStatusPath}`);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
for (const [target, workerHeartbeatPath] of Object.entries(paneStatus.recommended_inspect_worker_heartbeat_paths)) {
|
|
628
|
-
if (workerHeartbeatPath) {
|
|
629
|
-
console.log(`inspect_worker_heartbeat_path_${target}: ${workerHeartbeatPath}`);
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
for (const [target, workerIdentityPath] of Object.entries(paneStatus.recommended_inspect_worker_identity_paths)) {
|
|
633
|
-
if (workerIdentityPath) {
|
|
634
|
-
console.log(`inspect_worker_identity_path_${target}: ${workerIdentityPath}`);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
for (const [target, workerInboxPath] of Object.entries(paneStatus.recommended_inspect_worker_inbox_paths)) {
|
|
638
|
-
if (workerInboxPath) {
|
|
639
|
-
console.log(`inspect_worker_inbox_path_${target}: ${workerInboxPath}`);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
for (const [target, workerMailboxPath] of Object.entries(paneStatus.recommended_inspect_worker_mailbox_paths)) {
|
|
643
|
-
if (workerMailboxPath) {
|
|
644
|
-
console.log(`inspect_worker_mailbox_path_${target}: ${workerMailboxPath}`);
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
for (const [target, workerShutdownRequestPath] of Object.entries(paneStatus.recommended_inspect_worker_shutdown_request_paths)) {
|
|
648
|
-
if (workerShutdownRequestPath) {
|
|
649
|
-
console.log(`inspect_worker_shutdown_request_path_${target}: ${workerShutdownRequestPath}`);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
for (const [target, workerShutdownAckPath] of Object.entries(paneStatus.recommended_inspect_worker_shutdown_ack_paths)) {
|
|
653
|
-
if (workerShutdownAckPath) {
|
|
654
|
-
console.log(`inspect_worker_shutdown_ack_path_${target}: ${workerShutdownAckPath}`);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
for (const [target, teamDirPath] of Object.entries(paneStatus.recommended_inspect_team_dir_paths)) {
|
|
658
|
-
if (teamDirPath) {
|
|
659
|
-
console.log(`inspect_team_dir_path_${target}: ${teamDirPath}`);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
for (const [target, teamConfigPath] of Object.entries(paneStatus.recommended_inspect_team_config_paths)) {
|
|
663
|
-
if (teamConfigPath) {
|
|
664
|
-
console.log(`inspect_team_config_path_${target}: ${teamConfigPath}`);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
for (const [target, teamManifestPath] of Object.entries(paneStatus.recommended_inspect_team_manifest_paths)) {
|
|
668
|
-
if (teamManifestPath) {
|
|
669
|
-
console.log(`inspect_team_manifest_path_${target}: ${teamManifestPath}`);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
for (const [target, teamEventsPath] of Object.entries(paneStatus.recommended_inspect_team_events_paths)) {
|
|
673
|
-
if (teamEventsPath) {
|
|
674
|
-
console.log(`inspect_team_events_path_${target}: ${teamEventsPath}`);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
for (const [target, teamDispatchPath] of Object.entries(paneStatus.recommended_inspect_team_dispatch_paths)) {
|
|
678
|
-
if (teamDispatchPath) {
|
|
679
|
-
console.log(`inspect_team_dispatch_path_${target}: ${teamDispatchPath}`);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
for (const [target, teamPhasePath] of Object.entries(paneStatus.recommended_inspect_team_phase_paths)) {
|
|
683
|
-
if (teamPhasePath) {
|
|
684
|
-
console.log(`inspect_team_phase_path_${target}: ${teamPhasePath}`);
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
for (const [target, teamMonitorSnapshotPath] of Object.entries(paneStatus.recommended_inspect_team_monitor_snapshot_paths)) {
|
|
688
|
-
if (teamMonitorSnapshotPath) {
|
|
689
|
-
console.log(`inspect_team_monitor_snapshot_path_${target}: ${teamMonitorSnapshotPath}`);
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
for (const [target, teamSummarySnapshotPath] of Object.entries(paneStatus.recommended_inspect_team_summary_snapshot_paths)) {
|
|
693
|
-
if (teamSummarySnapshotPath) {
|
|
694
|
-
console.log(`inspect_team_summary_snapshot_path_${target}: ${teamSummarySnapshotPath}`);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
for (const [target, paneId] of Object.entries(paneStatus.recommended_inspect_panes)) {
|
|
698
|
-
if (paneId) {
|
|
699
|
-
console.log(`inspect_pane_${target}: ${paneId}`);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
541
|
+
logInspectEntryDescriptors(inspectEntryDescriptors(paneStatus));
|
|
702
542
|
if (paneStatus.recommended_inspect_command) {
|
|
703
543
|
console.log(`inspect_next: ${paneStatus.recommended_inspect_command}`);
|
|
704
544
|
}
|
|
@@ -709,82 +549,7 @@ function renderTeamPaneStatus(paneStatus) {
|
|
|
709
549
|
console.log(`inspect_priority_${index + 1}: ${command}`);
|
|
710
550
|
}
|
|
711
551
|
for (const [index, item] of paneStatus.recommended_inspect_items.entries()) {
|
|
712
|
-
|
|
713
|
-
const cliPart = item.worker_cli ? ` cli=${item.worker_cli}` : '';
|
|
714
|
-
const rolePart = item.role ? ` role=${item.role}` : '';
|
|
715
|
-
const indexPart = typeof item.index === 'number' ? ` index=${item.index}` : '';
|
|
716
|
-
const alivePart = typeof item.alive === 'boolean' ? ` alive=${item.alive}` : '';
|
|
717
|
-
const turnCountPart = typeof item.turn_count === 'number' ? ` turn_count=${item.turn_count}` : '';
|
|
718
|
-
const turnsWithoutProgressPart = typeof item.turns_without_progress === 'number'
|
|
719
|
-
? ` turns_without_progress=${item.turns_without_progress}`
|
|
720
|
-
: '';
|
|
721
|
-
const lastTurnPart = item.last_turn_at ? ` last_turn_at=${item.last_turn_at}` : '';
|
|
722
|
-
const statusUpdatedPart = item.status_updated_at ? ` status_updated_at=${item.status_updated_at}` : '';
|
|
723
|
-
const pidPart = typeof item.pid === 'number' ? ` pid=${item.pid}` : '';
|
|
724
|
-
const worktreeRepoRootPart = item.worktree_repo_root ? ` worktree_repo_root=${item.worktree_repo_root}` : '';
|
|
725
|
-
const worktreePathPart = item.worktree_path ? ` worktree_path=${item.worktree_path}` : '';
|
|
726
|
-
const worktreeBranchPart = item.worktree_branch ? ` worktree_branch=${item.worktree_branch}` : '';
|
|
727
|
-
const worktreeDetachedPart = typeof item.worktree_detached === 'boolean'
|
|
728
|
-
? ` worktree_detached=${item.worktree_detached}`
|
|
729
|
-
: '';
|
|
730
|
-
const worktreeCreatedPart = typeof item.worktree_created === 'boolean'
|
|
731
|
-
? ` worktree_created=${item.worktree_created}`
|
|
732
|
-
: '';
|
|
733
|
-
const teamStateRootPart = item.team_state_root ? ` team_state_root=${item.team_state_root}` : '';
|
|
734
|
-
const workdirPart = item.working_dir ? ` workdir=${item.working_dir}` : '';
|
|
735
|
-
const assignedTasksPart = item.assigned_tasks.length > 0 ? ` assigned_tasks=${item.assigned_tasks.join(',')}` : '';
|
|
736
|
-
const taskStatusPart = item.task_status ? ` task_status=${item.task_status}` : '';
|
|
737
|
-
const taskResultPart = item.task_result ? ` task_result=${item.task_result}` : '';
|
|
738
|
-
const taskErrorPart = item.task_error ? ` task_error=${item.task_error}` : '';
|
|
739
|
-
const taskVersionPart = typeof item.task_version === 'number' ? ` task_version=${item.task_version}` : '';
|
|
740
|
-
const taskCreatedAtPart = item.task_created_at ? ` task_created_at=${item.task_created_at}` : '';
|
|
741
|
-
const taskCompletedAtPart = item.task_completed_at ? ` task_completed_at=${item.task_completed_at}` : '';
|
|
742
|
-
const taskDependsOnPart = item.task_depends_on.length > 0 ? ` task_depends_on=${item.task_depends_on.join(',')}` : '';
|
|
743
|
-
const taskClaimPresentPart = typeof item.task_claim_present === 'boolean'
|
|
744
|
-
? ` task_claim_present=${item.task_claim_present}`
|
|
745
|
-
: '';
|
|
746
|
-
const taskClaimOwnerPart = item.task_claim_owner ? ` task_claim_owner=${item.task_claim_owner}` : '';
|
|
747
|
-
const taskClaimTokenPart = item.task_claim_token ? ` task_claim_token=${item.task_claim_token}` : '';
|
|
748
|
-
const taskClaimLeasePart = item.task_claim_leased_until ? ` task_claim_leased_until=${item.task_claim_leased_until}` : '';
|
|
749
|
-
const taskClaimLockPathPart = item.task_claim_lock_path ? ` task_claim_lock_path=${item.task_claim_lock_path}` : '';
|
|
750
|
-
const approvalRequiredPart = typeof item.approval_required === 'boolean' ? ` approval_required=${item.approval_required}` : '';
|
|
751
|
-
const requiresCodeChangePart = typeof item.requires_code_change === 'boolean'
|
|
752
|
-
? ` requires_code_change=${item.requires_code_change}`
|
|
753
|
-
: '';
|
|
754
|
-
const taskDescriptionPart = item.task_description ? ` description=${item.task_description}` : '';
|
|
755
|
-
const blockedByPart = item.blocked_by.length > 0 ? ` blocked_by=${item.blocked_by.join(',')}` : '';
|
|
756
|
-
const taskRolePart = item.task_role ? ` task_role=${item.task_role}` : '';
|
|
757
|
-
const taskOwnerPart = item.task_owner ? ` task_owner=${item.task_owner}` : '';
|
|
758
|
-
const approvalStatusPart = item.approval_status ? ` approval_status=${item.approval_status}` : '';
|
|
759
|
-
const approvalReviewerPart = item.approval_reviewer ? ` approval_reviewer=${item.approval_reviewer}` : '';
|
|
760
|
-
const approvalReasonPart = item.approval_reason ? ` approval_reason=${item.approval_reason}` : '';
|
|
761
|
-
const approvalDecidedAtPart = item.approval_decided_at ? ` approval_decided_at=${item.approval_decided_at}` : '';
|
|
762
|
-
const approvalRecordPresentPart = typeof item.approval_record_present === 'boolean'
|
|
763
|
-
? ` approval_record_present=${item.approval_record_present}`
|
|
764
|
-
: '';
|
|
765
|
-
const statePart = item.state ? ` state=${item.state}` : '';
|
|
766
|
-
const stateReasonPart = item.state_reason ? ` state_reason=${item.state_reason}` : '';
|
|
767
|
-
const taskPart = item.task_id ? ` task=${item.task_id}` : '';
|
|
768
|
-
const subjectPart = item.task_subject ? ` subject=${item.task_subject}` : '';
|
|
769
|
-
const taskPathPart = item.task_path ? ` task_path=${item.task_path}` : '';
|
|
770
|
-
const approvalPathPart = item.approval_path ? ` approval_path=${item.approval_path}` : '';
|
|
771
|
-
const workerStateDirPart = item.worker_state_dir ? ` worker_state_dir=${item.worker_state_dir}` : '';
|
|
772
|
-
const workerStatusPathPart = item.worker_status_path ? ` worker_status_path=${item.worker_status_path}` : '';
|
|
773
|
-
const workerHeartbeatPathPart = item.worker_heartbeat_path ? ` worker_heartbeat_path=${item.worker_heartbeat_path}` : '';
|
|
774
|
-
const workerIdentityPathPart = item.worker_identity_path ? ` worker_identity_path=${item.worker_identity_path}` : '';
|
|
775
|
-
const workerInboxPathPart = item.worker_inbox_path ? ` worker_inbox_path=${item.worker_inbox_path}` : '';
|
|
776
|
-
const workerMailboxPathPart = item.worker_mailbox_path ? ` worker_mailbox_path=${item.worker_mailbox_path}` : '';
|
|
777
|
-
const workerShutdownRequestPathPart = item.worker_shutdown_request_path ? ` worker_shutdown_request_path=${item.worker_shutdown_request_path}` : '';
|
|
778
|
-
const workerShutdownAckPathPart = item.worker_shutdown_ack_path ? ` worker_shutdown_ack_path=${item.worker_shutdown_ack_path}` : '';
|
|
779
|
-
const teamDirPathPart = item.team_dir_path ? ` team_dir_path=${item.team_dir_path}` : '';
|
|
780
|
-
const teamConfigPathPart = item.team_config_path ? ` team_config_path=${item.team_config_path}` : '';
|
|
781
|
-
const teamManifestPathPart = item.team_manifest_path ? ` team_manifest_path=${item.team_manifest_path}` : '';
|
|
782
|
-
const teamEventsPathPart = item.team_events_path ? ` team_events_path=${item.team_events_path}` : '';
|
|
783
|
-
const teamDispatchPathPart = item.team_dispatch_path ? ` team_dispatch_path=${item.team_dispatch_path}` : '';
|
|
784
|
-
const teamPhasePathPart = item.team_phase_path ? ` team_phase_path=${item.team_phase_path}` : '';
|
|
785
|
-
const teamMonitorSnapshotPathPart = item.team_monitor_snapshot_path ? ` team_monitor_snapshot_path=${item.team_monitor_snapshot_path}` : '';
|
|
786
|
-
const teamSummarySnapshotPathPart = item.team_summary_snapshot_path ? ` team_summary_snapshot_path=${item.team_summary_snapshot_path}` : '';
|
|
787
|
-
console.log(`inspect_item_${index + 1}: target=${item.target}${panePart}${cliPart}${rolePart}${indexPart}${alivePart}${turnCountPart}${turnsWithoutProgressPart}${lastTurnPart}${statusUpdatedPart}${pidPart}${worktreeRepoRootPart}${worktreePathPart}${worktreeBranchPart}${worktreeDetachedPart}${worktreeCreatedPart}${teamStateRootPart}${workdirPart}${assignedTasksPart}${taskStatusPart}${taskResultPart}${taskErrorPart}${taskVersionPart}${taskCreatedAtPart}${taskCompletedAtPart}${taskDependsOnPart}${taskClaimPresentPart}${taskClaimOwnerPart}${taskClaimTokenPart}${taskClaimLeasePart}${taskClaimLockPathPart}${approvalRequiredPart}${requiresCodeChangePart}${taskDescriptionPart}${blockedByPart}${taskRolePart}${taskOwnerPart}${approvalStatusPart}${approvalReviewerPart}${approvalReasonPart}${approvalDecidedAtPart}${approvalRecordPresentPart}${stateReasonPart}${taskPart}${subjectPart}${taskPathPart}${approvalPathPart}${workerStateDirPart}${workerStatusPathPart}${workerHeartbeatPathPart}${workerIdentityPathPart}${workerInboxPathPart}${workerMailboxPathPart}${workerShutdownRequestPathPart}${workerShutdownAckPathPart}${teamDirPathPart}${teamConfigPathPart}${teamManifestPathPart}${teamEventsPathPart}${teamDispatchPathPart}${teamPhasePathPart}${teamMonitorSnapshotPathPart}${teamSummarySnapshotPathPart} reason=${item.reason}${statePart} command=${item.command}`);
|
|
552
|
+
console.log(formatInspectItemLine(index, item));
|
|
788
553
|
}
|
|
789
554
|
for (const [target, command] of Object.entries(paneStatus.sparkshell_commands)) {
|
|
790
555
|
console.log(`inspect_${target}: ${command}`);
|