oh-my-opencode 4.19.0 → 4.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/command/omomomo.md +1 -1
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.opencode/command/omomomo.md +1 -1
- package/README.ja.md +6 -6
- package/README.ko.md +6 -6
- package/README.md +6 -6
- package/README.ru.md +6 -6
- package/README.zh-cn.md +6 -6
- package/dist/agents/atlas/agent.d.ts +5 -3
- package/dist/agents/explore.d.ts +4 -2
- package/dist/agents/gpt-prompt-identity.d.ts +3 -0
- package/dist/agents/hephaestus/agent.d.ts +4 -2
- package/dist/agents/librarian.d.ts +4 -2
- package/dist/agents/metis.d.ts +4 -2
- package/dist/agents/momus.d.ts +3 -2
- package/dist/agents/multimodal-looker.d.ts +4 -2
- package/dist/agents/oracle.d.ts +4 -2
- package/dist/agents/sisyphus/claude-opus-5.d.ts +33 -0
- package/dist/agents/sisyphus/gpt-5-5.d.ts +1 -1
- package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +1 -0
- package/dist/agents/sisyphus/index.d.ts +2 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +5 -2
- package/dist/agents/sisyphus-junior/agent.d.ts +4 -1
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +23577 -19269
- package/dist/cli-node/index.js +23577 -19269
- package/dist/config/schema/agent-names.d.ts +26 -26
- package/dist/config/schema/agent-overrides.d.ts +400 -400
- package/dist/config/schema/browser-automation.d.ts +2 -2
- package/dist/config/schema/categories.d.ts +36 -36
- package/dist/config/schema/codegraph.d.ts +2 -0
- package/dist/config/schema/commands.d.ts +2 -2
- package/dist/config/schema/dynamic-context-pruning.d.ts +1 -1
- package/dist/config/schema/experimental.d.ts +1 -1
- package/dist/config/schema/fallback-models.d.ts +25 -25
- package/dist/config/schema/hooks.d.ts +43 -43
- package/dist/config/schema/internal/permission.d.ts +9 -9
- package/dist/config/schema/keyword-detector.d.ts +6 -6
- package/dist/config/schema/oh-my-opencode-config.d.ts +404 -402
- package/dist/config/schema/tmux.d.ts +6 -6
- package/dist/create-hooks.d.ts +35 -35
- package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +11 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/claude-tasks/types.d.ts +4 -4
- package/dist/features/team-mode/team-runtime/shutdown-helpers.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/shutdown-test-fixtures.d.ts +4 -4
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +42 -42
- package/dist/features/tmux-subagent/environment-eligibility.d.ts +2 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +1 -0
- package/dist/features/tui-sidebar/snapshot-schema.d.ts +6 -6
- package/dist/help/schema/acp.d.ts +3 -3
- package/dist/help/schema/doctor.d.ts +4 -4
- package/dist/help/schema/status.d.ts +3 -3
- package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
- package/dist/hooks/goal/types.d.ts +5 -5
- package/dist/hooks/non-interactive-env/constants.d.ts +4 -1
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/start-work/notepad-scaffold.d.ts +10 -0
- package/dist/hooks/start-work/parse-user-request.d.ts +2 -0
- package/dist/hooks/start-work/worktree-block.d.ts +5 -0
- package/dist/index.js +27370 -21301
- package/dist/mcp/types.d.ts +3 -3
- package/dist/oh-my-opencode.schema.json +11 -0
- package/dist/plugin/chat-message/loop-commands.d.ts +1 -0
- package/dist/plugin/command-execute-before.d.ts +3 -3
- package/dist/plugin/hooks/create-core-hooks.d.ts +25 -25
- package/dist/shared/omo-process-sweep.d.ts +18 -0
- package/dist/shared/tmux/tmux-utils/environment.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils.d.ts +1 -1
- package/dist/shared/typescript-native-source-parser.d.ts +7 -0
- package/dist/skills/coding-agent-sessions/SKILL.md +5 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/dist/skills/debugging/SKILL.md +2 -1
- package/dist/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/dist/skills/programming/SKILL.md +11 -1
- package/dist/skills/programming/references/logging.md +6 -1
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +75 -11
- package/dist/skills/start-work/SKILL.md +12 -2
- package/dist/skills/ulw-plan/SKILL.md +21 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +12 -1
- package/dist/skills/ulw-plan/references/intent-clear.md +1 -1
- package/dist/testing/create-plugin-module.d.ts +1 -0
- package/dist/tools/task/types.d.ts +10 -10
- package/dist/tui.js +23442 -19182
- package/package.json +14 -14
- package/packages/git-bash-mcp/dist/cli.js +54 -8
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +62 -2
- package/packages/lsp-core/src/lsp/client.ts +14 -1
- package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +2 -2
- package/packages/lsp-core/src/mcp.ts +9 -0
- package/packages/lsp-daemon/dist/cli.js +319 -51
- package/packages/lsp-daemon/dist/client.js +136 -48
- package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -10
- package/packages/lsp-daemon/dist/daemon-client.js +4 -34
- package/packages/lsp-daemon/dist/daemon-failure-result.d.ts +3 -0
- package/packages/lsp-daemon/dist/daemon-failure-result.js +38 -0
- package/packages/lsp-daemon/dist/daemon-request-error.d.ts +14 -0
- package/packages/lsp-daemon/dist/daemon-request-error.js +26 -0
- package/packages/lsp-daemon/dist/daemon-server.js +5 -1
- package/packages/lsp-daemon/dist/index.js +137 -48
- package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
- package/packages/lsp-daemon/dist/proxy.js +1 -0
- package/packages/lsp-daemon/dist/version-reap.d.ts +26 -0
- package/packages/lsp-daemon/dist/version-reap.js +182 -0
- package/packages/lsp-tools-mcp/dist/cli.js +61 -10
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +61 -10
- package/packages/lsp-tools-mcp/dist/tools.js +6 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +72 -12
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +22 -2
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +779 -385
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +302 -173
- package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +23 -42
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +98 -32
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +5 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +17 -9
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +18 -25
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +1 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +5 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +176 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +6 -1
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +31 -2
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +6 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +65 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -7
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +2 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +57 -3
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +42 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +122 -10
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +2 -2
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +101 -64
- 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/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +80 -40
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +11 -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/post-compact-budget.ts +11 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +60 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +1 -1
- 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/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- 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/lazycodex-clone-fidelity-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +12 -7
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
- 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/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +21 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +42 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +6 -4
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +12 -7
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.d.ts +21 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +64 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +15 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -33
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +998 -593
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +10 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +81 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +7 -59
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.js +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- 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 +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +49 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +13 -45
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +20 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +125 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +6 -58
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/validation-batch.ts +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +76 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +111 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +57 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +152 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +29 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch-checkpoint.test.ts +147 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch.test.ts +73 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -2
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -2
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -2
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +41 -41
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +44 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +11 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +6 -1
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +75 -11
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +12 -2
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +21 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +1 -1
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +9 -9
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +26 -0
- package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +41 -0
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +22 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +49 -5
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/shared-skills/skills/debugging/SKILL.md +2 -1
- package/packages/shared-skills/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/shared-skills/skills/programming/SKILL.md +11 -1
- package/packages/shared-skills/skills/programming/references/logging.md +6 -1
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +75 -11
- package/packages/shared-skills/skills/start-work/SKILL.md +12 -2
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +21 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +1 -1
|
@@ -5,6 +5,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
5
5
|
import { Readable, Writable } from "node:stream";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
+
import { CODEGRAPH_PINNED_VERSION } from "../../../../../utils/src/codegraph/manifest.ts";
|
|
8
9
|
import { resolveServeProcessInvocation, runCodegraphServe } from "../src/serve.ts";
|
|
9
10
|
|
|
10
11
|
const componentRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
@@ -27,12 +28,6 @@ describe("runCodegraphServe", () => {
|
|
|
27
28
|
env: { CUSTOM: "drop", HOME: "/tmp/home", OPENAI_API_KEY: "sk-test-secret" },
|
|
28
29
|
nodeVersion: "22.14.0",
|
|
29
30
|
homeDir: "/tmp/home",
|
|
30
|
-
buildEnv: ({ homeDir }) => ({
|
|
31
|
-
CODEGRAPH_INSTALL_DIR: `${homeDir}/.omo/codegraph`,
|
|
32
|
-
CODEGRAPH_NO_DOWNLOAD: "1",
|
|
33
|
-
CODEGRAPH_TELEMETRY: "0",
|
|
34
|
-
DO_NOT_TRACK: "1",
|
|
35
|
-
}),
|
|
36
31
|
resolve: () => ({ argsPrefix: ["shim.js"], command: "node", exists: true, source: "bundled" }),
|
|
37
32
|
runProcess: (
|
|
38
33
|
command: string,
|
|
@@ -53,7 +48,58 @@ describe("runCodegraphServe", () => {
|
|
|
53
48
|
command: "node",
|
|
54
49
|
cwd: resolve(runCwd),
|
|
55
50
|
env: {
|
|
56
|
-
CODEGRAPH_INSTALL_DIR: "/tmp/home
|
|
51
|
+
CODEGRAPH_INSTALL_DIR: join("/tmp/home", ".omo", "codegraph"),
|
|
52
|
+
CODEGRAPH_NO_DOWNLOAD: "1",
|
|
53
|
+
CODEGRAPH_TELEMETRY: "0",
|
|
54
|
+
DO_NOT_TRACK: "1",
|
|
55
|
+
HOME: "/tmp/home",
|
|
56
|
+
},
|
|
57
|
+
stdio: "pipe",
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
expect(calls[0]?.env["CUSTOM"]).toBeUndefined();
|
|
61
|
+
expect(calls[0]?.env["OPENAI_API_KEY"]).toBeUndefined();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("#given codegraph.daemon=false #when serving MCP #then CODEGRAPH_NO_DAEMON pins daemon-off", async () => {
|
|
65
|
+
// given
|
|
66
|
+
const runCwd = componentRoot;
|
|
67
|
+
const calls: Array<{
|
|
68
|
+
readonly args: readonly string[];
|
|
69
|
+
readonly command: string;
|
|
70
|
+
readonly cwd: string;
|
|
71
|
+
readonly env: Record<string, string | undefined>;
|
|
72
|
+
readonly stdio: "pipe";
|
|
73
|
+
}> = [];
|
|
74
|
+
|
|
75
|
+
// when
|
|
76
|
+
const exitCode = await runCodegraphServe({
|
|
77
|
+
config: { codegraph: { daemon: false, enabled: true }, sources: [], warnings: [] },
|
|
78
|
+
cwd: runCwd,
|
|
79
|
+
env: { CUSTOM: "drop", HOME: "/tmp/home", OPENAI_API_KEY: "sk-test-secret" },
|
|
80
|
+
nodeVersion: "22.14.0",
|
|
81
|
+
homeDir: "/tmp/home",
|
|
82
|
+
resolve: () => ({ argsPrefix: ["shim.js"], command: "node", exists: true, source: "bundled" }),
|
|
83
|
+
runProcess: (
|
|
84
|
+
command: string,
|
|
85
|
+
args: readonly string[],
|
|
86
|
+
options: { readonly cwd: string; readonly env: Record<string, string | undefined>; readonly stdio: "pipe" },
|
|
87
|
+
) => {
|
|
88
|
+
calls.push({ args, command, cwd: options.cwd, env: options.env, stdio: options.stdio });
|
|
89
|
+
return Promise.resolve(7);
|
|
90
|
+
},
|
|
91
|
+
stderr: { write: () => undefined },
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// then
|
|
95
|
+
expect(exitCode).toBe(7);
|
|
96
|
+
expect(calls).toEqual([
|
|
97
|
+
{
|
|
98
|
+
args: ["shim.js", "serve", "--mcp"],
|
|
99
|
+
command: "node",
|
|
100
|
+
cwd: resolve(runCwd),
|
|
101
|
+
env: {
|
|
102
|
+
CODEGRAPH_INSTALL_DIR: join("/tmp/home", ".omo", "codegraph"),
|
|
57
103
|
CODEGRAPH_NO_DAEMON: "1",
|
|
58
104
|
CODEGRAPH_NO_DOWNLOAD: "1",
|
|
59
105
|
CODEGRAPH_TELEMETRY: "0",
|
|
@@ -63,6 +109,7 @@ describe("runCodegraphServe", () => {
|
|
|
63
109
|
stdio: "pipe",
|
|
64
110
|
},
|
|
65
111
|
]);
|
|
112
|
+
expect(calls[0]?.env["CODEGRAPH_NO_DAEMON"]).toBe("1");
|
|
66
113
|
expect(calls[0]?.env["CUSTOM"]).toBeUndefined();
|
|
67
114
|
expect(calls[0]?.env["OPENAI_API_KEY"]).toBeUndefined();
|
|
68
115
|
});
|
|
@@ -136,12 +183,12 @@ describe("runCodegraphServe", () => {
|
|
|
136
183
|
expect(spawned).toEqual([{ args: ["serve", "--mcp"], command: commandPath }]);
|
|
137
184
|
});
|
|
138
185
|
|
|
139
|
-
it("#given
|
|
140
|
-
await withProcessPlatform(
|
|
186
|
+
it("#given Codex SOT install_dir has the pinned launcher and daemon is omitted #when serving MCP #then it defaults daemon-on", async () => {
|
|
187
|
+
await withProcessPlatform(process.platform, async () => {
|
|
141
188
|
// given
|
|
142
189
|
const tempRoot = mkdtempSync(join(tmpdir(), "omo-codegraph-serve-install-dir-"));
|
|
143
190
|
const installDir = join(tempRoot, "custom-codegraph");
|
|
144
|
-
const binPath = join(installDir, "bin", "codegraph.cmd");
|
|
191
|
+
const binPath = join(installDir, "bin", process.platform === "win32" ? "codegraph.cmd" : "codegraph");
|
|
145
192
|
const calls: Array<{
|
|
146
193
|
readonly args: readonly string[];
|
|
147
194
|
readonly command: string;
|
|
@@ -150,7 +197,12 @@ describe("runCodegraphServe", () => {
|
|
|
150
197
|
|
|
151
198
|
try {
|
|
152
199
|
mkdirSync(join(installDir, "bin"), { recursive: true });
|
|
200
|
+
mkdirSync(join(installDir, ".provisioned"), { recursive: true });
|
|
153
201
|
writeFileSync(binPath, "");
|
|
202
|
+
writeFileSync(
|
|
203
|
+
join(installDir, ".provisioned", `codegraph-${CODEGRAPH_PINNED_VERSION}.json`),
|
|
204
|
+
`${JSON.stringify({ binPath, version: CODEGRAPH_PINNED_VERSION })}\n`,
|
|
205
|
+
);
|
|
154
206
|
|
|
155
207
|
// when
|
|
156
208
|
const exitCode = await runCodegraphServe({
|
|
@@ -169,6 +221,65 @@ describe("runCodegraphServe", () => {
|
|
|
169
221
|
stderr: { write: () => undefined },
|
|
170
222
|
});
|
|
171
223
|
|
|
224
|
+
// then
|
|
225
|
+
expect(exitCode).toBe(0);
|
|
226
|
+
expect(calls).toEqual([
|
|
227
|
+
{
|
|
228
|
+
args: ["serve", "--mcp"],
|
|
229
|
+
command: binPath,
|
|
230
|
+
env: {
|
|
231
|
+
CODEGRAPH_INSTALL_DIR: installDir,
|
|
232
|
+
CODEGRAPH_NO_DOWNLOAD: "1",
|
|
233
|
+
CODEGRAPH_TELEMETRY: "0",
|
|
234
|
+
DO_NOT_TRACK: "1",
|
|
235
|
+
HOME: "/tmp/home",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
]);
|
|
239
|
+
} finally {
|
|
240
|
+
rmSync(tempRoot, { recursive: true, force: true });
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it("#given Codex SOT install_dir with codegraph.daemon=false #when serving MCP #then CODEGRAPH_NO_DAEMON pins daemon-off", async () => {
|
|
246
|
+
await withProcessPlatform(process.platform, async () => {
|
|
247
|
+
// given
|
|
248
|
+
const tempRoot = mkdtempSync(join(tmpdir(), "omo-codegraph-serve-install-dir-daemon-"));
|
|
249
|
+
const installDir = join(tempRoot, "custom-codegraph");
|
|
250
|
+
const binPath = join(installDir, "bin", process.platform === "win32" ? "codegraph.cmd" : "codegraph");
|
|
251
|
+
const calls: Array<{
|
|
252
|
+
readonly args: readonly string[];
|
|
253
|
+
readonly command: string;
|
|
254
|
+
readonly env: Record<string, string | undefined>;
|
|
255
|
+
}> = [];
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
mkdirSync(join(installDir, "bin"), { recursive: true });
|
|
259
|
+
mkdirSync(join(installDir, ".provisioned"), { recursive: true });
|
|
260
|
+
writeFileSync(binPath, "");
|
|
261
|
+
writeFileSync(
|
|
262
|
+
join(installDir, ".provisioned", `codegraph-${CODEGRAPH_PINNED_VERSION}.json`),
|
|
263
|
+
`${JSON.stringify({ binPath, version: CODEGRAPH_PINNED_VERSION })}\n`,
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
// when
|
|
267
|
+
const exitCode = await runCodegraphServe({
|
|
268
|
+
config: { codegraph: { daemon: false, enabled: true, install_dir: installDir }, sources: [], trustedCodegraphInstallDir: installDir, warnings: [] },
|
|
269
|
+
env: { HOME: "/tmp/home" },
|
|
270
|
+
nodeVersion: "22.14.0",
|
|
271
|
+
homeDir: "/tmp/home",
|
|
272
|
+
resolve: (options) => {
|
|
273
|
+
const provisioned = options.provisioned?.();
|
|
274
|
+
return { argsPrefix: [], command: provisioned ?? "missing", exists: provisioned !== null && provisioned !== undefined, source: "provisioned" };
|
|
275
|
+
},
|
|
276
|
+
runProcess: (command, args, options) => {
|
|
277
|
+
calls.push({ args, command, env: options.env });
|
|
278
|
+
return Promise.resolve(0);
|
|
279
|
+
},
|
|
280
|
+
stderr: { write: () => undefined },
|
|
281
|
+
});
|
|
282
|
+
|
|
172
283
|
// then
|
|
173
284
|
expect(exitCode).toBe(0);
|
|
174
285
|
expect(calls).toEqual([
|
|
@@ -185,6 +296,7 @@ describe("runCodegraphServe", () => {
|
|
|
185
296
|
},
|
|
186
297
|
},
|
|
187
298
|
]);
|
|
299
|
+
expect(calls[0]?.env["CODEGRAPH_NO_DAEMON"]).toBe("1");
|
|
188
300
|
} finally {
|
|
189
301
|
rmSync(tempRoot, { recursive: true, force: true });
|
|
190
302
|
}
|
package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts
CHANGED
|
@@ -52,7 +52,7 @@ describe("CodeGraph SessionStart worker Node support", () => {
|
|
|
52
52
|
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-node-provision-home-"));
|
|
53
53
|
const binPath = join(homeDir, ".omo", "codegraph", "bin", "codegraph");
|
|
54
54
|
const calls: Array<{ readonly args: readonly string[]; readonly command: string }> = [];
|
|
55
|
-
const provisionCalls: Array<{ readonly installDir?: string; readonly lockDir: string; readonly version: "1.
|
|
55
|
+
const provisionCalls: Array<{ readonly installDir?: string; readonly lockDir: string; readonly version: "1.4.1" }> = [];
|
|
56
56
|
const outcomes: unknown[] = [];
|
|
57
57
|
|
|
58
58
|
try {
|
|
@@ -90,7 +90,7 @@ describe("CodeGraph SessionStart worker Node support", () => {
|
|
|
90
90
|
{ args: ["init"], command: binPath },
|
|
91
91
|
]);
|
|
92
92
|
expect(provisionCalls).toEqual([
|
|
93
|
-
{ installDir: join(homeDir, ".omo", "codegraph"), lockDir: join(homeDir, ".omo", "codegraph", ".locks"), version: "1.
|
|
93
|
+
{ installDir: join(homeDir, ".omo", "codegraph"), lockDir: join(homeDir, ".omo", "codegraph", ".locks"), version: "1.4.1" },
|
|
94
94
|
]);
|
|
95
95
|
expect(outcomes).toEqual([{ action: "initialized", exitCode: 0, projectRoot: workspace, source: "provisioned", timedOut: false }]);
|
|
96
96
|
} finally {
|
package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts
CHANGED
|
@@ -3,66 +3,70 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "nod
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
|
|
6
|
+
import { CODEGRAPH_PINNED_VERSION } from "../../../../../utils/src/codegraph/manifest.ts";
|
|
6
7
|
import { resolveCodegraphCommandInvocation, runCodegraphSessionStartWorker } from "../src/hook.ts";
|
|
7
8
|
|
|
8
9
|
describe("CodeGraph SessionStart worker flow", () => {
|
|
9
|
-
it("#given
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
it("#given install_dir has the pinned platform binary #when worker resolves provisioned CodeGraph #then it uses that launcher", async () => {
|
|
11
|
+
// given
|
|
12
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-"));
|
|
13
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-home-"));
|
|
14
|
+
const installDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-install-"));
|
|
15
|
+
const binPath = join(installDir, "bin", process.platform === "win32" ? "codegraph.cmd" : "codegraph");
|
|
16
|
+
const calls: { readonly args: readonly string[]; readonly command: string; readonly env: Record<string, string> }[] = [];
|
|
17
|
+
const outcomes: unknown[] = [];
|
|
18
|
+
try {
|
|
19
|
+
mkdirSync(join(installDir, "bin"), { recursive: true });
|
|
20
|
+
mkdirSync(join(installDir, ".provisioned"), { recursive: true });
|
|
21
|
+
writeFileSync(binPath, "");
|
|
22
|
+
writeFileSync(
|
|
23
|
+
join(installDir, ".provisioned", `codegraph-${CODEGRAPH_PINNED_VERSION}.json`),
|
|
24
|
+
`${JSON.stringify({ binPath, version: CODEGRAPH_PINNED_VERSION })}\n`,
|
|
25
|
+
);
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
prepareWorkspace: () => ({
|
|
35
|
-
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
36
|
-
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
37
|
-
linked: true,
|
|
38
|
-
mode: "global-linked",
|
|
39
|
-
projectLink: join(workspace, ".codegraph"),
|
|
40
|
-
}),
|
|
41
|
-
resolveCommand: (options) => {
|
|
42
|
-
const provisioned = options?.provisioned?.() ?? null;
|
|
43
|
-
return { argsPrefix: [], command: provisioned ?? "missing-codegraph", exists: provisioned !== null, source: provisioned === null ? "path" : "provisioned" };
|
|
44
|
-
},
|
|
45
|
-
runCommand: (_projectRoot, command, args, options) => {
|
|
46
|
-
calls.push({ args, command, env: options.env });
|
|
47
|
-
return Promise.resolve({ exitCode: 0, stdout: calls.length === 1 ? '{"initialized":false}' : "", timedOut: false });
|
|
48
|
-
},
|
|
27
|
+
// when
|
|
28
|
+
const result = await runCodegraphSessionStartWorker({
|
|
29
|
+
config: { codegraph: { enabled: true, install_dir: installDir }, sources: [], trustedCodegraphInstallDir: installDir, warnings: [] },
|
|
30
|
+
nodeVersion: "22.14.0",
|
|
31
|
+
cwd: workspace,
|
|
32
|
+
env: { HOME: homeDir },
|
|
33
|
+
logOutcome: (outcome) => outcomes.push(outcome),
|
|
34
|
+
deps: {
|
|
35
|
+
ensureGitignored: () => true,
|
|
36
|
+
ensureProvisioned: () => {
|
|
37
|
+
throw new Error("provisioning should not run when install_dir binary exists");
|
|
49
38
|
},
|
|
50
|
-
|
|
39
|
+
prepareWorkspace: () => ({
|
|
40
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
41
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
42
|
+
linked: true,
|
|
43
|
+
mode: "global-linked",
|
|
44
|
+
projectLink: join(workspace, ".codegraph"),
|
|
45
|
+
}),
|
|
46
|
+
resolveCommand: (options) => {
|
|
47
|
+
const provisioned = options?.provisioned?.() ?? null;
|
|
48
|
+
return { argsPrefix: [], command: provisioned ?? "missing-codegraph", exists: provisioned !== null, source: provisioned === null ? "path" : "provisioned" };
|
|
49
|
+
},
|
|
50
|
+
runCommand: (_projectRoot, command, args, options) => {
|
|
51
|
+
calls.push({ args, command, env: options.env });
|
|
52
|
+
return Promise.resolve({ exitCode: 0, stdout: calls.length === 1 ? '{"initialized":false}' : "", timedOut: false });
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
57
|
+
// then
|
|
58
|
+
expect(result).toEqual({ action: "initialized" });
|
|
59
|
+
expect(calls.map((call) => ({ args: [...call.args], command: call.command }))).toEqual([
|
|
60
|
+
{ args: ["status", "--json"], command: binPath },
|
|
61
|
+
{ args: ["init"], command: binPath },
|
|
62
|
+
]);
|
|
63
|
+
expect(calls[0]?.env["CODEGRAPH_INSTALL_DIR"]).toBe(installDir);
|
|
64
|
+
expect(outcomes).toEqual([{ action: "initialized", exitCode: 0, projectRoot: workspace, source: "provisioned", timedOut: false }]);
|
|
65
|
+
} finally {
|
|
66
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
67
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
68
|
+
rmSync(installDir, { recursive: true, force: true });
|
|
69
|
+
}
|
|
66
70
|
});
|
|
67
71
|
|
|
68
72
|
it("#given Windows codegraph.cmd #when default worker runner builds invocation #then it runs through cmd.exe", () => {
|
|
@@ -152,6 +156,49 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
152
156
|
}
|
|
153
157
|
});
|
|
154
158
|
|
|
159
|
+
it("#given codegraph.daemon=true #when the indexing worker runs #then its env stays daemon-less with CODEGRAPH_NO_DAEMON=1", async () => {
|
|
160
|
+
// given
|
|
161
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-daemon-"));
|
|
162
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-daemon-home-"));
|
|
163
|
+
const calls: { readonly args: readonly string[]; readonly command: string; readonly env: Record<string, string> }[] = [];
|
|
164
|
+
try {
|
|
165
|
+
// when
|
|
166
|
+
const result = await runCodegraphSessionStartWorker({
|
|
167
|
+
config: { codegraph: { daemon: true, enabled: true, install_dir: "/tmp/codegraph-install" }, sources: [], trustedCodegraphInstallDir: "/tmp/codegraph-install", warnings: [] },
|
|
168
|
+
nodeVersion: "22.14.0",
|
|
169
|
+
cwd: workspace,
|
|
170
|
+
env: { HOME: homeDir },
|
|
171
|
+
logOutcome: () => undefined,
|
|
172
|
+
deps: {
|
|
173
|
+
ensureGitignored: () => true,
|
|
174
|
+
ensureProvisioned: () => Promise.resolve({ binPath: "/tmp/codegraph", provisioned: true }),
|
|
175
|
+
prepareWorkspace: () => ({
|
|
176
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
177
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
178
|
+
linked: true,
|
|
179
|
+
mode: "global-linked",
|
|
180
|
+
projectLink: join(workspace, ".codegraph"),
|
|
181
|
+
}),
|
|
182
|
+
resolveCommand: () => ({ argsPrefix: [], command: "/tmp/codegraph", exists: true, source: "path" }),
|
|
183
|
+
runCommand: (_projectRoot, command, args, options) => {
|
|
184
|
+
calls.push({ args, command, env: options.env });
|
|
185
|
+
return Promise.resolve({ exitCode: 0, stdout: calls.length === 1 ? '{"initialized":true}' : "", timedOut: false });
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
// then
|
|
191
|
+
expect(result).toEqual({ action: "synced" });
|
|
192
|
+
expect(calls.length).toBeGreaterThan(0);
|
|
193
|
+
for (const call of calls) {
|
|
194
|
+
expect(call.env["CODEGRAPH_NO_DAEMON"]).toBe("1");
|
|
195
|
+
}
|
|
196
|
+
} finally {
|
|
197
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
198
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
155
202
|
it("#given ambient provider tokens #when default worker runner spawns CodeGraph #then child env only gets safe and controlled variables", async () => {
|
|
156
203
|
// given
|
|
157
204
|
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-env-"));
|
|
@@ -208,13 +255,3 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
208
255
|
}
|
|
209
256
|
});
|
|
210
257
|
});
|
|
211
|
-
|
|
212
|
-
async function withProcessPlatform(platform: NodeJS.Platform, run: () => Promise<void>): Promise<void> {
|
|
213
|
-
const descriptor = Object.getOwnPropertyDescriptor(process, "platform");
|
|
214
|
-
Object.defineProperty(process, "platform", { configurable: true, enumerable: true, value: platform });
|
|
215
|
-
try {
|
|
216
|
-
await run();
|
|
217
|
-
} finally {
|
|
218
|
-
if (descriptor !== undefined) Object.defineProperty(process, "platform", descriptor);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
|
|
10
10
|
"timeout": 5,
|
|
11
|
-
"statusMessage": "(OmO 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.2) Recommending Git Bash MCP"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "command",
|
|
21
21
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
22
22
|
"timeout": 5,
|
|
23
|
-
"statusMessage": "(OmO 4.19.
|
|
23
|
+
"statusMessage": "(OmO 4.19.2) Resetting Git Bash MCP Reminder"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.2) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "4.19.
|
|
4
|
-
"inputDigest": "sha256:
|
|
3
|
+
"version": "4.19.2",
|
|
4
|
+
"inputDigest": "sha256:e3b790af9754f934c7eeebe6a7d023ac12cdff1e9f8f519e30fbcb53ada9ac14",
|
|
5
5
|
"outputs": [
|
|
6
6
|
{
|
|
7
7
|
"path": "cli.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "cli.js",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "f46b15e830f85d0d6f46e0b36c726de2fd56adc43b1cd4660430db86352a8f37"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "codex-hook-cli.d.ts",
|
|
@@ -212,6 +212,78 @@ function errorCode(error) {
|
|
|
212
212
|
function isPlainRecord(value) {
|
|
213
213
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
214
214
|
}
|
|
215
|
+
|
|
216
|
+
class DaemonRequestError extends Error {
|
|
217
|
+
requestWritten;
|
|
218
|
+
constructor(message, requestWritten) {
|
|
219
|
+
super(message);
|
|
220
|
+
this.name = "DaemonRequestError";
|
|
221
|
+
this.requestWritten = requestWritten;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
class DaemonAuthenticationRejectedError extends DaemonRequestError {
|
|
226
|
+
constructor() {
|
|
227
|
+
super("daemon authentication failed before dispatch", true);
|
|
228
|
+
this.name = "DaemonAuthenticationRejectedError";
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
class DaemonRequestCancelledError extends DaemonRequestError {
|
|
233
|
+
constructor(requestWritten) {
|
|
234
|
+
super("daemon request cancelled", requestWritten);
|
|
235
|
+
this.name = "DaemonRequestCancelledError";
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
class DaemonRequestTimedOutError extends DaemonRequestError {
|
|
240
|
+
timeoutMs;
|
|
241
|
+
constructor(requestWritten, timeoutMs) {
|
|
242
|
+
super("daemon request timed out", requestWritten);
|
|
243
|
+
this.name = "DaemonRequestTimedOutError";
|
|
244
|
+
this.timeoutMs = timeoutMs;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function daemonFailureResult(paths, error) {
|
|
248
|
+
if (error instanceof DaemonRequestCancelledError)
|
|
249
|
+
return daemonCancelledResult(paths);
|
|
250
|
+
if (error instanceof DaemonRequestTimedOutError)
|
|
251
|
+
return daemonTimedOutResult(paths, error.timeoutMs);
|
|
252
|
+
return daemonUnreachableResult(paths, error);
|
|
253
|
+
}
|
|
254
|
+
function daemonCancelledResult(paths) {
|
|
255
|
+
const text = [
|
|
256
|
+
"LSP daemon request cancelled: the caller aborted this request (for example, the turn was interrupted).",
|
|
257
|
+
"The daemon stays available; no LSP work was applied. Retry when you are ready.",
|
|
258
|
+
`Socket: ${paths.socket}`
|
|
259
|
+
].join(`
|
|
260
|
+
`);
|
|
261
|
+
return { content: [{ type: "text", text }], isError: true };
|
|
262
|
+
}
|
|
263
|
+
function daemonTimedOutResult(paths, timeoutMs) {
|
|
264
|
+
const text = [
|
|
265
|
+
`LSP daemon request timed out after ${timeoutMs}ms: the daemon did not respond in time.`,
|
|
266
|
+
"The daemon stays available but may be busy. Retry when you are ready.",
|
|
267
|
+
`Socket: ${paths.socket}`,
|
|
268
|
+
`Logs: ${paths.log}`
|
|
269
|
+
].join(`
|
|
270
|
+
`);
|
|
271
|
+
return { content: [{ type: "text", text }], isError: true };
|
|
272
|
+
}
|
|
273
|
+
function daemonUnreachableResult(paths, error) {
|
|
274
|
+
const text = [
|
|
275
|
+
`LSP daemon unreachable: ${errorText(error)}.`,
|
|
276
|
+
"The MCP server is a thin proxy and never runs language servers in-process.",
|
|
277
|
+
`Socket: ${paths.socket}`,
|
|
278
|
+
`Logs: ${paths.log}`,
|
|
279
|
+
"The daemon is auto-started on demand and will be retried on the next request."
|
|
280
|
+
].join(`
|
|
281
|
+
`);
|
|
282
|
+
return { content: [{ type: "text", text }], isError: true };
|
|
283
|
+
}
|
|
284
|
+
function errorText(error) {
|
|
285
|
+
return error instanceof Error ? error.message : String(error);
|
|
286
|
+
}
|
|
215
287
|
var OMO_DAEMON_PROTOCOL_VERSION = 1;
|
|
216
288
|
var AUTH_ERROR_CODE = -32001;
|
|
217
289
|
function authEnvelope(token) {
|
|
@@ -3134,8 +3206,13 @@ class LspClient extends LspClientConnection {
|
|
|
3134
3206
|
if (!pushFallbackOnly)
|
|
3135
3207
|
continue;
|
|
3136
3208
|
const remainingMs = deadlineAt - Date.now();
|
|
3137
|
-
if (remainingMs <= 0)
|
|
3209
|
+
if (remainingMs <= 0) {
|
|
3210
|
+
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
3211
|
+
const cached = this.documents.getPullCache(snapshot);
|
|
3212
|
+
return { items: cached === null ? [] : [...cached.diagnostics] };
|
|
3213
|
+
}
|
|
3138
3214
|
return this.freshnessTimeout(absPath);
|
|
3215
|
+
}
|
|
3139
3216
|
const waitMs = push.status === "wait" ? Math.min(push.waitMs, remainingMs) : remainingMs;
|
|
3140
3217
|
await waitForDiagnosticsActivity(this.documents.waitForDiagnosticsActivity(snapshot, waitMs), signal);
|
|
3141
3218
|
}
|
|
@@ -4995,29 +5072,6 @@ var LSP_MCP_TOOLS = [
|
|
|
4995
5072
|
var CONTEXT_KEY = "_context";
|
|
4996
5073
|
var DEFAULT_REQUEST_TIMEOUT_MS = 30000;
|
|
4997
5074
|
var nextProxyRequestId = 1;
|
|
4998
|
-
|
|
4999
|
-
class DaemonRequestError extends Error {
|
|
5000
|
-
requestWritten;
|
|
5001
|
-
constructor(message, requestWritten) {
|
|
5002
|
-
super(message);
|
|
5003
|
-
this.name = "DaemonRequestError";
|
|
5004
|
-
this.requestWritten = requestWritten;
|
|
5005
|
-
}
|
|
5006
|
-
}
|
|
5007
|
-
|
|
5008
|
-
class DaemonAuthenticationRejectedError extends DaemonRequestError {
|
|
5009
|
-
constructor() {
|
|
5010
|
-
super("daemon authentication failed before dispatch", true);
|
|
5011
|
-
this.name = "DaemonAuthenticationRejectedError";
|
|
5012
|
-
}
|
|
5013
|
-
}
|
|
5014
|
-
|
|
5015
|
-
class DaemonRequestCancelledError extends DaemonRequestError {
|
|
5016
|
-
constructor(requestWritten) {
|
|
5017
|
-
super("daemon request cancelled", requestWritten);
|
|
5018
|
-
this.name = "DaemonRequestCancelledError";
|
|
5019
|
-
}
|
|
5020
|
-
}
|
|
5021
5075
|
async function callToolViaDaemon(name, args, options) {
|
|
5022
5076
|
const context = requireContext(options.context);
|
|
5023
5077
|
const paths = options.paths ?? daemonPaths();
|
|
@@ -5046,7 +5100,7 @@ async function callToolViaDaemon(name, args, options) {
|
|
|
5046
5100
|
break;
|
|
5047
5101
|
}
|
|
5048
5102
|
}
|
|
5049
|
-
return
|
|
5103
|
+
return daemonFailureResult(paths, lastError);
|
|
5050
5104
|
}
|
|
5051
5105
|
function callDiagnosticsViaDaemon(filePath, options) {
|
|
5052
5106
|
return callToolViaDaemon("diagnostics", { filePath, severity: "error" }, options);
|
|
@@ -5080,17 +5134,6 @@ function ensureDaemonAvailable(paths, ensure, signal) {
|
|
|
5080
5134
|
Promise.resolve().then(() => ensure(paths, signal)).then(() => finish(() => resolve9()), (error) => finish(() => reject(signal.aborted ? new DaemonRequestCancelledError(false) : error)));
|
|
5081
5135
|
});
|
|
5082
5136
|
}
|
|
5083
|
-
function daemonUnreachableResult(paths, error) {
|
|
5084
|
-
const text2 = [
|
|
5085
|
-
`LSP daemon unreachable: ${errorText(error)}.`,
|
|
5086
|
-
"The MCP server is a thin proxy and never runs language servers in-process.",
|
|
5087
|
-
`Socket: ${paths.socket}`,
|
|
5088
|
-
`Logs: ${paths.log}`,
|
|
5089
|
-
"The daemon is auto-started on demand and will be retried on the next request."
|
|
5090
|
-
].join(`
|
|
5091
|
-
`);
|
|
5092
|
-
return { content: [{ type: "text", text: text2 }], isError: true };
|
|
5093
|
-
}
|
|
5094
5137
|
function sendToolCall(paths, token, name, args, options) {
|
|
5095
5138
|
return new Promise((resolve9, reject) => {
|
|
5096
5139
|
const socket = connect(paths.socket);
|
|
@@ -5130,7 +5173,7 @@ function sendToolCall(paths, token, name, args, options) {
|
|
|
5130
5173
|
};
|
|
5131
5174
|
const timer = setTimeout(() => {
|
|
5132
5175
|
sendCancel();
|
|
5133
|
-
finish(() => reject(new
|
|
5176
|
+
finish(() => reject(new DaemonRequestTimedOutError(requestWritten, options.timeoutMs)));
|
|
5134
5177
|
}, options.timeoutMs);
|
|
5135
5178
|
timer.unref();
|
|
5136
5179
|
if (options.signal?.aborted) {
|
|
@@ -5189,9 +5232,6 @@ function allocateProxyRequestId() {
|
|
|
5189
5232
|
function isRetryableTool(name) {
|
|
5190
5233
|
return name !== "rename" && name !== "lsp_rename";
|
|
5191
5234
|
}
|
|
5192
|
-
function errorText(error) {
|
|
5193
|
-
return error instanceof Error ? error.message : String(error);
|
|
5194
|
-
}
|
|
5195
5235
|
var OMO_LSP_DAEMON_CLI2 = "OMO_LSP_DAEMON_CLI";
|
|
5196
5236
|
var OMO_LSP_DAEMON_VERSION2 = "OMO_LSP_DAEMON_VERSION";
|
|
5197
5237
|
var DAEMON_VERSION_PATTERN2 = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
|
|
10
10
|
"timeout": 60,
|
|
11
|
-
"statusMessage": "(OmO 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.2) Checking LSP Diagnostics"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type": "command",
|
|
22
22
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
23
23
|
"timeout": 5,
|
|
24
|
-
"statusMessage": "(OmO 4.19.
|
|
24
|
+
"statusMessage": "(OmO 4.19.2) Resetting LSP Diagnostics Cache"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|