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
|
@@ -3477,6 +3477,9 @@ function handlePipeResult(left, next, ctx) {
|
|
|
3477
3477
|
}
|
|
3478
3478
|
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
3479
3479
|
}
|
|
3480
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
3481
|
+
$ZodPipe.init(inst, def);
|
|
3482
|
+
});
|
|
3480
3483
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3481
3484
|
$ZodType.init(inst, def);
|
|
3482
3485
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -5563,6 +5566,10 @@ function pipe(in_, out) {
|
|
|
5563
5566
|
out
|
|
5564
5567
|
});
|
|
5565
5568
|
}
|
|
5569
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
5570
|
+
ZodPipe.init(inst, def);
|
|
5571
|
+
$ZodPreprocess.init(inst, def);
|
|
5572
|
+
});
|
|
5566
5573
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
5567
5574
|
$ZodReadonly.init(inst, def);
|
|
5568
5575
|
ZodType.init(inst, def);
|
|
@@ -5586,22 +5593,142 @@ function refine(fn, _params = {}) {
|
|
|
5586
5593
|
function superRefine(fn, params) {
|
|
5587
5594
|
return _superRefine(fn, params);
|
|
5588
5595
|
}
|
|
5596
|
+
function preprocess(fn, schema) {
|
|
5597
|
+
return new ZodPreprocess({
|
|
5598
|
+
type: "pipe",
|
|
5599
|
+
in: transform(fn),
|
|
5600
|
+
out: schema
|
|
5601
|
+
});
|
|
5602
|
+
}
|
|
5603
|
+
|
|
5604
|
+
// ../../../../omo-config-core/src/schema/reasoning-vocabulary.ts
|
|
5605
|
+
var REASONING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
5606
|
+
var REASONING_AUTO = "auto";
|
|
5607
|
+
var REASONING_LEVEL_SET = new Set(REASONING_LEVELS);
|
|
5608
|
+
var REASONING_LEVEL_OR_AUTO_SET = new Set([...REASONING_LEVELS, REASONING_AUTO]);
|
|
5609
|
+
function isReasoningLevel(value) {
|
|
5610
|
+
return REASONING_LEVEL_SET.has(value);
|
|
5611
|
+
}
|
|
5612
|
+
function normalizeReasoning(input) {
|
|
5613
|
+
const normalized = input.trim().toLowerCase();
|
|
5614
|
+
if (!normalized)
|
|
5615
|
+
return {};
|
|
5616
|
+
if (normalized === "none")
|
|
5617
|
+
return { level: "off" };
|
|
5618
|
+
if (normalized === REASONING_AUTO)
|
|
5619
|
+
return { level: REASONING_AUTO };
|
|
5620
|
+
if (isReasoningLevel(normalized))
|
|
5621
|
+
return { level: normalized };
|
|
5622
|
+
return { passthrough: normalized };
|
|
5623
|
+
}
|
|
5624
|
+
function splitReasoningSuffix(model, options) {
|
|
5625
|
+
if (typeof model !== "string")
|
|
5626
|
+
return { base: "" };
|
|
5627
|
+
const trimmed = model.trim();
|
|
5628
|
+
if (!trimmed)
|
|
5629
|
+
return { base: "" };
|
|
5630
|
+
const separatorIndex = trimmed.lastIndexOf(":");
|
|
5631
|
+
if (separatorIndex === -1)
|
|
5632
|
+
return { base: trimmed };
|
|
5633
|
+
const base = trimmed.slice(0, separatorIndex).trim();
|
|
5634
|
+
const token = trimmed.slice(separatorIndex + 1).trim().toLowerCase();
|
|
5635
|
+
if (!base || !REASONING_LEVEL_OR_AUTO_SET.has(token))
|
|
5636
|
+
return { base: trimmed };
|
|
5637
|
+
if (token === "max" && !(options?.allowMaxSuffix ?? base.includes("/")))
|
|
5638
|
+
return { base: trimmed };
|
|
5639
|
+
return { base, level: token };
|
|
5640
|
+
}
|
|
5641
|
+
|
|
5642
|
+
// ../../../../omo-config-core/src/schema/model-ref.ts
|
|
5643
|
+
var REASONING_LEVELS_OR_AUTO = [...REASONING_LEVELS, "auto"];
|
|
5644
|
+
var OmoReasoningSchema = union([
|
|
5645
|
+
_enum(REASONING_LEVELS_OR_AUTO),
|
|
5646
|
+
string2()
|
|
5647
|
+
]);
|
|
5648
|
+
var OmoModelRefObjectSchema = object({
|
|
5649
|
+
model: string2(),
|
|
5650
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5651
|
+
temperature: number2().min(0).max(2).optional(),
|
|
5652
|
+
top_p: number2().min(0).max(1).optional(),
|
|
5653
|
+
max_tokens: number2().int().positive().optional(),
|
|
5654
|
+
provider_options: record(string2(), unknown()).optional()
|
|
5655
|
+
}).strict();
|
|
5656
|
+
var OmoModelRefSchema = union([string2(), OmoModelRefObjectSchema]);
|
|
5589
5657
|
|
|
5590
5658
|
// ../../../../omo-config-core/src/schema/fallback-models.ts
|
|
5591
5659
|
var OmoThinkingConfigSchema = object({
|
|
5592
5660
|
type: _enum(["enabled", "disabled"]),
|
|
5593
5661
|
budgetTokens: number2().optional()
|
|
5594
5662
|
}).strict();
|
|
5595
|
-
var OmoReasoningEffortSchema =
|
|
5596
|
-
|
|
5663
|
+
var OmoReasoningEffortSchema = OmoReasoningSchema;
|
|
5664
|
+
function isRecord(value) {
|
|
5665
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5666
|
+
}
|
|
5667
|
+
function canonicalReasoning(value) {
|
|
5668
|
+
if (typeof value !== "string")
|
|
5669
|
+
return;
|
|
5670
|
+
const normalized = normalizeReasoning(value);
|
|
5671
|
+
return normalized.level ?? normalized.passthrough;
|
|
5672
|
+
}
|
|
5673
|
+
function canonicalModelString(model) {
|
|
5674
|
+
const colon = splitReasoningSuffix(model, { allowMaxSuffix: true });
|
|
5675
|
+
if (colon.level !== undefined)
|
|
5676
|
+
return `${colon.base}:${colon.level}`;
|
|
5677
|
+
const trimmed = model.trim();
|
|
5678
|
+
const parenthesized = trimmed.match(/^(.*)\(([^()]+)\)\s*$/);
|
|
5679
|
+
const spaced = parenthesized === null ? trimmed.match(/^(.*\S)\s+([a-z][a-z0-9_-]*)$/i) : null;
|
|
5680
|
+
const base = (parenthesized?.[1] ?? spaced?.[1])?.trim();
|
|
5681
|
+
const token = (parenthesized?.[2] ?? spaced?.[2])?.trim();
|
|
5682
|
+
if (base === undefined || token === undefined)
|
|
5683
|
+
return trimmed;
|
|
5684
|
+
const normalized = normalizeReasoning(token);
|
|
5685
|
+
return normalized.level === undefined ? trimmed : `${base}:${normalized.level}`;
|
|
5686
|
+
}
|
|
5687
|
+
function normalizeLegacyModelFields(entry) {
|
|
5688
|
+
const normalized = { ...entry };
|
|
5689
|
+
delete normalized["variant"];
|
|
5690
|
+
delete normalized["reasoningEffort"];
|
|
5691
|
+
delete normalized["thinking"];
|
|
5692
|
+
delete normalized["textVerbosity"];
|
|
5693
|
+
delete normalized["maxTokens"];
|
|
5694
|
+
delete normalized["providerOptions"];
|
|
5695
|
+
if (typeof entry["model"] === "string")
|
|
5696
|
+
normalized["model"] = canonicalModelString(entry["model"]);
|
|
5697
|
+
const explicitReasoning = canonicalReasoning(entry["reasoning"]);
|
|
5698
|
+
const variant = canonicalReasoning(entry["variant"]);
|
|
5699
|
+
const reasoningEffort = canonicalReasoning(entry["reasoningEffort"]);
|
|
5700
|
+
const thinking = isRecord(entry["thinking"]) ? entry["thinking"] : undefined;
|
|
5701
|
+
const reasoning = explicitReasoning ?? reasoningEffort ?? variant ?? (thinking?.["type"] === "disabled" ? "off" : undefined);
|
|
5702
|
+
if (reasoning !== undefined)
|
|
5703
|
+
normalized["reasoning"] = reasoning;
|
|
5704
|
+
const providerOptions = isRecord(entry["provider_options"]) ? { ...entry["provider_options"] } : isRecord(entry["providerOptions"]) ? { ...entry["providerOptions"] } : {};
|
|
5705
|
+
if (thinking?.["type"] === "enabled")
|
|
5706
|
+
providerOptions["thinking"] = { ...thinking };
|
|
5707
|
+
if (entry["textVerbosity"] !== undefined)
|
|
5708
|
+
providerOptions["textVerbosity"] = entry["textVerbosity"];
|
|
5709
|
+
if (Object.keys(providerOptions).length > 0)
|
|
5710
|
+
normalized["provider_options"] = providerOptions;
|
|
5711
|
+
if (entry["max_tokens"] !== undefined)
|
|
5712
|
+
normalized["max_tokens"] = entry["max_tokens"];
|
|
5713
|
+
else if (entry["maxTokens"] !== undefined)
|
|
5714
|
+
normalized["max_tokens"] = entry["maxTokens"];
|
|
5715
|
+
return normalized;
|
|
5716
|
+
}
|
|
5717
|
+
var OmoLegacyFallbackModelObjectInputSchema = object({
|
|
5597
5718
|
model: string2(),
|
|
5598
|
-
|
|
5599
|
-
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5719
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5600
5720
|
temperature: number2().min(0).max(2).optional(),
|
|
5601
5721
|
top_p: number2().min(0).max(1).optional(),
|
|
5722
|
+
max_tokens: number2().int().positive().optional(),
|
|
5723
|
+
provider_options: record(string2(), unknown()).optional(),
|
|
5724
|
+
variant: string2().optional(),
|
|
5725
|
+
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5726
|
+
thinking: OmoThinkingConfigSchema.optional(),
|
|
5727
|
+
textVerbosity: _enum(["low", "medium", "high"]).optional(),
|
|
5602
5728
|
maxTokens: number2().optional(),
|
|
5603
|
-
|
|
5729
|
+
providerOptions: record(string2(), unknown()).optional()
|
|
5604
5730
|
}).strict();
|
|
5731
|
+
var OmoFallbackModelObjectSchema = preprocess((value) => isRecord(value) ? normalizeLegacyModelFields(value) : value, OmoLegacyFallbackModelObjectInputSchema);
|
|
5605
5732
|
var OmoFallbackModelsSchema = union([
|
|
5606
5733
|
string2(),
|
|
5607
5734
|
array(string2()),
|
|
@@ -5610,19 +5737,16 @@ var OmoFallbackModelsSchema = union([
|
|
|
5610
5737
|
]);
|
|
5611
5738
|
|
|
5612
5739
|
// ../../../../omo-config-core/src/schema/agent.ts
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
reasoningEffort: OmoReasoningEffortSchema.optional()
|
|
5619
|
-
}).strict()
|
|
5620
|
-
]);
|
|
5621
|
-
var OmoAgentDefSchema = object({
|
|
5740
|
+
function isRecord2(value) {
|
|
5741
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5742
|
+
}
|
|
5743
|
+
var OmoAgentModelEntrySchema = union([string2(), OmoFallbackModelObjectSchema]);
|
|
5744
|
+
var OmoAgentDefInputSchema = object({
|
|
5622
5745
|
description: string2().optional(),
|
|
5623
5746
|
prompt: string2().optional(),
|
|
5624
5747
|
model: string2().optional(),
|
|
5625
5748
|
models: array(OmoAgentModelEntrySchema).optional(),
|
|
5749
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5626
5750
|
variant: string2().optional(),
|
|
5627
5751
|
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
5628
5752
|
tools: record(string2(), boolean2()).optional(),
|
|
@@ -5635,16 +5759,24 @@ var OmoAgentDefSchema = object({
|
|
|
5635
5759
|
temperature: number2().min(0).max(2).optional(),
|
|
5636
5760
|
disable: boolean2().optional()
|
|
5637
5761
|
}).strict();
|
|
5762
|
+
var OmoAgentDefSchema = preprocess((value) => isRecord2(value) ? normalizeLegacyModelFields(value) : value, OmoAgentDefInputSchema);
|
|
5638
5763
|
var OmoAgentsConfigSchema = record(string2(), OmoAgentDefSchema);
|
|
5639
5764
|
|
|
5640
5765
|
// ../../../../omo-config-core/src/schema/category.ts
|
|
5641
|
-
|
|
5766
|
+
function isRecord3(value) {
|
|
5767
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5768
|
+
}
|
|
5769
|
+
var OmoCategoryConfigObjectSchema = object({
|
|
5642
5770
|
description: string2().optional(),
|
|
5643
5771
|
model: string2().optional(),
|
|
5644
|
-
|
|
5645
|
-
|
|
5772
|
+
models: array(union([string2(), OmoFallbackModelObjectSchema])).optional(),
|
|
5773
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5646
5774
|
temperature: number2().min(0).max(2).optional(),
|
|
5647
5775
|
top_p: number2().min(0).max(1).optional(),
|
|
5776
|
+
max_tokens: number2().int().positive().optional(),
|
|
5777
|
+
provider_options: record(string2(), unknown()).optional(),
|
|
5778
|
+
fallback_models: OmoFallbackModelsSchema.optional(),
|
|
5779
|
+
variant: string2().optional(),
|
|
5648
5780
|
maxTokens: number2().optional(),
|
|
5649
5781
|
thinking: OmoThinkingConfigSchema.optional(),
|
|
5650
5782
|
reasoningEffort: OmoReasoningEffortSchema.optional(),
|
|
@@ -5653,8 +5785,10 @@ var OmoCategoryConfigSchema = object({
|
|
|
5653
5785
|
prompt_append: string2().optional(),
|
|
5654
5786
|
max_prompt_tokens: number2().int().positive().optional(),
|
|
5655
5787
|
is_unstable_agent: boolean2().optional(),
|
|
5656
|
-
disable: boolean2().optional()
|
|
5788
|
+
disable: boolean2().optional(),
|
|
5789
|
+
warn_unavailable: boolean2().optional()
|
|
5657
5790
|
}).strict();
|
|
5791
|
+
var OmoCategoryConfigSchema = preprocess((value) => isRecord3(value) ? normalizeLegacyModelFields(value) : value, OmoCategoryConfigObjectSchema);
|
|
5658
5792
|
var OmoCategoriesConfigSchema = record(string2(), OmoCategoryConfigSchema);
|
|
5659
5793
|
|
|
5660
5794
|
// ../../../../omo-config-core/src/schema/harness.ts
|
|
@@ -5681,17 +5815,95 @@ var OmoCodegraphSettingsSchema = OmoCodegraphSettingsLayerSchema.extend({
|
|
|
5681
5815
|
telemetry: boolean2().default(false)
|
|
5682
5816
|
}).strict();
|
|
5683
5817
|
|
|
5818
|
+
// ../../../../omo-config-core/src/schema/memory.ts
|
|
5819
|
+
var OmoMemoryReflectionTriggerSchema = object({
|
|
5820
|
+
step_count: number2().int().nonnegative().default(0),
|
|
5821
|
+
on_compaction: boolean2().default(true)
|
|
5822
|
+
}).strict();
|
|
5823
|
+
var OmoMemoryReflectionSchema = object({
|
|
5824
|
+
trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 0, on_compaction: true }),
|
|
5825
|
+
merge: _enum(["auto", "integration"]).default("auto"),
|
|
5826
|
+
category: string2().min(1).default("quick"),
|
|
5827
|
+
timeout_minutes: number2().int().positive().default(15),
|
|
5828
|
+
sandbox: _enum(["auto", "required", "off"]).default("auto")
|
|
5829
|
+
}).strict();
|
|
5830
|
+
var OmoMemorySyncSchema = object({
|
|
5831
|
+
remote: string2().min(1).optional(),
|
|
5832
|
+
enabled: boolean2().default(true)
|
|
5833
|
+
}).strict();
|
|
5834
|
+
var OmoMemorySearchSchema = object({
|
|
5835
|
+
enabled: boolean2().default(true)
|
|
5836
|
+
}).strict();
|
|
5837
|
+
var OmoMemoryReflectionTriggerLayerSchema = object({
|
|
5838
|
+
step_count: number2().int().nonnegative().optional(),
|
|
5839
|
+
on_compaction: boolean2().optional()
|
|
5840
|
+
}).strict();
|
|
5841
|
+
var OmoMemoryReflectionLayerSchema = object({
|
|
5842
|
+
trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
|
|
5843
|
+
merge: _enum(["auto", "integration"]).optional(),
|
|
5844
|
+
category: string2().min(1).optional(),
|
|
5845
|
+
timeout_minutes: number2().int().positive().optional(),
|
|
5846
|
+
sandbox: _enum(["auto", "required", "off"]).optional()
|
|
5847
|
+
}).strict();
|
|
5848
|
+
var OmoMemorySyncLayerSchema = object({
|
|
5849
|
+
remote: string2().min(1).optional(),
|
|
5850
|
+
enabled: boolean2().optional()
|
|
5851
|
+
}).strict();
|
|
5852
|
+
var OmoMemorySearchLayerSchema = object({
|
|
5853
|
+
enabled: boolean2().optional()
|
|
5854
|
+
}).strict();
|
|
5855
|
+
var OmoMemoryAgentOverridesSchema = object({
|
|
5856
|
+
enabled: boolean2().optional(),
|
|
5857
|
+
agent: string2().min(1).optional(),
|
|
5858
|
+
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5859
|
+
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5860
|
+
search: OmoMemorySearchLayerSchema.optional(),
|
|
5861
|
+
compile_warn_tokens: number2().int().positive().optional()
|
|
5862
|
+
}).strict();
|
|
5863
|
+
var OmoMemorySettingsSchema = object({
|
|
5864
|
+
enabled: boolean2().default(true),
|
|
5865
|
+
agent: string2().min(1).default("auto"),
|
|
5866
|
+
reflection: OmoMemoryReflectionSchema.default({
|
|
5867
|
+
trigger: { step_count: 0, on_compaction: true },
|
|
5868
|
+
merge: "auto",
|
|
5869
|
+
category: "quick",
|
|
5870
|
+
timeout_minutes: 15,
|
|
5871
|
+
sandbox: "auto"
|
|
5872
|
+
}),
|
|
5873
|
+
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5874
|
+
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5875
|
+
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5876
|
+
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5877
|
+
}).strict();
|
|
5878
|
+
var OmoMemorySettingsLayerSchema = object({
|
|
5879
|
+
enabled: boolean2().optional(),
|
|
5880
|
+
agent: string2().min(1).optional(),
|
|
5881
|
+
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5882
|
+
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5883
|
+
search: OmoMemorySearchLayerSchema.optional(),
|
|
5884
|
+
compile_warn_tokens: number2().int().positive().optional(),
|
|
5885
|
+
agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
|
|
5886
|
+
}).strict();
|
|
5887
|
+
|
|
5684
5888
|
// ../../../../omo-config-core/src/schema/model-catalog.ts
|
|
5685
|
-
|
|
5889
|
+
function isRecord4(value) {
|
|
5890
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5891
|
+
}
|
|
5892
|
+
var OmoModelCatalogEntryInputSchema = object({
|
|
5686
5893
|
model: string2(),
|
|
5894
|
+
reasoning: OmoReasoningSchema.optional(),
|
|
5687
5895
|
variant: string2().optional(),
|
|
5688
5896
|
reasoningEffort: OmoReasoningEffortSchema.optional()
|
|
5689
5897
|
}).strict();
|
|
5898
|
+
var OmoModelCatalogEntrySchema = preprocess((value) => isRecord4(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryInputSchema);
|
|
5690
5899
|
var OmoModelCatalogSchema = record(string2(), OmoModelCatalogEntrySchema);
|
|
5691
|
-
var
|
|
5900
|
+
var OmoModelCatalogEntryLayerInputSchema = OmoModelCatalogEntryInputSchema.partial();
|
|
5901
|
+
var OmoModelCatalogEntryLayerSchema = preprocess((value) => isRecord4(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryLayerInputSchema);
|
|
5692
5902
|
var OmoModelCatalogLayerSchema = record(string2(), OmoModelCatalogEntryLayerSchema);
|
|
5693
5903
|
|
|
5694
5904
|
// ../../../../omo-config-core/src/schema/task.ts
|
|
5905
|
+
import { availableParallelism } from "node:os";
|
|
5906
|
+
var ResidencyMaxChildrenInputSchema = union([number2().int().positive(), literal("unlimited")]);
|
|
5695
5907
|
var OmoTaskWaitSchema = object({
|
|
5696
5908
|
min_ms: number2().int().positive().default(5000),
|
|
5697
5909
|
default_ms: number2().int().positive().default(60000),
|
|
@@ -5702,16 +5914,21 @@ var OmoTaskTeamSettingsSchema = object({
|
|
|
5702
5914
|
max_parallel_members: number2().int().min(1).max(8).default(4),
|
|
5703
5915
|
max_wall_clock_minutes: number2().int().positive().default(120)
|
|
5704
5916
|
}).strict();
|
|
5917
|
+
var OmoTaskWarningsSchema = object({
|
|
5918
|
+
unavailable_categories: boolean2().default(true)
|
|
5919
|
+
}).strict();
|
|
5705
5920
|
var OmoTaskSettingsSchema = object({
|
|
5706
5921
|
default_execution_mode: _enum(["in-process", "process"]).default("in-process"),
|
|
5707
5922
|
default_concurrency: number2().int().positive().default(5),
|
|
5708
5923
|
provider_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5709
5924
|
model_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5710
5925
|
max_depth: number2().int().nonnegative().default(1),
|
|
5711
|
-
residency_max_children:
|
|
5926
|
+
residency_max_children: ResidencyMaxChildrenInputSchema.default(8),
|
|
5712
5927
|
ttl_ms: number2().int().positive().default(86400000),
|
|
5713
5928
|
state_dir: string2().optional(),
|
|
5714
5929
|
reattach_on_reconcile: boolean2().optional(),
|
|
5930
|
+
resume_children: boolean2().default(true),
|
|
5931
|
+
warnings: OmoTaskWarningsSchema.default({ unavailable_categories: true }),
|
|
5715
5932
|
wait: OmoTaskWaitSchema.default({ min_ms: 5000, default_ms: 60000, max_ms: 600000 }),
|
|
5716
5933
|
team: OmoTaskTeamSettingsSchema.default({
|
|
5717
5934
|
max_members: 8,
|
|
@@ -5729,19 +5946,31 @@ var OmoTaskTeamSettingsLayerSchema = object({
|
|
|
5729
5946
|
max_parallel_members: number2().int().min(1).max(8).optional(),
|
|
5730
5947
|
max_wall_clock_minutes: number2().int().positive().optional()
|
|
5731
5948
|
}).strict();
|
|
5949
|
+
var OmoTaskWarningsLayerSchema = object({
|
|
5950
|
+
unavailable_categories: boolean2().optional()
|
|
5951
|
+
}).strict();
|
|
5732
5952
|
var OmoTaskSettingsLayerSchema = object({
|
|
5733
5953
|
default_execution_mode: _enum(["in-process", "process"]).optional(),
|
|
5734
5954
|
default_concurrency: number2().int().positive().optional(),
|
|
5735
5955
|
provider_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5736
5956
|
model_concurrency: record(string2(), number2().int().positive()).optional(),
|
|
5737
5957
|
max_depth: number2().int().nonnegative().optional(),
|
|
5738
|
-
residency_max_children:
|
|
5958
|
+
residency_max_children: ResidencyMaxChildrenInputSchema.optional(),
|
|
5739
5959
|
ttl_ms: number2().int().positive().optional(),
|
|
5740
5960
|
state_dir: string2().optional(),
|
|
5741
5961
|
reattach_on_reconcile: boolean2().optional(),
|
|
5962
|
+
resume_children: boolean2().optional(),
|
|
5963
|
+
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
5742
5964
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
5743
5965
|
team: OmoTaskTeamSettingsLayerSchema.optional()
|
|
5744
5966
|
}).strict();
|
|
5967
|
+
function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism) {
|
|
5968
|
+
const record2 = record(string2(), unknown()).parse(input);
|
|
5969
|
+
return OmoTaskSettingsSchema.parse({
|
|
5970
|
+
...record2,
|
|
5971
|
+
residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
|
|
5972
|
+
});
|
|
5973
|
+
}
|
|
5745
5974
|
|
|
5746
5975
|
// ../../../../omo-config-core/src/schema/team.ts
|
|
5747
5976
|
var OmoTeamMemberBaseSchema = object({
|
|
@@ -5798,7 +6027,8 @@ var OmoTypedHarnessConfigSchema = object({
|
|
|
5798
6027
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
5799
6028
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5800
6029
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5801
|
-
models: OmoModelCatalogLayerSchema.optional()
|
|
6030
|
+
models: OmoModelCatalogLayerSchema.optional(),
|
|
6031
|
+
memory: OmoMemorySettingsLayerSchema.optional()
|
|
5802
6032
|
}).strict();
|
|
5803
6033
|
var OmoConfigProfileSchema = object({
|
|
5804
6034
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
@@ -5807,6 +6037,7 @@ var OmoConfigProfileSchema = object({
|
|
|
5807
6037
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5808
6038
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5809
6039
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
6040
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5810
6041
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5811
6042
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5812
6043
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
@@ -5819,6 +6050,7 @@ var OmoConfigSchema = object({
|
|
|
5819
6050
|
task: OmoTaskSettingsSchema.optional(),
|
|
5820
6051
|
teams: OmoTeamsConfigSchema.optional(),
|
|
5821
6052
|
models: OmoModelCatalogSchema.optional(),
|
|
6053
|
+
memory: OmoMemorySettingsSchema.optional(),
|
|
5822
6054
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5823
6055
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5824
6056
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -5834,6 +6066,7 @@ var OmoConfigLayerSchema = object({
|
|
|
5834
6066
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5835
6067
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5836
6068
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
6069
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5837
6070
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5838
6071
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5839
6072
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -7239,7 +7472,8 @@ function mergeOmoConfigRecords(base, override, parentKey) {
|
|
|
7239
7472
|
}
|
|
7240
7473
|
|
|
7241
7474
|
// ../../../../omo-config-core/src/loader/paths.ts
|
|
7242
|
-
import {
|
|
7475
|
+
import { userInfo } from "node:os";
|
|
7476
|
+
import { dirname as dirname2, join as join7, posix, resolve as resolve3 } from "node:path";
|
|
7243
7477
|
|
|
7244
7478
|
// ../../../../omo-config-core/src/internal/posix-path.ts
|
|
7245
7479
|
function toPosixPath(path) {
|
|
@@ -7257,10 +7491,7 @@ var DEFAULT_READ_FILE_SYSTEM = {
|
|
|
7257
7491
|
|
|
7258
7492
|
// ../../../../omo-config-core/src/loader/paths.ts
|
|
7259
7493
|
var MAX_PROJECT_CONFIG_DIRECTORY_DEPTH = 256;
|
|
7260
|
-
|
|
7261
|
-
const pathToChild = relative(parent, child);
|
|
7262
|
-
return pathToChild === "" || !pathToChild.startsWith("..") && !isAbsolute2(pathToChild);
|
|
7263
|
-
}
|
|
7494
|
+
var ACCOUNT_HOME_DIR = userInfo().homedir;
|
|
7264
7495
|
function resolveHomeDir(env = process.env) {
|
|
7265
7496
|
const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
|
|
7266
7497
|
return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve3(homeDir));
|
|
@@ -7312,15 +7543,14 @@ function realpathOrSelf(path, fileSystem) {
|
|
|
7312
7543
|
return path;
|
|
7313
7544
|
}
|
|
7314
7545
|
}
|
|
7315
|
-
function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem) {
|
|
7546
|
+
function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHomeDir = homeDir) {
|
|
7316
7547
|
const startDir = resolve3(cwd);
|
|
7317
|
-
const
|
|
7318
|
-
const
|
|
7319
|
-
const stopDir = containsPath(realHomeDir, realpathOrSelf(startDir, fileSystem)) ? realHomeDir : null;
|
|
7548
|
+
const boundaryDirs = [...new Set([resolve3(homeDir), resolve3(accountHomeDir)])];
|
|
7549
|
+
const realBoundaryDirs = new Set(boundaryDirs.map((path) => realpathOrSelf(path, fileSystem)));
|
|
7320
7550
|
const nearestFirst = [];
|
|
7321
7551
|
let currentDir = startDir;
|
|
7322
7552
|
for (let depth = 0;depth < MAX_PROJECT_CONFIG_DIRECTORY_DEPTH; depth += 1) {
|
|
7323
|
-
const isHomeDir = currentDir
|
|
7553
|
+
const isHomeDir = boundaryDirs.includes(currentDir) || realBoundaryDirs.has(realpathOrSelf(currentDir, fileSystem));
|
|
7324
7554
|
const configPath = isHomeDir ? null : detectOmoJsonPath(currentDir, fileSystem);
|
|
7325
7555
|
if (configPath !== null)
|
|
7326
7556
|
nearestFirst.push(configPath);
|
|
@@ -7337,7 +7567,7 @@ function resolveOmoConfigPaths(options) {
|
|
|
7337
7567
|
const fileSystem = options.fileSystem ?? DEFAULT_READ_FILE_SYSTEM;
|
|
7338
7568
|
const env = options.env ?? process.env;
|
|
7339
7569
|
const userPath = detectUserOmoJsonPath(env, fileSystem);
|
|
7340
|
-
const projectPaths = findProjectConfigPathsFarthestFirst(options.cwd, resolveHomeDir(env), fileSystem);
|
|
7570
|
+
const projectPaths = findProjectConfigPathsFarthestFirst(options.cwd, resolveHomeDir(env), fileSystem, ACCOUNT_HOME_DIR);
|
|
7341
7571
|
return [
|
|
7342
7572
|
{ path: userPath, scope: "user" },
|
|
7343
7573
|
...projectPaths.map((path) => ({ path, scope: "project" }))
|
|
@@ -7420,7 +7650,7 @@ var DEFAULT_RAW_CONFIG = {
|
|
|
7420
7650
|
agents: {},
|
|
7421
7651
|
categories: {},
|
|
7422
7652
|
codegraph: OmoCodegraphSettingsSchema.parse({}),
|
|
7423
|
-
task:
|
|
7653
|
+
task: resolveOmoTaskSettings({}),
|
|
7424
7654
|
teams: {}
|
|
7425
7655
|
};
|
|
7426
7656
|
function stripResolutionControlKeys(config2) {
|
|
@@ -7761,6 +7991,21 @@ function isPlainObject3(value) {
|
|
|
7761
7991
|
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.prototype.toString.call(value) === "[object Object]";
|
|
7762
7992
|
}
|
|
7763
7993
|
|
|
7994
|
+
// ../../../../omo-config-core/src/migration/backup-move.ts
|
|
7995
|
+
function isCrossDeviceError(error) {
|
|
7996
|
+
return error instanceof Error && Reflect.get(error, "code") === "EXDEV";
|
|
7997
|
+
}
|
|
7998
|
+
function moveMigrationBackup(fileSystem, sourcePath, backupPath) {
|
|
7999
|
+
try {
|
|
8000
|
+
fileSystem.renameSync(sourcePath, backupPath);
|
|
8001
|
+
} catch (error) {
|
|
8002
|
+
if (!isCrossDeviceError(error))
|
|
8003
|
+
throw error;
|
|
8004
|
+
fileSystem.copyFileSync(sourcePath, backupPath);
|
|
8005
|
+
fileSystem.unlinkSync(sourcePath);
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
|
|
7764
8009
|
// ../../../../omo-config-core/src/migration/commit.ts
|
|
7765
8010
|
import { basename as basename3, dirname as dirname4, join as join9, resolve as resolve4 } from "node:path";
|
|
7766
8011
|
|
|
@@ -7972,6 +8217,23 @@ function prepareTargetWrite(input) {
|
|
|
7972
8217
|
const edits = [...collectMigrationEdits(merged.additions), { path: ["_migrations"], value: marker }];
|
|
7973
8218
|
return { diagnostics: merged.diagnostics, document, edits };
|
|
7974
8219
|
}
|
|
8220
|
+
function prepareTargetReplacement(input) {
|
|
8221
|
+
const marker = markerValue(input.target, input.migrationId, input.targetPath);
|
|
8222
|
+
const document = { ...input.document, _migrations: marker };
|
|
8223
|
+
validateTarget(input.targetPath, document);
|
|
8224
|
+
const edits = [];
|
|
8225
|
+
for (const key of Object.keys(input.target)) {
|
|
8226
|
+
if (key !== "_migrations" && !Object.prototype.hasOwnProperty.call(input.document, key)) {
|
|
8227
|
+
edits.push({ path: [key], value: undefined });
|
|
8228
|
+
}
|
|
8229
|
+
}
|
|
8230
|
+
for (const [key, value] of Object.entries(input.document)) {
|
|
8231
|
+
if (key !== "_migrations")
|
|
8232
|
+
edits.push({ path: [key], value });
|
|
8233
|
+
}
|
|
8234
|
+
edits.push({ path: ["_migrations"], value: marker });
|
|
8235
|
+
return { diagnostics: [], document, edits };
|
|
8236
|
+
}
|
|
7975
8237
|
function writePreparedTarget(input) {
|
|
7976
8238
|
input.writeTarget({
|
|
7977
8239
|
edits: input.prepared.edits,
|
|
@@ -8004,9 +8266,17 @@ function parseJournal(value) {
|
|
|
8004
8266
|
if (!isPlainObject3(value["targetWrite"]) || !isPlainObject3(value["targetWrite"]["additions"])) {
|
|
8005
8267
|
throw new Error("Migration journal target write is invalid");
|
|
8006
8268
|
}
|
|
8269
|
+
const targetWriteMode = value["targetWrite"]["mode"];
|
|
8270
|
+
if (targetWriteMode !== undefined && targetWriteMode !== "replace-target") {
|
|
8271
|
+
throw new Error("Migration journal target write mode is invalid");
|
|
8272
|
+
}
|
|
8007
8273
|
if (typeof value["targetWritten"] !== "boolean" || !Array.isArray(value["completedMoves"])) {
|
|
8008
8274
|
throw new Error("Migration journal completion state is invalid");
|
|
8009
8275
|
}
|
|
8276
|
+
const diagnostics = value["diagnostics"];
|
|
8277
|
+
if (diagnostics !== undefined && (!Array.isArray(diagnostics) || !diagnostics.every((entry) => typeof entry === "string"))) {
|
|
8278
|
+
throw new Error("Migration journal diagnostics are invalid");
|
|
8279
|
+
}
|
|
8010
8280
|
if (!value["completedMoves"].every((path) => typeof path === "string")) {
|
|
8011
8281
|
throw new Error("Migration journal completed moves are invalid");
|
|
8012
8282
|
}
|
|
@@ -8022,9 +8292,13 @@ function parseJournal(value) {
|
|
|
8022
8292
|
return {
|
|
8023
8293
|
backupMoves,
|
|
8024
8294
|
completedMoves: [...value["completedMoves"]],
|
|
8295
|
+
diagnostics: diagnostics === undefined ? [] : [...diagnostics],
|
|
8025
8296
|
migrationId: value["migrationId"],
|
|
8026
8297
|
targetPath: value["targetPath"],
|
|
8027
|
-
targetWrite: {
|
|
8298
|
+
targetWrite: {
|
|
8299
|
+
additions: { ...value["targetWrite"]["additions"] },
|
|
8300
|
+
...targetWriteMode === undefined ? {} : { mode: targetWriteMode }
|
|
8301
|
+
},
|
|
8028
8302
|
targetWritten: value["targetWritten"],
|
|
8029
8303
|
version: 1
|
|
8030
8304
|
};
|
|
@@ -8215,7 +8489,12 @@ function resumeMigrationJournal(input) {
|
|
|
8215
8489
|
input.renewLock();
|
|
8216
8490
|
const target = targetDocument(journal.targetPath, input.fileSystem);
|
|
8217
8491
|
if (!hasMigrationMarker(target, journal.migrationId)) {
|
|
8218
|
-
const prepared =
|
|
8492
|
+
const prepared = journal.targetWrite.mode === "replace-target" ? prepareTargetReplacement({
|
|
8493
|
+
document: journal.targetWrite.additions,
|
|
8494
|
+
migrationId: journal.migrationId,
|
|
8495
|
+
target,
|
|
8496
|
+
targetPath: journal.targetPath
|
|
8497
|
+
}) : prepareTargetWrite({
|
|
8219
8498
|
additions: journal.targetWrite.additions,
|
|
8220
8499
|
migrationId: journal.migrationId,
|
|
8221
8500
|
target,
|
|
@@ -8239,7 +8518,7 @@ function resumeMigrationJournal(input) {
|
|
|
8239
8518
|
if (input.fileSystem.existsSync(move.to)) {
|
|
8240
8519
|
throw new MigrationTransactionError(`Migration backup path already exists: ${move.to}`);
|
|
8241
8520
|
}
|
|
8242
|
-
input.fileSystem
|
|
8521
|
+
moveMigrationBackup(input.fileSystem, move.from, move.to);
|
|
8243
8522
|
} else if (!input.fileSystem.existsSync(move.to)) {
|
|
8244
8523
|
throw new MigrationTransactionError(`Migration source and backup are both missing: ${move.from}`);
|
|
8245
8524
|
}
|
|
@@ -8319,11 +8598,17 @@ function executePlan(input) {
|
|
|
8319
8598
|
assertSafeSourcePaths(plan.sources, protectedPaths);
|
|
8320
8599
|
const existingSources = plan.sources.filter((source) => fileSystem.existsSync(source.path));
|
|
8321
8600
|
const target = targetDocument(plan.targetPath, fileSystem);
|
|
8322
|
-
|
|
8601
|
+
const replaceTarget = plan.mode === "replace-target";
|
|
8602
|
+
if (!shouldRunMigration({
|
|
8603
|
+
legacySourcesExist: replaceTarget ? fileSystem.existsSync(plan.targetPath) : existingSources.length > 0,
|
|
8604
|
+
migrationId: plan.id,
|
|
8605
|
+
target
|
|
8606
|
+
})) {
|
|
8323
8607
|
return { diagnostics: [], journalResumed, status: "skipped" };
|
|
8324
8608
|
}
|
|
8325
|
-
const
|
|
8326
|
-
const
|
|
8609
|
+
const loaded = replaceTarget ? [{ path: plan.targetPath, value: target }] : loadSources(existingSources, fileSystem);
|
|
8610
|
+
const transformed = transformResult(plan.transform(loaded));
|
|
8611
|
+
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 });
|
|
8327
8612
|
const diagnostics = [...transformed.diagnostics, ...prepared.diagnostics];
|
|
8328
8613
|
const moves = backupMoves(existingSources, plan.id, fileSystem, protectedPaths);
|
|
8329
8614
|
const preview = { backupMoves: moves, targetPath: plan.targetPath, transform: transformed.document };
|
|
@@ -8333,9 +8618,13 @@ function executePlan(input) {
|
|
|
8333
8618
|
const journal = {
|
|
8334
8619
|
backupMoves: moves,
|
|
8335
8620
|
completedMoves: [],
|
|
8621
|
+
diagnostics,
|
|
8336
8622
|
migrationId: plan.id,
|
|
8337
8623
|
targetPath: plan.targetPath,
|
|
8338
|
-
targetWrite: {
|
|
8624
|
+
targetWrite: {
|
|
8625
|
+
additions: transformed.document,
|
|
8626
|
+
...replaceTarget ? { mode: "replace-target" } : {}
|
|
8627
|
+
},
|
|
8339
8628
|
targetWritten: false,
|
|
8340
8629
|
version: 1
|
|
8341
8630
|
};
|
|
@@ -8351,7 +8640,7 @@ function executePlan(input) {
|
|
|
8351
8640
|
input.renewLock();
|
|
8352
8641
|
if (fileSystem.existsSync(move.to))
|
|
8353
8642
|
throw new MigrationTransactionError(`Migration backup path already exists: ${move.to}`);
|
|
8354
|
-
fileSystem
|
|
8643
|
+
moveMigrationBackup(fileSystem, move.from, move.to);
|
|
8355
8644
|
input.onBoundary?.("source-moved");
|
|
8356
8645
|
Object.assign(targetRecorded, { completedMoves: [...targetRecorded.completedMoves, move.from] });
|
|
8357
8646
|
writeMigrationJournal(targetRecorded, fileSystem, env, input.process, input.clock);
|
|
@@ -8399,17 +8688,17 @@ import { existsSync as existsSync6 } from "node:fs";
|
|
|
8399
8688
|
import { posix as posix4, win32 } from "node:path";
|
|
8400
8689
|
var MIGRATION_ID = "2026-07-codex-config-jsonc";
|
|
8401
8690
|
var OMO_SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/omo.schema.json";
|
|
8402
|
-
function
|
|
8691
|
+
function isRecord5(value) {
|
|
8403
8692
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8404
8693
|
}
|
|
8405
8694
|
function recordAt(value, key) {
|
|
8406
8695
|
const candidate = value[key];
|
|
8407
|
-
return
|
|
8696
|
+
return isRecord5(candidate) ? candidate : undefined;
|
|
8408
8697
|
}
|
|
8409
8698
|
function migrationHistory(sources, configPath) {
|
|
8410
8699
|
const history = [];
|
|
8411
8700
|
for (const source of sources) {
|
|
8412
|
-
if (!
|
|
8701
|
+
if (!isRecord5(source.value))
|
|
8413
8702
|
continue;
|
|
8414
8703
|
for (const key of ["_migrations", "appliedMigrations"]) {
|
|
8415
8704
|
const values = source.value[key];
|
|
@@ -8425,7 +8714,7 @@ function migrationHistory(sources, configPath) {
|
|
|
8425
8714
|
}
|
|
8426
8715
|
function transformConfigJsonc(configPath, sources) {
|
|
8427
8716
|
const config2 = sources.find((source) => source.path === configPath);
|
|
8428
|
-
const legacy = config2 === undefined || !
|
|
8717
|
+
const legacy = config2 === undefined || !isRecord5(config2.value) ? {} : config2.value;
|
|
8429
8718
|
const omo = recordAt(legacy, "[omo]");
|
|
8430
8719
|
const senpi = recordAt(legacy, "[senpi]");
|
|
8431
8720
|
const history = migrationHistory(sources, configPath);
|