oh-my-opencode 4.19.3 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/command/get-unpublished-changes.md +2 -0
- package/.agents/command/omomomo.md +1 -1
- package/.agents/command/publish.md +7 -0
- package/.agents/skills/get-unpublished-changes/SKILL.md +2 -0
- package/.agents/skills/hyperplan/SKILL.md +3 -3
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.agents/skills/publish/SKILL.md +7 -0
- package/.opencode/command/get-unpublished-changes.md +2 -0
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/command/publish.md +7 -0
- package/.opencode/skills/hyperplan/SKILL.md +3 -3
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +6 -5
- 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/sisyphus-junior/agent.d.ts +1 -1
- package/dist/cli/doctor/checks/deprecated-reasoning-keys.d.ts +2 -0
- package/dist/cli/index.js +2925 -1919
- package/dist/cli-node/index.js +2925 -1919
- package/dist/config/schema/agent-overrides.d.ts +1343 -15
- package/dist/config/schema/categories.d.ts +132 -0
- package/dist/config/schema/fallback-models.d.ts +50 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1322 -11
- package/dist/config-migration/index.d.ts +1 -0
- package/dist/config-migration/migration-plans.d.ts +1 -0
- package/dist/config-migration/reasoning-unification.d.ts +3 -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/features/team-mode/tools/lifecycle-test-fixture.d.ts +2 -0
- package/dist/hooks/codegraph-bootstrap/command-runner.d.ts +1 -0
- package/dist/hooks/model-fallback/next-fallback.d.ts +1 -0
- package/dist/hooks/runtime-fallback/constants.d.ts +1 -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 +4864 -4011
- package/dist/mcp/lsp.d.ts +1 -0
- package/dist/oh-my-opencode.schema.json +3221 -222
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
- package/dist/shared/agent-variant.d.ts +11 -0
- package/dist/shared/session-prompt-params-helpers.d.ts +6 -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 +4 -3
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/dist/skills/data-scientist/SKILL.md +243 -0
- package/dist/skills/data-scientist/references/common-scenarios.md +176 -0
- package/dist/skills/data-scientist/references/execution-templates.md +197 -0
- package/dist/skills/data-scientist/references/integration-patterns.md +153 -0
- package/dist/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/dist/skills/data-scientist/references/uv-setup.md +78 -0
- package/dist/skills/data-scientist/scripts/quick-query.py +111 -0
- package/dist/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/dist/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/dist/skills/debugging/SKILL.md +1 -1
- package/dist/skills/programming/SKILL.md +1 -2
- package/dist/skills/start-work/SKILL.md +54 -9
- package/dist/skills/ultimate-browsing/SKILL.md +2 -2
- 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/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 +2 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +3 -3
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/dist/skills/ulw-research/SKILL.md +128 -12
- package/dist/tools/delegate-task/builtin-categories.d.ts +1 -0
- package/dist/tools/delegate-task/builtin-category-definition.d.ts +1 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tui.js +1271 -1108
- package/docs/reference/web-terminal-visual-qa.md +1 -1
- package/package.json +27 -19
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +2 -2
- package/packages/lsp-core/src/lsp/connection.ts +1 -1
- package/packages/lsp-daemon/dist/cli.js +27 -13
- package/packages/lsp-daemon/dist/client.js +49 -35
- 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 +34 -20
- package/packages/lsp-tools-mcp/dist/cli.js +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +1 -1
- package/packages/lsp-tools-mcp/dist/tools.js +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +289 -95
- 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 +385 -64
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +336 -47
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +6 -0
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/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 +56 -42
- 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 +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/src/post-compact-budget.ts +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +1 -0
- 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/codex-hook.test.ts +105 -0
- 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/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 +3 -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 +3 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.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/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 +3 -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 +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +22 -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/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-hook.test.ts +2 -2
- 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 +5 -5
- 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/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 +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -2
- 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 +4 -3
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +243 -0
- package/packages/omo-codex/plugin/skills/data-scientist/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/common-scenarios.md +176 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/execution-templates.md +197 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/integration-patterns.md +153 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +78 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/quick-query.py +111 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +1 -2
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +54 -9
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -2
- 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/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 +3 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +22 -25
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.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 +127 -12
- 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/sync-skills-orchestration.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +9 -2
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +12 -0
- 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 +138 -65
- 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 +4 -3
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/packages/shared-skills/skills/data-scientist/SKILL.md +243 -0
- package/packages/shared-skills/skills/data-scientist/references/common-scenarios.md +176 -0
- package/packages/shared-skills/skills/data-scientist/references/execution-templates.md +197 -0
- package/packages/shared-skills/skills/data-scientist/references/integration-patterns.md +153 -0
- package/packages/shared-skills/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +78 -0
- package/packages/shared-skills/skills/data-scientist/scripts/quick-query.py +111 -0
- package/packages/shared-skills/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/packages/shared-skills/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
- package/packages/shared-skills/skills/programming/SKILL.md +1 -2
- package/packages/shared-skills/skills/start-work/SKILL.md +54 -9
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -2
- 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/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 +2 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.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 +128 -12
- package/postinstall.mjs +6 -0
|
@@ -3211,6 +3211,9 @@ function handlePipeResult(left, next, ctx) {
|
|
|
3211
3211
|
}
|
|
3212
3212
|
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
3213
3213
|
}
|
|
3214
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
3215
|
+
$ZodPipe.init(inst, def);
|
|
3216
|
+
});
|
|
3214
3217
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3215
3218
|
$ZodType.init(inst, def);
|
|
3216
3219
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -5297,6 +5300,10 @@ function pipe(in_, out) {
|
|
|
5297
5300
|
out
|
|
5298
5301
|
});
|
|
5299
5302
|
}
|
|
5303
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
5304
|
+
ZodPipe.init(inst, def);
|
|
5305
|
+
$ZodPreprocess.init(inst, def);
|
|
5306
|
+
});
|
|
5300
5307
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
5301
5308
|
$ZodReadonly.init(inst, def);
|
|
5302
5309
|
ZodType.init(inst, def);
|
|
@@ -5320,22 +5327,142 @@ function refine(fn, _params = {}) {
|
|
|
5320
5327
|
function superRefine(fn, params) {
|
|
5321
5328
|
return _superRefine(fn, params);
|
|
5322
5329
|
}
|
|
5330
|
+
function preprocess(fn, schema) {
|
|
5331
|
+
return new ZodPreprocess({
|
|
5332
|
+
type: "pipe",
|
|
5333
|
+
in: transform(fn),
|
|
5334
|
+
out: schema
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
// ../../omo-config-core/src/schema/reasoning-vocabulary.ts
|
|
5339
|
+
var REASONING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
5340
|
+
var REASONING_AUTO = "auto";
|
|
5341
|
+
var REASONING_LEVEL_SET = new Set(REASONING_LEVELS);
|
|
5342
|
+
var REASONING_LEVEL_OR_AUTO_SET = new Set([...REASONING_LEVELS, REASONING_AUTO]);
|
|
5343
|
+
function isReasoningLevel(value) {
|
|
5344
|
+
return REASONING_LEVEL_SET.has(value);
|
|
5345
|
+
}
|
|
5346
|
+
function normalizeReasoning(input) {
|
|
5347
|
+
const normalized = input.trim().toLowerCase();
|
|
5348
|
+
if (!normalized)
|
|
5349
|
+
return {};
|
|
5350
|
+
if (normalized === "none")
|
|
5351
|
+
return { level: "off" };
|
|
5352
|
+
if (normalized === REASONING_AUTO)
|
|
5353
|
+
return { level: REASONING_AUTO };
|
|
5354
|
+
if (isReasoningLevel(normalized))
|
|
5355
|
+
return { level: normalized };
|
|
5356
|
+
return { passthrough: normalized };
|
|
5357
|
+
}
|
|
5358
|
+
function splitReasoningSuffix(model, options) {
|
|
5359
|
+
if (typeof model !== "string")
|
|
5360
|
+
return { base: "" };
|
|
5361
|
+
const trimmed = model.trim();
|
|
5362
|
+
if (!trimmed)
|
|
5363
|
+
return { base: "" };
|
|
5364
|
+
const separatorIndex = trimmed.lastIndexOf(":");
|
|
5365
|
+
if (separatorIndex === -1)
|
|
5366
|
+
return { base: trimmed };
|
|
5367
|
+
const base = trimmed.slice(0, separatorIndex).trim();
|
|
5368
|
+
const token = trimmed.slice(separatorIndex + 1).trim().toLowerCase();
|
|
5369
|
+
if (!base || !REASONING_LEVEL_OR_AUTO_SET.has(token))
|
|
5370
|
+
return { base: trimmed };
|
|
5371
|
+
if (token === "max" && !(options?.allowMaxSuffix ?? base.includes("/")))
|
|
5372
|
+
return { base: trimmed };
|
|
5373
|
+
return { base, level: token };
|
|
5374
|
+
}
|
|
5375
|
+
|
|
5376
|
+
// ../../omo-config-core/src/schema/model-ref.ts
|
|
5377
|
+
var REASONING_LEVELS_OR_AUTO = [...REASONING_LEVELS, "auto"];
|
|
5378
|
+
var OmoReasoningSchema = union([
|
|
5379
|
+
_enum(REASONING_LEVELS_OR_AUTO),
|
|
5380
|
+
string2()
|
|
5381
|
+
]);
|
|
5382
|
+
var OmoModelRefObjectSchema = object({
|
|
5383
|
+
model: string2(),
|
|
5384
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5385
|
+
temperature: number2().min(0).max(2).optional(),
|
|
5386
|
+
top_p: number2().min(0).max(1).optional(),
|
|
5387
|
+
max_tokens: number2().int().positive().optional(),
|
|
5388
|
+
provider_options: record(string2(), unknown()).optional()
|
|
5389
|
+
}).strict();
|
|
5390
|
+
var OmoModelRefSchema = union([string2(), OmoModelRefObjectSchema]);
|
|
5323
5391
|
|
|
5324
5392
|
// ../../omo-config-core/src/schema/fallback-models.ts
|
|
5325
5393
|
var OmoThinkingConfigSchema = object({
|
|
5326
5394
|
type: _enum(["enabled", "disabled"]),
|
|
5327
5395
|
budgetTokens: number2().optional()
|
|
5328
5396
|
}).strict();
|
|
5329
|
-
var OmoReasoningEffortSchema =
|
|
5330
|
-
|
|
5397
|
+
var OmoReasoningEffortSchema = OmoReasoningSchema;
|
|
5398
|
+
function isRecord(value) {
|
|
5399
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5400
|
+
}
|
|
5401
|
+
function canonicalReasoning(value) {
|
|
5402
|
+
if (typeof value !== "string")
|
|
5403
|
+
return;
|
|
5404
|
+
const normalized = normalizeReasoning(value);
|
|
5405
|
+
return normalized.level ?? normalized.passthrough;
|
|
5406
|
+
}
|
|
5407
|
+
function canonicalModelString(model) {
|
|
5408
|
+
const colon = splitReasoningSuffix(model, { allowMaxSuffix: true });
|
|
5409
|
+
if (colon.level !== undefined)
|
|
5410
|
+
return `${colon.base}:${colon.level}`;
|
|
5411
|
+
const trimmed = model.trim();
|
|
5412
|
+
const parenthesized = trimmed.match(/^(.*)\(([^()]+)\)\s*$/);
|
|
5413
|
+
const spaced = parenthesized === null ? trimmed.match(/^(.*\S)\s+([a-z][a-z0-9_-]*)$/i) : null;
|
|
5414
|
+
const base = (parenthesized?.[1] ?? spaced?.[1])?.trim();
|
|
5415
|
+
const token = (parenthesized?.[2] ?? spaced?.[2])?.trim();
|
|
5416
|
+
if (base === undefined || token === undefined)
|
|
5417
|
+
return trimmed;
|
|
5418
|
+
const normalized = normalizeReasoning(token);
|
|
5419
|
+
return normalized.level === undefined ? trimmed : `${base}:${normalized.level}`;
|
|
5420
|
+
}
|
|
5421
|
+
function normalizeLegacyModelFields(entry) {
|
|
5422
|
+
const normalized = { ...entry };
|
|
5423
|
+
delete normalized["variant"];
|
|
5424
|
+
delete normalized["reasoningEffort"];
|
|
5425
|
+
delete normalized["thinking"];
|
|
5426
|
+
delete normalized["textVerbosity"];
|
|
5427
|
+
delete normalized["maxTokens"];
|
|
5428
|
+
delete normalized["providerOptions"];
|
|
5429
|
+
if (typeof entry["model"] === "string")
|
|
5430
|
+
normalized["model"] = canonicalModelString(entry["model"]);
|
|
5431
|
+
const explicitReasoning = canonicalReasoning(entry["reasoning"]);
|
|
5432
|
+
const variant = canonicalReasoning(entry["variant"]);
|
|
5433
|
+
const reasoningEffort = canonicalReasoning(entry["reasoningEffort"]);
|
|
5434
|
+
const thinking = isRecord(entry["thinking"]) ? entry["thinking"] : undefined;
|
|
5435
|
+
const reasoning = explicitReasoning ?? reasoningEffort ?? variant ?? (thinking?.["type"] === "disabled" ? "off" : undefined);
|
|
5436
|
+
if (reasoning !== undefined)
|
|
5437
|
+
normalized["reasoning"] = reasoning;
|
|
5438
|
+
const providerOptions = isRecord(entry["provider_options"]) ? { ...entry["provider_options"] } : isRecord(entry["providerOptions"]) ? { ...entry["providerOptions"] } : {};
|
|
5439
|
+
if (thinking?.["type"] === "enabled")
|
|
5440
|
+
providerOptions["thinking"] = { ...thinking };
|
|
5441
|
+
if (entry["textVerbosity"] !== undefined)
|
|
5442
|
+
providerOptions["textVerbosity"] = entry["textVerbosity"];
|
|
5443
|
+
if (Object.keys(providerOptions).length > 0)
|
|
5444
|
+
normalized["provider_options"] = providerOptions;
|
|
5445
|
+
if (entry["max_tokens"] !== undefined)
|
|
5446
|
+
normalized["max_tokens"] = entry["max_tokens"];
|
|
5447
|
+
else if (entry["maxTokens"] !== undefined)
|
|
5448
|
+
normalized["max_tokens"] = entry["maxTokens"];
|
|
5449
|
+
return normalized;
|
|
5450
|
+
}
|
|
5451
|
+
var OmoLegacyFallbackModelObjectInputSchema = object({
|
|
5331
5452
|
model: string2(),
|
|
5332
|
-
|
|
5333
|
-
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5453
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5334
5454
|
temperature: number2().min(0).max(2).optional(),
|
|
5335
5455
|
top_p: number2().min(0).max(1).optional(),
|
|
5456
|
+
max_tokens: number2().int().positive().optional(),
|
|
5457
|
+
provider_options: record(string2(), unknown()).optional(),
|
|
5458
|
+
variant: string2().optional(),
|
|
5459
|
+
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5460
|
+
thinking: OmoThinkingConfigSchema.optional(),
|
|
5461
|
+
textVerbosity: _enum(["low", "medium", "high"]).optional(),
|
|
5336
5462
|
maxTokens: number2().optional(),
|
|
5337
|
-
|
|
5463
|
+
providerOptions: record(string2(), unknown()).optional()
|
|
5338
5464
|
}).strict();
|
|
5465
|
+
var OmoFallbackModelObjectSchema = preprocess((value) => isRecord(value) ? normalizeLegacyModelFields(value) : value, OmoLegacyFallbackModelObjectInputSchema);
|
|
5339
5466
|
var OmoFallbackModelsSchema = union([
|
|
5340
5467
|
string2(),
|
|
5341
5468
|
array(string2()),
|
|
@@ -5344,19 +5471,16 @@ var OmoFallbackModelsSchema = union([
|
|
|
5344
5471
|
]);
|
|
5345
5472
|
|
|
5346
5473
|
// ../../omo-config-core/src/schema/agent.ts
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
reasoningEffort: OmoReasoningEffortSchema.optional()
|
|
5353
|
-
}).strict()
|
|
5354
|
-
]);
|
|
5355
|
-
var OmoAgentDefSchema = object({
|
|
5474
|
+
function isRecord2(value) {
|
|
5475
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5476
|
+
}
|
|
5477
|
+
var OmoAgentModelEntrySchema = union([string2(), OmoFallbackModelObjectSchema]);
|
|
5478
|
+
var OmoAgentDefInputSchema = object({
|
|
5356
5479
|
description: string2().optional(),
|
|
5357
5480
|
prompt: string2().optional(),
|
|
5358
5481
|
model: string2().optional(),
|
|
5359
5482
|
models: array(OmoAgentModelEntrySchema).optional(),
|
|
5483
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5360
5484
|
variant: string2().optional(),
|
|
5361
5485
|
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5362
5486
|
tools: record(string2(), boolean2()).optional(),
|
|
@@ -5369,16 +5493,24 @@ var OmoAgentDefSchema = object({
|
|
|
5369
5493
|
temperature: number2().min(0).max(2).optional(),
|
|
5370
5494
|
disable: boolean2().optional()
|
|
5371
5495
|
}).strict();
|
|
5496
|
+
var OmoAgentDefSchema = preprocess((value) => isRecord2(value) ? normalizeLegacyModelFields(value) : value, OmoAgentDefInputSchema);
|
|
5372
5497
|
var OmoAgentsConfigSchema = record(string2(), OmoAgentDefSchema);
|
|
5373
5498
|
|
|
5374
5499
|
// ../../omo-config-core/src/schema/category.ts
|
|
5375
|
-
|
|
5500
|
+
function isRecord3(value) {
|
|
5501
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5502
|
+
}
|
|
5503
|
+
var OmoCategoryConfigObjectSchema = object({
|
|
5376
5504
|
description: string2().optional(),
|
|
5377
5505
|
model: string2().optional(),
|
|
5378
|
-
|
|
5379
|
-
|
|
5506
|
+
models: array(union([string2(), OmoFallbackModelObjectSchema])).optional(),
|
|
5507
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5380
5508
|
temperature: number2().min(0).max(2).optional(),
|
|
5381
5509
|
top_p: number2().min(0).max(1).optional(),
|
|
5510
|
+
max_tokens: number2().int().positive().optional(),
|
|
5511
|
+
provider_options: record(string2(), unknown()).optional(),
|
|
5512
|
+
fallback_models: OmoFallbackModelsSchema.optional(),
|
|
5513
|
+
variant: string2().optional(),
|
|
5382
5514
|
maxTokens: number2().optional(),
|
|
5383
5515
|
thinking: OmoThinkingConfigSchema.optional(),
|
|
5384
5516
|
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
@@ -5387,8 +5519,10 @@ var OmoCategoryConfigSchema = object({
|
|
|
5387
5519
|
prompt_append: string2().optional(),
|
|
5388
5520
|
max_prompt_tokens: number2().int().positive().optional(),
|
|
5389
5521
|
is_unstable_agent: boolean2().optional(),
|
|
5390
|
-
disable: boolean2().optional()
|
|
5522
|
+
disable: boolean2().optional(),
|
|
5523
|
+
warn_unavailable: boolean2().optional()
|
|
5391
5524
|
}).strict();
|
|
5525
|
+
var OmoCategoryConfigSchema = preprocess((value) => isRecord3(value) ? normalizeLegacyModelFields(value) : value, OmoCategoryConfigObjectSchema);
|
|
5392
5526
|
var OmoCategoriesConfigSchema = record(string2(), OmoCategoryConfigSchema);
|
|
5393
5527
|
|
|
5394
5528
|
// ../../omo-config-core/src/schema/harness.ts
|
|
@@ -5415,17 +5549,95 @@ var OmoCodegraphSettingsSchema = OmoCodegraphSettingsLayerSchema.extend({
|
|
|
5415
5549
|
telemetry: boolean2().default(false)
|
|
5416
5550
|
}).strict();
|
|
5417
5551
|
|
|
5552
|
+
// ../../omo-config-core/src/schema/memory.ts
|
|
5553
|
+
var OmoMemoryReflectionTriggerSchema = object({
|
|
5554
|
+
step_count: number2().int().nonnegative().default(0),
|
|
5555
|
+
on_compaction: boolean2().default(true)
|
|
5556
|
+
}).strict();
|
|
5557
|
+
var OmoMemoryReflectionSchema = object({
|
|
5558
|
+
trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 0, on_compaction: true }),
|
|
5559
|
+
merge: _enum(["auto", "integration"]).default("auto"),
|
|
5560
|
+
category: string2().min(1).default("quick"),
|
|
5561
|
+
timeout_minutes: number2().int().positive().default(15),
|
|
5562
|
+
sandbox: _enum(["auto", "required", "off"]).default("auto")
|
|
5563
|
+
}).strict();
|
|
5564
|
+
var OmoMemorySyncSchema = object({
|
|
5565
|
+
remote: string2().min(1).optional(),
|
|
5566
|
+
enabled: boolean2().default(true)
|
|
5567
|
+
}).strict();
|
|
5568
|
+
var OmoMemorySearchSchema = object({
|
|
5569
|
+
enabled: boolean2().default(true)
|
|
5570
|
+
}).strict();
|
|
5571
|
+
var OmoMemoryReflectionTriggerLayerSchema = object({
|
|
5572
|
+
step_count: number2().int().nonnegative().optional(),
|
|
5573
|
+
on_compaction: boolean2().optional()
|
|
5574
|
+
}).strict();
|
|
5575
|
+
var OmoMemoryReflectionLayerSchema = object({
|
|
5576
|
+
trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
|
|
5577
|
+
merge: _enum(["auto", "integration"]).optional(),
|
|
5578
|
+
category: string2().min(1).optional(),
|
|
5579
|
+
timeout_minutes: number2().int().positive().optional(),
|
|
5580
|
+
sandbox: _enum(["auto", "required", "off"]).optional()
|
|
5581
|
+
}).strict();
|
|
5582
|
+
var OmoMemorySyncLayerSchema = object({
|
|
5583
|
+
remote: string2().min(1).optional(),
|
|
5584
|
+
enabled: boolean2().optional()
|
|
5585
|
+
}).strict();
|
|
5586
|
+
var OmoMemorySearchLayerSchema = object({
|
|
5587
|
+
enabled: boolean2().optional()
|
|
5588
|
+
}).strict();
|
|
5589
|
+
var OmoMemoryAgentOverridesSchema = object({
|
|
5590
|
+
enabled: boolean2().optional(),
|
|
5591
|
+
agent: string2().min(1).optional(),
|
|
5592
|
+
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5593
|
+
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5594
|
+
search: OmoMemorySearchLayerSchema.optional(),
|
|
5595
|
+
compile_warn_tokens: number2().int().positive().optional()
|
|
5596
|
+
}).strict();
|
|
5597
|
+
var OmoMemorySettingsSchema = object({
|
|
5598
|
+
enabled: boolean2().default(true),
|
|
5599
|
+
agent: string2().min(1).default("auto"),
|
|
5600
|
+
reflection: OmoMemoryReflectionSchema.default({
|
|
5601
|
+
trigger: { step_count: 0, on_compaction: true },
|
|
5602
|
+
merge: "auto",
|
|
5603
|
+
category: "quick",
|
|
5604
|
+
timeout_minutes: 15,
|
|
5605
|
+
sandbox: "auto"
|
|
5606
|
+
}),
|
|
5607
|
+
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5608
|
+
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5609
|
+
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5610
|
+
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5611
|
+
}).strict();
|
|
5612
|
+
var OmoMemorySettingsLayerSchema = object({
|
|
5613
|
+
enabled: boolean2().optional(),
|
|
5614
|
+
agent: string2().min(1).optional(),
|
|
5615
|
+
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5616
|
+
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5617
|
+
search: OmoMemorySearchLayerSchema.optional(),
|
|
5618
|
+
compile_warn_tokens: number2().int().positive().optional(),
|
|
5619
|
+
agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
|
|
5620
|
+
}).strict();
|
|
5621
|
+
|
|
5418
5622
|
// ../../omo-config-core/src/schema/model-catalog.ts
|
|
5419
|
-
|
|
5623
|
+
function isRecord4(value) {
|
|
5624
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5625
|
+
}
|
|
5626
|
+
var OmoModelCatalogEntryInputSchema = object({
|
|
5420
5627
|
model: string2(),
|
|
5628
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5421
5629
|
variant: string2().optional(),
|
|
5422
5630
|
reasoningEffort: OmoReasoningEffortSchema.optional()
|
|
5423
5631
|
}).strict();
|
|
5632
|
+
var OmoModelCatalogEntrySchema = preprocess((value) => isRecord4(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryInputSchema);
|
|
5424
5633
|
var OmoModelCatalogSchema = record(string2(), OmoModelCatalogEntrySchema);
|
|
5425
|
-
var
|
|
5634
|
+
var OmoModelCatalogEntryLayerInputSchema = OmoModelCatalogEntryInputSchema.partial();
|
|
5635
|
+
var OmoModelCatalogEntryLayerSchema = preprocess((value) => isRecord4(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryLayerInputSchema);
|
|
5426
5636
|
var OmoModelCatalogLayerSchema = record(string2(), OmoModelCatalogEntryLayerSchema);
|
|
5427
5637
|
|
|
5428
5638
|
// ../../omo-config-core/src/schema/task.ts
|
|
5639
|
+
import { availableParallelism } from "node:os";
|
|
5640
|
+
var ResidencyMaxChildrenInputSchema = union([number2().int().positive(), literal("unlimited")]);
|
|
5429
5641
|
var OmoTaskWaitSchema = object({
|
|
5430
5642
|
min_ms: number2().int().positive().default(5000),
|
|
5431
5643
|
default_ms: number2().int().positive().default(60000),
|
|
@@ -5436,16 +5648,21 @@ var OmoTaskTeamSettingsSchema = object({
|
|
|
5436
5648
|
max_parallel_members: number2().int().min(1).max(8).default(4),
|
|
5437
5649
|
max_wall_clock_minutes: number2().int().positive().default(120)
|
|
5438
5650
|
}).strict();
|
|
5651
|
+
var OmoTaskWarningsSchema = object({
|
|
5652
|
+
unavailable_categories: boolean2().default(true)
|
|
5653
|
+
}).strict();
|
|
5439
5654
|
var OmoTaskSettingsSchema = object({
|
|
5440
5655
|
default_execution_mode: _enum(["in-process", "process"]).default("in-process"),
|
|
5441
5656
|
default_concurrency: number2().int().positive().default(5),
|
|
5442
5657
|
provider_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5443
5658
|
model_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5444
5659
|
max_depth: number2().int().nonnegative().default(1),
|
|
5445
|
-
residency_max_children:
|
|
5660
|
+
residency_max_children: ResidencyMaxChildrenInputSchema.default(8),
|
|
5446
5661
|
ttl_ms: number2().int().positive().default(86400000),
|
|
5447
5662
|
state_dir: string2().optional(),
|
|
5448
5663
|
reattach_on_reconcile: boolean2().optional(),
|
|
5664
|
+
resume_children: boolean2().default(true),
|
|
5665
|
+
warnings: OmoTaskWarningsSchema.default({ unavailable_categories: true }),
|
|
5449
5666
|
wait: OmoTaskWaitSchema.default({ min_ms: 5000, default_ms: 60000, max_ms: 600000 }),
|
|
5450
5667
|
team: OmoTaskTeamSettingsSchema.default({
|
|
5451
5668
|
max_members: 8,
|
|
@@ -5463,19 +5680,31 @@ var OmoTaskTeamSettingsLayerSchema = object({
|
|
|
5463
5680
|
max_parallel_members: number2().int().min(1).max(8).optional(),
|
|
5464
5681
|
max_wall_clock_minutes: number2().int().positive().optional()
|
|
5465
5682
|
}).strict();
|
|
5683
|
+
var OmoTaskWarningsLayerSchema = object({
|
|
5684
|
+
unavailable_categories: boolean2().optional()
|
|
5685
|
+
}).strict();
|
|
5466
5686
|
var OmoTaskSettingsLayerSchema = object({
|
|
5467
5687
|
default_execution_mode: _enum(["in-process", "process"]).optional(),
|
|
5468
5688
|
default_concurrency: number2().int().positive().optional(),
|
|
5469
5689
|
provider_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5470
5690
|
model_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5471
5691
|
max_depth: number2().int().nonnegative().optional(),
|
|
5472
|
-
residency_max_children:
|
|
5692
|
+
residency_max_children: ResidencyMaxChildrenInputSchema.optional(),
|
|
5473
5693
|
ttl_ms: number2().int().positive().optional(),
|
|
5474
5694
|
state_dir: string2().optional(),
|
|
5475
5695
|
reattach_on_reconcile: boolean2().optional(),
|
|
5696
|
+
resume_children: boolean2().optional(),
|
|
5697
|
+
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
5476
5698
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
5477
5699
|
team: OmoTaskTeamSettingsLayerSchema.optional()
|
|
5478
5700
|
}).strict();
|
|
5701
|
+
function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism) {
|
|
5702
|
+
const record2 = record(string2(), unknown()).parse(input);
|
|
5703
|
+
return OmoTaskSettingsSchema.parse({
|
|
5704
|
+
...record2,
|
|
5705
|
+
residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
|
|
5706
|
+
});
|
|
5707
|
+
}
|
|
5479
5708
|
|
|
5480
5709
|
// ../../omo-config-core/src/schema/team.ts
|
|
5481
5710
|
var OmoTeamMemberBaseSchema = object({
|
|
@@ -5532,7 +5761,8 @@ var OmoTypedHarnessConfigSchema = object({
|
|
|
5532
5761
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
5533
5762
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5534
5763
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5535
|
-
models: OmoModelCatalogLayerSchema.optional()
|
|
5764
|
+
models: OmoModelCatalogLayerSchema.optional(),
|
|
5765
|
+
memory: OmoMemorySettingsLayerSchema.optional()
|
|
5536
5766
|
}).strict();
|
|
5537
5767
|
var OmoConfigProfileSchema = object({
|
|
5538
5768
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
@@ -5541,6 +5771,7 @@ var OmoConfigProfileSchema = object({
|
|
|
5541
5771
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5542
5772
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5543
5773
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
5774
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5544
5775
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5545
5776
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5546
5777
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
@@ -5553,6 +5784,7 @@ var OmoConfigSchema = object({
|
|
|
5553
5784
|
task: OmoTaskSettingsSchema.optional(),
|
|
5554
5785
|
teams: OmoTeamsConfigSchema.optional(),
|
|
5555
5786
|
models: OmoModelCatalogSchema.optional(),
|
|
5787
|
+
memory: OmoMemorySettingsSchema.optional(),
|
|
5556
5788
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5557
5789
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5558
5790
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -5568,6 +5800,7 @@ var OmoConfigLayerSchema = object({
|
|
|
5568
5800
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5569
5801
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5570
5802
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
5803
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5571
5804
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5572
5805
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5573
5806
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -6973,7 +7206,8 @@ function mergeOmoConfigRecords(base, override, parentKey) {
|
|
|
6973
7206
|
}
|
|
6974
7207
|
|
|
6975
7208
|
// ../../omo-config-core/src/loader/paths.ts
|
|
6976
|
-
import {
|
|
7209
|
+
import { userInfo } from "node:os";
|
|
7210
|
+
import { dirname as dirname2, join as join6, posix, resolve as resolve4 } from "node:path";
|
|
6977
7211
|
|
|
6978
7212
|
// ../../omo-config-core/src/internal/posix-path.ts
|
|
6979
7213
|
function toPosixPath(path) {
|
|
@@ -6991,10 +7225,7 @@ var DEFAULT_READ_FILE_SYSTEM = {
|
|
|
6991
7225
|
|
|
6992
7226
|
// ../../omo-config-core/src/loader/paths.ts
|
|
6993
7227
|
var MAX_PROJECT_CONFIG_DIRECTORY_DEPTH = 256;
|
|
6994
|
-
|
|
6995
|
-
const pathToChild = relative(parent, child);
|
|
6996
|
-
return pathToChild === "" || !pathToChild.startsWith("..") && !isAbsolute2(pathToChild);
|
|
6997
|
-
}
|
|
7228
|
+
var ACCOUNT_HOME_DIR = userInfo().homedir;
|
|
6998
7229
|
function resolveHomeDir(env = process.env) {
|
|
6999
7230
|
const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
|
|
7000
7231
|
return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve4(homeDir));
|
|
@@ -7046,15 +7277,14 @@ function realpathOrSelf(path, fileSystem) {
|
|
|
7046
7277
|
return path;
|
|
7047
7278
|
}
|
|
7048
7279
|
}
|
|
7049
|
-
function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem) {
|
|
7280
|
+
function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHomeDir = homeDir) {
|
|
7050
7281
|
const startDir = resolve4(cwd);
|
|
7051
|
-
const
|
|
7052
|
-
const
|
|
7053
|
-
const stopDir = containsPath(realHomeDir, realpathOrSelf(startDir, fileSystem)) ? realHomeDir : null;
|
|
7282
|
+
const boundaryDirs = [...new Set([resolve4(homeDir), resolve4(accountHomeDir)])];
|
|
7283
|
+
const realBoundaryDirs = new Set(boundaryDirs.map((path) => realpathOrSelf(path, fileSystem)));
|
|
7054
7284
|
const nearestFirst = [];
|
|
7055
7285
|
let currentDir = startDir;
|
|
7056
7286
|
for (let depth = 0;depth < MAX_PROJECT_CONFIG_DIRECTORY_DEPTH; depth += 1) {
|
|
7057
|
-
const isHomeDir = currentDir
|
|
7287
|
+
const isHomeDir = boundaryDirs.includes(currentDir) || realBoundaryDirs.has(realpathOrSelf(currentDir, fileSystem));
|
|
7058
7288
|
const configPath = isHomeDir ? null : detectOmoJsonPath(currentDir, fileSystem);
|
|
7059
7289
|
if (configPath !== null)
|
|
7060
7290
|
nearestFirst.push(configPath);
|
|
@@ -7071,7 +7301,7 @@ function resolveOmoConfigPaths(options) {
|
|
|
7071
7301
|
const fileSystem = options.fileSystem ?? DEFAULT_READ_FILE_SYSTEM;
|
|
7072
7302
|
const env = options.env ?? process.env;
|
|
7073
7303
|
const userPath = detectUserOmoJsonPath(env, fileSystem);
|
|
7074
|
-
const projectPaths = findProjectConfigPathsFarthestFirst(options.cwd, resolveHomeDir(env), fileSystem);
|
|
7304
|
+
const projectPaths = findProjectConfigPathsFarthestFirst(options.cwd, resolveHomeDir(env), fileSystem, ACCOUNT_HOME_DIR);
|
|
7075
7305
|
return [
|
|
7076
7306
|
{ path: userPath, scope: "user" },
|
|
7077
7307
|
...projectPaths.map((path) => ({ path, scope: "project" }))
|
|
@@ -7154,7 +7384,7 @@ var DEFAULT_RAW_CONFIG = {
|
|
|
7154
7384
|
agents: {},
|
|
7155
7385
|
categories: {},
|
|
7156
7386
|
codegraph: OmoCodegraphSettingsSchema.parse({}),
|
|
7157
|
-
task:
|
|
7387
|
+
task: resolveOmoTaskSettings({}),
|
|
7158
7388
|
teams: {}
|
|
7159
7389
|
};
|
|
7160
7390
|
function stripResolutionControlKeys(config2) {
|
|
@@ -7495,6 +7725,21 @@ function isPlainObject3(value) {
|
|
|
7495
7725
|
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.prototype.toString.call(value) === "[object Object]";
|
|
7496
7726
|
}
|
|
7497
7727
|
|
|
7728
|
+
// ../../omo-config-core/src/migration/backup-move.ts
|
|
7729
|
+
function isCrossDeviceError(error) {
|
|
7730
|
+
return error instanceof Error && Reflect.get(error, "code") === "EXDEV";
|
|
7731
|
+
}
|
|
7732
|
+
function moveMigrationBackup(fileSystem, sourcePath, backupPath) {
|
|
7733
|
+
try {
|
|
7734
|
+
fileSystem.renameSync(sourcePath, backupPath);
|
|
7735
|
+
} catch (error) {
|
|
7736
|
+
if (!isCrossDeviceError(error))
|
|
7737
|
+
throw error;
|
|
7738
|
+
fileSystem.copyFileSync(sourcePath, backupPath);
|
|
7739
|
+
fileSystem.unlinkSync(sourcePath);
|
|
7740
|
+
}
|
|
7741
|
+
}
|
|
7742
|
+
|
|
7498
7743
|
// ../../omo-config-core/src/migration/commit.ts
|
|
7499
7744
|
import { basename as basename2, dirname as dirname4, join as join8, resolve as resolve5 } from "node:path";
|
|
7500
7745
|
|
|
@@ -7706,6 +7951,23 @@ function prepareTargetWrite(input) {
|
|
|
7706
7951
|
const edits = [...collectMigrationEdits(merged.additions), { path: ["_migrations"], value: marker }];
|
|
7707
7952
|
return { diagnostics: merged.diagnostics, document, edits };
|
|
7708
7953
|
}
|
|
7954
|
+
function prepareTargetReplacement(input) {
|
|
7955
|
+
const marker = markerValue(input.target, input.migrationId, input.targetPath);
|
|
7956
|
+
const document = { ...input.document, _migrations: marker };
|
|
7957
|
+
validateTarget(input.targetPath, document);
|
|
7958
|
+
const edits = [];
|
|
7959
|
+
for (const key of Object.keys(input.target)) {
|
|
7960
|
+
if (key !== "_migrations" && !Object.prototype.hasOwnProperty.call(input.document, key)) {
|
|
7961
|
+
edits.push({ path: [key], value: undefined });
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7964
|
+
for (const [key, value] of Object.entries(input.document)) {
|
|
7965
|
+
if (key !== "_migrations")
|
|
7966
|
+
edits.push({ path: [key], value });
|
|
7967
|
+
}
|
|
7968
|
+
edits.push({ path: ["_migrations"], value: marker });
|
|
7969
|
+
return { diagnostics: [], document, edits };
|
|
7970
|
+
}
|
|
7709
7971
|
function writePreparedTarget(input) {
|
|
7710
7972
|
input.writeTarget({
|
|
7711
7973
|
edits: input.prepared.edits,
|
|
@@ -7738,9 +8000,17 @@ function parseJournal(value) {
|
|
|
7738
8000
|
if (!isPlainObject3(value["targetWrite"]) || !isPlainObject3(value["targetWrite"]["additions"])) {
|
|
7739
8001
|
throw new Error("Migration journal target write is invalid");
|
|
7740
8002
|
}
|
|
8003
|
+
const targetWriteMode = value["targetWrite"]["mode"];
|
|
8004
|
+
if (targetWriteMode !== undefined && targetWriteMode !== "replace-target") {
|
|
8005
|
+
throw new Error("Migration journal target write mode is invalid");
|
|
8006
|
+
}
|
|
7741
8007
|
if (typeof value["targetWritten"] !== "boolean" || !Array.isArray(value["completedMoves"])) {
|
|
7742
8008
|
throw new Error("Migration journal completion state is invalid");
|
|
7743
8009
|
}
|
|
8010
|
+
const diagnostics = value["diagnostics"];
|
|
8011
|
+
if (diagnostics !== undefined && (!Array.isArray(diagnostics) || !diagnostics.every((entry) => typeof entry === "string"))) {
|
|
8012
|
+
throw new Error("Migration journal diagnostics are invalid");
|
|
8013
|
+
}
|
|
7744
8014
|
if (!value["completedMoves"].every((path) => typeof path === "string")) {
|
|
7745
8015
|
throw new Error("Migration journal completed moves are invalid");
|
|
7746
8016
|
}
|
|
@@ -7756,9 +8026,13 @@ function parseJournal(value) {
|
|
|
7756
8026
|
return {
|
|
7757
8027
|
backupMoves,
|
|
7758
8028
|
completedMoves: [...value["completedMoves"]],
|
|
8029
|
+
diagnostics: diagnostics === undefined ? [] : [...diagnostics],
|
|
7759
8030
|
migrationId: value["migrationId"],
|
|
7760
8031
|
targetPath: value["targetPath"],
|
|
7761
|
-
targetWrite: {
|
|
8032
|
+
targetWrite: {
|
|
8033
|
+
additions: { ...value["targetWrite"]["additions"] },
|
|
8034
|
+
...targetWriteMode === undefined ? {} : { mode: targetWriteMode }
|
|
8035
|
+
},
|
|
7762
8036
|
targetWritten: value["targetWritten"],
|
|
7763
8037
|
version: 1
|
|
7764
8038
|
};
|
|
@@ -7949,7 +8223,12 @@ function resumeMigrationJournal(input) {
|
|
|
7949
8223
|
input.renewLock();
|
|
7950
8224
|
const target = targetDocument(journal.targetPath, input.fileSystem);
|
|
7951
8225
|
if (!hasMigrationMarker(target, journal.migrationId)) {
|
|
7952
|
-
const prepared =
|
|
8226
|
+
const prepared = journal.targetWrite.mode === "replace-target" ? prepareTargetReplacement({
|
|
8227
|
+
document: journal.targetWrite.additions,
|
|
8228
|
+
migrationId: journal.migrationId,
|
|
8229
|
+
target,
|
|
8230
|
+
targetPath: journal.targetPath
|
|
8231
|
+
}) : prepareTargetWrite({
|
|
7953
8232
|
additions: journal.targetWrite.additions,
|
|
7954
8233
|
migrationId: journal.migrationId,
|
|
7955
8234
|
target,
|
|
@@ -7973,7 +8252,7 @@ function resumeMigrationJournal(input) {
|
|
|
7973
8252
|
if (input.fileSystem.existsSync(move.to)) {
|
|
7974
8253
|
throw new MigrationTransactionError(`Migration backup path already exists: ${move.to}`);
|
|
7975
8254
|
}
|
|
7976
|
-
input.fileSystem
|
|
8255
|
+
moveMigrationBackup(input.fileSystem, move.from, move.to);
|
|
7977
8256
|
} else if (!input.fileSystem.existsSync(move.to)) {
|
|
7978
8257
|
throw new MigrationTransactionError(`Migration source and backup are both missing: ${move.from}`);
|
|
7979
8258
|
}
|
|
@@ -8053,11 +8332,17 @@ function executePlan(input) {
|
|
|
8053
8332
|
assertSafeSourcePaths(plan.sources, protectedPaths);
|
|
8054
8333
|
const existingSources = plan.sources.filter((source) => fileSystem.existsSync(source.path));
|
|
8055
8334
|
const target = targetDocument(plan.targetPath, fileSystem);
|
|
8056
|
-
|
|
8335
|
+
const replaceTarget = plan.mode === "replace-target";
|
|
8336
|
+
if (!shouldRunMigration({
|
|
8337
|
+
legacySourcesExist: replaceTarget ? fileSystem.existsSync(plan.targetPath) : existingSources.length > 0,
|
|
8338
|
+
migrationId: plan.id,
|
|
8339
|
+
target
|
|
8340
|
+
})) {
|
|
8057
8341
|
return { diagnostics: [], journalResumed, status: "skipped" };
|
|
8058
8342
|
}
|
|
8059
|
-
const
|
|
8060
|
-
const
|
|
8343
|
+
const loaded = replaceTarget ? [{ path: plan.targetPath, value: target }] : loadSources(existingSources, fileSystem);
|
|
8344
|
+
const transformed = transformResult(plan.transform(loaded));
|
|
8345
|
+
const prepared = replaceTarget ? prepareTargetReplacement({ document: transformed.document, migrationId: plan.id, target, targetPath: plan.targetPath }) : prepareTargetWrite({ additions: transformed.document, migrationId: plan.id, target, targetPath: plan.targetPath });
|
|
8061
8346
|
const diagnostics = [...transformed.diagnostics, ...prepared.diagnostics];
|
|
8062
8347
|
const moves = backupMoves(existingSources, plan.id, fileSystem, protectedPaths);
|
|
8063
8348
|
const preview = { backupMoves: moves, targetPath: plan.targetPath, transform: transformed.document };
|
|
@@ -8067,9 +8352,13 @@ function executePlan(input) {
|
|
|
8067
8352
|
const journal = {
|
|
8068
8353
|
backupMoves: moves,
|
|
8069
8354
|
completedMoves: [],
|
|
8355
|
+
diagnostics,
|
|
8070
8356
|
migrationId: plan.id,
|
|
8071
8357
|
targetPath: plan.targetPath,
|
|
8072
|
-
targetWrite: {
|
|
8358
|
+
targetWrite: {
|
|
8359
|
+
additions: transformed.document,
|
|
8360
|
+
...replaceTarget ? { mode: "replace-target" } : {}
|
|
8361
|
+
},
|
|
8073
8362
|
targetWritten: false,
|
|
8074
8363
|
version: 1
|
|
8075
8364
|
};
|
|
@@ -8085,7 +8374,7 @@ function executePlan(input) {
|
|
|
8085
8374
|
input.renewLock();
|
|
8086
8375
|
if (fileSystem.existsSync(move.to))
|
|
8087
8376
|
throw new MigrationTransactionError(`Migration backup path already exists: ${move.to}`);
|
|
8088
|
-
fileSystem
|
|
8377
|
+
moveMigrationBackup(fileSystem, move.from, move.to);
|
|
8089
8378
|
input.onBoundary?.("source-moved");
|
|
8090
8379
|
Object.assign(targetRecorded, { completedMoves: [...targetRecorded.completedMoves, move.from] });
|
|
8091
8380
|
writeMigrationJournal(targetRecorded, fileSystem, env, input.process, input.clock);
|
|
@@ -8133,17 +8422,17 @@ import { existsSync as existsSync5 } from "node:fs";
|
|
|
8133
8422
|
import { posix as posix4, win32 } from "node:path";
|
|
8134
8423
|
var MIGRATION_ID = "2026-07-codex-config-jsonc";
|
|
8135
8424
|
var OMO_SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/omo.schema.json";
|
|
8136
|
-
function
|
|
8425
|
+
function isRecord5(value) {
|
|
8137
8426
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8138
8427
|
}
|
|
8139
8428
|
function recordAt(value, key) {
|
|
8140
8429
|
const candidate = value[key];
|
|
8141
|
-
return
|
|
8430
|
+
return isRecord5(candidate) ? candidate : undefined;
|
|
8142
8431
|
}
|
|
8143
8432
|
function migrationHistory(sources, configPath) {
|
|
8144
8433
|
const history = [];
|
|
8145
8434
|
for (const source of sources) {
|
|
8146
|
-
if (!
|
|
8435
|
+
if (!isRecord5(source.value))
|
|
8147
8436
|
continue;
|
|
8148
8437
|
for (const key of ["_migrations", "appliedMigrations"]) {
|
|
8149
8438
|
const values = source.value[key];
|
|
@@ -8159,7 +8448,7 @@ function migrationHistory(sources, configPath) {
|
|
|
8159
8448
|
}
|
|
8160
8449
|
function transformConfigJsonc(configPath, sources) {
|
|
8161
8450
|
const config2 = sources.find((source) => source.path === configPath);
|
|
8162
|
-
const legacy = config2 === undefined || !
|
|
8451
|
+
const legacy = config2 === undefined || !isRecord5(config2.value) ? {} : config2.value;
|
|
8163
8452
|
const omo = recordAt(legacy, "[omo]");
|
|
8164
8453
|
const senpi = recordAt(legacy, "[senpi]");
|
|
8165
8454
|
const history = migrationHistory(sources, configPath);
|
|
@@ -8407,7 +8696,7 @@ function resolveHomeDir3(env) {
|
|
|
8407
8696
|
return env["HOME"] ?? env["USERPROFILE"] ?? homedir6();
|
|
8408
8697
|
}
|
|
8409
8698
|
function resolveHookProjectRoot(input, fallback) {
|
|
8410
|
-
if (!
|
|
8699
|
+
if (!isRecord6(input))
|
|
8411
8700
|
return fallback;
|
|
8412
8701
|
const cwd = input["cwd"];
|
|
8413
8702
|
return typeof cwd === "string" && cwd.trim().length > 0 ? cwd : fallback;
|
|
@@ -8422,7 +8711,7 @@ async function readHookInput(stdin) {
|
|
|
8422
8711
|
return;
|
|
8423
8712
|
return parseJson(text);
|
|
8424
8713
|
}
|
|
8425
|
-
function
|
|
8714
|
+
function isRecord6(value) {
|
|
8426
8715
|
return typeof value === "object" && value !== null;
|
|
8427
8716
|
}
|
|
8428
8717
|
function parseJson(text) {
|
|
@@ -8465,7 +8754,7 @@ function parseWindowsProcessTable(output) {
|
|
|
8465
8754
|
const entries = Array.isArray(parsed) ? parsed : parsed === undefined ? [] : [parsed];
|
|
8466
8755
|
const processes = [];
|
|
8467
8756
|
for (const entry of entries) {
|
|
8468
|
-
if (!
|
|
8757
|
+
if (!isRecord7(entry))
|
|
8469
8758
|
continue;
|
|
8470
8759
|
const pid = numberField(entry, "ProcessId");
|
|
8471
8760
|
const ppid = numberField(entry, "ParentProcessId");
|
|
@@ -8499,7 +8788,7 @@ function stringField(record2, key) {
|
|
|
8499
8788
|
const value = record2[key];
|
|
8500
8789
|
return typeof value === "string" ? value : undefined;
|
|
8501
8790
|
}
|
|
8502
|
-
function
|
|
8791
|
+
function isRecord7(value) {
|
|
8503
8792
|
return typeof value === "object" && value !== null;
|
|
8504
8793
|
}
|
|
8505
8794
|
|
|
@@ -8587,7 +8876,7 @@ async function runProcessFamilySweep(config2, options) {
|
|
|
8587
8876
|
}
|
|
8588
8877
|
try {
|
|
8589
8878
|
const plan = await config2.collect();
|
|
8590
|
-
const { failed, killed } = dryRun ? { failed: [], killed: [] } : await killTargets(plan.killList, options, config2
|
|
8879
|
+
const { failed, killed } = dryRun ? { failed: [], killed: [] } : await killTargets(plan.killList, options, config2);
|
|
8591
8880
|
if (!dryRun)
|
|
8592
8881
|
writeSweepStamp(config2.stampFile, nowMs);
|
|
8593
8882
|
return {
|
|
@@ -8604,16 +8893,18 @@ async function runProcessFamilySweep(config2, options) {
|
|
|
8604
8893
|
return { action: "failed", candidates: [], dryRun, failed: [], killed: [], spared: [], stampFile: config2.stampFile };
|
|
8605
8894
|
}
|
|
8606
8895
|
}
|
|
8607
|
-
async function killTargets(targets, options,
|
|
8896
|
+
async function killTargets(targets, options, config2) {
|
|
8608
8897
|
const failed = [];
|
|
8609
8898
|
const killed = [];
|
|
8610
8899
|
const context = {
|
|
8611
8900
|
failed,
|
|
8612
|
-
familyLabel,
|
|
8901
|
+
familyLabel: config2.familyLabel,
|
|
8613
8902
|
killer: options.killer ?? createDefaultProcessKiller(options.platform),
|
|
8614
8903
|
log: options.log
|
|
8615
8904
|
};
|
|
8616
8905
|
for (const target of targets) {
|
|
8906
|
+
if (!await passesSignalAttestation(target, config2.attestBeforeSignal, options.log, "SIGTERM"))
|
|
8907
|
+
continue;
|
|
8617
8908
|
const terminated = await safelyTerminate(target.pid, context);
|
|
8618
8909
|
if (!terminated)
|
|
8619
8910
|
continue;
|
|
@@ -8622,11 +8913,26 @@ async function killTargets(targets, options, familyLabel) {
|
|
|
8622
8913
|
killed.push(target);
|
|
8623
8914
|
continue;
|
|
8624
8915
|
}
|
|
8916
|
+
if (!await passesSignalAttestation(target, config2.attestBeforeSignal, options.log, "SIGKILL"))
|
|
8917
|
+
continue;
|
|
8625
8918
|
if (await safelyKill(target.pid, context))
|
|
8626
8919
|
killed.push(target);
|
|
8627
8920
|
}
|
|
8628
8921
|
return { failed, killed };
|
|
8629
8922
|
}
|
|
8923
|
+
async function passesSignalAttestation(target, attest, log, signal) {
|
|
8924
|
+
if (attest === undefined)
|
|
8925
|
+
return true;
|
|
8926
|
+
try {
|
|
8927
|
+
const attested = await attest(target);
|
|
8928
|
+
if (!attested)
|
|
8929
|
+
log?.(`process sweep sparing pid ${target.pid}: identity changed before ${signal}`);
|
|
8930
|
+
return attested;
|
|
8931
|
+
} catch (error) {
|
|
8932
|
+
log?.(`process sweep sparing pid ${target.pid}: identity attestation failed before ${signal}: ${String(error)}`);
|
|
8933
|
+
return false;
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8630
8936
|
async function safelyTerminate(pid, context) {
|
|
8631
8937
|
try {
|
|
8632
8938
|
await context.killer.terminate(pid);
|
|
@@ -10271,21 +10577,36 @@ function runProcessWithTreeTimeout(options) {
|
|
|
10271
10577
|
};
|
|
10272
10578
|
child.stdout.on("data", (chunk) => capture("stdout", chunk));
|
|
10273
10579
|
child.stderr.on("data", (chunk) => capture("stderr", chunk));
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
timeout.unref();
|
|
10580
|
+
let removeTimeoutSignal = () => {
|
|
10581
|
+
return;
|
|
10582
|
+
};
|
|
10583
|
+
let timeout;
|
|
10279
10584
|
const settle = async (exitCode, signal) => {
|
|
10280
10585
|
if (settled)
|
|
10281
10586
|
return;
|
|
10282
10587
|
settled = true;
|
|
10283
10588
|
clearTimeout(timeout);
|
|
10589
|
+
removeTimeoutSignal();
|
|
10284
10590
|
const termination = treeTermination === undefined ? null : await treeTermination;
|
|
10285
10591
|
stderr += stderrDecoder.end();
|
|
10286
10592
|
stdout += stdoutDecoder.end();
|
|
10287
10593
|
resolvePromise({ exitCode, signal, stderr, stdout, termination, timedOut });
|
|
10288
10594
|
};
|
|
10595
|
+
const triggerTimeout = () => {
|
|
10596
|
+
if (settled)
|
|
10597
|
+
return;
|
|
10598
|
+
timedOut = true;
|
|
10599
|
+
startTermination().then(() => settle(124, child.signalCode));
|
|
10600
|
+
};
|
|
10601
|
+
timeout = setTimeout(triggerTimeout, options.timeoutMs);
|
|
10602
|
+
timeout.unref();
|
|
10603
|
+
if (options.timeoutSignal?.aborted === true) {
|
|
10604
|
+
triggerTimeout();
|
|
10605
|
+
} else if (options.timeoutSignal !== undefined) {
|
|
10606
|
+
const timeoutSignal = options.timeoutSignal;
|
|
10607
|
+
timeoutSignal.addEventListener("abort", triggerTimeout, { once: true });
|
|
10608
|
+
removeTimeoutSignal = () => timeoutSignal.removeEventListener("abort", triggerTimeout);
|
|
10609
|
+
}
|
|
10289
10610
|
child.once("error", () => {
|
|
10290
10611
|
resolveChildClosed();
|
|
10291
10612
|
settle(1, null);
|
|
@@ -10699,12 +11020,12 @@ function textFromUnknown(value) {
|
|
|
10699
11020
|
if (Array.isArray(value))
|
|
10700
11021
|
return value.map(textFromUnknown).filter(Boolean).join(`
|
|
10701
11022
|
`);
|
|
10702
|
-
if (!
|
|
11023
|
+
if (!isRecord8(value))
|
|
10703
11024
|
return "";
|
|
10704
11025
|
return Object.entries(value).map(([key, nested]) => `${key}: ${textFromUnknown(nested)}`).filter((line) => line.trim().length > 0).join(`
|
|
10705
11026
|
`);
|
|
10706
11027
|
}
|
|
10707
|
-
function
|
|
11028
|
+
function isRecord8(value) {
|
|
10708
11029
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10709
11030
|
}
|
|
10710
11031
|
|
|
@@ -10722,9 +11043,9 @@ async function executeCodegraphPostToolUseHook(options = {}) {
|
|
|
10722
11043
|
return { action: "emitted-guidance", exitCode: 0 };
|
|
10723
11044
|
}
|
|
10724
11045
|
function runCodegraphPostToolUseHook(input, options = {}) {
|
|
10725
|
-
const toolName =
|
|
10726
|
-
const cwd =
|
|
10727
|
-
const toolOutput =
|
|
11046
|
+
const toolName = isRecord6(input) ? input["tool_name"] : undefined;
|
|
11047
|
+
const cwd = isRecord6(input) ? input["cwd"] : undefined;
|
|
11048
|
+
const toolOutput = isRecord6(input) ? input["tool_response"] ?? input["tool_output"] ?? input["response"] : input;
|
|
10728
11049
|
const guidance = buildCodegraphInitGuidanceForToolResult({ cwd, toolName, toolOutput }, options);
|
|
10729
11050
|
if (guidance === null)
|
|
10730
11051
|
return "";
|