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
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import test from "node:test";
|
|
6
|
+
|
|
7
|
+
import { assertHookCommandTargets, findMissingHookCommandTargets } from "./install/hook-targets.mjs";
|
|
8
|
+
|
|
9
|
+
const HOOKS_MANIFEST = {
|
|
10
|
+
hooks: {
|
|
11
|
+
SessionStart: [
|
|
12
|
+
{
|
|
13
|
+
hooks: [
|
|
14
|
+
{
|
|
15
|
+
type: "command",
|
|
16
|
+
command: 'node "${PLUGIN_ROOT}/components/git-bash/dist/cli.js" hook session-start',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
matcher: "^startup$",
|
|
22
|
+
hooks: [
|
|
23
|
+
{
|
|
24
|
+
type: "command",
|
|
25
|
+
command: 'node "${PLUGIN_ROOT}/scripts/auto-update.mjs" hook session-start',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
Stop: [
|
|
31
|
+
{
|
|
32
|
+
hooks: [
|
|
33
|
+
{
|
|
34
|
+
type: "command",
|
|
35
|
+
command: 'node "${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js" hook stop',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
async function createPluginRoot({ withGitBashDist }) {
|
|
44
|
+
const pluginRoot = await mkdtemp(join(tmpdir(), "hook-targets-"));
|
|
45
|
+
await mkdir(join(pluginRoot, "hooks"), { recursive: true });
|
|
46
|
+
await writeFile(join(pluginRoot, "hooks", "hooks.json"), JSON.stringify(HOOKS_MANIFEST, null, "\t"));
|
|
47
|
+
const targets = [
|
|
48
|
+
"scripts/auto-update.mjs",
|
|
49
|
+
"components/ulw-loop/dist/cli.js",
|
|
50
|
+
...(withGitBashDist ? ["components/git-bash/dist/cli.js"] : []),
|
|
51
|
+
];
|
|
52
|
+
for (const target of targets) {
|
|
53
|
+
await mkdir(dirname(join(pluginRoot, target)), { recursive: true });
|
|
54
|
+
await writeFile(join(pluginRoot, target), "");
|
|
55
|
+
}
|
|
56
|
+
return pluginRoot;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
test("#given a hook command target missing from the payload #when scanning #then exactly that path is reported", async (t) => {
|
|
60
|
+
const pluginRoot = await createPluginRoot({ withGitBashDist: false });
|
|
61
|
+
t.after(() => rm(pluginRoot, { recursive: true, force: true }));
|
|
62
|
+
|
|
63
|
+
const missing = await findMissingHookCommandTargets(pluginRoot);
|
|
64
|
+
|
|
65
|
+
assert.deepEqual(missing, [join(pluginRoot, "components/git-bash/dist/cli.js")]);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("#given a complete payload #when scanning #then nothing is missing", async (t) => {
|
|
69
|
+
const pluginRoot = await createPluginRoot({ withGitBashDist: true });
|
|
70
|
+
t.after(() => rm(pluginRoot, { recursive: true, force: true }));
|
|
71
|
+
|
|
72
|
+
assert.deepEqual(await findMissingHookCommandTargets(pluginRoot), []);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test("#given no hooks manifest #when scanning #then nothing is missing", async (t) => {
|
|
76
|
+
const pluginRoot = await mkdtemp(join(tmpdir(), "hook-targets-"));
|
|
77
|
+
t.after(() => rm(pluginRoot, { recursive: true, force: true }));
|
|
78
|
+
|
|
79
|
+
assert.deepEqual(await findMissingHookCommandTargets(pluginRoot), []);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test("#given a broken payload #when asserting #then the error names the missing target and the plugin root", async (t) => {
|
|
83
|
+
const pluginRoot = await createPluginRoot({ withGitBashDist: false });
|
|
84
|
+
t.after(() => rm(pluginRoot, { recursive: true, force: true }));
|
|
85
|
+
|
|
86
|
+
await assert.rejects(
|
|
87
|
+
() => assertHookCommandTargets(pluginRoot),
|
|
88
|
+
(error) =>
|
|
89
|
+
error instanceof Error &&
|
|
90
|
+
error.message.includes("components/git-bash/dist/cli.js") &&
|
|
91
|
+
error.message.includes("hooks.json"),
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test("#given a complete payload #when asserting #then it resolves", async (t) => {
|
|
96
|
+
const pluginRoot = await createPluginRoot({ withGitBashDist: true });
|
|
97
|
+
t.after(() => rm(pluginRoot, { recursive: true, force: true }));
|
|
98
|
+
|
|
99
|
+
await assertHookCommandTargets(pluginRoot);
|
|
100
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import test from "node:test";
|
|
5
5
|
|
|
@@ -53,6 +53,8 @@ test("#given sisyphuslabs lazycodex install #when installing locally #then stamp
|
|
|
53
53
|
],
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
|
+
await mkdir(join(pluginRoot, "components", "comment-checker", "dist"), { recursive: true });
|
|
57
|
+
await writeFile(join(pluginRoot, "components", "comment-checker", "dist", "cli.js"), "console.log('comment checker cli')\n");
|
|
56
58
|
|
|
57
59
|
const result = await installMarketplaceLocally({
|
|
58
60
|
repoRoot,
|
|
@@ -39,17 +39,8 @@ import {
|
|
|
39
39
|
} from "./install/lazycodex-version-stamp.mjs";
|
|
40
40
|
import { shouldBuildSourcePackages } from "./install/source-package-build.mjs";
|
|
41
41
|
import { runLazyCodexManualUpdate } from "../plugin/scripts/auto-update.mjs";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const homeDir = resolve(options.homeDir ?? homedir());
|
|
45
|
-
const env = options.env ?? process.env;
|
|
46
|
-
const explicitBinDir = nonEmptyEnvValue(env, "CODEX_LOCAL_BIN_DIR");
|
|
47
|
-
if (explicitBinDir !== undefined) return explicitBinDir;
|
|
48
|
-
|
|
49
|
-
const codexHome = resolve(options.codexHome ?? nonEmptyEnvValue(env, "CODEX_HOME") ?? join(homeDir, ".codex"));
|
|
50
|
-
const defaultCodexHome = resolve(join(homeDir, ".codex"));
|
|
51
|
-
return codexHome === defaultCodexHome ? join(homeDir, ".local", "bin") : join(codexHome, "bin");
|
|
52
|
-
}
|
|
42
|
+
export { nonEmptyEnvValue, resolveCodexInstallerBinDir } from "./install/bin-dir.mjs";
|
|
43
|
+
import { nonEmptyEnvValue, resolveCodexInstallerBinDir } from "./install/bin-dir.mjs";
|
|
53
44
|
|
|
54
45
|
export async function installMarketplaceLocally(options = {}) {
|
|
55
46
|
const repoRoot = resolve(options.repoRoot ?? process.cwd());
|
|
@@ -115,6 +106,10 @@ export async function installMarketplaceLocally(options = {}) {
|
|
|
115
106
|
if (marketplace.name === "sisyphuslabs" && plugin.name === "omo") {
|
|
116
107
|
const runtimeLink = await linkRootRuntimeBin({ binDir, codexHome, repoRoot, platform });
|
|
117
108
|
if (runtimeLink !== null) log(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
|
|
109
|
+
else
|
|
110
|
+
log(
|
|
111
|
+
`Warning: skipped the omo runtime wrapper because ${join(repoRoot, "dist", "cli", "index.js")} is missing; omo sparkshell/ulw-loop commands will be unavailable until a package shipping dist/cli is installed`,
|
|
112
|
+
);
|
|
118
113
|
}
|
|
119
114
|
pluginSources.push({ name: entry.name, sourcePath });
|
|
120
115
|
installed.push(plugin);
|
|
@@ -161,6 +156,7 @@ export async function installMarketplaceLocally(options = {}) {
|
|
|
161
156
|
marketplaceSource: { sourceType: "local", source: marketplaceRoot },
|
|
162
157
|
pluginNames,
|
|
163
158
|
platform,
|
|
159
|
+
gitBashEnabled: platform === "win32" && gitBashResolution.found,
|
|
164
160
|
trustedHookStates,
|
|
165
161
|
agentConfigs: [...agentConfigs.values()].sort((left, right) => left.name.localeCompare(right.name)),
|
|
166
162
|
autonomousPermissions: options.autonomousPermissions !== false,
|
|
@@ -198,13 +194,6 @@ function agentNameFromToml(fileName) {
|
|
|
198
194
|
return fileName.endsWith(".toml") ? fileName.slice(0, -".toml".length) : fileName;
|
|
199
195
|
}
|
|
200
196
|
|
|
201
|
-
function nonEmptyEnvValue(env, key) {
|
|
202
|
-
const value = env[key];
|
|
203
|
-
if (typeof value !== "string") return undefined;
|
|
204
|
-
const trimmed = value.trim();
|
|
205
|
-
return trimmed.length === 0 ? undefined : trimmed;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
197
|
function legacyCacheMarketplaces(marketplaceName) {
|
|
209
198
|
return marketplaceName === "sisyphuslabs" ? ["lazycodex", ["code", "yeongyu", "codex", "plugins"].join("-")] : [];
|
|
210
199
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { mkdir, readFile,
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import test from "node:test";
|
|
@@ -66,6 +66,38 @@ test("#given custom CODEX_HOME and PATH without omo #when installing locally wit
|
|
|
66
66
|
assert.match(wrapper, /omo-ulw-loop/);
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
+
test("#given repoRoot without root CLI dist #when installing locally #then warns about the skipped omo runtime wrapper", async () => {
|
|
70
|
+
const repoRoot = await makeTempDir();
|
|
71
|
+
const codexHome = await makeTempDir();
|
|
72
|
+
const homeDir = await makeTempDir();
|
|
73
|
+
const codexPackageRoot = join(repoRoot, "packages", "omo-codex");
|
|
74
|
+
const pluginRoot = join(codexPackageRoot, "plugin");
|
|
75
|
+
|
|
76
|
+
await writeJson(join(codexPackageRoot, "marketplace.json"), {
|
|
77
|
+
name: "sisyphuslabs",
|
|
78
|
+
plugins: [{ name: "omo", source: "./plugins/omo" }],
|
|
79
|
+
});
|
|
80
|
+
await writePluginAt(pluginRoot, "omo", "0.1.0");
|
|
81
|
+
|
|
82
|
+
const logs = [];
|
|
83
|
+
await installMarketplaceLocally({
|
|
84
|
+
repoRoot,
|
|
85
|
+
codexHome,
|
|
86
|
+
env: {},
|
|
87
|
+
homeDir,
|
|
88
|
+
platform: "linux",
|
|
89
|
+
runCommand: async () => {},
|
|
90
|
+
log: (line) => logs.push(String(line)),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const cliPath = join(repoRoot, "dist", "cli", "index.js");
|
|
94
|
+
assert.ok(
|
|
95
|
+
logs.some((line) => line.includes("omo runtime wrapper") && line.includes(cliPath)),
|
|
96
|
+
`expected a warning naming the missing ${cliPath}; got:\n${logs.join("\n")}`,
|
|
97
|
+
);
|
|
98
|
+
await assert.rejects(readFile(join(codexHome, "bin", "omo"), "utf8"));
|
|
99
|
+
});
|
|
100
|
+
|
|
69
101
|
test("#given explicit CODEX_LOCAL_BIN_DIR #when resolving local installer bin dir #then preserves installed omo precedence", () => {
|
|
70
102
|
const homeDir = join(tmpdir(), "omo-codex-home-explicit");
|
|
71
103
|
const codexHome = join(tmpdir(), "omo-codex-install-explicit");
|
|
@@ -121,6 +153,7 @@ test("#given plugin hooks #when installing #then records trusted hook hashes", a
|
|
|
121
153
|
});
|
|
122
154
|
const pluginRoot = join(codexPackageRoot, "plugin");
|
|
123
155
|
await writePluginAt(pluginRoot, "alpha", "1.2.3");
|
|
156
|
+
await writeFile(join(pluginRoot, "dist", "cli.js"), "console.log('plugin cli')\n");
|
|
124
157
|
await writeJson(join(pluginRoot, "hooks", "hooks.json"), {
|
|
125
158
|
hooks: {
|
|
126
159
|
UserPromptSubmit: [
|
|
@@ -30,7 +30,22 @@ Create a PR that includes:
|
|
|
30
30
|
|
|
31
31
|
1. Read the user's bug report and identify the affected surface.
|
|
32
32
|
2. Invoke `$omo:debugging` for the investigation. If only unqualified skill names are exposed, invoke `$debugging` and state that it is the OMO debugging skill.
|
|
33
|
-
3.
|
|
33
|
+
3. Materialize the latest sources, then decide the target repository. Sync both checkouts on every run and compare them before choosing — a stale checkout routes the fix to the wrong repo:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
sync_latest_source() {
|
|
37
|
+
REPO="$1"; DEST="$2"
|
|
38
|
+
if [ ! -d "$DEST/.git" ]; then
|
|
39
|
+
gh repo clone "$REPO" "$DEST" -- --depth=1 \
|
|
40
|
+
|| git clone --depth=1 "https://github.com/$REPO" "$DEST"
|
|
41
|
+
fi
|
|
42
|
+
DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
43
|
+
git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
|
|
44
|
+
git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
|
|
45
|
+
}
|
|
46
|
+
sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
|
|
47
|
+
sync_latest_source openai/codex /tmp/openai-codex-source
|
|
48
|
+
```
|
|
34
49
|
4. Create a fresh temporary clone and branch. Do not modify the user's current repository for the target fix unless the current repository is itself the requested target and the user explicitly asked for local edits.
|
|
35
50
|
|
|
36
51
|
```bash
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lcx-doctor
|
|
3
|
+
description: "Diagnose LazyCodex and Codex CLI installation health against the latest sources. Use whenever the user asks for a doctor or health check, says LazyCodex, lazycodex-ai, omo-codex, or Codex behaves oddly after an install, update, or config change, suspects a stale, drifted, or broken setup, or wants the local install audited and compared with the latest LazyCodex and Codex code."
|
|
4
|
+
metadata:
|
|
5
|
+
short-description: Diagnose LazyCodex/Codex install health against latest sources
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# lcx-doctor
|
|
9
|
+
|
|
10
|
+
You are a LazyCodex install doctor. Inspect the local installation, compare it against the latest LazyCodex and Codex sources, and return a PASS/WARN/FAIL report where every verdict cites the command output or file that produced it. Diagnose only: the only writes you make are under `/tmp`. Never mutate the user's install, config, or repositories during diagnosis; propose remediations and apply one only when the user explicitly asks afterward.
|
|
11
|
+
|
|
12
|
+
Use GPT-5.5 style: outcome first, concise, evidence-bound.
|
|
13
|
+
|
|
14
|
+
## Required Workflow
|
|
15
|
+
|
|
16
|
+
1. Materialize the latest sources under `/tmp` first. Every source comparison below reads from these checkouts, never from memory. Re-sync on every run so a cached checkout cannot go stale:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
sync_latest_source() {
|
|
20
|
+
REPO="$1"; DEST="$2"
|
|
21
|
+
if [ ! -d "$DEST/.git" ]; then
|
|
22
|
+
gh repo clone "$REPO" "$DEST" -- --depth=1 \
|
|
23
|
+
|| git clone --depth=1 "https://github.com/$REPO" "$DEST"
|
|
24
|
+
fi
|
|
25
|
+
DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
26
|
+
git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
|
|
27
|
+
git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
|
|
28
|
+
}
|
|
29
|
+
sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
|
|
30
|
+
sync_latest_source openai/codex /tmp/openai-codex-source
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. Inventory the installed surface. Resolve `CODEX_HOME` (default `~/.codex`), then collect:
|
|
34
|
+
- `codex --version` and how `codex` resolves (`command -v codex`).
|
|
35
|
+
- Installed LazyCodex version: the `version` in the installed plugin manifest, discoverable with `find "${CODEX_HOME:-$HOME/.codex}/plugins" -path '*/.codex-plugin/plugin.json'`. Installed plugins live under `$CODEX_HOME/plugins/cache/<marketplace>/<name>/<version>/`.
|
|
36
|
+
- Latest LazyCodex version from `/tmp/lazycodex-source` (release tags or the version stamped in the repo) and latest Codex release (`gh release view --repo openai/codex`).
|
|
37
|
+
- OS, install method, and `lazycodex` / `lazycodex-ai` bin links resolving (`command -v`).
|
|
38
|
+
3. Check config and wiring against the latest installer, not against assumptions. Read what the current installer under `/tmp/lazycodex-source` writes (installer sources live in the omo-codex package, e.g. `scripts/install/`), then verify the local equivalents:
|
|
39
|
+
- `$CODEX_HOME/config.toml` exists and parses; LazyCodex-managed entries match what the latest installer would write.
|
|
40
|
+
- Plugin payload present and non-empty: `hooks/hooks.json`, `skills/`, `.mcp.json`, components under the installed plugin root.
|
|
41
|
+
- Stale project-local leftovers the installer now removes (e.g. `.codex/hooks.json`, `.codex/skills` in the project) are flagged, not deleted.
|
|
42
|
+
4. Probe the real surface. Run the built-in diagnostics first: `lazycodex doctor --json` (add `--verbose` when a check needs deeper traces) and fold its results into the report. A missing or crashing `lazycodex doctor` is itself a FAIL finding, not a reason to skip probing — fall back to `codex --version` plus a trivial non-interactive invocation that loads the plugin. Capture stderr verbatim; a clean exit with warnings is WARN, not PASS.
|
|
43
|
+
5. Compare for drift. Where installed bundled files differ from the same files at the installed version, or the latest source renamed or removed something the local config still references, record it with both paths.
|
|
44
|
+
6. Check whether each FAIL is already known: `gh issue list --repo code-yeongyu/lazycodex --search "<short symptom>" --state open` (and `openai/codex` when the failure points upstream). Link matches in the report instead of re-diagnosing from scratch.
|
|
45
|
+
7. If a probe fails and the cause is not explained by config or source comparison, invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
|
|
46
|
+
8. Emit the report.
|
|
47
|
+
|
|
48
|
+
## Doctor Report Template
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
## LazyCodex Doctor Report
|
|
52
|
+
|
|
53
|
+
### Summary
|
|
54
|
+
[One sentence: healthy, degraded, or broken — and the single most important next action.]
|
|
55
|
+
|
|
56
|
+
### Environment
|
|
57
|
+
- LazyCodex installed / latest:
|
|
58
|
+
- Codex CLI installed / latest:
|
|
59
|
+
- CODEX_HOME:
|
|
60
|
+
- OS / install method:
|
|
61
|
+
|
|
62
|
+
### Checks
|
|
63
|
+
| Check | Verdict | Evidence |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| Versions current | PASS/WARN/FAIL | [command output or file:line] |
|
|
66
|
+
| config.toml integrity | PASS/WARN/FAIL | [evidence] |
|
|
67
|
+
| Plugin payload wiring | PASS/WARN/FAIL | [evidence] |
|
|
68
|
+
| Bin links / aliases | PASS/WARN/FAIL | [evidence] |
|
|
69
|
+
| Runtime probe | PASS/WARN/FAIL | [evidence] |
|
|
70
|
+
| Drift vs latest source | PASS/WARN/FAIL | [evidence, citing /tmp/lazycodex-source or /tmp/openai-codex-source paths] |
|
|
71
|
+
|
|
72
|
+
### Remediations
|
|
73
|
+
1. [Most important fix first: exact command or config edit, and what it resolves.]
|
|
74
|
+
|
|
75
|
+
### Known Issues Matched
|
|
76
|
+
- [issue URL — or "none found"]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Follow-up Routing
|
|
80
|
+
|
|
81
|
+
- Local misconfiguration or stale install: give the remediation; reinstalling via the standard LazyCodex install command is the default fix for payload drift.
|
|
82
|
+
- Defect in LazyCodex or Codex product code: recommend `$lcx-report-bug` to file it, or `$lcx-contribute-bug-fix` when the user wants a fix PR. Both reuse the `/tmp` checkouts you already synced.
|
|
83
|
+
|
|
84
|
+
## Stop Conditions
|
|
85
|
+
|
|
86
|
+
Ask one narrow question only when a finding requires a destructive decision, such as deleting user-edited config or downgrading a version.
|
|
87
|
+
|
|
88
|
+
Do not:
|
|
89
|
+
|
|
90
|
+
- mutate config, installs, or repositories during diagnosis
|
|
91
|
+
- report a verdict without captured evidence
|
|
92
|
+
- compare against remembered source layout instead of `/tmp/lazycodex-source` and `/tmp/openai-codex-source`
|
|
93
|
+
- declare healthy while any probe output was never captured
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "lcx-doctor (omo)"
|
|
3
|
+
short_description: "Diagnose LazyCodex/Codex install health against latest sources"
|
|
4
|
+
search_terms:
|
|
5
|
+
- "lcx-doctor"
|
|
6
|
+
- "lazycodex doctor"
|
|
7
|
+
- "lazycodex health check"
|
|
8
|
+
- "codex doctor"
|
|
9
|
+
- "lazycodex install broken"
|
|
10
|
+
- "omo-codex diagnose"
|
|
11
|
+
default_prompt: "Use $lcx-doctor to sync the latest LazyCodex and Codex sources into /tmp, inventory the local installation, compare versions, config, and wiring against the latest sources, probe the real surface, and report PASS/WARN/FAIL findings with evidence and remediations."
|
|
@@ -33,24 +33,28 @@ Create or prepare a GitHub issue or PR that includes:
|
|
|
33
33
|
|
|
34
34
|
1. Read the user's bug report and identify the affected surface: LazyCodex installer, Codex plugin, skill, hook, MCP, CLI alias, GitHub marketplace sync, or web/docs.
|
|
35
35
|
2. Invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
|
|
36
|
-
3. Materialize upstream Codex
|
|
36
|
+
3. Materialize the latest LazyCodex and upstream Codex sources under `/tmp` before deciding ownership. Re-sync on every run so a cached checkout cannot go stale — stale source produces wrong routing and dead line references:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
fi
|
|
39
|
+
sync_latest_source() {
|
|
40
|
+
REPO="$1"; DEST="$2"
|
|
41
|
+
if [ ! -d "$DEST/.git" ]; then
|
|
42
|
+
gh repo clone "$REPO" "$DEST" -- --depth=1 \
|
|
43
|
+
|| git clone --depth=1 "https://github.com/$REPO" "$DEST"
|
|
44
|
+
fi
|
|
45
|
+
DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
46
|
+
git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
|
|
47
|
+
git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
|
|
48
|
+
}
|
|
49
|
+
sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
|
|
50
|
+
sync_latest_source openai/codex /tmp/openai-codex-source
|
|
45
51
|
```
|
|
46
|
-
|
|
47
|
-
If `gh` is unavailable, use `git clone --depth=1 https://github.com/openai/codex "$CODEX_SRC"`.
|
|
48
52
|
4. Follow the debugging skill far enough to gather runtime evidence:
|
|
49
53
|
- form at least three plausible hypotheses
|
|
50
54
|
- run the smallest reproduction that exercises the real surface
|
|
51
55
|
- confirm the root cause by observing the failing state
|
|
52
56
|
- identify the minimal fix path or maintainer action
|
|
53
|
-
5. Compare
|
|
57
|
+
5. Compare runtime evidence with both `/tmp/lazycodex-source` and `/tmp/openai-codex-source` before choosing the target repo. Cite exact files, commands, logs, or source paths that support the routing decision.
|
|
54
58
|
6. Choose the target repo:
|
|
55
59
|
- Use `code-yeongyu/lazycodex` when the bug is in LazyCodex integration, distribution, bundled plugin code, skills, hooks, MCP wiring, installer behavior, aliases, marketplace sync, docs, or any behavior that disappears in clean upstream Codex.
|
|
56
60
|
- Use `openai/codex` when the bug reproduces in clean upstream Codex without LazyCodex, or the failing behavior comes from Codex CLI core, plugin API contracts, sandboxing, approvals, config loading, or built-in tool behavior.
|
|
@@ -106,7 +110,7 @@ Write the issue body in English and keep it direct:
|
|
|
106
110
|
## Repository Decision
|
|
107
111
|
- Target repository:
|
|
108
112
|
- Why this belongs there:
|
|
109
|
-
- LazyCodex evidence:
|
|
113
|
+
- LazyCodex evidence (runtime + `/tmp/lazycodex-source`):
|
|
110
114
|
- Upstream Codex source evidence from `/tmp/openai-codex-source`:
|
|
111
115
|
|
|
112
116
|
## Reproduction
|
|
@@ -150,7 +154,7 @@ Use this when a PR is the right artifact:
|
|
|
150
154
|
## Repository Decision
|
|
151
155
|
- Target repository:
|
|
152
156
|
- Why this belongs there:
|
|
153
|
-
- LazyCodex evidence:
|
|
157
|
+
- LazyCodex evidence (runtime + `/tmp/lazycodex-source`):
|
|
154
158
|
- Upstream Codex source evidence from `/tmp/openai-codex-source`:
|
|
155
159
|
|
|
156
160
|
## Root Cause
|
|
@@ -227,6 +231,6 @@ Do not file:
|
|
|
227
231
|
- a vague issue without reproduction steps
|
|
228
232
|
- an issue that claims a root cause not supported by runtime evidence
|
|
229
233
|
- a duplicate when commenting on an existing issue is enough
|
|
230
|
-
- an
|
|
234
|
+
- an issue without checking the latest `/tmp/lazycodex-source` and `/tmp/openai-codex-source` checkouts
|
|
231
235
|
- a LazyCodex issue when the bug is proven to reproduce in clean upstream Codex
|
|
232
236
|
- a fix PR without a concrete branch, implemented fix, and verification result
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lsp-setup
|
|
3
|
+
description: "Configure a Language Server (LSP) for a specific language so editor/agent tooling — diagnostics, go-to-definition, find-references, rename — works. Use when you need to: configure LSP, lsp setup, set up or install a language server, fix 'no LSP server configured' / 'server not installed', choose between servers (basedpyright vs pyright vs ty vs ruff), or wire .codex/lsp-client.json / .opencode/lsp.json. 언어서버 설정. Routes by file extension to references/<language>/README.md for the exact builtin server, per-OS install commands (macOS/Linux/Windows), config snippets for both config files, initialization options, alternatives, and troubleshooting. Ships scripts: detect-lsp.ts (scan a project for languages + each server's install/config status) and verify-lsp.ts (run a real diagnostics roundtrip). Covers typescript, python, go, rust, c/c++, java, kotlin, c#/razor, swift, ruby, php, dart, elixir, zig, lua, bash, yaml, terraform, haskell, julia."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LSP Setup
|
|
7
|
+
|
|
8
|
+
Configure the right Language Server for a project so the `lsp` MCP tools
|
|
9
|
+
(`diagnostics`, `goto_definition`, `find_references`, `symbols`, `rename`)
|
|
10
|
+
actually work. This skill is an index: detect what a project needs, install the
|
|
11
|
+
server, write the config, then verify with a real roundtrip.
|
|
12
|
+
|
|
13
|
+
The list of servers we ship as **builtin** is the source of truth in
|
|
14
|
+
`packages/lsp-tools-mcp/src/lsp/server-definitions.ts` (`BUILTIN_SERVERS` +
|
|
15
|
+
`LSP_INSTALL_HINTS`). The per-language references below mirror it.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## PHASE 0 — LANGUAGE GATE (run first)
|
|
20
|
+
|
|
21
|
+
Identify the language from the file extension, then **read the matching
|
|
22
|
+
reference before installing or configuring anything**.
|
|
23
|
+
|
|
24
|
+
| Extension(s) | Reference |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `.ts .tsx .js .jsx .mjs .cjs .mts .cts .vue .svelte .astro` | `references/typescript/README.md` |
|
|
27
|
+
| `.py .pyi` | `references/python/README.md` |
|
|
28
|
+
| `.go` | `references/go/README.md` |
|
|
29
|
+
| `.rs` | `references/rust/README.md` |
|
|
30
|
+
| `.c .cpp .cc .cxx .h .hpp .hh .hxx` | `references/c-cpp/README.md` |
|
|
31
|
+
| `.java` | `references/java/README.md` |
|
|
32
|
+
| `.kt .kts` | `references/kotlin/README.md` |
|
|
33
|
+
| `.cs .razor .cshtml` | `references/csharp/README.md` |
|
|
34
|
+
| `.swift` | `references/swift/README.md` |
|
|
35
|
+
| `.rb .rake .gemspec .ru` | `references/ruby/README.md` |
|
|
36
|
+
| `.php` | `references/php/README.md` |
|
|
37
|
+
| `.dart` | `references/dart/README.md` |
|
|
38
|
+
| `.ex .exs` | `references/elixir/README.md` |
|
|
39
|
+
| `.zig .zon` | `references/zig/README.md` |
|
|
40
|
+
| `.lua` | `references/lua/README.md` |
|
|
41
|
+
| `.sh .bash .zsh .ksh` | `references/bash/README.md` |
|
|
42
|
+
| `.yaml .yml` | `references/yaml/README.md` |
|
|
43
|
+
| `.tf .tfvars` | `references/terraform/README.md` |
|
|
44
|
+
| `.hs .lhs` | `references/haskell/README.md` |
|
|
45
|
+
| `.jl` | `references/julia/README.md` |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## WORKFLOW — detect → install → configure → verify
|
|
50
|
+
|
|
51
|
+
### 1. Detect
|
|
52
|
+
|
|
53
|
+
Scan the project to see which languages are present and whether each server is
|
|
54
|
+
installed and configured:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bun scripts/detect-lsp.ts <projectDir> # human report (default: cwd)
|
|
58
|
+
bun scripts/detect-lsp.ts <projectDir> --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For each detected language it prints the builtin server id, the executable it
|
|
62
|
+
needs on `PATH`, whether that executable is installed, an install hint, and
|
|
63
|
+
whether a project config file already references it.
|
|
64
|
+
|
|
65
|
+
### 2. Install
|
|
66
|
+
|
|
67
|
+
Open `references/<language>/README.md` and run the install command for your OS.
|
|
68
|
+
Then confirm the executable resolves:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
command -v <server-executable> # e.g. typescript-language-server, gopls, rust-analyzer
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 3. Configure
|
|
75
|
+
|
|
76
|
+
Most builtin servers need **no config** — they are resolved automatically by
|
|
77
|
+
file extension. Write config only to: pick between competing servers, set a
|
|
78
|
+
`priority`, pass `initialization` options, override `extensions`, set `env`, or
|
|
79
|
+
`disable` a server.
|
|
80
|
+
|
|
81
|
+
Two project-scoped config files, **identical JSON shape**:
|
|
82
|
+
|
|
83
|
+
- Codex harness → `.codex/lsp-client.json` (user: `~/.codex/lsp-client.json`)
|
|
84
|
+
- OpenCode/omo harness → `.opencode/lsp.json` (also `.omo/lsp.json`)
|
|
85
|
+
|
|
86
|
+
```jsonc
|
|
87
|
+
{
|
|
88
|
+
"lsp": {
|
|
89
|
+
"<server-id>": {
|
|
90
|
+
"command": ["<bin>", "<args>"], // optional for builtin ids (supplied automatically)
|
|
91
|
+
"extensions": [".ext"], // optional override
|
|
92
|
+
"priority": 100, // higher wins when several servers match an extension
|
|
93
|
+
"initialization": { }, // server-specific initializationOptions
|
|
94
|
+
"env": { "KEY": "value" }, // optional
|
|
95
|
+
"disabled": false // set true to turn a server off
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Rules enforced by `config-loader.ts`:
|
|
102
|
+
|
|
103
|
+
- In a **project** config (`.codex/lsp-client.json`, `.opencode/lsp.json`) an
|
|
104
|
+
entry whose id is a **builtin** server inherits `command` automatically — you
|
|
105
|
+
only override `extensions` / `priority` / `initialization`. A non-builtin id
|
|
106
|
+
in a project config is **ignored**.
|
|
107
|
+
- To define a **fully custom** (non-builtin) server with its own `command`, put
|
|
108
|
+
it in the **user** config (`~/.codex/lsp-client.json`, or the path set by
|
|
109
|
+
`LSP_TOOLS_MCP_USER_CONFIG`), where `command` + `extensions` are honored.
|
|
110
|
+
- Project entries win over user entries; both win over builtin defaults.
|
|
111
|
+
|
|
112
|
+
Each language reference gives a ready-to-paste snippet.
|
|
113
|
+
|
|
114
|
+
### 4. Verify
|
|
115
|
+
|
|
116
|
+
Run a real diagnostics roundtrip against a source file. This spawns the server,
|
|
117
|
+
opens the file, requests diagnostics, and reports `OK`/`FAIL`:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
bun scripts/verify-lsp.ts <path/to/file.ext>
|
|
121
|
+
bun scripts/verify-lsp.ts <file> --timeout=90000
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`OK` = the server started and answered. `FAIL: language server not installed`
|
|
125
|
+
= go back to step 2. Other `FAIL` text carries the server/startup error.
|
|
126
|
+
`SKIP` = the engine source could not be located; run from inside the omo
|
|
127
|
+
repo/worktree, or call the `lsp` MCP `diagnostics` tool directly.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Scripts
|
|
132
|
+
|
|
133
|
+
| Script | Purpose |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `scripts/detect-lsp.ts` | Scan a directory; per detected language report server id, install status, install hint, config status. `--json` for machine output. |
|
|
136
|
+
| `scripts/verify-lsp.ts` | Real LSP diagnostics roundtrip for one file via the `lsp-tools-mcp` engine; `OK`/`FAIL`/`SKIP` + exit code 0/1/3. |
|
|
137
|
+
| `scripts/lsp-server-table.ts` | Embedded snapshot of the primary builtin server per language (mirrors `server-definitions.ts`). |
|
|
138
|
+
|
|
139
|
+
Run with [Bun](https://bun.sh): `curl -fsSL https://bun.sh/install | bash`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Bash — LSP setup
|
|
2
|
+
|
|
3
|
+
- **Builtin server:** `bash` — `bash-language-server start`
|
|
4
|
+
- **Extensions:** `.sh .bash .zsh .ksh`
|
|
5
|
+
- **Install hint:** `npm install -g bash-language-server`
|
|
6
|
+
|
|
7
|
+
An alias id `bash-ls` exists with the identical command; either id works.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
- **macOS:** `npm install -g bash-language-server`
|
|
12
|
+
- **Linux:** `npm install -g bash-language-server`
|
|
13
|
+
- **Windows:** `npm install -g bash-language-server` (PowerShell)
|
|
14
|
+
|
|
15
|
+
For real diagnostics, also install `shellcheck`:
|
|
16
|
+
|
|
17
|
+
- **macOS:** `brew install shellcheck`
|
|
18
|
+
- **Linux:** `apt install shellcheck` (or `dnf install ShellCheck`)
|
|
19
|
+
- **Windows:** `scoop install shellcheck`
|
|
20
|
+
|
|
21
|
+
Confirm it resolves:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
command -v bash-language-server
|
|
25
|
+
command -v shellcheck
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Configure
|
|
29
|
+
|
|
30
|
+
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in `.codex/lsp-client.json` (Codex) AND `.opencode/lsp.json` (OpenCode/omo):
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{ "lsp": { "bash": { "priority": 100 } } }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For builtin ids in a PROJECT config, `command` is supplied automatically — only set `priority`/`initialization`/`extensions`/`disabled`/`env`. A fully custom (non-builtin) server with its own `command` must go in the USER config (`~/.codex/lsp-client.json`).
|
|
37
|
+
|
|
38
|
+
### Initialization options (only if commonly needed)
|
|
39
|
+
|
|
40
|
+
None commonly required. `bash-language-server` discovers `shellcheck` on PATH automatically. To point at a non-PATH binary, export `SHELLCHECK_PATH` via `env`:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{ "lsp": { "bash": { "env": { "SHELLCHECK_PATH": "/opt/bin/shellcheck" } } } }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Alternatives
|
|
47
|
+
|
|
48
|
+
- `shellcheck` standalone as a linter-only flow (no LSP).
|
|
49
|
+
- `shfmt` for formatting (complements, does not replace, the LSP).
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
- **PATH:** `bash-language-server` on PATH; reopen shell after `npm -g` install.
|
|
53
|
+
- **No diagnostics:** `shellcheck` missing — diagnostics are powered by it; install and reopen.
|
|
54
|
+
- **Wrong shell dialect:** `.zsh`/`.ksh` are linted as bash; shellcheck may flag shell-specific syntax.
|
|
55
|
+
|
|
56
|
+
## Verify
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bun ../../scripts/verify-lsp.ts path/to/file.sh
|
|
60
|
+
```
|