oh-my-opencode 4.8.1 → 4.9.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/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/sisyphus/claude-fable-5.d.ts +19 -0
- package/dist/agents/sisyphus/claude-opus-4-7.d.ts +3 -1
- package/dist/agents/sisyphus/claude-opus-4-8.d.ts +19 -0
- package/dist/agents/sisyphus/index.d.ts +4 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/doctor/checks/codex.d.ts +1 -0
- package/dist/cli/doctor/checks/dependencies.d.ts +2 -2
- package/dist/cli/doctor/checks/tools-gh.d.ts +8 -1
- package/dist/cli/doctor/index.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +2 -0
- package/dist/cli/index.js +1908 -787
- package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -1
- package/dist/cli/install-codex/codex-config-plugins.d.ts +1 -0
- package/dist/cli/install-codex/codex-config-toml.d.ts +1 -0
- package/dist/cli/install-codex/codex-installer-bin-dir.d.ts +8 -0
- package/dist/cli/install-codex/install-codex.d.ts +1 -8
- package/dist/cli/install-codex/lsp-daemon-reaper.d.ts +5 -0
- package/dist/cli/sparkshell-condense.d.ts +10 -0
- package/dist/cli/sparkshell-parse.d.ts +3 -0
- package/dist/cli/sparkshell-session-context.d.ts +20 -0
- package/dist/cli/sparkshell-spark.d.ts +23 -0
- package/dist/cli/sparkshell.d.ts +8 -1
- package/dist/cli-node/index.js +92564 -0
- package/dist/config/schema/agent-names.d.ts +2 -0
- package/dist/config/schema/hooks.d.ts +0 -2
- package/dist/config/schema/keyword-detector.d.ts +0 -6
- package/dist/config/schema/oh-my-opencode-config.d.ts +2 -4
- package/dist/create-hooks.d.ts +0 -2
- package/dist/features/background-agent/parent-wake-dedupe.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-flush-runner.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-prompt-dispatch.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-session-history.d.ts +4 -0
- package/dist/features/background-agent/parent-wake-session-inspector.d.ts +1 -0
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-skills/index.d.ts +1 -1
- package/dist/features/builtin-skills/skills.d.ts +4 -0
- package/dist/features/opencode-runtime-skills/source-server.d.ts +16 -1
- package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +2 -0
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +2 -0
- package/dist/features/team-mode/types.d.ts +1 -0
- package/dist/features/tmux-subagent/failed-readiness-cache.d.ts +28 -0
- package/dist/features/tmux-subagent/manager.d.ts +1 -9
- package/dist/features/tmux-subagent/resolve-server-url.d.ts +3 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/constants.d.ts +0 -4
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +1 -1
- package/dist/index.js +9001 -1795
- package/dist/oh-my-opencode.schema.json +2 -4
- package/dist/plugin/chat-params.d.ts +1 -8
- package/dist/plugin/hooks/create-core-hooks.d.ts +0 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts +0 -2
- package/dist/plugin/hooks/create-transform-hooks.d.ts +1 -2
- package/dist/plugin/messages-transform.d.ts +0 -1
- package/dist/shared/model-availability.d.ts +10 -2
- package/dist/shared/module-resolution-failure.d.ts +7 -0
- package/package.json +25 -18
- package/packages/ast-grep-mcp/dist/cli.js +2 -10
- package/packages/git-bash-mcp/dist/cli.js +11 -4
- package/packages/lsp-daemon/dist/cli.d.ts +2 -0
- package/packages/lsp-daemon/dist/cli.js +3711 -0
- package/packages/lsp-daemon/dist/daemon-client.d.ts +19 -0
- package/packages/lsp-daemon/dist/daemon-client.js +114 -0
- package/packages/lsp-daemon/dist/daemon-server.d.ts +12 -0
- package/packages/lsp-daemon/dist/daemon-server.js +106 -0
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +21 -0
- package/packages/lsp-daemon/dist/ensure-daemon.js +97 -0
- package/packages/lsp-daemon/dist/index.d.ts +5 -0
- package/packages/lsp-daemon/dist/index.js +3573 -0
- package/packages/lsp-daemon/dist/lock.d.ts +7 -0
- package/packages/lsp-daemon/dist/lock.js +61 -0
- package/packages/lsp-daemon/dist/package.json +6 -0
- package/packages/lsp-daemon/dist/paths.d.ts +11 -0
- package/packages/lsp-daemon/dist/paths.js +49 -0
- package/packages/lsp-daemon/dist/proxy.d.ts +10 -0
- package/packages/lsp-daemon/dist/proxy.js +61 -0
- package/packages/lsp-daemon/dist/request-routing.d.ts +9 -0
- package/packages/lsp-daemon/dist/request-routing.js +44 -0
- package/packages/lsp-daemon/dist/run-daemon.d.ts +1 -0
- package/packages/lsp-daemon/dist/run-daemon.js +11 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.d.ts +5 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.js +25 -0
- package/packages/lsp-daemon/package.json +38 -0
- package/packages/lsp-tools-mcp/dist/cli.js +0 -0
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +40 -17
- package/packages/lsp-tools-mcp/dist/lsp/client.js +11 -9
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +5 -5
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js +5 -3
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.d.ts +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.js +8 -0
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js +3 -2
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js +12 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.d.ts +12 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.js +51 -0
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +2 -1
- package/packages/lsp-tools-mcp/dist/request-context.d.ts +7 -0
- package/packages/lsp-tools-mcp/dist/request-context.js +14 -0
- package/packages/lsp-tools-mcp/dist/tools.js +44 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +46 -33
- package/packages/omo-codex/plugin/.mcp.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.d.ts +7 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.js +173 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +10 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.d.ts +22 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.js +165 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.d.ts +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.js +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.d.ts +5 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.js +4 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.d.ts +6 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.js +10 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.d.ts +2 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.js +11 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.d.ts +3 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.js +104 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.d.ts +26 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.js +144 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.d.ts +43 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.js +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.js +29 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.d.ts +28 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.js +137 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/index.d.ts +1 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/index.js +1 -0
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +5 -2
- package/packages/omo-codex/plugin/components/lsp/.mcp.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +42 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +40 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +16 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +180 -0
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +12 -0
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +95 -0
- package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.js +79 -0
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +7 -7
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +68 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-tools.mjs +45 -22
- package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +4 -0
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +68 -0
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +8 -20
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +69 -96
- package/packages/omo-codex/plugin/components/rules/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +118 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.js +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.d.ts +47 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.js +127 -0
- package/packages/omo-codex/plugin/components/rules/dist/config.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/config.js +100 -0
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.js +26 -0
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.d.ts +8 -0
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.js +36 -0
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.js +65 -0
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.js +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.js +24 -0
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.js +24 -0
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.d.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.js +172 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.js +74 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.js +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.js +32 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.d.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.js +29 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.d.ts +9 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.js +51 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.d.ts +70 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.js +101 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.js +60 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.js +61 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.js +60 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.d.ts +11 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.js +75 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.js +29 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.d.ts +44 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.js +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.js +85 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.js +12 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.d.ts +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.js +51 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.js +33 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.js +40 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.d.ts +28 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.js +146 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.js +112 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.d.ts +18 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.js +93 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.js +27 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.js +30 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.js +237 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.js +31 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.js +48 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.js +23 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.d.ts +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.js +111 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.js +9 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.d.ts +18 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.js +59 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.d.ts +126 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.js +8 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.js +20 -0
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.js +41 -0
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.d.ts +10 -0
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.js +90 -0
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.js +128 -0
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.js +168 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.js +49 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.js +91 -0
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +4 -2
- package/packages/omo-codex/plugin/components/rules/src/config.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/src/event-budget.ts +17 -0
- package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +4 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-directive.ts +39 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/constants.ts +16 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine.ts +8 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/types.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +53 -4
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +127 -7
- package/packages/omo-codex/plugin/components/rules/src/transcript-rule-filter.ts +9 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +4 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +7 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +9 -9
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +10 -4
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +241 -0
- package/packages/omo-codex/plugin/components/rules/test/event-budget.test.ts +168 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +86 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +15 -15
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.d.ts +16 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.js +146 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +49 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.js +80 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.js +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.d.ts +5 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.js +3 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.d.ts +20 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.js +1 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +24 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.d.ts +1 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.js +18 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +62 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.d.ts +15 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.js +42 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.d.ts +10 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.js +35 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.d.ts +12 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.js +108 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.d.ts +4 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.js +31 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.d.ts +8 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.js +68 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.d.ts +21 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +133 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.d.ts +8 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.js +29 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +5 -13
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +61 -185
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +122 -117
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +48 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.js +122 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.js +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +20 -11
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +17 -11
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -71
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +200 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.d.ts +17 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +97 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +183 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +55 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +145 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +39 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +100 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +26 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +97 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +28 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +145 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.d.ts +34 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +95 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +31 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +119 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +69 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +48 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +119 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +89 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +123 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +70 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.d.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.js +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +63 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +292 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/types.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/types.js +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -14
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +24 -25
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +95 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +0 -96
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +46 -0
- package/packages/omo-codex/plugin/hooks/hooks.json +16 -16
- package/packages/omo-codex/plugin/package-lock.json +10 -9
- package/packages/omo-codex/plugin/package.json +27 -26
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +64 -15
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +16 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +82 -18
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +23 -11
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +94 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
- package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +93 -0
- package/packages/omo-codex/plugin/skills/lcx-doctor/agents/openai.yaml +11 -0
- package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +17 -13
- package/packages/omo-codex/plugin/skills/lsp-setup/SKILL.md +139 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/bash/README.md +60 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/c-cpp/README.md +61 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/csharp/README.md +71 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/dart/README.md +48 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/elixir/README.md +51 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/go/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/haskell/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/java/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/julia/README.md +60 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/kotlin/README.md +59 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/lua/README.md +66 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/php/README.md +62 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/python/README.md +71 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/ruby/README.md +53 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/rust/README.md +59 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/swift/README.md +51 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/terraform/README.md +62 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/typescript/README.md +77 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/yaml/README.md +70 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/zig/README.md +49 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/tsconfig.json +17 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +10 -10
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +20 -22
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +38 -61
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +135 -677
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -14
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +24 -25
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +20 -11
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +17 -11
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +9 -9
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -1
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +5 -5
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +194 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +17 -0
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +15 -44
- package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +140 -0
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +189 -7
- package/packages/omo-codex/plugin/test/start-work-skill.test.mjs +9 -31
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +68 -4
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +119 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +11 -112
- package/packages/omo-codex/plugin/test/sync-version.test.mjs +68 -0
- package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +126 -0
- package/packages/omo-codex/plugin/test/ulw-plan-skill.test.mjs +2 -2
- package/packages/omo-codex/scripts/install/bin-dir.mjs +20 -0
- package/packages/omo-codex/scripts/install/bin-links.mjs +43 -6
- package/packages/omo-codex/scripts/install/cache.mjs +4 -0
- package/packages/omo-codex/scripts/install/config.mjs +4 -4
- package/packages/omo-codex/scripts/install/delegated-command.mjs +5 -1
- package/packages/omo-codex/scripts/install/git-bash-mcp-env.mjs +28 -0
- package/packages/omo-codex/scripts/install/git-bash.mjs +12 -4
- package/packages/omo-codex/scripts/install/git-bash.test.mjs +39 -4
- package/packages/omo-codex/scripts/install/hook-targets.mjs +46 -0
- package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +12 -2
- package/packages/omo-codex/scripts/install/process.mjs +1 -0
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +131 -3
- package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +91 -0
- package/packages/omo-codex/scripts/install-config.test.mjs +50 -44
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +78 -0
- package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +93 -0
- package/packages/omo-codex/scripts/install-hook-targets.test.mjs +100 -0
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +3 -1
- package/packages/omo-codex/scripts/install-local.mjs +7 -18
- package/packages/omo-codex/scripts/install-local.test.mjs +34 -1
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
- package/packages/shared-skills/skills/lcx-doctor/SKILL.md +93 -0
- package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +11 -0
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +17 -13
- package/packages/shared-skills/skills/lsp-setup/SKILL.md +139 -0
- package/packages/shared-skills/skills/lsp-setup/references/bash/README.md +60 -0
- package/packages/shared-skills/skills/lsp-setup/references/c-cpp/README.md +61 -0
- package/packages/shared-skills/skills/lsp-setup/references/csharp/README.md +71 -0
- package/packages/shared-skills/skills/lsp-setup/references/dart/README.md +48 -0
- package/packages/shared-skills/skills/lsp-setup/references/elixir/README.md +51 -0
- package/packages/shared-skills/skills/lsp-setup/references/go/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/haskell/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/java/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/julia/README.md +60 -0
- package/packages/shared-skills/skills/lsp-setup/references/kotlin/README.md +59 -0
- package/packages/shared-skills/skills/lsp-setup/references/lua/README.md +66 -0
- package/packages/shared-skills/skills/lsp-setup/references/php/README.md +62 -0
- package/packages/shared-skills/skills/lsp-setup/references/python/README.md +71 -0
- package/packages/shared-skills/skills/lsp-setup/references/ruby/README.md +53 -0
- package/packages/shared-skills/skills/lsp-setup/references/rust/README.md +59 -0
- package/packages/shared-skills/skills/lsp-setup/references/swift/README.md +51 -0
- package/packages/shared-skills/skills/lsp-setup/references/terraform/README.md +62 -0
- package/packages/shared-skills/skills/lsp-setup/references/typescript/README.md +77 -0
- package/packages/shared-skills/skills/lsp-setup/references/yaml/README.md +70 -0
- package/packages/shared-skills/skills/lsp-setup/references/zig/README.md +49 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/tsconfig.json +17 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/shared-skills/skills/review-work/SKILL.md +10 -14
- package/packages/shared-skills/skills/start-work/SKILL.md +30 -59
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +126 -667
- package/dist/hooks/anthropic-effort/hook.d.ts +0 -26
- package/dist/hooks/anthropic-effort/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +0 -12
- package/dist/hooks/keyword-detector/analyze/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/search/default.d.ts +0 -12
- package/dist/hooks/keyword-detector/search/index.d.ts +0 -1
- package/dist/hooks/thinking-block-validator/hook.d.ts +0 -12
- package/dist/hooks/thinking-block-validator/index.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-contract.test.ts +0 -18
- package/packages/omo-codex/plugin/test/global-review-debug-gate.test.mjs +0 -29
- package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +0 -151
|
@@ -11,19 +11,40 @@ narration.
|
|
|
11
11
|
|
|
12
12
|
# Goal
|
|
13
13
|
Deliver EXACTLY what the user asked, end-to-end working, proven by
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
captured evidence: a failing-first proof that went RED→GREEN through
|
|
15
|
+
the cheapest faithful channel, plus real-surface proof sized by the
|
|
16
|
+
tier below. TESTS ALONE NEVER PROVE DONE — a green suite means the
|
|
17
|
+
unit-level contract holds, not that the user-facing behavior works.
|
|
18
|
+
|
|
19
|
+
# Tier triage (classify ONCE at bootstrap; record tier + one-line
|
|
20
|
+
justification in the notepad; ratchet up only)
|
|
21
|
+
Default is LIGHT. Take HEAVY only when the change set hits a fact you
|
|
22
|
+
can point to: a new module / layer / domain model / abstraction;
|
|
23
|
+
auth, security, session, or permissions; an external integration
|
|
24
|
+
(API, queue, payment, webhook); a DB schema or migration; concurrency,
|
|
25
|
+
transaction boundaries, or cache invalidation; a refactor crossing
|
|
26
|
+
domain boundaries; or the user signaled care ("carefully",
|
|
27
|
+
"thoroughly", "design first") or demanded review.
|
|
28
|
+
When unsure, take HEAVY. If a HEAVY fact surfaces mid-task, upgrade
|
|
29
|
+
immediately and redo whatever the LIGHT path skipped; never downgrade
|
|
30
|
+
mid-task. The tier sizes process, never honesty: both tiers capture
|
|
31
|
+
evidence, record cleanup receipts, and obey the never-suppress rules.
|
|
32
|
+
|
|
33
|
+
LIGHT — a narrow change inside existing layers (one-spot bugfix, a
|
|
34
|
+
method or endpoint following an existing pattern, a validation rule,
|
|
35
|
+
a query tweak, copy/constants): plan directly in the notepad; 1-2
|
|
36
|
+
success criteria (happy path + the riskiest edge); one real-surface
|
|
37
|
+
proof of the user-visible deliverable, where auxiliary surfaces are
|
|
38
|
+
first-class for CLI- or data-shaped work; self-review recorded in the
|
|
39
|
+
notepad instead of the reviewer loop.
|
|
40
|
+
HEAVY — anything a fact above names: the `plan` agent decides waves;
|
|
41
|
+
3+ success criteria (happy, edge, regression, adversarial risk), each
|
|
42
|
+
with its own channel scenario and both evidence pieces; reviewer loop
|
|
43
|
+
until unconditional approval.
|
|
44
|
+
|
|
45
|
+
# Manual-QA channels
|
|
46
|
+
Run real-surface proof yourself through the channel that faithfully
|
|
47
|
+
exercises the surface; capture the artifact.
|
|
27
48
|
|
|
28
49
|
1. HTTP call — hit the live endpoint with `curl -i` (or a
|
|
29
50
|
Playwright APIRequestContext); capture status line + headers +
|
|
@@ -49,53 +70,41 @@ observable that decides PASS vs FAIL. "run the endpoint", "open the
|
|
|
49
70
|
page", "check it works" are NOT scenarios — write the `curl ...`, the
|
|
50
71
|
`send-keys ...`, the `page.click(...)`, the expected status/text.
|
|
51
72
|
|
|
52
|
-
Auxiliary surfaces (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump)
|
|
74
|
+
are first-class evidence for CLI- or data-shaped criteria; use a
|
|
75
|
+
channel scenario when the behavior is user-facing. `--dry-run`,
|
|
76
|
+
printing the command, "should respond", and "looks correct" never
|
|
77
|
+
count.
|
|
57
78
|
|
|
58
79
|
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
|
|
59
80
|
|
|
60
81
|
## 0. Survey the skills, then size the work
|
|
61
|
-
First,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
context and let IT decide ordering and parallelism; follow the plan
|
|
71
|
-
agent's wave order and parallel grouping exactly, and run the
|
|
72
|
-
verification it specifies. Only a genuinely trivial single-step change
|
|
73
|
-
may skip the plan agent — justify that skip in the notepad.
|
|
82
|
+
First, survey the loaded skill list and read the description of each
|
|
83
|
+
loosely relevant skill. Decide explicitly which skills this task will
|
|
84
|
+
use and prefer using every genuinely applicable one — name them in the
|
|
85
|
+
notepad with a one-line reason each. Skipping a skill that fits the
|
|
86
|
+
task is a defect.
|
|
87
|
+
Then run Tier triage (above) on the change set and record the tier.
|
|
88
|
+
HEAVY: spawn the `plan` agent with the gathered context, follow its
|
|
89
|
+
wave order and parallel grouping exactly, and run the verification it
|
|
90
|
+
specifies. LIGHT: plan directly in the notepad.
|
|
74
91
|
|
|
75
92
|
## 1. Create the goal with binding success criteria
|
|
76
93
|
Call `create_goal` (or open your reply with a `# Goal` block treated as
|
|
77
94
|
binding) using exactly `objective`. Do not include `status`. Goals are
|
|
78
95
|
unlimited; never invent a numeric budget or limit.
|
|
79
96
|
The criteria MUST list, upfront:
|
|
80
|
-
- The user-visible deliverable in one line
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
both). Tests added AFTER the green code do NOT satisfy this.
|
|
92
|
-
2. Channel scenario artifact — name which Manual-QA channel
|
|
93
|
-
(HTTP call / tmux / browser use / computer use) the scenario
|
|
94
|
-
uses, run it yourself, capture the artifact named in the channel
|
|
95
|
-
table above.
|
|
96
|
-
Tests are the FLOOR (required, never sufficient); the channel
|
|
97
|
-
scenario is the CEILING (also required, every criterion, every
|
|
98
|
-
time). "tests pass" alone is NEVER done.
|
|
97
|
+
- The user-visible deliverable in one line, and the tier with its
|
|
98
|
+
justification.
|
|
99
|
+
- Success criteria sized by tier (LIGHT 1-2, HEAVY 3+ covering happy
|
|
100
|
+
path, edge cases — boundary / empty / malformed / concurrent — and
|
|
101
|
+
adjacent-surface regression named by file + function), each naming
|
|
102
|
+
its exact scenario: the literal command / page action / payload and
|
|
103
|
+
the binary PASS/FAIL observable, plus the evidence artifact it will
|
|
104
|
+
capture.
|
|
105
|
+
- For each criterion, the failing-first proof (test id or scenario)
|
|
106
|
+
that will be captured RED BEFORE the implementation and GREEN after.
|
|
107
|
+
Evidence added after the green code does NOT satisfy this.
|
|
99
108
|
|
|
100
109
|
These scenarios are the contract. You are not done until every one of
|
|
101
110
|
them PASSES with its evidence captured.
|
|
@@ -128,9 +137,8 @@ Started: <ISO timestamp>
|
|
|
128
137
|
<patterns / pitfalls / principles to remember next turn>
|
|
129
138
|
```
|
|
130
139
|
|
|
131
|
-
Append
|
|
132
|
-
|
|
133
|
-
artifact path goes in the moment it happens. Update `## Now` and
|
|
140
|
+
Append each finding, decision, command, RED/GREEN capture, and QA
|
|
141
|
+
artifact path the moment it happens. Update `## Now` and
|
|
134
142
|
`## Todo` on every transition. Append-only — never rewrite. This notepad
|
|
135
143
|
is your durable memory and it OUTLIVES the context window. After any
|
|
136
144
|
compaction or context loss (a `Context compacted` notice, a summarized
|
|
@@ -143,10 +151,9 @@ steps.
|
|
|
143
151
|
## 3. Register obsessive todos via `update_plan`
|
|
144
152
|
The todo tool is Codex `update_plan` — your live, user-visible
|
|
145
153
|
checklist. Translate every action from the plan into one `update_plan`
|
|
146
|
-
step
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
coarse ones; if a step needs more than one tool call, split it.
|
|
154
|
+
step — one step per atomic work unit: an edit plus its verification, a
|
|
155
|
+
QA scenario run, a teardown. Keep each step small enough to finish
|
|
156
|
+
within a few tool calls.
|
|
150
157
|
Call `update_plan` on EVERY state transition — the instant a step starts
|
|
151
158
|
(mark it `in_progress`) and the instant it finishes (mark it `completed`
|
|
152
159
|
and the next `in_progress`). Exactly ONE `in_progress` at a time. Mark
|
|
@@ -183,34 +190,36 @@ When discovery needs multiple angles or the module layout is
|
|
|
183
190
|
unfamiliar, delegate to the `explorer` subagent (read-only codebase
|
|
184
191
|
search, absolute-path results). For research that leaves the repo —
|
|
185
192
|
library/API/docs/web — delegate to the `librarian` subagent. Spawn them
|
|
186
|
-
`
|
|
193
|
+
`fork_context: false` and keep doing root work while they run.
|
|
187
194
|
|
|
188
|
-
# Execution loop (
|
|
189
|
-
Until every success
|
|
195
|
+
# Execution loop (PIN → RED → GREEN → SURFACE → CLEAN)
|
|
196
|
+
Until every success criterion PASSES with its evidence captured:
|
|
190
197
|
1. Pick next criterion → mark in_progress → update notepad `## Now`.
|
|
191
|
-
2. RED:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
2. PIN + RED: when touching existing behavior, first pin it with a
|
|
199
|
+
characterization test that passes on the unchanged code. Then
|
|
200
|
+
capture the failing-first proof through the cheapest faithful
|
|
201
|
+
channel — a unit test where a seam exists, an integration/e2e test
|
|
202
|
+
where the behavior lives in wiring, or the criterion's real-surface
|
|
203
|
+
scenario captured failing when no test seam exists. It must fail
|
|
204
|
+
for the RIGHT reason (not a syntax error, not a missing import).
|
|
205
|
+
Paste RED output into the notepad. No production code yet.
|
|
195
206
|
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
|
|
196
207
|
Before GREEN work that depends on external review, PR, issue, or
|
|
197
208
|
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
|
|
198
209
|
separate compatibility detection from policy changes unless the goal
|
|
199
210
|
explicitly asks to change policy.
|
|
200
|
-
Re-run the
|
|
201
|
-
|
|
202
|
-
4. SURFACE
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
notepad.
|
|
211
|
+
Re-run the proof. Capture GREEN output. A GREEN far larger than the
|
|
212
|
+
criterion implies means the proof was too coarse — split it.
|
|
213
|
+
4. SURFACE: run the real-surface proof the criterion named (channel
|
|
214
|
+
table above; auxiliary surface for CLI- or data-shaped criteria),
|
|
215
|
+
end-to-end, yourself. If the RED proof was the scenario itself,
|
|
216
|
+
re-run it now and capture it passing. Paste the artifact path into
|
|
217
|
+
the notepad.
|
|
208
218
|
5. CLEANUP (PAIRED — NEVER SKIP): the moment a QA scenario spawns any
|
|
209
219
|
resource, register its teardown as its own todo (e.g.
|
|
210
|
-
`cleanup: kill server pid for criterion 2 — verify kill -0 fails`)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
spawned in step 4 MUST be torn down before this step completes:
|
|
220
|
+
`cleanup: kill server pid for criterion 2 — verify kill -0 fails`).
|
|
221
|
+
Every runtime artifact the QA spawned in step 4 MUST be torn down
|
|
222
|
+
before this step completes:
|
|
214
223
|
server PIDs (`kill <pid>`; verify `kill -0` fails), `tmux` sessions
|
|
215
224
|
(`tmux kill-session -t ulw-qa-<criterion>`; verify with `tmux ls`),
|
|
216
225
|
browser / Playwright contexts (`.close()`), containers
|
|
@@ -222,26 +231,26 @@ Until every success-criteria scenario PASSES with BOTH evidence pieces:
|
|
|
222
231
|
6. Verify: LSP diagnostics clean on changed files + full test suite
|
|
223
232
|
green (no skipped, no xfail added this turn).
|
|
224
233
|
7. Mark completed. Append non-obvious findings / learnings.
|
|
225
|
-
8. After each increment, re-run
|
|
226
|
-
PASS/FAIL inline with
|
|
234
|
+
8. After each increment, re-run every criterion's scenario. Record
|
|
235
|
+
PASS/FAIL inline with the evidence paths AND the cleanup receipt.
|
|
227
236
|
Loop until all PASS.
|
|
228
237
|
|
|
229
238
|
Parallel-batch independent reads / searches / subagents within a step,
|
|
230
239
|
but NEVER parallelise RED and GREEN of the same criterion.
|
|
231
240
|
|
|
232
241
|
# Codex subagent reliability
|
|
233
|
-
Every `spawn_agent` message is self-contained and starts with
|
|
242
|
+
Every `multi_agent_v1.spawn_agent` message is self-contained and starts with
|
|
234
243
|
`TASK: <imperative assignment>`, then names `DELIVERABLE`, `SCOPE`, and
|
|
235
244
|
`VERIFY`. State that it is an executable assignment, not a context
|
|
236
|
-
handoff.
|
|
245
|
+
handoff. Use `fork_context: false` unless full history is truly
|
|
237
246
|
required; paste only the context the child needs. Full-history forks can
|
|
238
247
|
make the child continue old parent context instead of the delegated task.
|
|
239
248
|
|
|
240
249
|
# TOML-backed subagent routing compatibility
|
|
241
|
-
Treat TOML-backed role routing as **routing-unverified**. The
|
|
242
|
-
`spawn_agent` schema accepts
|
|
243
|
-
`
|
|
244
|
-
effort, or `service_tier
|
|
250
|
+
Treat TOML-backed role routing as **routing-unverified**. The
|
|
251
|
+
`multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
|
|
252
|
+
`agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
|
|
253
|
+
effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
|
|
245
254
|
role requirements into the message, and judge the result from delivered
|
|
246
255
|
evidence. Never claim the reviewer, planner, or explorer role was
|
|
247
256
|
selected from TOML unless runtime evidence confirms it.
|
|
@@ -250,18 +259,14 @@ Treat child status as a progress signal, not a timeout counter. For
|
|
|
250
259
|
work likely to exceed one wait cycle, tell the child to send
|
|
251
260
|
`WORKING: <task> - <current phase>` before long reading, testing, or
|
|
252
261
|
review passes, and `BLOCKED: <reason>` only when it cannot progress.
|
|
253
|
-
Track spawned agent names locally. Use `wait_agent` for mailbox
|
|
254
|
-
signals, but a timeout only means no new mailbox update arrived.
|
|
255
|
-
a
|
|
256
|
-
|
|
257
|
-
`WORKING:`, treat it as alive and keep doing independent root work.
|
|
258
|
-
Do not use `list_agents` as a polling loop or status feed; it can
|
|
259
|
-
replay large payloads. Send `TASK STILL ACTIVE: return <deliverable> or
|
|
260
|
-
BLOCKED: <reason>` only when the child is completed without the
|
|
262
|
+
Track spawned agent names locally. Use `multi_agent_v1.wait_agent` for mailbox
|
|
263
|
+
signals, but a timeout only means no new mailbox update arrived.
|
|
264
|
+
Treat a running child as alive and keep doing independent root work.
|
|
265
|
+
Fallback only when the child is completed without the
|
|
261
266
|
deliverable, ack-only, or no longer running. If that followup is still
|
|
262
267
|
silent or ack-only, record the result as inconclusive, do not count it
|
|
263
268
|
as approval/pass, close it if safe, and respawn a smaller
|
|
264
|
-
`
|
|
269
|
+
`fork_context: false` task with the missing deliverable.
|
|
265
270
|
|
|
266
271
|
# Subagent-dependent transition barrier
|
|
267
272
|
Do not mark an `update_plan` step `completed` while an active child owns
|
|
@@ -270,7 +275,7 @@ audit, research, or review result is integrated or explicitly recorded
|
|
|
270
275
|
as inconclusive. Do not generate a plan before spawned research lanes
|
|
271
276
|
that feed the plan have returned or been closed as inconclusive.
|
|
272
277
|
Do not write the final answer, PR handoff, or completion summary while
|
|
273
|
-
active child agents remain open. Use short `wait_agent` cycles.
|
|
278
|
+
active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
|
|
274
279
|
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
|
|
275
280
|
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
|
|
276
281
|
inconclusive, record that it is not approval, and respawn smaller only
|
|
@@ -279,14 +284,15 @@ if the deliverable is still required.
|
|
|
279
284
|
# Verification gate (TRIGGERED, NOT OPTIONAL)
|
|
280
285
|
|
|
281
286
|
Trigger when ANY apply:
|
|
287
|
+
- Tier is HEAVY.
|
|
282
288
|
- User demanded strict, rigorous, or proper review.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
289
|
+
LIGHT tier records a self-review in the notepad instead: re-read the
|
|
290
|
+
diff, run diagnostics, confirm each criterion's evidence, and state in
|
|
291
|
+
one line why the tier held.
|
|
286
292
|
|
|
287
293
|
Procedure (NON-NEGOTIABLE):
|
|
288
|
-
1. Spawn a child with `
|
|
289
|
-
assignment in `message`. The `spawn_agent` schema cannot select a
|
|
294
|
+
1. Spawn a child with `fork_context: false` and a self-contained reviewer
|
|
295
|
+
assignment in `message`. The `multi_agent_v1.spawn_agent` schema cannot select a
|
|
290
296
|
TOML-backed reviewer role, so paste the reviewer requirements into
|
|
291
297
|
the message.
|
|
292
298
|
Pass: goal, success-criteria, scenario evidence, full diff, notepad
|
|
@@ -311,23 +317,23 @@ requested or preauthorised this session — default is stage + draft
|
|
|
311
317
|
message + present for approval.
|
|
312
318
|
|
|
313
319
|
# Constraints
|
|
314
|
-
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
behavior
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
- Every behavior change needs a failing-first proof captured BEFORE
|
|
321
|
+
the production change, through the cheapest faithful channel (unit
|
|
322
|
+
test at a seam; integration/e2e in wiring; the real-surface scenario
|
|
323
|
+
when no test seam exists). If you typed production code first, STOP,
|
|
324
|
+
revert, capture the proof failing, then redo the change. Exempt
|
|
325
|
+
only: pure formatting, comment-only edits, dependency bumps with no
|
|
326
|
+
behavior delta, rename-only moves — justify each in `## Findings`.
|
|
327
|
+
- A test that mirrors its implementation — asserting mocks were
|
|
328
|
+
called, pinning a constant, or unable to fail under any plausible
|
|
329
|
+
regression — is NOT evidence. Prefer a real-surface proof with no
|
|
330
|
+
new test over a tautological test.
|
|
331
|
+
- Refactors: characterization tests pinning current observable
|
|
332
|
+
behavior FIRST, green against the old code, green throughout.
|
|
327
333
|
- Smallest correct change. No drive-by refactors.
|
|
328
334
|
- Never suppress lints / errors / test failures. Never delete, skip,
|
|
329
335
|
`.only`, `.skip`, `xfail`, or comment out tests to green the suite.
|
|
330
|
-
- Never claim done from inference — only from
|
|
336
|
+
- Never claim done from inference — only from captured evidence.
|
|
331
337
|
- Parallel tool calls for any independent work.
|
|
332
338
|
|
|
333
339
|
# Output discipline
|
|
@@ -343,10 +349,9 @@ message + present for approval.
|
|
|
343
349
|
- Stop ONLY when every scenario PASSES with captured evidence, every
|
|
344
350
|
cleanup receipt is recorded, notepad is current, and (if gate
|
|
345
351
|
triggered) reviewer approved unconditionally.
|
|
346
|
-
- Leftover
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
down, record the receipt, then continue.
|
|
352
|
+
- Leftover QA state (live process, `tmux` session, browser context,
|
|
353
|
+
bound port, temp file / dir) means NOT done. Tear it down, record
|
|
354
|
+
the receipt, then continue.
|
|
350
355
|
- After 2 identical failed attempts at one step, surface what was tried
|
|
351
356
|
and ask the user before another retry.
|
|
352
357
|
- After 2 parallel exploration waves yield no new useful facts, stop
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { stdin as processStdin, stdout as processStdout } from "node:process";
|
|
3
|
+
import { runUserPromptSubmitHook } from "./codex-hook.js";
|
|
4
|
+
const command = process.argv[2];
|
|
5
|
+
const subcommand = process.argv[3];
|
|
6
|
+
if (command === "hook" && subcommand === "user-prompt-submit") {
|
|
7
|
+
await runHookCli();
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
process.stderr.write("Usage: omo-ultrawork hook user-prompt-submit\n");
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
}
|
|
13
|
+
async function runHookCli() {
|
|
14
|
+
const raw = await readStdin();
|
|
15
|
+
if (raw.trim().length === 0)
|
|
16
|
+
return;
|
|
17
|
+
const parsed = parseHookInput(raw);
|
|
18
|
+
const output = runUserPromptSubmitHook(parsed);
|
|
19
|
+
if (output.length > 0) {
|
|
20
|
+
processStdout.write(output);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function parseHookInput(raw) {
|
|
24
|
+
try {
|
|
25
|
+
const parsed = JSON.parse(raw);
|
|
26
|
+
return parsed;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof SyntaxError)
|
|
30
|
+
return undefined;
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function readStdin() {
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
let data = "";
|
|
37
|
+
processStdin.setEncoding("utf8");
|
|
38
|
+
processStdin.on("data", (chunk) => {
|
|
39
|
+
data += chunk;
|
|
40
|
+
});
|
|
41
|
+
processStdin.once("error", () => {
|
|
42
|
+
resolve(data);
|
|
43
|
+
});
|
|
44
|
+
processStdin.once("end", () => {
|
|
45
|
+
resolve(data);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type CodexUserPromptSubmitInput = {
|
|
2
|
+
readonly hook_event_name: "UserPromptSubmit";
|
|
3
|
+
readonly prompt: string;
|
|
4
|
+
readonly transcript_path?: string | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function runUserPromptSubmitHook(input: unknown): string;
|
|
7
|
+
export declare function isUltraworkPrompt(prompt: string): boolean;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { ULTRAWORK_DIRECTIVE } from "./directive.js";
|
|
3
|
+
const ULTRAWORK_PATTERN = /\b(?:ultrawork|ulw)\b/i;
|
|
4
|
+
const ULTRAWORK_DIRECTIVE_MARKER = "<ultrawork-mode>";
|
|
5
|
+
const TRANSCRIPT_SEARCH_BYTES = 512_000;
|
|
6
|
+
const CONTEXT_PRESSURE_MARKERS = [
|
|
7
|
+
"context compacted",
|
|
8
|
+
"context_length_exceeded",
|
|
9
|
+
"skill descriptions were shortened",
|
|
10
|
+
"context_too_large",
|
|
11
|
+
"codex ran out of room in the model's context window",
|
|
12
|
+
"your input exceeds the context window",
|
|
13
|
+
"long threads and multiple compactions",
|
|
14
|
+
];
|
|
15
|
+
export function runUserPromptSubmitHook(input) {
|
|
16
|
+
if (!isCodexUserPromptSubmitInput(input))
|
|
17
|
+
return "";
|
|
18
|
+
if (isContextPressureRecoveryPrompt(input.prompt))
|
|
19
|
+
return "";
|
|
20
|
+
if (hasUltraworkDirectiveAlreadyInTranscript(input.transcript_path))
|
|
21
|
+
return "";
|
|
22
|
+
if (isContextPressureTranscript(input.transcript_path))
|
|
23
|
+
return "";
|
|
24
|
+
return isUltraworkPrompt(input.prompt) ? formatAdditionalContextOutput(ULTRAWORK_DIRECTIVE) : "";
|
|
25
|
+
}
|
|
26
|
+
function hasUltraworkDirectiveAlreadyInTranscript(transcriptPath) {
|
|
27
|
+
if (transcriptPath === undefined || transcriptPath === null)
|
|
28
|
+
return false;
|
|
29
|
+
try {
|
|
30
|
+
const rawTranscript = readTranscriptTail(transcriptPath);
|
|
31
|
+
for (const line of rawTranscript.split(/\r?\n/)) {
|
|
32
|
+
const parsed = parseJsonLine(line);
|
|
33
|
+
if (parsed === null) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (!isRecord(parsed)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const hookSpecificOutput = parsed["hookSpecificOutput"];
|
|
40
|
+
if (!isRecord(hookSpecificOutput)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (hookSpecificOutput["hookEventName"] !== "UserPromptSubmit") {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (typeof hookSpecificOutput["additionalContext"] === "string" &&
|
|
47
|
+
hookSpecificOutput["additionalContext"].includes(ULTRAWORK_DIRECTIVE_MARKER)) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (error instanceof Error)
|
|
54
|
+
return false;
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function readTranscriptTail(transcriptPath) {
|
|
60
|
+
const rawTranscript = readFileSync(transcriptPath);
|
|
61
|
+
return rawTranscript.subarray(Math.max(0, rawTranscript.byteLength - TRANSCRIPT_SEARCH_BYTES)).toString("utf8");
|
|
62
|
+
}
|
|
63
|
+
export function isUltraworkPrompt(prompt) {
|
|
64
|
+
return ULTRAWORK_PATTERN.test(prompt);
|
|
65
|
+
}
|
|
66
|
+
function isContextPressureRecoveryPrompt(prompt) {
|
|
67
|
+
const normalizedPrompt = prompt.toLowerCase();
|
|
68
|
+
return CONTEXT_PRESSURE_MARKERS.some((marker) => normalizedPrompt.includes(marker));
|
|
69
|
+
}
|
|
70
|
+
function isContextPressureTranscript(transcriptPath) {
|
|
71
|
+
if (transcriptPath === undefined || transcriptPath === null)
|
|
72
|
+
return false;
|
|
73
|
+
try {
|
|
74
|
+
return isContextPressureRecoveryPrompt(readFileSync(transcriptPath, "utf8"));
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (error instanceof Error)
|
|
78
|
+
return false;
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function formatAdditionalContextOutput(additionalContext) {
|
|
83
|
+
const normalizedContext = normalizeAdditionalContext(additionalContext);
|
|
84
|
+
if (normalizedContext.length === 0)
|
|
85
|
+
return "";
|
|
86
|
+
const output = {
|
|
87
|
+
hookSpecificOutput: {
|
|
88
|
+
hookEventName: "UserPromptSubmit",
|
|
89
|
+
additionalContext: normalizedContext,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
return `${JSON.stringify(output)}\n`;
|
|
93
|
+
}
|
|
94
|
+
function normalizeAdditionalContext(additionalContext) {
|
|
95
|
+
return additionalContext.replace(/\r\n/g, "\n").replace(/\r/g, "\n").trim();
|
|
96
|
+
}
|
|
97
|
+
function parseJsonLine(line) {
|
|
98
|
+
if (line.trim().length === 0) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
const parsed = JSON.parse(line);
|
|
103
|
+
return parsed;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error instanceof Error) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function isCodexUserPromptSubmitInput(value) {
|
|
113
|
+
return (isRecord(value) &&
|
|
114
|
+
value["hook_event_name"] === "UserPromptSubmit" &&
|
|
115
|
+
typeof value["prompt"] === "string" &&
|
|
116
|
+
(value["transcript_path"] === undefined ||
|
|
117
|
+
value["transcript_path"] === null ||
|
|
118
|
+
typeof value["transcript_path"] === "string"));
|
|
119
|
+
}
|
|
120
|
+
function isRecord(value) {
|
|
121
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ULTRAWORK_DIRECTIVE: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/codex-ultrawork",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.9.1",
|
|
4
4
|
"description": "Codex plugin that injects the ultrawork orchestration directive and syncs the ultrawork reviewer agent role.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.12.1",
|