oh-my-codex 0.13.2 → 0.14.1
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/autoresearch/__tests__/skill-validation.test.d.ts +2 -0
- package/dist/autoresearch/__tests__/skill-validation.test.d.ts.map +1 -0
- package/dist/autoresearch/__tests__/skill-validation.test.js +91 -0
- package/dist/autoresearch/__tests__/skill-validation.test.js.map +1 -0
- package/dist/autoresearch/skill-validation.d.ts +13 -0
- package/dist/autoresearch/skill-validation.d.ts.map +1 -0
- package/dist/autoresearch/skill-validation.js +165 -0
- package/dist/autoresearch/skill-validation.js.map +1 -0
- package/dist/catalog/__tests__/schema.test.js +6 -0
- package/dist/catalog/__tests__/schema.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js +236 -273
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch.test.js +64 -653
- package/dist/cli/__tests__/autoresearch.test.js.map +1 -1
- 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 +18 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/nested-help-routing.test.js +2 -1
- package/dist/cli/__tests__/nested-help-routing.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.d.ts +2 -0
- package/dist/cli/__tests__/question.test.d.ts.map +1 -0
- package/dist/cli/__tests__/question.test.js +166 -0
- package/dist/cli/__tests__/question.test.js.map +1 -0
- package/dist/cli/__tests__/session-search-help.test.js +1 -1
- package/dist/cli/__tests__/session-search-help.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__/setup-skills-overwrite.test.js +2 -0
- package/dist/cli/__tests__/setup-skills-overwrite.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/autoresearch-guided.d.ts +24 -7
- package/dist/cli/autoresearch-guided.d.ts.map +1 -1
- package/dist/cli/autoresearch-guided.js +189 -130
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/autoresearch.d.ts +3 -2
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +29 -305
- package/dist/cli/autoresearch.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +43 -0
- package/dist/cli/doctor.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 +15 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/question.d.ts +3 -0
- package/dist/cli/question.d.ts.map +1 -0
- package/dist/cli/question.js +182 -0
- package/dist/cli/question.js.map +1 -0
- 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__/analyze-routing-contract.test.js +22 -13
- package/dist/hooks/__tests__/analyze-routing-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/anti-slop-workflow.test.js +3 -3
- package/dist/hooks/__tests__/anti-slop-workflow.test.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__/debugger-log-recency-contract.test.js +2 -2
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +51 -5
- 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__/explore-sparkshell-guidance-contract.test.js +2 -2
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +308 -17
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +570 -2
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +717 -16
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +25 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +894 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +34 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +132 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js +22 -4
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +4 -2
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts +1 -0
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js +19 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +28 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.js +5 -4
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-team-routing.test.js +2 -2
- package/dist/hooks/__tests__/prompt-team-routing.test.js.map +1 -1
- package/dist/hooks/__tests__/triage-config.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-config.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-config.test.js +211 -0
- package/dist/hooks/__tests__/triage-config.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-heuristic.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js +230 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-state.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-state.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-state.test.js +426 -0
- package/dist/hooks/__tests__/triage-state.test.js.map +1 -0
- package/dist/hooks/keyword-detector.d.ts +26 -7
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +97 -26
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +16 -9
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +28 -1
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/triage-config.d.ts +33 -0
- package/dist/hooks/triage-config.d.ts.map +1 -0
- package/dist/hooks/triage-config.js +87 -0
- package/dist/hooks/triage-config.js.map +1 -0
- package/dist/hooks/triage-heuristic.d.ts +20 -0
- package/dist/hooks/triage-heuristic.d.ts.map +1 -0
- package/dist/hooks/triage-heuristic.js +210 -0
- package/dist/hooks/triage-heuristic.js.map +1 -0
- package/dist/hooks/triage-state.d.ts +63 -0
- package/dist/hooks/triage-state.d.ts.map +1 -0
- package/dist/hooks/triage-state.js +138 -0
- package/dist/hooks/triage-state.js.map +1 -0
- package/dist/hud/__tests__/reconcile.test.js +20 -0
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/reconcile.d.ts +1 -0
- package/dist/hud/reconcile.d.ts.map +1 -1
- package/dist/hud/reconcile.js +2 -1
- package/dist/hud/reconcile.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +5 -24
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +127 -0
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +1 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +3 -11
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-server.d.ts +25 -0
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +41 -0
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/modes/__tests__/base-ralph-contract.test.js +15 -0
- package/dist/modes/__tests__/base-ralph-contract.test.js.map +1 -1
- package/dist/modes/base.d.ts +1 -0
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +22 -6
- package/dist/modes/base.js.map +1 -1
- package/dist/notifications/__tests__/index.test.js +75 -0
- 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/index.d.ts.map +1 -1
- package/dist/notifications/index.js +39 -22
- package/dist/notifications/index.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/openclaw/index.d.ts +5 -3
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +5 -3
- package/dist/openclaw/index.js.map +1 -1
- package/dist/question/__tests__/client.test.d.ts +2 -0
- package/dist/question/__tests__/client.test.d.ts.map +1 -0
- package/dist/question/__tests__/client.test.js +70 -0
- package/dist/question/__tests__/client.test.js.map +1 -0
- package/dist/question/__tests__/deep-interview.test.d.ts +2 -0
- package/dist/question/__tests__/deep-interview.test.d.ts.map +1 -0
- package/dist/question/__tests__/deep-interview.test.js +118 -0
- package/dist/question/__tests__/deep-interview.test.js.map +1 -0
- package/dist/question/__tests__/policy.test.d.ts +2 -0
- package/dist/question/__tests__/policy.test.d.ts.map +1 -0
- package/dist/question/__tests__/policy.test.js +107 -0
- package/dist/question/__tests__/policy.test.js.map +1 -0
- package/dist/question/__tests__/renderer.test.d.ts +2 -0
- package/dist/question/__tests__/renderer.test.d.ts.map +1 -0
- package/dist/question/__tests__/renderer.test.js +238 -0
- package/dist/question/__tests__/renderer.test.js.map +1 -0
- package/dist/question/__tests__/state.test.d.ts +2 -0
- package/dist/question/__tests__/state.test.d.ts.map +1 -0
- package/dist/question/__tests__/state.test.js +75 -0
- package/dist/question/__tests__/state.test.js.map +1 -0
- package/dist/question/__tests__/types.test.d.ts +2 -0
- package/dist/question/__tests__/types.test.d.ts.map +1 -0
- package/dist/question/__tests__/types.test.js +44 -0
- package/dist/question/__tests__/types.test.js.map +1 -0
- package/dist/question/__tests__/ui.test.d.ts +2 -0
- package/dist/question/__tests__/ui.test.d.ts.map +1 -0
- package/dist/question/__tests__/ui.test.js +169 -0
- package/dist/question/__tests__/ui.test.js.map +1 -0
- package/dist/question/client.d.ts +54 -0
- package/dist/question/client.d.ts.map +1 -0
- package/dist/question/client.js +77 -0
- package/dist/question/client.js.map +1 -0
- package/dist/question/deep-interview.d.ts +30 -0
- package/dist/question/deep-interview.d.ts.map +1 -0
- package/dist/question/deep-interview.js +118 -0
- package/dist/question/deep-interview.js.map +1 -0
- package/dist/question/policy.d.ts +18 -0
- package/dist/question/policy.d.ts.map +1 -0
- package/dist/question/policy.js +77 -0
- package/dist/question/policy.js.map +1 -0
- package/dist/question/renderer.d.ts +20 -0
- package/dist/question/renderer.d.ts.map +1 -0
- package/dist/question/renderer.js +190 -0
- package/dist/question/renderer.js.map +1 -0
- package/dist/question/state.d.ts +19 -0
- package/dist/question/state.d.ts.map +1 -0
- package/dist/question/state.js +108 -0
- package/dist/question/state.js.map +1 -0
- package/dist/question/types.d.ts +66 -0
- package/dist/question/types.d.ts.map +1 -0
- package/dist/question/types.js +82 -0
- package/dist/question/types.js.map +1 -0
- package/dist/question/ui.d.ts +38 -0
- package/dist/question/ui.d.ts.map +1 -0
- package/dist/question/ui.js +321 -0
- package/dist/question/ui.js.map +1 -0
- package/dist/ralph/contract.d.ts +1 -1
- package/dist/ralph/contract.d.ts.map +1 -1
- package/dist/ralph/contract.js +4 -1
- package/dist/ralph/contract.js.map +1 -1
- package/dist/ralplan/runtime.js +1 -1
- package/dist/ralplan/runtime.js.map +1 -1
- package/dist/runtime/__tests__/run-loop.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-loop.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-loop.test.js +35 -0
- package/dist/runtime/__tests__/run-loop.test.js.map +1 -0
- package/dist/runtime/__tests__/run-outcome.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-outcome.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-outcome.test.js +102 -0
- package/dist/runtime/__tests__/run-outcome.test.js.map +1 -0
- 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 +45 -0
- package/dist/runtime/run-loop.d.ts.map +1 -0
- package/dist/runtime/run-loop.js +51 -0
- package/dist/runtime/run-loop.js.map +1 -0
- package/dist/runtime/run-outcome.d.ts +46 -0
- package/dist/runtime/run-outcome.d.ts.map +1 -0
- package/dist/runtime/run-outcome.js +285 -0
- package/dist/runtime/run-outcome.js.map +1 -0
- package/dist/runtime/run-state.d.ts +40 -0
- package/dist/runtime/run-state.d.ts.map +1 -0
- package/dist/runtime/run-state.js +120 -0
- package/dist/runtime/run-state.js.map +1 -0
- 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 +1459 -126
- 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 +3 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +308 -61
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +81 -2
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.d.ts +27 -0
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.js +83 -20
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +64 -38
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.js +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -1
- package/dist/scripts/notify-hook.js +15 -5
- package/dist/scripts/notify-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/scripts/sync-prompt-guidance-fragments.js +5 -0
- package/dist/scripts/sync-prompt-guidance-fragments.js.map +1 -1
- package/dist/state/__tests__/operations-ralph-phase.test.js +21 -0
- package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +18 -0
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/workflow-transition.test.js +11 -0
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +15 -0
- package/dist/state/operations.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +14 -1
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +3 -1
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/team/__tests__/followup-planner.test.js +15 -0
- package/dist/team/__tests__/followup-planner.test.js.map +1 -1
- package/dist/team/__tests__/role-router.test.js +47 -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/followup-planner.d.ts.map +1 -1
- package/dist/team/followup-planner.js +31 -9
- package/dist/team/followup-planner.js.map +1 -1
- package/dist/team/role-router.d.ts.map +1 -1
- package/dist/team/role-router.js +73 -0
- package/dist/team/role-router.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 +4 -2
- package/prompts/architect.md +4 -0
- package/prompts/code-reviewer.md +3 -0
- package/prompts/dependency-expert.md +3 -0
- package/prompts/executor.md +5 -0
- package/prompts/explore.md +2 -0
- package/prompts/planner.md +5 -0
- package/prompts/product-analyst.md +8 -8
- package/prompts/researcher.md +78 -30
- package/prompts/verifier.md +4 -0
- package/skills/autoresearch/SKILL.md +68 -0
- package/skills/code-review/SKILL.md +94 -28
- package/skills/deep-interview/SKILL.md +100 -9
- package/skills/help/SKILL.md +3 -1
- package/skills/ralplan/SKILL.md +1 -0
- package/skills/team/SKILL.md +1 -0
- package/skills/ultrawork/SKILL.md +1 -0
- package/src/scripts/__tests__/codex-native-hook.test.ts +2373 -692
- package/src/scripts/__tests__/postinstall.test.ts +210 -0
- package/src/scripts/codex-native-hook.ts +365 -66
- package/src/scripts/notify-fallback-watcher.ts +92 -2
- package/src/scripts/notify-hook/auto-nudge.ts +89 -20
- package/src/scripts/notify-hook/managed-tmux.ts +70 -31
- package/src/scripts/notify-hook/ralph-session-resume.ts +1 -1
- package/src/scripts/notify-hook.ts +23 -5
- package/src/scripts/postinstall-bootstrap.js +23 -0
- package/src/scripts/postinstall.ts +161 -0
- package/src/scripts/sync-prompt-guidance-fragments.ts +4 -0
- package/templates/AGENTS.md +48 -37
- package/templates/catalog-manifest.json +7 -0
- package/templates/model-instructions/explore-lightweight-AGENTS.md +11 -0
- package/templates/model-instructions/sparkshell-lightweight-AGENTS.md +10 -0
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { isLaunchReadyEvaluatorCommand, resolveAutoresearchDeepInterviewResult, writeAutoresearchDeepInterviewArtifacts, writeAutoresearchDraftArtifact, } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
async function initRepo() {
|
|
12
|
-
const cwd = await mkdtemp(join(tmpdir(), 'omx-autoresearch-guided-test-'));
|
|
13
|
-
execFileSync('git', ['init'], { cwd, stdio: 'ignore' });
|
|
14
|
-
execFileSync('git', ['config', 'user.email', 'test@example.com'], { cwd, stdio: 'ignore' });
|
|
15
|
-
execFileSync('git', ['config', 'user.name', 'Test User'], { cwd, stdio: 'ignore' });
|
|
16
|
-
const { writeFile } = await import('node:fs/promises');
|
|
17
|
-
await writeFile(join(cwd, 'README.md'), 'hello\n', 'utf-8');
|
|
18
|
-
execFileSync('git', ['add', 'README.md'], { cwd, stdio: 'ignore' });
|
|
19
|
-
execFileSync('git', ['commit', '-m', 'init'], { cwd, stdio: 'ignore' });
|
|
20
|
-
return cwd;
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { mkdtemp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { describe, it } from "node:test";
|
|
6
|
+
import { OmxQuestionError } from "../../question/client.js";
|
|
7
|
+
import { buildAutoresearchDeepInterviewPrompt, parseInitArgs, runAutoresearchNoviceBridge, } from "../autoresearch-guided.js";
|
|
8
|
+
import { isLaunchReadyEvaluatorCommand, resolveAutoresearchDeepInterviewResult, writeAutoresearchDeepInterviewArtifacts, writeAutoresearchDraftArtifact, } from "../autoresearch-intake.js";
|
|
9
|
+
async function initWorkspace() {
|
|
10
|
+
return mkdtemp(join(tmpdir(), "omx-autoresearch-guided-test-"));
|
|
21
11
|
}
|
|
22
12
|
function withMockedTty(fn) {
|
|
23
|
-
const descriptor = Object.getOwnPropertyDescriptor(process.stdin,
|
|
24
|
-
Object.defineProperty(process.stdin,
|
|
13
|
+
const descriptor = Object.getOwnPropertyDescriptor(process.stdin, "isTTY");
|
|
14
|
+
Object.defineProperty(process.stdin, "isTTY", {
|
|
15
|
+
configurable: true,
|
|
16
|
+
value: true,
|
|
17
|
+
});
|
|
25
18
|
return fn().finally(() => {
|
|
26
19
|
if (descriptor) {
|
|
27
|
-
Object.defineProperty(process.stdin,
|
|
20
|
+
Object.defineProperty(process.stdin, "isTTY", descriptor);
|
|
28
21
|
}
|
|
29
22
|
else {
|
|
30
|
-
Object.defineProperty(process.stdin,
|
|
23
|
+
Object.defineProperty(process.stdin, "isTTY", {
|
|
24
|
+
configurable: true,
|
|
25
|
+
value: false,
|
|
26
|
+
});
|
|
31
27
|
}
|
|
32
28
|
});
|
|
33
29
|
}
|
|
@@ -35,222 +31,122 @@ function makeFakeIo(answers) {
|
|
|
35
31
|
const queue = [...answers];
|
|
36
32
|
return {
|
|
37
33
|
async question() {
|
|
38
|
-
return queue.shift() ??
|
|
34
|
+
return queue.shift() ?? "";
|
|
39
35
|
},
|
|
40
36
|
close() { },
|
|
41
37
|
};
|
|
42
38
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
keepPolicy: 'pass_only',
|
|
74
|
-
slug: 'db-perf',
|
|
75
|
-
repoRoot: repo,
|
|
76
|
-
});
|
|
77
|
-
const sandboxContent = await readFile(join(result.missionDir, 'sandbox.md'), 'utf-8');
|
|
78
|
-
assert.match(sandboxContent, /^---\n/);
|
|
79
|
-
assert.match(sandboxContent, /evaluator:/);
|
|
80
|
-
assert.match(sandboxContent, /command: node scripts\/eval-perf\.js/);
|
|
81
|
-
assert.match(sandboxContent, /format: json/);
|
|
82
|
-
assert.match(sandboxContent, /keep_policy: pass_only/);
|
|
83
|
-
}
|
|
84
|
-
finally {
|
|
85
|
-
await rm(repo, { recursive: true, force: true });
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
it('generated sandbox.md passes parseSandboxContract validation', async () => {
|
|
89
|
-
const repo = await initRepo();
|
|
90
|
-
try {
|
|
91
|
-
const result = await initAutoresearchMission({
|
|
92
|
-
topic: 'Fix flaky tests',
|
|
93
|
-
evaluatorCommand: 'bash run-tests.sh',
|
|
94
|
-
keepPolicy: 'score_improvement',
|
|
95
|
-
slug: 'flaky-tests',
|
|
96
|
-
repoRoot: repo,
|
|
97
|
-
});
|
|
98
|
-
const sandboxContent = await readFile(join(result.missionDir, 'sandbox.md'), 'utf-8');
|
|
99
|
-
const parsed = parseSandboxContract(sandboxContent);
|
|
100
|
-
assert.equal(parsed.evaluator.command, 'bash run-tests.sh');
|
|
101
|
-
assert.equal(parsed.evaluator.format, 'json');
|
|
102
|
-
assert.equal(parsed.evaluator.keep_policy, 'score_improvement');
|
|
103
|
-
}
|
|
104
|
-
finally {
|
|
105
|
-
await rm(repo, { recursive: true, force: true });
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
it('throws if mission directory already exists', async () => {
|
|
109
|
-
const repo = await initRepo();
|
|
110
|
-
try {
|
|
111
|
-
const missionDir = join(repo, 'missions', 'existing');
|
|
112
|
-
await mkdir(missionDir, { recursive: true });
|
|
113
|
-
await assert.rejects(() => initAutoresearchMission({
|
|
114
|
-
topic: 'duplicate',
|
|
115
|
-
evaluatorCommand: 'echo ok',
|
|
116
|
-
keepPolicy: 'pass_only',
|
|
117
|
-
slug: 'existing',
|
|
118
|
-
repoRoot: repo,
|
|
119
|
-
}), /already exists/);
|
|
120
|
-
}
|
|
121
|
-
finally {
|
|
122
|
-
await rm(repo, { recursive: true, force: true });
|
|
39
|
+
function makeFakeStructuredQuestionAsker(answers, questions = []) {
|
|
40
|
+
const queue = [...answers];
|
|
41
|
+
return async (input) => {
|
|
42
|
+
questions.push({
|
|
43
|
+
question: input.question,
|
|
44
|
+
options: input.options.map((option) => option.value),
|
|
45
|
+
allowOther: input.allow_other,
|
|
46
|
+
});
|
|
47
|
+
const next = queue.shift() ?? "";
|
|
48
|
+
const matchingOption = input.options.find((option) => option.value === next);
|
|
49
|
+
if (matchingOption) {
|
|
50
|
+
return {
|
|
51
|
+
ok: true,
|
|
52
|
+
question_id: `q-${questions.length}`,
|
|
53
|
+
prompt: {
|
|
54
|
+
header: input.header,
|
|
55
|
+
question: input.question,
|
|
56
|
+
options: input.options,
|
|
57
|
+
allow_other: input.allow_other,
|
|
58
|
+
other_label: input.other_label ?? "Other",
|
|
59
|
+
multi_select: input.multi_select ?? false,
|
|
60
|
+
source: input.source,
|
|
61
|
+
},
|
|
62
|
+
answer: {
|
|
63
|
+
kind: "option",
|
|
64
|
+
value: matchingOption.value,
|
|
65
|
+
selected_labels: [matchingOption.label],
|
|
66
|
+
selected_values: [matchingOption.value],
|
|
67
|
+
},
|
|
68
|
+
};
|
|
123
69
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
70
|
+
return {
|
|
71
|
+
ok: true,
|
|
72
|
+
question_id: `q-${questions.length}`,
|
|
73
|
+
prompt: {
|
|
74
|
+
header: input.header,
|
|
75
|
+
question: input.question,
|
|
76
|
+
options: input.options,
|
|
77
|
+
allow_other: input.allow_other,
|
|
78
|
+
other_label: input.other_label ?? "Other",
|
|
79
|
+
multi_select: input.multi_select ?? false,
|
|
80
|
+
source: input.source,
|
|
81
|
+
},
|
|
82
|
+
answer: {
|
|
83
|
+
kind: "other",
|
|
84
|
+
value: next,
|
|
85
|
+
selected_labels: [input.other_label ?? "Other"],
|
|
86
|
+
selected_values: [next],
|
|
87
|
+
other_text: next,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
describe("parseInitArgs", () => {
|
|
93
|
+
it("parses all flags with space-separated values", () => {
|
|
128
94
|
const result = parseInitArgs([
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
"--topic",
|
|
96
|
+
"my topic",
|
|
97
|
+
"--evaluator",
|
|
98
|
+
"node eval.js",
|
|
99
|
+
"--keep-policy",
|
|
100
|
+
"pass_only",
|
|
101
|
+
"--slug",
|
|
102
|
+
"my-slug",
|
|
133
103
|
]);
|
|
134
|
-
assert.equal(result.topic,
|
|
135
|
-
assert.equal(result.evaluatorCommand,
|
|
136
|
-
assert.equal(result.keepPolicy,
|
|
137
|
-
assert.equal(result.slug,
|
|
104
|
+
assert.equal(result.topic, "my topic");
|
|
105
|
+
assert.equal(result.evaluatorCommand, "node eval.js");
|
|
106
|
+
assert.equal(result.keepPolicy, "pass_only");
|
|
107
|
+
assert.equal(result.slug, "my-slug");
|
|
138
108
|
});
|
|
139
|
-
it(
|
|
109
|
+
it("parses all flags with = syntax", () => {
|
|
140
110
|
const result = parseInitArgs([
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
111
|
+
"--topic=my topic",
|
|
112
|
+
"--evaluator=node eval.js",
|
|
113
|
+
"--keep-policy=score_improvement",
|
|
114
|
+
"--slug=my-slug",
|
|
145
115
|
]);
|
|
146
|
-
assert.equal(result.topic,
|
|
147
|
-
assert.equal(result.evaluatorCommand,
|
|
148
|
-
assert.equal(result.keepPolicy,
|
|
149
|
-
assert.equal(result.slug,
|
|
116
|
+
assert.equal(result.topic, "my topic");
|
|
117
|
+
assert.equal(result.evaluatorCommand, "node eval.js");
|
|
118
|
+
assert.equal(result.keepPolicy, "score_improvement");
|
|
119
|
+
assert.equal(result.slug, "my-slug");
|
|
150
120
|
});
|
|
151
|
-
it(
|
|
152
|
-
const result = parseInitArgs([
|
|
153
|
-
assert.equal(result.topic,
|
|
121
|
+
it("returns partial result when some flags are missing", () => {
|
|
122
|
+
const result = parseInitArgs(["--topic", "my topic"]);
|
|
123
|
+
assert.equal(result.topic, "my topic");
|
|
154
124
|
assert.equal(result.evaluatorCommand, undefined);
|
|
155
125
|
assert.equal(result.keepPolicy, undefined);
|
|
156
126
|
assert.equal(result.slug, undefined);
|
|
157
127
|
});
|
|
158
|
-
it(
|
|
159
|
-
assert.throws(() => parseInitArgs([
|
|
128
|
+
it("throws on invalid keep-policy", () => {
|
|
129
|
+
assert.throws(() => parseInitArgs(["--keep-policy", "invalid"]), /must be one of/);
|
|
160
130
|
});
|
|
161
|
-
it(
|
|
162
|
-
assert.throws(() => parseInitArgs([
|
|
131
|
+
it("throws on unknown flags", () => {
|
|
132
|
+
assert.throws(() => parseInitArgs(["--unknown-flag", "value"]), /Unknown init flag: --unknown-flag/);
|
|
163
133
|
});
|
|
164
|
-
it(
|
|
165
|
-
const result = parseInitArgs([
|
|
134
|
+
it("sanitizes slug via slugifyMissionName", () => {
|
|
135
|
+
const result = parseInitArgs(["--slug", "../../etc/cron.d/omx"]);
|
|
166
136
|
assert.ok(result.slug);
|
|
167
137
|
assert.doesNotMatch(result.slug, /\.\./);
|
|
168
138
|
assert.doesNotMatch(result.slug, /\//);
|
|
169
139
|
});
|
|
170
140
|
});
|
|
171
|
-
describe(
|
|
172
|
-
it(
|
|
173
|
-
const
|
|
174
|
-
assert.equal(typeof result, 'boolean');
|
|
175
|
-
});
|
|
176
|
-
it('launches background tmux sessions with an absolute omx entry path even from a relative launcher', async () => {
|
|
177
|
-
const repo = await initRepo();
|
|
178
|
-
const fakeBin = await mkdtemp(join(tmpdir(), 'omx-autoresearch-guided-bin-'));
|
|
179
|
-
const startupCwd = await mkdtemp(join(tmpdir(), 'omx-autoresearch-guided-start-'));
|
|
180
|
-
const missionDir = join(repo, 'missions', 'demo');
|
|
181
|
-
const tmuxLog = join(repo, 'tmux.log');
|
|
182
|
-
const previousPath = process.env.PATH;
|
|
183
|
-
const previousEntryPath = process.env[OMX_ENTRY_PATH_ENV];
|
|
184
|
-
const previousStartupCwd = process.env[OMX_STARTUP_CWD_ENV];
|
|
185
|
-
try {
|
|
186
|
-
await mkdir(missionDir, { recursive: true });
|
|
187
|
-
const launcherDir = join(startupCwd, 'dist', 'cli');
|
|
188
|
-
const launcherPath = join(launcherDir, 'omx.js');
|
|
189
|
-
await mkdir(launcherDir, { recursive: true });
|
|
190
|
-
await writeFile(launcherPath, '#!/usr/bin/env node\n', 'utf-8');
|
|
191
|
-
const fakeTmuxPath = join(fakeBin, 'tmux');
|
|
192
|
-
await writeFile(fakeTmuxPath, `#!/bin/sh
|
|
193
|
-
printf '%s\n' "$*" >>"${tmuxLog}"
|
|
194
|
-
case "$1" in
|
|
195
|
-
-V)
|
|
196
|
-
exit 0
|
|
197
|
-
;;
|
|
198
|
-
has-session)
|
|
199
|
-
exit 1
|
|
200
|
-
;;
|
|
201
|
-
new-session)
|
|
202
|
-
exit 0
|
|
203
|
-
;;
|
|
204
|
-
*)
|
|
205
|
-
exit 0
|
|
206
|
-
;;
|
|
207
|
-
esac
|
|
208
|
-
`, 'utf-8');
|
|
209
|
-
execFileSync('chmod', ['+x', fakeTmuxPath], { stdio: 'ignore' });
|
|
210
|
-
process.env.PATH = `${fakeBin}:${previousPath || ''}`;
|
|
211
|
-
delete process.env[OMX_ENTRY_PATH_ENV];
|
|
212
|
-
process.env[OMX_STARTUP_CWD_ENV] = startupCwd;
|
|
213
|
-
const previousArgv = process.argv;
|
|
214
|
-
process.argv = [previousArgv[0] || 'node', 'dist/cli/omx.js'];
|
|
215
|
-
try {
|
|
216
|
-
spawnAutoresearchTmux(missionDir, 'demo');
|
|
217
|
-
}
|
|
218
|
-
finally {
|
|
219
|
-
process.argv = previousArgv;
|
|
220
|
-
}
|
|
221
|
-
const tmuxOutput = await readFile(tmuxLog, 'utf-8');
|
|
222
|
-
assert.match(tmuxOutput, /new-session -d -s omx-autoresearch-demo/);
|
|
223
|
-
assert.match(tmuxOutput, new RegExp(escapeRegExp(launcherPath)));
|
|
224
|
-
assert.doesNotMatch(tmuxOutput, /dist\/cli\/omx\.js autoresearch/);
|
|
225
|
-
}
|
|
226
|
-
finally {
|
|
227
|
-
if (typeof previousPath === 'string')
|
|
228
|
-
process.env.PATH = previousPath;
|
|
229
|
-
else
|
|
230
|
-
delete process.env.PATH;
|
|
231
|
-
if (typeof previousEntryPath === 'string')
|
|
232
|
-
process.env[OMX_ENTRY_PATH_ENV] = previousEntryPath;
|
|
233
|
-
else
|
|
234
|
-
delete process.env[OMX_ENTRY_PATH_ENV];
|
|
235
|
-
if (typeof previousStartupCwd === 'string')
|
|
236
|
-
process.env[OMX_STARTUP_CWD_ENV] = previousStartupCwd;
|
|
237
|
-
else
|
|
238
|
-
delete process.env[OMX_STARTUP_CWD_ENV];
|
|
239
|
-
await rm(repo, { recursive: true, force: true });
|
|
240
|
-
await rm(fakeBin, { recursive: true, force: true });
|
|
241
|
-
await rm(startupCwd, { recursive: true, force: true });
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
describe('autoresearch intake draft artifacts', () => {
|
|
246
|
-
it('writes a canonical deep-interview autoresearch draft artifact from vague input', async () => {
|
|
247
|
-
const repo = await initRepo();
|
|
141
|
+
describe("autoresearch intake draft artifacts", () => {
|
|
142
|
+
it("writes a canonical deep-interview autoresearch draft artifact from vague input", async () => {
|
|
143
|
+
const repo = await initWorkspace();
|
|
248
144
|
try {
|
|
249
145
|
const artifact = await writeAutoresearchDraftArtifact({
|
|
250
146
|
repoRoot: repo,
|
|
251
|
-
topic:
|
|
252
|
-
keepPolicy:
|
|
253
|
-
seedInputs: { topic:
|
|
147
|
+
topic: "Improve onboarding for first-time contributors",
|
|
148
|
+
keepPolicy: "score_improvement",
|
|
149
|
+
seedInputs: { topic: "Improve onboarding for first-time contributors" },
|
|
254
150
|
});
|
|
255
151
|
assert.match(artifact.path, /\.omx\/specs\/deep-interview-autoresearch-improve-onboarding-for-first-time-contributors\.md$/);
|
|
256
152
|
assert.equal(artifact.launchReady, false);
|
|
@@ -265,48 +161,51 @@ describe('autoresearch intake draft artifacts', () => {
|
|
|
265
161
|
await rm(repo, { recursive: true, force: true });
|
|
266
162
|
}
|
|
267
163
|
});
|
|
268
|
-
it(
|
|
269
|
-
assert.equal(isLaunchReadyEvaluatorCommand(
|
|
270
|
-
assert.equal(isLaunchReadyEvaluatorCommand(
|
|
271
|
-
assert.equal(isLaunchReadyEvaluatorCommand(
|
|
164
|
+
it("rejects placeholder evaluator commands and accepts concrete commands", () => {
|
|
165
|
+
assert.equal(isLaunchReadyEvaluatorCommand("TODO replace me"), false);
|
|
166
|
+
assert.equal(isLaunchReadyEvaluatorCommand("node scripts/eval.js"), true);
|
|
167
|
+
assert.equal(isLaunchReadyEvaluatorCommand("bash scripts/eval.sh"), true);
|
|
272
168
|
});
|
|
273
|
-
it(
|
|
274
|
-
const repo = await
|
|
169
|
+
it("writes launch-consumable mission/sandbox/result artifacts and resolves them back", async () => {
|
|
170
|
+
const repo = await initWorkspace();
|
|
275
171
|
try {
|
|
276
172
|
const artifacts = await writeAutoresearchDeepInterviewArtifacts({
|
|
277
173
|
repoRoot: repo,
|
|
278
|
-
topic:
|
|
279
|
-
evaluatorCommand:
|
|
280
|
-
keepPolicy:
|
|
281
|
-
slug:
|
|
282
|
-
seedInputs: { topic:
|
|
174
|
+
topic: "Measure onboarding friction",
|
|
175
|
+
evaluatorCommand: "node scripts/eval.js",
|
|
176
|
+
keepPolicy: "pass_only",
|
|
177
|
+
slug: "onboarding-friction",
|
|
178
|
+
seedInputs: { topic: "Measure onboarding friction" },
|
|
283
179
|
});
|
|
284
180
|
assert.match(artifacts.draftArtifactPath, /deep-interview-autoresearch-onboarding-friction\.md$/);
|
|
285
181
|
assert.match(artifacts.missionArtifactPath, /autoresearch-onboarding-friction\/mission\.md$/);
|
|
286
182
|
assert.match(artifacts.sandboxArtifactPath, /autoresearch-onboarding-friction\/sandbox\.md$/);
|
|
287
183
|
assert.match(artifacts.resultPath, /autoresearch-onboarding-friction\/result\.json$/);
|
|
288
|
-
const resolved = await resolveAutoresearchDeepInterviewResult(repo, {
|
|
184
|
+
const resolved = await resolveAutoresearchDeepInterviewResult(repo, {
|
|
185
|
+
slug: "onboarding-friction",
|
|
186
|
+
});
|
|
289
187
|
assert.ok(resolved);
|
|
290
|
-
assert.equal(resolved?.compileTarget.slug,
|
|
291
|
-
assert.equal(resolved?.compileTarget.keepPolicy,
|
|
188
|
+
assert.equal(resolved?.compileTarget.slug, "onboarding-friction");
|
|
189
|
+
assert.equal(resolved?.compileTarget.keepPolicy, "pass_only");
|
|
292
190
|
assert.equal(resolved?.launchReady, true);
|
|
293
|
-
assert.match(resolved?.missionContent ||
|
|
294
|
-
assert.match(resolved?.sandboxContent ||
|
|
191
|
+
assert.match(resolved?.missionContent || "", /Measure onboarding friction/);
|
|
192
|
+
assert.match(resolved?.sandboxContent || "", /command: node scripts\/eval\.js/);
|
|
295
193
|
}
|
|
296
194
|
finally {
|
|
297
195
|
await rm(repo, { recursive: true, force: true });
|
|
298
196
|
}
|
|
299
197
|
});
|
|
300
198
|
});
|
|
301
|
-
describe(
|
|
302
|
-
it(
|
|
199
|
+
describe("buildAutoresearchDeepInterviewPrompt", () => {
|
|
200
|
+
it("activates deep-interview --autoresearch and includes seed inputs", () => {
|
|
303
201
|
const prompt = buildAutoresearchDeepInterviewPrompt({
|
|
304
|
-
topic:
|
|
305
|
-
evaluatorCommand:
|
|
306
|
-
keepPolicy:
|
|
307
|
-
slug:
|
|
202
|
+
topic: "Investigate flaky tests",
|
|
203
|
+
evaluatorCommand: "node scripts/eval.js",
|
|
204
|
+
keepPolicy: "score_improvement",
|
|
205
|
+
slug: "flaky-tests",
|
|
308
206
|
});
|
|
309
207
|
assert.match(prompt, /\$deep-interview --autoresearch/);
|
|
208
|
+
assert.match(prompt, /Do not launch tmux or run `omx autoresearch` yourself/);
|
|
310
209
|
assert.match(prompt, /deep-interview-autoresearch-\{slug\}\.md/);
|
|
311
210
|
assert.match(prompt, /autoresearch-\{slug\}\/mission\.md/);
|
|
312
211
|
assert.match(prompt, /- topic: Investigate flaky tests/);
|
|
@@ -315,29 +214,99 @@ describe('buildAutoresearchDeepInterviewPrompt', () => {
|
|
|
315
214
|
assert.match(prompt, /- slug: flaky-tests/);
|
|
316
215
|
});
|
|
317
216
|
});
|
|
318
|
-
describe(
|
|
319
|
-
it(
|
|
320
|
-
const repo = await
|
|
217
|
+
describe("runAutoresearchNoviceBridge", () => {
|
|
218
|
+
it("falls back to plain terminal prompts when omx question is unavailable", async () => {
|
|
219
|
+
const repo = await initWorkspace();
|
|
321
220
|
try {
|
|
322
221
|
const result = await withMockedTty(() => runAutoresearchNoviceBridge(repo, {}, makeFakeIo([
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
222
|
+
"Improve evaluator UX",
|
|
223
|
+
"Passing evaluator output",
|
|
224
|
+
"node scripts/eval.js",
|
|
225
|
+
"pass_only",
|
|
226
|
+
"ux-eval",
|
|
227
|
+
"launch",
|
|
228
|
+
]), async () => {
|
|
229
|
+
throw new Error("omx question requires tmux for OMX-owned question UI rendering in this session.");
|
|
230
|
+
}));
|
|
231
|
+
assert.equal(result.slug, "ux-eval");
|
|
232
|
+
assert.equal(result.resultPath, join(repo, ".omx", "specs", "autoresearch-ux-eval", "result.json"));
|
|
233
|
+
}
|
|
234
|
+
finally {
|
|
235
|
+
await rm(repo, { recursive: true, force: true });
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
it("does not fall back to plain prompts when question policy denies structured questions", async () => {
|
|
239
|
+
const repo = await initWorkspace();
|
|
240
|
+
try {
|
|
241
|
+
await mkdir(join(repo, ".omx", "state", "sessions", "sess-autoresearch"), {
|
|
242
|
+
recursive: true,
|
|
243
|
+
});
|
|
244
|
+
await writeFile(join(repo, ".omx", "state", "session.json"), JSON.stringify({ session_id: "sess-autoresearch" }));
|
|
245
|
+
await writeFile(join(repo, ".omx", "state", "sessions", "sess-autoresearch", "autoresearch-state.json"), JSON.stringify({ mode: "autoresearch", active: true }));
|
|
246
|
+
await assert.rejects(() => withMockedTty(() => runAutoresearchNoviceBridge(repo, {}, makeFakeIo([
|
|
247
|
+
"should not be used",
|
|
248
|
+
"should not be used",
|
|
249
|
+
]), async () => {
|
|
250
|
+
throw new OmxQuestionError("active_execution_mode_blocked", "omx question is unavailable while auto-executing workflows are active: autoresearch.");
|
|
251
|
+
})), (error) => {
|
|
252
|
+
assert.ok(error instanceof OmxQuestionError);
|
|
253
|
+
assert.equal(error.code, "active_execution_mode_blocked");
|
|
254
|
+
return true;
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
finally {
|
|
258
|
+
await rm(repo, { recursive: true, force: true });
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
it("uses structured omx-question prompts and resumes from returned stdout answers", async () => {
|
|
262
|
+
const repo = await initWorkspace();
|
|
263
|
+
const askedQuestions = [];
|
|
264
|
+
try {
|
|
265
|
+
const result = await withMockedTty(() => runAutoresearchNoviceBridge(repo, {}, makeFakeIo([]), makeFakeStructuredQuestionAsker([
|
|
266
|
+
"Improve evaluator UX",
|
|
267
|
+
"Passing evaluator output",
|
|
268
|
+
"node scripts/eval.js",
|
|
269
|
+
"pass_only",
|
|
270
|
+
"ux-eval",
|
|
271
|
+
"launch",
|
|
272
|
+
], askedQuestions)));
|
|
273
|
+
assert.equal(result.slug, "ux-eval");
|
|
274
|
+
assert.equal(result.resultPath, join(repo, ".omx", "specs", "autoresearch-ux-eval", "result.json"));
|
|
275
|
+
assert.equal(askedQuestions.length, 6);
|
|
276
|
+
assert.equal(askedQuestions[0]?.question, "Research topic/goal");
|
|
277
|
+
assert.deepEqual(askedQuestions[0]?.options, []);
|
|
278
|
+
assert.equal(askedQuestions[0]?.allowOther, true);
|
|
279
|
+
assert.match(askedQuestions[5]?.question || "", /Next step/);
|
|
280
|
+
assert.deepEqual(askedQuestions[5]?.options, ["launch", "refine"]);
|
|
281
|
+
assert.equal(askedQuestions[5]?.allowOther, false);
|
|
282
|
+
}
|
|
283
|
+
finally {
|
|
284
|
+
await rm(repo, { recursive: true, force: true });
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
it("loops through refine further before launching and writes canonical spec artifacts", async () => {
|
|
288
|
+
const repo = await initWorkspace();
|
|
289
|
+
try {
|
|
290
|
+
const result = await withMockedTty(() => runAutoresearchNoviceBridge(repo, {}, makeFakeIo([
|
|
291
|
+
"Improve evaluator UX",
|
|
292
|
+
"Make success measurable",
|
|
293
|
+
"TODO replace with evaluator command",
|
|
294
|
+
"score_improvement",
|
|
295
|
+
"ux-eval",
|
|
296
|
+
"refine further",
|
|
297
|
+
"Improve evaluator UX",
|
|
298
|
+
"Passing evaluator output",
|
|
299
|
+
"node scripts/eval.js",
|
|
300
|
+
"pass_only",
|
|
301
|
+
"ux-eval",
|
|
302
|
+
"launch",
|
|
335
303
|
])));
|
|
336
|
-
const draftContent = await readFile(join(repo,
|
|
337
|
-
const resultContent = await readFile(
|
|
338
|
-
const missionContent = await readFile(
|
|
339
|
-
const sandboxContent = await readFile(
|
|
340
|
-
assert.equal(result.
|
|
304
|
+
const draftContent = await readFile(join(repo, ".omx", "specs", "deep-interview-autoresearch-ux-eval.md"), "utf-8");
|
|
305
|
+
const resultContent = await readFile(result.resultPath, "utf-8");
|
|
306
|
+
const missionContent = await readFile(result.missionArtifactPath, "utf-8");
|
|
307
|
+
const sandboxContent = await readFile(result.sandboxArtifactPath, "utf-8");
|
|
308
|
+
assert.equal(result.artifactDir, join(repo, ".omx", "specs", "autoresearch-ux-eval"));
|
|
309
|
+
assert.equal(result.slug, "ux-eval");
|
|
341
310
|
assert.match(draftContent, /Launch-ready: yes/);
|
|
342
311
|
assert.match(resultContent, /"launchReady": true/);
|
|
343
312
|
assert.match(missionContent, /Improve evaluator UX/);
|
|
@@ -348,24 +317,18 @@ describe('runAutoresearchNoviceBridge', () => {
|
|
|
348
317
|
await rm(repo, { recursive: true, force: true });
|
|
349
318
|
}
|
|
350
319
|
});
|
|
351
|
-
it(
|
|
352
|
-
const repo = await
|
|
320
|
+
it("uses seeded novice inputs while still requiring confirmation-driven launch", async () => {
|
|
321
|
+
const repo = await initWorkspace();
|
|
353
322
|
try {
|
|
354
323
|
const result = await withMockedTty(() => runAutoresearchNoviceBridge(repo, {
|
|
355
|
-
topic:
|
|
356
|
-
evaluatorCommand:
|
|
357
|
-
keepPolicy:
|
|
358
|
-
slug:
|
|
359
|
-
}, makeFakeIo([
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
'',
|
|
364
|
-
'',
|
|
365
|
-
'launch',
|
|
366
|
-
])));
|
|
367
|
-
const draftContent = await readFile(join(repo, '.omx', 'specs', 'deep-interview-autoresearch-seeded-topic.md'), 'utf-8');
|
|
368
|
-
assert.equal(result.slug, 'seeded-topic');
|
|
324
|
+
topic: "Seeded topic",
|
|
325
|
+
evaluatorCommand: "node scripts/eval.js",
|
|
326
|
+
keepPolicy: "score_improvement",
|
|
327
|
+
slug: "seeded-topic",
|
|
328
|
+
}, makeFakeIo(["", "", "", "", "", "launch"])));
|
|
329
|
+
const draftContent = await readFile(join(repo, ".omx", "specs", "deep-interview-autoresearch-seeded-topic.md"), "utf-8");
|
|
330
|
+
assert.equal(result.resultPath, join(repo, ".omx", "specs", "autoresearch-seeded-topic", "result.json"));
|
|
331
|
+
assert.equal(result.slug, "seeded-topic");
|
|
369
332
|
assert.match(draftContent, /- topic: Seeded topic/);
|
|
370
333
|
assert.match(draftContent, /- evaluator: node scripts\/eval\.js/);
|
|
371
334
|
assert.match(draftContent, /Launch-ready: yes/);
|