oh-my-opencode 4.19.4 → 5.0.0-beta.10
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/publish.md +44 -16
- package/.agents/skills/publish/SKILL.md +44 -16
- package/.agents/skills/work-with-pr/SKILL.md +37 -23
- package/.opencode/command/publish.md +44 -16
- package/.opencode/skills/work-with-pr/SKILL.md +37 -23
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +18 -6
- package/README.ru.md +1 -1
- package/README.zh-cn.md +1 -1
- package/bin/oh-my-opencode.js +14 -1
- package/bin/oh-my-opencode.test.ts +21 -0
- package/dist/agents/atlas/agent.d.ts +0 -1
- package/dist/agents/sisyphus/grok-4.d.ts +20 -0
- package/dist/agents/sisyphus/index.d.ts +2 -0
- package/dist/agents/sisyphus-agent-config.d.ts +6 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +15 -4
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +1888 -807
- package/dist/cli/run/on-complete-hook.d.ts +2 -0
- package/dist/cli-node/index.js +1888 -807
- package/dist/config/schema/agent-overrides.d.ts +528 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +495 -0
- package/dist/features/monitor/batcher.d.ts +3 -1
- package/dist/features/monitor/manager-internals.d.ts +1 -0
- package/dist/features/monitor/output-injector-types.d.ts +2 -0
- package/dist/features/monitor/output-injector.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-approval-gate.test-support.d.ts +50 -0
- package/dist/hooks/atlas/system-reminder-templates.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/unrecoverable-request-error.d.ts +9 -0
- package/dist/hooks/tool-pair-validator/hook.test-support.d.ts +29 -0
- package/dist/hooks/tool-pair-validator/tool-part-ids.d.ts +14 -5
- package/dist/hooks/tool-pair-validator/tool-result-repair.d.ts +4 -3
- package/dist/hooks/tool-pair-validator/types.d.ts +5 -22
- package/dist/index.js +3139 -2232
- package/dist/mcp/lsp.d.ts +1 -0
- package/dist/oh-my-opencode.schema.json +1466 -131
- package/dist/shared/normalize-sdk-response.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +1 -1
- package/dist/shared/tmux/constants.d.ts +1 -1
- package/dist/skills/ast-grep/SOURCE +1 -1
- package/dist/skills/ast-grep/install.ps1 +2 -2
- package/dist/skills/ast-grep/install.sh +1 -1
- package/dist/skills/ast-grep/references/install.md +2 -2
- package/dist/skills/ast-grep/tests/smoke.sh +1 -1
- package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/dist/skills/frontend/SKILL.md +10 -7
- package/dist/skills/frontend/references/design/_INDEX.md +1 -0
- package/dist/skills/frontend/references/design/stylegallery.md +80 -0
- package/dist/skills/start-work/SKILL.md +54 -9
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/dist/skills/ultimate-browsing/SKILL.md +2 -2
- package/dist/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/dist/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/dist/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/dist/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/dist/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/dist/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/dist/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/dist/skills/ultimate-browsing/engine/validators.py +46 -0
- package/dist/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/dist/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/dist/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/dist/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/dist/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/dist/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/dist/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/dist/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/dist/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/dist/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/dist/skills/ulw-plan/SKILL.md +3 -3
- package/dist/skills/ulw-plan/references/full-workflow.md +30 -6
- package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/dist/skills/ulw-research/SKILL.md +15 -10
- package/dist/tui.js +477 -36
- package/docs/reference/web-terminal-visual-qa.md +1 -1
- package/package.json +34 -24
- package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
- package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
- package/packages/lsp-core/src/lsp/connection.ts +1 -1
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
- package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
- package/packages/lsp-core/src/tools/navigation.ts +4 -2
- package/packages/lsp-core/src/tools/rename.ts +4 -2
- package/packages/lsp-core/src/tools/symbols.ts +1 -1
- package/packages/lsp-daemon/dist/cli.js +108 -40
- package/packages/lsp-daemon/dist/client.js +123 -55
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +1 -0
- package/packages/lsp-daemon/dist/ensure-daemon.js +18 -5
- package/packages/lsp-daemon/dist/index.js +111 -43
- package/packages/lsp-tools-mcp/dist/cli.js +77 -23
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +77 -23
- package/packages/lsp-tools-mcp/dist/tools.js +77 -23
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +268 -92
- 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 +7 -7
- package/packages/omo-codex/plugin/components/bootstrap/src/worker.ts +3 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +220 -10
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +220 -10
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- 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/lazycodex-executor-verify/test/codex-hook.test.ts +3 -17
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +135 -67
- 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/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +16 -23
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +37 -69
- package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -15
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +4 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/README.md +5 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +2 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +18 -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/src/codex-hook.ts +21 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +0 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +107 -16
- 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/teammode/test/thread-title-hook.test.ts +3 -9
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
- 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/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.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-low.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +9 -2
- 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 +9 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +11 -11
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +9 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +1 -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 +9 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +66 -66
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +2 -2
- 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 +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +23 -25
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +9 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-helpers.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-kind-guidance.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +7 -40
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +20 -20
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +4 -4
- package/packages/omo-codex/plugin/skills/ast-grep/SOURCE +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/install.ps1 +2 -2
- package/packages/omo-codex/plugin/skills/ast-grep/install.sh +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/references/install.md +2 -2
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +54 -9
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/validators.py +46 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +9 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +5 -4
- package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +23 -25
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +15 -10
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -24
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
- package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +12 -12
- package/packages/omo-codex/plugin/test/bootstrap-orchestration.test.mjs +36 -4
- package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +4 -4
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
- package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
- package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
- package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
- package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +56 -2
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +6 -6
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +170 -78
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +7 -2
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +4 -4
- package/packages/omo-codex/scripts/install-local.test.mjs +5 -2
- package/packages/shared-skills/index.mjs +19 -1
- package/packages/shared-skills/skills/ast-grep/SOURCE +1 -1
- package/packages/shared-skills/skills/ast-grep/install.ps1 +2 -2
- package/packages/shared-skills/skills/ast-grep/install.sh +1 -1
- package/packages/shared-skills/skills/ast-grep/references/install.md +2 -2
- package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/shared-skills/skills/start-work/SKILL.md +54 -9
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/packages/shared-skills/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/validators.py +46 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/SKILL.md +15 -10
- package/postinstall.mjs +6 -0
- package/dist/tools/call-omo-agent/background-agent-executor.d.ts +0 -5
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
- package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import { argv, stderr } from "node:process";
|
|
5
5
|
|
|
6
6
|
// src/proxy.ts
|
|
7
|
-
import { existsSync as
|
|
8
|
-
import { basename as
|
|
7
|
+
import { existsSync as existsSync12, realpathSync as realpathSync5 } from "node:fs";
|
|
8
|
+
import { basename as basename4, delimiter as delimiter4, dirname as dirname9, isAbsolute as isAbsolute5 } from "node:path";
|
|
9
9
|
|
|
10
10
|
// ../mcp-stdio-core/src/record.ts
|
|
11
11
|
function isPlainRecord(value) {
|
|
@@ -315,8 +315,8 @@ function createIdleTimer(idleTimeoutMs, log, onTimeout) {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
// ../lsp-core/src/lsp/client-wrapper.ts
|
|
318
|
-
import { existsSync as existsSync9, statSync as statSync3 } from "node:fs";
|
|
319
|
-
import { dirname as dirname6, join as join4, resolve as resolve7 } from "node:path";
|
|
318
|
+
import { existsSync as existsSync9, realpathSync as realpathSync4, statSync as statSync3 } from "node:fs";
|
|
319
|
+
import { basename as basename3, dirname as dirname6, join as join4, resolve as resolve7 } from "node:path";
|
|
320
320
|
|
|
321
321
|
// ../lsp-core/src/request-context.ts
|
|
322
322
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1417,7 +1417,7 @@ class LspClientConnection extends LspClientTransport {
|
|
|
1417
1417
|
initializationOptions: this.server.initialization
|
|
1418
1418
|
}, { timeoutMs: this.initializeTimeoutMs });
|
|
1419
1419
|
this.setDiagnosticPullSupported(supportsDiagnosticPull(result?.capabilities));
|
|
1420
|
-
await this.sendNotification("initialized");
|
|
1420
|
+
await this.sendNotification("initialized", {});
|
|
1421
1421
|
await this.sendNotification("workspace/didChangeConfiguration", {
|
|
1422
1422
|
settings: { json: { validate: { enable: true } } }
|
|
1423
1423
|
});
|
|
@@ -4029,32 +4029,86 @@ function isDirectoryPath(filePath) {
|
|
|
4029
4029
|
}
|
|
4030
4030
|
}
|
|
4031
4031
|
function findWorkspaceRoot(filePath) {
|
|
4032
|
-
const
|
|
4032
|
+
const cwd = contextCwd();
|
|
4033
|
+
const abs = resolveReadablePathInsideContext(filePath);
|
|
4033
4034
|
let dir = abs;
|
|
4034
4035
|
if (!isDirectoryPath(dir)) {
|
|
4035
4036
|
dir = dirname6(dir);
|
|
4036
4037
|
}
|
|
4037
|
-
|
|
4038
|
-
while (dir
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4038
|
+
const fallbackRoot = nearestExistingDirectoryInsideContext(dir, cwd) ?? cwd;
|
|
4039
|
+
while (isPathInside(cwd, dir)) {
|
|
4040
|
+
const canonicalDir = existingDirectoryInsideContext(dir, cwd);
|
|
4041
|
+
if (canonicalDir !== undefined) {
|
|
4042
|
+
for (const marker of WORKSPACE_MARKERS) {
|
|
4043
|
+
if (existsSync9(join4(dir, marker))) {
|
|
4044
|
+
return canonicalDir;
|
|
4045
|
+
}
|
|
4042
4046
|
}
|
|
4043
4047
|
}
|
|
4044
|
-
|
|
4048
|
+
if (dir === cwd)
|
|
4049
|
+
break;
|
|
4045
4050
|
dir = dirname6(dir);
|
|
4046
4051
|
}
|
|
4047
|
-
return
|
|
4052
|
+
return fallbackRoot;
|
|
4048
4053
|
}
|
|
4049
|
-
function
|
|
4054
|
+
function resolveReadablePathInsideContext(filePath) {
|
|
4050
4055
|
const cwd = contextCwd();
|
|
4051
4056
|
const abs = resolve7(cwd, filePath);
|
|
4057
|
+
if (isPathInside(cwd, abs))
|
|
4058
|
+
return abs;
|
|
4059
|
+
const rebased = rebaseThroughCanonicalAncestor(abs, cwd);
|
|
4060
|
+
if (rebased !== undefined)
|
|
4061
|
+
return rebased;
|
|
4062
|
+
const canonical = canonicalizeExistingOrNearestAncestor(abs);
|
|
4063
|
+
if (isPathInside(cwd, canonical))
|
|
4064
|
+
return canonical;
|
|
4065
|
+
throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
|
|
4066
|
+
}
|
|
4067
|
+
function resolvePathInsideContext(filePath) {
|
|
4068
|
+
const cwd = contextCwd();
|
|
4069
|
+
const abs = resolveReadablePathInsideContext(filePath);
|
|
4052
4070
|
const canonical = canonicalizeExistingOrNearestAncestor(abs);
|
|
4053
4071
|
if (!isPathInside(cwd, canonical)) {
|
|
4054
4072
|
throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
|
|
4055
4073
|
}
|
|
4056
4074
|
return canonical;
|
|
4057
4075
|
}
|
|
4076
|
+
function rebaseThroughCanonicalAncestor(path, cwd) {
|
|
4077
|
+
let current = path;
|
|
4078
|
+
const suffix = [];
|
|
4079
|
+
while (true) {
|
|
4080
|
+
if (existsSync9(current)) {
|
|
4081
|
+
const canonical = realpathSync4(current);
|
|
4082
|
+
if (isPathInside(cwd, canonical))
|
|
4083
|
+
return suffix.length === 0 ? canonical : join4(canonical, ...suffix);
|
|
4084
|
+
}
|
|
4085
|
+
const parent = dirname6(current);
|
|
4086
|
+
if (parent === current)
|
|
4087
|
+
return;
|
|
4088
|
+
suffix.unshift(basename3(current));
|
|
4089
|
+
current = parent;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
function existingDirectoryInsideContext(directory, cwd) {
|
|
4093
|
+
if (!existsSync9(directory))
|
|
4094
|
+
return;
|
|
4095
|
+
const canonical = realpathSync4(directory);
|
|
4096
|
+
if (!statSync3(canonical).isDirectory())
|
|
4097
|
+
return;
|
|
4098
|
+
return isPathInside(cwd, canonical) ? canonical : undefined;
|
|
4099
|
+
}
|
|
4100
|
+
function nearestExistingDirectoryInsideContext(directory, cwd) {
|
|
4101
|
+
let current = directory;
|
|
4102
|
+
while (isPathInside(cwd, current)) {
|
|
4103
|
+
const canonical = existingDirectoryInsideContext(current, cwd);
|
|
4104
|
+
if (canonical !== undefined)
|
|
4105
|
+
return canonical;
|
|
4106
|
+
if (current === cwd)
|
|
4107
|
+
return;
|
|
4108
|
+
current = dirname6(current);
|
|
4109
|
+
}
|
|
4110
|
+
return;
|
|
4111
|
+
}
|
|
4058
4112
|
function formatServerLookupError(result) {
|
|
4059
4113
|
if (result.status === "not_installed") {
|
|
4060
4114
|
return formatNotInstalled(result);
|
|
@@ -4125,7 +4179,7 @@ function formatNotInstalled(result) {
|
|
|
4125
4179
|
].join(`
|
|
4126
4180
|
`);
|
|
4127
4181
|
}
|
|
4128
|
-
var
|
|
4182
|
+
var READ_ONLY_TOOLS = new Set([
|
|
4129
4183
|
"diagnostics",
|
|
4130
4184
|
"definition",
|
|
4131
4185
|
"references",
|
|
@@ -4134,7 +4188,7 @@ var READ_ONLY_RETRY_TOOLS = new Set([
|
|
|
4134
4188
|
"prepareRename"
|
|
4135
4189
|
]);
|
|
4136
4190
|
async function withLspClient(filePath, fn, toolName, options = {}) {
|
|
4137
|
-
const absPath = resolvePathInsideContext(filePath);
|
|
4191
|
+
const absPath = READ_ONLY_TOOLS.has(toolName) ? resolveReadablePathInsideContext(filePath) : resolvePathInsideContext(filePath);
|
|
4138
4192
|
if (isDirectoryPath(absPath)) {
|
|
4139
4193
|
throw new LspInvalidPathError("Directory paths are not supported by this LSP tool. " + "Use lsp.diagnostics with a directory path for directory diagnostics.");
|
|
4140
4194
|
}
|
|
@@ -4149,9 +4203,9 @@ async function withLspClient(filePath, fn, toolName, options = {}) {
|
|
|
4149
4203
|
const acquireAndCall = async (allowRetry) => {
|
|
4150
4204
|
const client = await manager.getClient(root, server2, options.signal);
|
|
4151
4205
|
try {
|
|
4152
|
-
return await fn(client, root);
|
|
4206
|
+
return await fn(client, root, absPath);
|
|
4153
4207
|
} catch (err) {
|
|
4154
|
-
if (allowRetry &&
|
|
4208
|
+
if (allowRetry && READ_ONLY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
|
|
4155
4209
|
manager.invalidateClient(root, server2.id, client);
|
|
4156
4210
|
return acquireAndCall(false);
|
|
4157
4211
|
}
|
|
@@ -4606,7 +4660,7 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4606
4660
|
const filePath = requireString(params, "filePath");
|
|
4607
4661
|
const severity = severityFilter(params);
|
|
4608
4662
|
try {
|
|
4609
|
-
const absPath =
|
|
4663
|
+
const absPath = resolveReadablePathInsideContext(filePath);
|
|
4610
4664
|
if (isDirectoryPath(absPath)) {
|
|
4611
4665
|
const extension = inferExtensionFromDirectory(absPath);
|
|
4612
4666
|
if (!extension) {
|
|
@@ -4635,7 +4689,7 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4635
4689
|
};
|
|
4636
4690
|
return text(output2.output, details2);
|
|
4637
4691
|
}
|
|
4638
|
-
const result = await withLspClient(filePath, async (client) => client.diagnostics(
|
|
4692
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.diagnostics(resolvedFilePath, signal), "diagnostics", clientOptions(signal));
|
|
4639
4693
|
if (result.transientError) {
|
|
4640
4694
|
const message = result.transientError.message;
|
|
4641
4695
|
const details2 = {
|
|
@@ -4710,7 +4764,7 @@ async function executeLspGotoDefinition(params, signal) {
|
|
|
4710
4764
|
const line = requireNumber(params, "line");
|
|
4711
4765
|
const character = requireNumber(params, "character");
|
|
4712
4766
|
try {
|
|
4713
|
-
const result = await withLspClient(filePath, async (client) => client.definition(
|
|
4767
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.definition(resolvedFilePath, line, character, signal), "definition", clientOptions(signal));
|
|
4714
4768
|
const locations = !result ? [] : Array.isArray(result) ? result : [result];
|
|
4715
4769
|
const details = { filePath, line, character, locations };
|
|
4716
4770
|
if (locations.length === 0)
|
|
@@ -4735,7 +4789,7 @@ async function executeLspFindReferences(params, signal) {
|
|
|
4735
4789
|
const character = requireNumber(params, "character");
|
|
4736
4790
|
const includeDeclaration = optionalBoolean(params, "includeDeclaration") ?? true;
|
|
4737
4791
|
try {
|
|
4738
|
-
const result = await withLspClient(filePath, async (client) => client.references(
|
|
4792
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.references(resolvedFilePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
|
|
4739
4793
|
const references = Array.isArray(result) ? result : [];
|
|
4740
4794
|
const total = references.length;
|
|
4741
4795
|
const truncated = total > DEFAULT_MAX_REFERENCES;
|
|
@@ -4777,7 +4831,7 @@ async function executeLspPrepareRename(params, signal) {
|
|
|
4777
4831
|
const line = requireNumber(params, "line");
|
|
4778
4832
|
const character = requireNumber(params, "character");
|
|
4779
4833
|
try {
|
|
4780
|
-
const result = await withLspClient(filePath, async (client) => client.prepareRename(
|
|
4834
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.prepareRename(resolvedFilePath, line, character, signal), "prepareRename", clientOptions(signal));
|
|
4781
4835
|
const details = { filePath, line, character, result };
|
|
4782
4836
|
return text(formatPrepareRenameResult(result), details);
|
|
4783
4837
|
} catch (error) {
|
|
@@ -4798,7 +4852,7 @@ async function executeLspRename(params, signal) {
|
|
|
4798
4852
|
const character = requireNumber(params, "character");
|
|
4799
4853
|
const newName = requireString(params, "newName");
|
|
4800
4854
|
try {
|
|
4801
|
-
const result = await withLspClient(filePath, async (client) => client.rename(
|
|
4855
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.rename(resolvedFilePath, line, character, newName, signal), "rename", clientOptions(signal));
|
|
4802
4856
|
const details = { filePath, line, character, newName, apply: result.apply, edit: result.edit };
|
|
4803
4857
|
return text(formatApplyResult(result.apply), details, !result.apply.success);
|
|
4804
4858
|
} catch (error) {
|
|
@@ -4878,7 +4932,7 @@ async function executeLspSymbols(params, signal) {
|
|
|
4878
4932
|
const symbols2 = await withLspClient(filePath, async (client) => client.workspaceSymbols(query, signal), "workspaceSymbols", clientOptions(signal));
|
|
4879
4933
|
return formatSymbolsResult(filePath, scope, symbols2, limit, query);
|
|
4880
4934
|
}
|
|
4881
|
-
const symbols = await withLspClient(filePath, async (client) => client.documentSymbols(
|
|
4935
|
+
const symbols = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.documentSymbols(resolvedFilePath, signal), "documentSymbols", clientOptions(signal));
|
|
4882
4936
|
return formatSymbolsResult(filePath, scope, symbols, limit);
|
|
4883
4937
|
} catch (error) {
|
|
4884
4938
|
const query = optionalString(params, "query");
|
|
@@ -5192,10 +5246,10 @@ function errorText(error) {
|
|
|
5192
5246
|
|
|
5193
5247
|
// src/ensure-daemon.ts
|
|
5194
5248
|
import { spawn as spawn2 } from "node:child_process";
|
|
5195
|
-
import { closeSync as closeSync2, mkdirSync as mkdirSync3, openSync as openSync2 } from "node:fs";
|
|
5249
|
+
import { closeSync as closeSync2, existsSync as existsSync11, mkdirSync as mkdirSync3, openSync as openSync2, writeSync as writeSync2 } from "node:fs";
|
|
5196
5250
|
import { Socket } from "node:net";
|
|
5197
|
-
import { dirname as dirname8 } from "node:path";
|
|
5198
|
-
import { execPath } from "node:process";
|
|
5251
|
+
import { dirname as dirname8, isAbsolute as isAbsolute4 } from "node:path";
|
|
5252
|
+
import { argv0, execPath } from "node:process";
|
|
5199
5253
|
|
|
5200
5254
|
// src/ipc-protocol.ts
|
|
5201
5255
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
@@ -5665,15 +5719,29 @@ function spawnDaemonProcess(paths) {
|
|
|
5665
5719
|
mkdirSync3(dirname8(paths.log), { recursive: true });
|
|
5666
5720
|
const logFd = openSync2(paths.log, "a");
|
|
5667
5721
|
try {
|
|
5668
|
-
const child = spawn2(
|
|
5722
|
+
const child = spawn2(resolveDaemonNodeExecutable(), [paths.cliPath, "daemon"], {
|
|
5669
5723
|
detached: true,
|
|
5670
5724
|
stdio: ["ignore", logFd, logFd]
|
|
5671
5725
|
});
|
|
5726
|
+
child.once("spawn", () => closeSync2(logFd));
|
|
5727
|
+
child.once("error", (error) => {
|
|
5728
|
+
writeSync2(logFd, `[lsp-daemon] failed to spawn daemon: ${error.message}
|
|
5729
|
+
`);
|
|
5730
|
+
closeSync2(logFd);
|
|
5731
|
+
});
|
|
5672
5732
|
child.unref();
|
|
5673
|
-
}
|
|
5733
|
+
} catch (error) {
|
|
5674
5734
|
closeSync2(logFd);
|
|
5735
|
+
throw error;
|
|
5675
5736
|
}
|
|
5676
5737
|
}
|
|
5738
|
+
function resolveDaemonNodeExecutable(cachedExecPath = execPath, originalArgv0 = argv0, pathExists = existsSync11) {
|
|
5739
|
+
if (pathExists(cachedExecPath))
|
|
5740
|
+
return cachedExecPath;
|
|
5741
|
+
if (isAbsolute4(originalArgv0) && pathExists(originalArgv0))
|
|
5742
|
+
return originalArgv0;
|
|
5743
|
+
return "node";
|
|
5744
|
+
}
|
|
5677
5745
|
function defaultEnsureDaemonDeps() {
|
|
5678
5746
|
return {
|
|
5679
5747
|
probe: (paths, signal) => probeDaemon(paths, PROBE_TIMEOUT_MS, signal),
|
|
@@ -6144,15 +6212,15 @@ function canonicalizePathList(value) {
|
|
|
6144
6212
|
return value.split(delimiter4).map((entry) => canonicalizePath(entry) ?? entry).join(delimiter4);
|
|
6145
6213
|
}
|
|
6146
6214
|
function canonicalizePath(value) {
|
|
6147
|
-
if (value === undefined || !
|
|
6215
|
+
if (value === undefined || !isAbsolute5(value) || !existsSync12(value))
|
|
6148
6216
|
return value;
|
|
6149
|
-
return
|
|
6217
|
+
return realpathSync5(value);
|
|
6150
6218
|
}
|
|
6151
6219
|
function projectRootFromOpenCodeConfigPath(path2) {
|
|
6152
|
-
if (
|
|
6220
|
+
if (basename4(path2) !== "lsp.json" && basename4(path2) !== "lsp-client.json")
|
|
6153
6221
|
return;
|
|
6154
6222
|
const configDir = dirname9(path2);
|
|
6155
|
-
const configDirName =
|
|
6223
|
+
const configDirName = basename4(configDir);
|
|
6156
6224
|
if (configDirName !== ".opencode" && configDirName !== ".omo")
|
|
6157
6225
|
return;
|
|
6158
6226
|
return dirname9(configDir);
|
|
@@ -6164,11 +6232,11 @@ import { createServer as createServer2 } from "node:net";
|
|
|
6164
6232
|
|
|
6165
6233
|
// src/ownership.ts
|
|
6166
6234
|
import { randomUUID } from "node:crypto";
|
|
6167
|
-
import { existsSync as
|
|
6235
|
+
import { existsSync as existsSync13, lstatSync as lstatSync7, readFileSync as readFileSync7, statSync as statSync5, unlinkSync as unlinkSync3 } from "node:fs";
|
|
6168
6236
|
import { dirname as dirname11 } from "node:path";
|
|
6169
6237
|
|
|
6170
6238
|
// src/lock.ts
|
|
6171
|
-
import { closeSync as closeSync3, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync6, unlinkSync as unlinkSync2, writeSync as
|
|
6239
|
+
import { closeSync as closeSync3, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync6, unlinkSync as unlinkSync2, writeSync as writeSync3 } from "node:fs";
|
|
6172
6240
|
import { dirname as dirname10 } from "node:path";
|
|
6173
6241
|
function isProcessAlive2(pid) {
|
|
6174
6242
|
if (!Number.isInteger(pid) || pid <= 0)
|
|
@@ -6204,7 +6272,7 @@ function tryAcquireLock(lockPath, ownerPid = process.pid) {
|
|
|
6204
6272
|
function writeLockFile(lockPath, ownerPid) {
|
|
6205
6273
|
try {
|
|
6206
6274
|
const fd = openSync3(lockPath, "wx", 384);
|
|
6207
|
-
|
|
6275
|
+
writeSync3(fd, `${ownerPid}
|
|
6208
6276
|
`);
|
|
6209
6277
|
closeSync3(fd);
|
|
6210
6278
|
return { release: () => unlinkQuietly(lockPath) };
|
|
@@ -6352,7 +6420,7 @@ async function validateExistingOwner(paths, pingOwner) {
|
|
|
6352
6420
|
throw new DaemonStartupDeferredError("reachable_owner_mismatch");
|
|
6353
6421
|
}
|
|
6354
6422
|
function cleanupDeadOwner(paths, owner) {
|
|
6355
|
-
if (process.platform !== "win32" &&
|
|
6423
|
+
if (process.platform !== "win32" && existsSync13(owner.endpoint.path)) {
|
|
6356
6424
|
const stat = lstatSync7(owner.endpoint.path);
|
|
6357
6425
|
if (stat.isSocket())
|
|
6358
6426
|
unlinkSync3(owner.endpoint.path);
|
|
@@ -6403,7 +6471,7 @@ function parseEndpoint(value) {
|
|
|
6403
6471
|
// src/version-reap.ts
|
|
6404
6472
|
import { execFile } from "node:child_process";
|
|
6405
6473
|
import { readdir, readFile, rm } from "node:fs/promises";
|
|
6406
|
-
import { basename as
|
|
6474
|
+
import { basename as basename5, dirname as dirname12, join as join8 } from "node:path";
|
|
6407
6475
|
var TERM_GRACE_MS = 5000;
|
|
6408
6476
|
var KILL_GRACE_MS = 1000;
|
|
6409
6477
|
var VERSION_ENTRY_PATTERN = /^v([A-Za-z0-9][A-Za-z0-9._+-]{0,127})$/;
|
|
@@ -6533,7 +6601,7 @@ function splitCmdline(buffer) {
|
|
|
6533
6601
|
function isNodeCliDaemonArgv(argv) {
|
|
6534
6602
|
if (argv.length < 2 || !argv.includes("daemon"))
|
|
6535
6603
|
return false;
|
|
6536
|
-
const executable =
|
|
6604
|
+
const executable = basename5(argv[0] ?? "");
|
|
6537
6605
|
if (!/^node(?:\.exe)?$/i.test(executable))
|
|
6538
6606
|
return false;
|
|
6539
6607
|
return argv.some((value) => value === "cli.js" || value.endsWith("/cli.js") || value.endsWith("\\cli.js"));
|