oh-my-opencode 5.1.45 → 5.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/command/publish.md +12 -13
- package/.agents/skills/publish/SKILL.md +12 -13
- package/.opencode/command/publish.md +12 -13
- package/README.de.md +0 -5
- package/README.es.md +0 -5
- package/README.fr.md +0 -5
- package/README.it.md +0 -5
- package/README.ja.md +0 -5
- package/README.ko.md +0 -5
- package/README.md +4 -5
- package/README.pt-br.md +0 -5
- package/README.ru.md +0 -6
- package/README.zh-cn.md +0 -5
- package/dist/agents/atlas/agent.d.ts +3 -2
- package/dist/agents/sisyphus/index.d.ts +1 -0
- package/dist/agents/sisyphus/kimi-k3-1.d.ts +9 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-junior/agent.d.ts +1 -1
- package/dist/agents/sisyphus-junior/index.d.ts +1 -0
- package/dist/agents/sisyphus-junior/kimi-k3-1.d.ts +6 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +91 -163
- package/dist/cli/service-auth/keystore.d.ts +8 -3
- package/dist/cli-node/index.js +91 -163
- package/dist/config-migration/index.d.ts +2 -2
- package/dist/config-migration/migration-plans.d.ts +0 -10
- package/dist/index.js +1784 -1204
- package/dist/skills/ast-grep/AGENTS.md +1 -1
- package/dist/skills/browser/runtime/omowright/manifest.json +1 -1
- package/dist/skills/frontend/ATTRIBUTION.md +2 -2
- package/dist/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/dist/skills/ulw-research/AGENTS.md +14 -2
- package/dist/skills/ulw-research/SKILL.md +37 -12
- package/dist/skills/ulw-research/references/deliverable-phase.md +81 -14
- package/dist/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
- package/dist/skills/ulw-research/references/fact-ledger.md +95 -0
- package/dist/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/dist/skills/ulw-research/references/report-gates.md +21 -4
- package/dist/skills/ulw-research/references/report-visualization.md +2 -0
- package/dist/skills/ulw-research/references/unit-rules.md +157 -0
- package/dist/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/dist/skills/ulw-research/scripts/claim-kinds.test.ts +193 -0
- package/dist/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/dist/skills/ulw-research/scripts/cli-support.test.ts +13 -2
- package/dist/skills/ulw-research/scripts/contracts.mjs +27 -6
- package/dist/skills/ulw-research/scripts/contracts.test.ts +3 -0
- package/dist/skills/ulw-research/scripts/copy-returns-polish.test.ts +209 -0
- package/dist/skills/ulw-research/scripts/copy-returns.test.ts +183 -0
- package/dist/skills/ulw-research/scripts/delivery-barrier.test.ts +245 -0
- package/dist/skills/ulw-research/scripts/fact-commands-meaning.mjs +176 -0
- package/dist/skills/ulw-research/scripts/fact-commands-polish.mjs +127 -0
- package/dist/skills/ulw-research/scripts/fact-commands-verify.mjs +183 -0
- package/dist/skills/ulw-research/scripts/fact-commands.mjs +241 -0
- package/dist/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/dist/skills/ulw-research/scripts/fact-derive.test.ts +375 -0
- package/dist/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/dist/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/dist/skills/ulw-research/scripts/fact-fill.test.ts +221 -0
- package/dist/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +9 -2
- package/dist/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
- package/dist/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +18 -3
- package/dist/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +160 -0
- package/dist/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
- package/dist/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
- package/dist/skills/ulw-research/scripts/fact-ledger.test.ts +2 -0
- package/dist/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/dist/skills/ulw-research/scripts/fact-locate.test.ts +118 -0
- package/dist/skills/ulw-research/scripts/fact-pairs.mjs +185 -0
- package/dist/skills/ulw-research/scripts/fact-pairs.test.ts +151 -0
- package/dist/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/dist/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +409 -0
- package/dist/skills/ulw-research/scripts/fact-unit-rules.test.ts +388 -0
- package/dist/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/dist/skills/ulw-research/scripts/fidelity-binding.test.ts +81 -0
- package/dist/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
- package/dist/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/dist/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/dist/skills/ulw-research/scripts/fidelity-lexicon.test.ts +117 -0
- package/dist/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/dist/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
- package/dist/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/dist/skills/ulw-research/scripts/fidelity-trace.test.ts +58 -0
- package/dist/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/dist/skills/ulw-research/scripts/fidelity-values.test.ts +270 -0
- package/dist/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/dist/skills/ulw-research/scripts/gates-fidelity.test.ts +73 -0
- package/dist/skills/ulw-research/scripts/gates-static.mjs +28 -8
- package/dist/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/dist/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/dist/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/dist/skills/ulw-research/scripts/md-lite.test.ts +271 -0
- package/dist/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/dist/skills/ulw-research/scripts/meaning-check.test.ts +228 -0
- package/dist/skills/ulw-research/scripts/outcome.mjs +6 -5
- package/dist/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/dist/skills/ulw-research/scripts/placeholder.test.ts +77 -0
- package/dist/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/dist/skills/ulw-research/scripts/polish-apply.test.ts +363 -0
- package/dist/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/dist/skills/ulw-research/scripts/polish-diff.test.ts +168 -0
- package/dist/skills/ulw-research/scripts/polish-markup.test.ts +187 -0
- package/dist/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/dist/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/dist/skills/ulw-research/scripts/references-fences.test.ts +25 -0
- package/dist/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
- package/dist/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/dist/skills/ulw-research/scripts/report-tools.test.ts +545 -2
- package/dist/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/dist/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/dist/skills/ulw-research/scripts/source-snapshot.test.ts +113 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/assets/share.csv +3 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/gen-legacy-dev.mjs +89 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-basic.json +223 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-legacy-dev.json +859 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-verify.json +420 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/polish-edits.json +12 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/report-bad.html +19 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/report-good.html +39 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/acronyms.json +3 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/meta.json +9 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/sentences.jsonl +7 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/text.txt +7 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4.html +19 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/acronyms.json +1 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/meta.json +9 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/sentences.jsonl +1 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/text.txt +1 -0
- package/dist/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S9.txt +1 -0
- package/dist/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/dist/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/dist/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/dist/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/dist/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/dist/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/dist/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/dist/skills/ulw-research/scripts/units.mjs +4 -4
- package/dist/testing/module-mock-lifecycle.d.ts +1 -1
- package/dist/tui.js +32 -34
- package/package.json +13 -13
- package/packages/lsp-core/src/mcp-protocol-pin.test.ts +29 -0
- package/packages/lsp-core/src/mcp.ts +5 -2
- package/packages/lsp-daemon/dist/cli.js +3 -3
- package/packages/lsp-daemon/dist/client.js +3 -3
- package/packages/lsp-daemon/dist/index.js +3 -3
- package/packages/lsp-tools-mcp/dist/cli.js +3 -3
- package/packages/lsp-tools-mcp/dist/mcp.js +3 -3
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +23 -14
- 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/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 +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/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/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +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-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/post-tool-use-recording-spawn-admission.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-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-ulw-execute-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-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 +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -3
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +0 -2
- package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +14 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +36 -11
- package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +81 -14
- package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
- package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger.md +95 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +21 -4
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-visualization.md +2 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/unit-rules.md +157 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +27 -6
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +176 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +127 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +183 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +241 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-pairs.mjs +185 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +28 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +6 -5
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +4 -4
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +19 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +7 -3
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +28 -19
- package/packages/shared-skills/skills/ast-grep/AGENTS.md +1 -1
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/packages/shared-skills/skills/ulw-research/AGENTS.md +14 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +37 -12
- package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +81 -14
- package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
- package/packages/shared-skills/skills/ulw-research/references/fact-ledger.md +95 -0
- package/packages/shared-skills/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/packages/shared-skills/skills/ulw-research/references/report-gates.md +21 -4
- package/packages/shared-skills/skills/ulw-research/references/report-visualization.md +2 -0
- package/packages/shared-skills/skills/ulw-research/references/unit-rules.md +157 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +193 -0
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +13 -2
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +27 -6
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +3 -0
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-polish.test.ts +209 -0
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns.test.ts +183 -0
- package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +245 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +176 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-polish.mjs +127 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +183 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +241 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +375 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.test.ts +221 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +9 -2
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +18 -3
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +160 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +2 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.test.ts +118 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.mjs +185 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.test.ts +151 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +409 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +388 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.test.ts +81 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.test.ts +117 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.test.ts +58 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +270 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.test.ts +73 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +28 -8
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.test.ts +271 -0
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.test.ts +228 -0
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +6 -5
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.test.ts +77 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.test.ts +363 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.test.ts +168 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +187 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/packages/shared-skills/skills/ulw-research/scripts/references-fences.test.ts +25 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +545 -2
- package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +113 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/assets/share.csv +3 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/gen-legacy-dev.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-basic.json +223 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-legacy-dev.json +859 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-verify.json +420 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/polish-edits.json +12 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-bad.html +19 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-good.html +39 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/acronyms.json +3 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/meta.json +9 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/sentences.jsonl +7 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/text.txt +7 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4.html +19 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/acronyms.json +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/meta.json +9 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/sentences.jsonl +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/text.txt +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S9.txt +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +4 -4
- package/dist/config-migration/dori-section-rename.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -4893,7 +4893,7 @@ function resolveStdio(options) {
|
|
|
4893
4893
|
return [options.stdin ?? "ignore", options.stdout ?? "pipe", options.stderr ?? "inherit"];
|
|
4894
4894
|
}
|
|
4895
4895
|
function createBunSpawnOptions(options) {
|
|
4896
|
-
return { ...options, windowsHide: true };
|
|
4896
|
+
return { ...options, env: options.env ?? process.env, windowsHide: true };
|
|
4897
4897
|
}
|
|
4898
4898
|
function createNodeSpawnOptions(options, platform = process.platform) {
|
|
4899
4899
|
const nodeOptions = {
|
|
@@ -11833,7 +11833,7 @@ var init_member_parser = __esm(() => {
|
|
|
11833
11833
|
});
|
|
11834
11834
|
|
|
11835
11835
|
// packages/team-core/src/types.ts
|
|
11836
|
-
import * as
|
|
11836
|
+
import * as z55 from "zod";
|
|
11837
11837
|
var MESSAGE_KINDS, TASK_STATUSES, RUNTIME_STATUSES, MemberBaseSchema, CategoryMemberSchema, SubagentMemberSchema, MemberSchema, TeamReferenceSchema, MISSING_TEAM_LEAD_MESSAGE = "leadAgentId required (or write a `lead: {...}` field, or mark one member with `isLead: true`)", TeamSpecSchema, MessageSchema, TaskSchema, RuntimeStateMemberModelSchema, RuntimeStateMemberSchema, RuntimeBoundsSchema, ShutdownRequestSchema, RuntimeStateTmuxLayoutSchema, RuntimeStateSchema, AGENT_ELIGIBILITY_REGISTRY, parseMemberBase;
|
|
11838
11838
|
var init_types2 = __esm(() => {
|
|
11839
11839
|
init_member_parser();
|
|
@@ -11854,40 +11854,40 @@ var init_types2 = __esm(() => {
|
|
|
11854
11854
|
"failed",
|
|
11855
11855
|
"orphaned"
|
|
11856
11856
|
];
|
|
11857
|
-
MemberBaseSchema =
|
|
11858
|
-
name:
|
|
11859
|
-
cwd:
|
|
11860
|
-
worktreePath:
|
|
11861
|
-
task_summary:
|
|
11862
|
-
subscriptions:
|
|
11863
|
-
backendType:
|
|
11864
|
-
color:
|
|
11865
|
-
isActive:
|
|
11857
|
+
MemberBaseSchema = z55.object({
|
|
11858
|
+
name: z55.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
11859
|
+
cwd: z55.string().optional(),
|
|
11860
|
+
worktreePath: z55.string().optional(),
|
|
11861
|
+
task_summary: z55.string().max(80).optional(),
|
|
11862
|
+
subscriptions: z55.array(z55.string()).optional(),
|
|
11863
|
+
backendType: z55.enum(["in-process", "tmux"]).default("in-process"),
|
|
11864
|
+
color: z55.string().optional(),
|
|
11865
|
+
isActive: z55.boolean().default(true)
|
|
11866
11866
|
}).strict();
|
|
11867
11867
|
CategoryMemberSchema = MemberBaseSchema.extend({
|
|
11868
|
-
kind:
|
|
11869
|
-
category:
|
|
11870
|
-
prompt:
|
|
11868
|
+
kind: z55.literal("category"),
|
|
11869
|
+
category: z55.string().min(1),
|
|
11870
|
+
prompt: z55.string().min(1)
|
|
11871
11871
|
});
|
|
11872
11872
|
SubagentMemberSchema = MemberBaseSchema.extend({
|
|
11873
|
-
kind:
|
|
11874
|
-
subagent_type:
|
|
11875
|
-
prompt:
|
|
11873
|
+
kind: z55.literal("subagent_type"),
|
|
11874
|
+
subagent_type: z55.string().min(1),
|
|
11875
|
+
prompt: z55.string().optional()
|
|
11876
11876
|
});
|
|
11877
|
-
MemberSchema =
|
|
11878
|
-
TeamReferenceSchema =
|
|
11879
|
-
path:
|
|
11880
|
-
description:
|
|
11877
|
+
MemberSchema = z55.discriminatedUnion("kind", [CategoryMemberSchema, SubagentMemberSchema]);
|
|
11878
|
+
TeamReferenceSchema = z55.object({
|
|
11879
|
+
path: z55.string(),
|
|
11880
|
+
description: z55.string().optional()
|
|
11881
11881
|
}).strict();
|
|
11882
|
-
TeamSpecSchema =
|
|
11883
|
-
version:
|
|
11884
|
-
name:
|
|
11885
|
-
description:
|
|
11886
|
-
createdAt:
|
|
11887
|
-
leadAgentId:
|
|
11888
|
-
teamAllowedPaths:
|
|
11889
|
-
sessionPermission:
|
|
11890
|
-
members:
|
|
11882
|
+
TeamSpecSchema = z55.object({
|
|
11883
|
+
version: z55.literal(1).default(1),
|
|
11884
|
+
name: z55.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
11885
|
+
description: z55.string().optional(),
|
|
11886
|
+
createdAt: z55.number().int().positive().default(() => Date.now()),
|
|
11887
|
+
leadAgentId: z55.string().optional(),
|
|
11888
|
+
teamAllowedPaths: z55.array(z55.string()).optional(),
|
|
11889
|
+
sessionPermission: z55.string().optional(),
|
|
11890
|
+
members: z55.array(MemberSchema).min(1).max(8)
|
|
11891
11891
|
}).superRefine((teamSpec, ctx) => {
|
|
11892
11892
|
if (teamSpec.leadAgentId === undefined && teamSpec.members.length > 1) {
|
|
11893
11893
|
ctx.addIssue({
|
|
@@ -11909,95 +11909,95 @@ var init_types2 = __esm(() => {
|
|
|
11909
11909
|
leadAgentId: firstMember.name
|
|
11910
11910
|
};
|
|
11911
11911
|
});
|
|
11912
|
-
MessageSchema =
|
|
11913
|
-
version:
|
|
11914
|
-
messageId:
|
|
11915
|
-
from:
|
|
11916
|
-
to:
|
|
11917
|
-
kind:
|
|
11918
|
-
body:
|
|
11919
|
-
summary:
|
|
11920
|
-
references:
|
|
11921
|
-
timestamp:
|
|
11922
|
-
correlationId:
|
|
11923
|
-
color:
|
|
11912
|
+
MessageSchema = z55.object({
|
|
11913
|
+
version: z55.literal(1),
|
|
11914
|
+
messageId: z55.string().uuid(),
|
|
11915
|
+
from: z55.string(),
|
|
11916
|
+
to: z55.string(),
|
|
11917
|
+
kind: z55.enum(MESSAGE_KINDS),
|
|
11918
|
+
body: z55.string().max(32 * 1024),
|
|
11919
|
+
summary: z55.string().optional(),
|
|
11920
|
+
references: z55.array(TeamReferenceSchema).optional(),
|
|
11921
|
+
timestamp: z55.number().int().positive(),
|
|
11922
|
+
correlationId: z55.string().uuid().optional(),
|
|
11923
|
+
color: z55.string().optional()
|
|
11924
11924
|
});
|
|
11925
|
-
TaskSchema =
|
|
11926
|
-
version:
|
|
11927
|
-
id:
|
|
11928
|
-
subject:
|
|
11929
|
-
description:
|
|
11930
|
-
activeForm:
|
|
11931
|
-
status:
|
|
11932
|
-
owner:
|
|
11933
|
-
blocks:
|
|
11934
|
-
blockedBy:
|
|
11935
|
-
metadata:
|
|
11936
|
-
createdAt:
|
|
11937
|
-
updatedAt:
|
|
11938
|
-
claimedAt:
|
|
11925
|
+
TaskSchema = z55.object({
|
|
11926
|
+
version: z55.literal(1),
|
|
11927
|
+
id: z55.string(),
|
|
11928
|
+
subject: z55.string(),
|
|
11929
|
+
description: z55.string(),
|
|
11930
|
+
activeForm: z55.string().optional(),
|
|
11931
|
+
status: z55.enum(TASK_STATUSES),
|
|
11932
|
+
owner: z55.string().optional(),
|
|
11933
|
+
blocks: z55.array(z55.string()).default([]),
|
|
11934
|
+
blockedBy: z55.array(z55.string()).default([]),
|
|
11935
|
+
metadata: z55.record(z55.string(), z55.unknown()).optional(),
|
|
11936
|
+
createdAt: z55.number().int().positive(),
|
|
11937
|
+
updatedAt: z55.number().int().positive(),
|
|
11938
|
+
claimedAt: z55.number().int().positive().optional()
|
|
11939
11939
|
});
|
|
11940
|
-
RuntimeStateMemberModelSchema =
|
|
11941
|
-
providerID:
|
|
11942
|
-
modelID:
|
|
11943
|
-
variant:
|
|
11944
|
-
reasoningEffort:
|
|
11945
|
-
temperature:
|
|
11946
|
-
top_p:
|
|
11947
|
-
maxTokens:
|
|
11948
|
-
thinking:
|
|
11949
|
-
type:
|
|
11950
|
-
budgetTokens:
|
|
11940
|
+
RuntimeStateMemberModelSchema = z55.object({
|
|
11941
|
+
providerID: z55.string(),
|
|
11942
|
+
modelID: z55.string(),
|
|
11943
|
+
variant: z55.string().optional(),
|
|
11944
|
+
reasoningEffort: z55.string().optional(),
|
|
11945
|
+
temperature: z55.number().optional(),
|
|
11946
|
+
top_p: z55.number().optional(),
|
|
11947
|
+
maxTokens: z55.number().optional(),
|
|
11948
|
+
thinking: z55.object({
|
|
11949
|
+
type: z55.enum(["enabled", "disabled"]),
|
|
11950
|
+
budgetTokens: z55.number().int().positive().optional()
|
|
11951
11951
|
}).optional()
|
|
11952
11952
|
}).strict();
|
|
11953
|
-
RuntimeStateMemberSchema =
|
|
11954
|
-
name:
|
|
11955
|
-
sessionId:
|
|
11956
|
-
tmuxPaneId:
|
|
11957
|
-
tmuxGridPaneId:
|
|
11958
|
-
agentType:
|
|
11959
|
-
subagent_type:
|
|
11960
|
-
category:
|
|
11953
|
+
RuntimeStateMemberSchema = z55.object({
|
|
11954
|
+
name: z55.string(),
|
|
11955
|
+
sessionId: z55.string().optional(),
|
|
11956
|
+
tmuxPaneId: z55.string().optional(),
|
|
11957
|
+
tmuxGridPaneId: z55.string().optional(),
|
|
11958
|
+
agentType: z55.enum(["leader", "general-purpose"]),
|
|
11959
|
+
subagent_type: z55.string().optional(),
|
|
11960
|
+
category: z55.string().optional(),
|
|
11961
11961
|
model: RuntimeStateMemberModelSchema.optional(),
|
|
11962
|
-
status:
|
|
11963
|
-
color:
|
|
11964
|
-
worktreePath:
|
|
11965
|
-
lastInjectedTurnMarker:
|
|
11966
|
-
pendingInjectedMessageIds:
|
|
11962
|
+
status: z55.enum(["pending", "running", "idle", "errored", "completed", "shutdown_approved"]),
|
|
11963
|
+
color: z55.string().optional(),
|
|
11964
|
+
worktreePath: z55.string().optional(),
|
|
11965
|
+
lastInjectedTurnMarker: z55.string().optional(),
|
|
11966
|
+
pendingInjectedMessageIds: z55.array(z55.string()).default([])
|
|
11967
11967
|
}).strict();
|
|
11968
|
-
RuntimeBoundsSchema =
|
|
11969
|
-
maxMembers:
|
|
11970
|
-
maxParallelMembers:
|
|
11971
|
-
maxMessagesPerRun:
|
|
11972
|
-
maxWallClockMinutes:
|
|
11973
|
-
maxMemberTurns:
|
|
11968
|
+
RuntimeBoundsSchema = z55.object({
|
|
11969
|
+
maxMembers: z55.number().int().default(8),
|
|
11970
|
+
maxParallelMembers: z55.number().int().default(4),
|
|
11971
|
+
maxMessagesPerRun: z55.number().int().default(1e4),
|
|
11972
|
+
maxWallClockMinutes: z55.number().int().default(120),
|
|
11973
|
+
maxMemberTurns: z55.number().int().default(500)
|
|
11974
11974
|
}).strict();
|
|
11975
|
-
ShutdownRequestSchema =
|
|
11976
|
-
memberId:
|
|
11977
|
-
requesterName:
|
|
11978
|
-
requestedAt:
|
|
11979
|
-
approvedAt:
|
|
11980
|
-
rejectedReason:
|
|
11981
|
-
rejectedAt:
|
|
11975
|
+
ShutdownRequestSchema = z55.object({
|
|
11976
|
+
memberId: z55.string(),
|
|
11977
|
+
requesterName: z55.string(),
|
|
11978
|
+
requestedAt: z55.number().int().positive(),
|
|
11979
|
+
approvedAt: z55.number().int().positive().optional(),
|
|
11980
|
+
rejectedReason: z55.string().optional(),
|
|
11981
|
+
rejectedAt: z55.number().int().positive().optional()
|
|
11982
11982
|
}).strict();
|
|
11983
|
-
RuntimeStateTmuxLayoutSchema =
|
|
11984
|
-
ownedSession:
|
|
11985
|
-
targetSessionId:
|
|
11986
|
-
focusWindowId:
|
|
11987
|
-
gridWindowId:
|
|
11988
|
-
paneIds:
|
|
11983
|
+
RuntimeStateTmuxLayoutSchema = z55.object({
|
|
11984
|
+
ownedSession: z55.boolean(),
|
|
11985
|
+
targetSessionId: z55.string(),
|
|
11986
|
+
focusWindowId: z55.string().optional(),
|
|
11987
|
+
gridWindowId: z55.string().optional(),
|
|
11988
|
+
paneIds: z55.array(z55.string()).optional()
|
|
11989
11989
|
}).strict();
|
|
11990
|
-
RuntimeStateSchema =
|
|
11991
|
-
version:
|
|
11992
|
-
teamRunId:
|
|
11993
|
-
teamName:
|
|
11994
|
-
specSource:
|
|
11995
|
-
createdAt:
|
|
11996
|
-
status:
|
|
11997
|
-
leadSessionId:
|
|
11990
|
+
RuntimeStateSchema = z55.object({
|
|
11991
|
+
version: z55.literal(1),
|
|
11992
|
+
teamRunId: z55.string().uuid(),
|
|
11993
|
+
teamName: z55.string(),
|
|
11994
|
+
specSource: z55.enum(["project", "user"]),
|
|
11995
|
+
createdAt: z55.number().int().positive(),
|
|
11996
|
+
status: z55.enum(RUNTIME_STATUSES),
|
|
11997
|
+
leadSessionId: z55.string().optional(),
|
|
11998
11998
|
tmuxLayout: RuntimeStateTmuxLayoutSchema.optional(),
|
|
11999
|
-
members:
|
|
12000
|
-
shutdownRequests:
|
|
11999
|
+
members: z55.array(RuntimeStateMemberSchema),
|
|
12000
|
+
shutdownRequests: z55.array(ShutdownRequestSchema).default([]),
|
|
12001
12001
|
bounds: RuntimeBoundsSchema
|
|
12002
12002
|
});
|
|
12003
12003
|
AGENT_ELIGIBILITY_REGISTRY = {
|
|
@@ -12352,7 +12352,7 @@ var init_lock_publish = __esm(() => {
|
|
|
12352
12352
|
});
|
|
12353
12353
|
|
|
12354
12354
|
// packages/team-core/src/team-state-store/lock-reclaim.ts
|
|
12355
|
-
import { createHash as
|
|
12355
|
+
import { createHash as createHash5 } from "crypto";
|
|
12356
12356
|
import { unlink as unlink3 } from "fs/promises";
|
|
12357
12357
|
function delay3(ms) {
|
|
12358
12358
|
return new Promise((resolve) => {
|
|
@@ -12360,7 +12360,7 @@ function delay3(ms) {
|
|
|
12360
12360
|
});
|
|
12361
12361
|
}
|
|
12362
12362
|
function reclaimGuardPath(lockPath, record) {
|
|
12363
|
-
return `${lockPath}.reclaim-${
|
|
12363
|
+
return `${lockPath}.reclaim-${createHash5("sha256").update(record).digest("hex").slice(0, 16)}`;
|
|
12364
12364
|
}
|
|
12365
12365
|
async function unlinkWithRetry(path, deps) {
|
|
12366
12366
|
const wait = deps.delay ?? delay3;
|
|
@@ -22329,8 +22329,14 @@ function isKimiK28Model(model) {
|
|
|
22329
22329
|
function isKimiK2CodeModel(model) {
|
|
22330
22330
|
return isKimiK27Model(model) || isKimiK28Model(model);
|
|
22331
22331
|
}
|
|
22332
|
+
var KIMI_K31_RE = /(?:^|[/._-])(?:kimi-)?k3(?:[._-]|p)1(?:$|[/._:-])/;
|
|
22333
|
+
function isKimiK31Model(model) {
|
|
22334
|
+
return KIMI_K31_RE.test(extractModelName(model).toLowerCase().replace(/\s+/g, "-"));
|
|
22335
|
+
}
|
|
22332
22336
|
function isKimiK3Model(model) {
|
|
22333
22337
|
const modelName = extractModelName(model).toLowerCase();
|
|
22338
|
+
if (isKimiK31Model(model))
|
|
22339
|
+
return true;
|
|
22334
22340
|
if (/kimi-k3/.test(modelName))
|
|
22335
22341
|
return true;
|
|
22336
22342
|
if (/k3[-.]?p?\d*$/.test(modelName))
|
|
@@ -22832,6 +22838,10 @@ function transformModelForProviderUsingAnthropicBehavior(provider, model) {
|
|
|
22832
22838
|
return "k3";
|
|
22833
22839
|
if (model === "kimi-k3-256k")
|
|
22834
22840
|
return "k3-256k";
|
|
22841
|
+
if (model === "kimi-k3.1-pro")
|
|
22842
|
+
return "k3.1-pro";
|
|
22843
|
+
if (model === "kimi-k3.1-pro-highspeed")
|
|
22844
|
+
return "k3.1-pro-highspeed";
|
|
22835
22845
|
}
|
|
22836
22846
|
return model;
|
|
22837
22847
|
}
|
|
@@ -86531,7 +86541,7 @@ var OmoCategoryConfigSchema = z4.preprocess((value) => isRecord7(value) ? normal
|
|
|
86531
86541
|
var OmoCategoriesConfigSchema = z4.record(z4.string(), OmoCategoryConfigSchema);
|
|
86532
86542
|
|
|
86533
86543
|
// packages/omo-config-core/src/schema/config.ts
|
|
86534
|
-
import * as
|
|
86544
|
+
import * as z18 from "zod";
|
|
86535
86545
|
|
|
86536
86546
|
// packages/omo-config-core/src/schema/computer.ts
|
|
86537
86547
|
import * as z5 from "zod";
|
|
@@ -86608,6 +86618,7 @@ var OmoMemoryReflectionSchema = z9.object({
|
|
|
86608
86618
|
merge: z9.enum(["auto", "integration"]).default("auto"),
|
|
86609
86619
|
category: z9.string().min(1).default("quick"),
|
|
86610
86620
|
timeout_minutes: z9.number().int().positive().default(15),
|
|
86621
|
+
max_concurrent_runs: z9.number().int().positive().default(1),
|
|
86611
86622
|
sandbox: z9.enum(["auto", "required", "off"]).default("auto")
|
|
86612
86623
|
}).strict();
|
|
86613
86624
|
var OmoMemorySyncSchema = z9.object({
|
|
@@ -86679,6 +86690,7 @@ var OmoMemoryReflectionLayerSchema = z9.object({
|
|
|
86679
86690
|
merge: z9.enum(["auto", "integration"]).optional(),
|
|
86680
86691
|
category: z9.string().min(1).optional(),
|
|
86681
86692
|
timeout_minutes: z9.number().int().positive().optional(),
|
|
86693
|
+
max_concurrent_runs: z9.number().int().positive().optional(),
|
|
86682
86694
|
sandbox: z9.enum(["auto", "required", "off"]).optional()
|
|
86683
86695
|
}).strict();
|
|
86684
86696
|
var OmoMemorySyncLayerSchema = z9.object({
|
|
@@ -86743,7 +86755,7 @@ var OmoMemoryProjectionLayerSchema = z9.object({
|
|
|
86743
86755
|
var OmoMemoryAgentOverridesSchema = z9.object({
|
|
86744
86756
|
enabled: z9.boolean().optional(),
|
|
86745
86757
|
agent: z9.string().min(1).optional(),
|
|
86746
|
-
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
86758
|
+
reflection: OmoMemoryReflectionLayerSchema.omit({ max_concurrent_runs: true }).optional(),
|
|
86747
86759
|
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
86748
86760
|
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
86749
86761
|
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
@@ -86768,6 +86780,7 @@ var OmoMemorySettingsSchema = z9.object({
|
|
|
86768
86780
|
merge: "auto",
|
|
86769
86781
|
category: "quick",
|
|
86770
86782
|
timeout_minutes: 15,
|
|
86783
|
+
max_concurrent_runs: 1,
|
|
86771
86784
|
sandbox: "auto"
|
|
86772
86785
|
}),
|
|
86773
86786
|
nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
|
|
@@ -87118,28 +87131,23 @@ var OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
|
87118
87131
|
timeoutMs: z16.number().int().positive().default(3000)
|
|
87119
87132
|
}).strict();
|
|
87120
87133
|
|
|
87121
|
-
// packages/omo-config-core/src/schema/dori.ts
|
|
87122
|
-
import * as z17 from "zod";
|
|
87123
|
-
var OmoDoriSectionSchema = z17.record(z17.string(), z17.unknown()).describe("Chat-surface dori settings, owned and validated by a separately installed dori package. omo accepts the key and never reads it.");
|
|
87124
|
-
|
|
87125
87134
|
// packages/omo-config-core/src/schema/provenance.ts
|
|
87126
|
-
import * as
|
|
87127
|
-
var OmoProvenanceSettingsSchema =
|
|
87128
|
-
workspaces:
|
|
87129
|
-
name:
|
|
87130
|
-
git_owners:
|
|
87131
|
-
paths:
|
|
87135
|
+
import * as z17 from "zod";
|
|
87136
|
+
var OmoProvenanceSettingsSchema = z17.object({
|
|
87137
|
+
workspaces: z17.array(z17.object({
|
|
87138
|
+
name: z17.string().trim().min(1).regex(/\S/),
|
|
87139
|
+
git_owners: z17.array(z17.string().trim().min(1).regex(/\S/)).optional(),
|
|
87140
|
+
paths: z17.array(z17.string().trim().min(1).regex(/\S/)).optional()
|
|
87132
87141
|
}).strict()).optional()
|
|
87133
87142
|
}).strict();
|
|
87134
87143
|
|
|
87135
87144
|
// packages/omo-config-core/src/schema/config.ts
|
|
87136
|
-
var OmoOpenCodeHarnessConfigSchema =
|
|
87137
|
-
var OmoDisabledSkillsSchema =
|
|
87138
|
-
var OmoExcludedModelsSchema =
|
|
87139
|
-
var OmoTypedHarnessConfigSchema =
|
|
87145
|
+
var OmoOpenCodeHarnessConfigSchema = z18.record(z18.string(), z18.unknown());
|
|
87146
|
+
var OmoDisabledSkillsSchema = z18.array(z18.string());
|
|
87147
|
+
var OmoExcludedModelsSchema = z18.array(z18.string());
|
|
87148
|
+
var OmoTypedHarnessConfigSchema = z18.object({
|
|
87140
87149
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
87141
87150
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
87142
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
87143
87151
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
87144
87152
|
agents: OmoAgentsConfigSchema.optional(),
|
|
87145
87153
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
@@ -87147,7 +87155,7 @@ var OmoTypedHarnessConfigSchema = z19.object({
|
|
|
87147
87155
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
87148
87156
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
87149
87157
|
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
87150
|
-
model_profile:
|
|
87158
|
+
model_profile: z18.string().optional(),
|
|
87151
87159
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
87152
87160
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
87153
87161
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
@@ -87155,10 +87163,9 @@ var OmoTypedHarnessConfigSchema = z19.object({
|
|
|
87155
87163
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
87156
87164
|
exclude_models: OmoExcludedModelsSchema.optional()
|
|
87157
87165
|
}).strict();
|
|
87158
|
-
var OmoConfigProfileSchema =
|
|
87166
|
+
var OmoConfigProfileSchema = z18.object({
|
|
87159
87167
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
87160
87168
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
87161
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
87162
87169
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
87163
87170
|
agents: OmoAgentsConfigSchema.optional(),
|
|
87164
87171
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
@@ -87166,7 +87173,7 @@ var OmoConfigProfileSchema = z19.object({
|
|
|
87166
87173
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
87167
87174
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
87168
87175
|
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
87169
|
-
model_profile:
|
|
87176
|
+
model_profile: z18.string().optional(),
|
|
87170
87177
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
87171
87178
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
87172
87179
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
@@ -87178,11 +87185,10 @@ var OmoConfigProfileSchema = z19.object({
|
|
|
87178
87185
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
87179
87186
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
87180
87187
|
}).strict();
|
|
87181
|
-
var OmoConfigSchema =
|
|
87188
|
+
var OmoConfigSchema = z18.object({
|
|
87182
87189
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
87183
87190
|
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
87184
|
-
|
|
87185
|
-
$schema: z19.string().optional(),
|
|
87191
|
+
$schema: z18.string().optional(),
|
|
87186
87192
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
87187
87193
|
agents: OmoAgentsConfigSchema.optional(),
|
|
87188
87194
|
git_master: OmoGitMasterSettingsSchema.optional(),
|
|
@@ -87190,7 +87196,7 @@ var OmoConfigSchema = z19.object({
|
|
|
87190
87196
|
teams: OmoTeamsConfigSchema.optional(),
|
|
87191
87197
|
models: OmoModelCatalogSchema.optional(),
|
|
87192
87198
|
model_profiles: OmoModelProfilesSchema.optional(),
|
|
87193
|
-
model_profile:
|
|
87199
|
+
model_profile: z18.string().optional(),
|
|
87194
87200
|
memory: OmoMemorySettingsSchema.optional(),
|
|
87195
87201
|
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
87196
87202
|
side_panel: OmoSidePanelSettingsSchema.optional(),
|
|
@@ -87201,15 +87207,14 @@ var OmoConfigSchema = z19.object({
|
|
|
87201
87207
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
87202
87208
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
87203
87209
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
87204
|
-
profiles:
|
|
87205
|
-
_migrations:
|
|
87206
|
-
legacy_migrations:
|
|
87210
|
+
profiles: z18.record(z18.string(), OmoConfigProfileSchema).default({}),
|
|
87211
|
+
_migrations: z18.array(z18.string()).optional(),
|
|
87212
|
+
legacy_migrations: z18.record(z18.string(), z18.unknown()).optional()
|
|
87207
87213
|
}).strict();
|
|
87208
|
-
var OmoConfigLayerSchema =
|
|
87214
|
+
var OmoConfigLayerSchema = z18.object({
|
|
87209
87215
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
87210
87216
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
87211
|
-
|
|
87212
|
-
$schema: z19.string().optional(),
|
|
87217
|
+
$schema: z18.string().optional(),
|
|
87213
87218
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
87214
87219
|
agents: OmoAgentsConfigSchema.optional(),
|
|
87215
87220
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
@@ -87217,7 +87222,7 @@ var OmoConfigLayerSchema = z19.object({
|
|
|
87217
87222
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
87218
87223
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
87219
87224
|
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
87220
|
-
model_profile:
|
|
87225
|
+
model_profile: z18.string().optional(),
|
|
87221
87226
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
87222
87227
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
87223
87228
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
@@ -87228,9 +87233,9 @@ var OmoConfigLayerSchema = z19.object({
|
|
|
87228
87233
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
87229
87234
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
87230
87235
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
87231
|
-
profiles:
|
|
87232
|
-
_migrations:
|
|
87233
|
-
legacy_migrations:
|
|
87236
|
+
profiles: z18.record(z18.string(), OmoConfigProfileSchema).optional(),
|
|
87237
|
+
_migrations: z18.array(z18.string()).optional(),
|
|
87238
|
+
legacy_migrations: z18.record(z18.string(), z18.unknown()).optional()
|
|
87234
87239
|
}).strict();
|
|
87235
87240
|
|
|
87236
87241
|
// packages/omo-config-core/src/schema/legacy-category-names.ts
|
|
@@ -87343,51 +87348,6 @@ function hasLegacyHarnessBlocks(document) {
|
|
|
87343
87348
|
return canonicalizeLegacyHarnessBlocks(document).renames.length > 0;
|
|
87344
87349
|
}
|
|
87345
87350
|
|
|
87346
|
-
// packages/omo-config-core/src/schema/legacy-dori-section.ts
|
|
87347
|
-
var HARNESS_BLOCKS = ["[opencode]", "[native]", "[senpi]", "[codex]"];
|
|
87348
|
-
function isRecord12(value) {
|
|
87349
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
87350
|
-
}
|
|
87351
|
-
function migrateLegacyDoriSection(document) {
|
|
87352
|
-
if (!isRecord12(document))
|
|
87353
|
-
return { document: {}, diagnostics: [] };
|
|
87354
|
-
const diagnostics = [];
|
|
87355
|
-
const rename = (container, path) => {
|
|
87356
|
-
const result = { ...container };
|
|
87357
|
-
if (Object.hasOwn(container, "gateway")) {
|
|
87358
|
-
if (Object.hasOwn(container, "dori")) {
|
|
87359
|
-
diagnostics.push(`${[...path, "gateway"].join(".")} removed: dori is already configured`);
|
|
87360
|
-
} else {
|
|
87361
|
-
result.dori = container.gateway;
|
|
87362
|
-
diagnostics.push(`${[...path, "gateway"].join(".")} renamed to dori`);
|
|
87363
|
-
}
|
|
87364
|
-
delete result.gateway;
|
|
87365
|
-
}
|
|
87366
|
-
return result;
|
|
87367
|
-
};
|
|
87368
|
-
const layer = (container, path) => {
|
|
87369
|
-
const result = rename(container, path);
|
|
87370
|
-
for (const key of HARNESS_BLOCKS) {
|
|
87371
|
-
const block = container[key];
|
|
87372
|
-
if (isRecord12(block))
|
|
87373
|
-
result[key] = rename(block, [...path, key]);
|
|
87374
|
-
}
|
|
87375
|
-
return result;
|
|
87376
|
-
};
|
|
87377
|
-
const result = layer(document, []);
|
|
87378
|
-
if (isRecord12(document.profiles)) {
|
|
87379
|
-
const profiles = {};
|
|
87380
|
-
for (const [name, profile] of Object.entries(document.profiles)) {
|
|
87381
|
-
profiles[name] = isRecord12(profile) ? layer(profile, ["profiles", name]) : profile;
|
|
87382
|
-
}
|
|
87383
|
-
result.profiles = profiles;
|
|
87384
|
-
}
|
|
87385
|
-
return { document: result, diagnostics };
|
|
87386
|
-
}
|
|
87387
|
-
function hasLegacyGatewaySection(document) {
|
|
87388
|
-
return migrateLegacyDoriSection(document).diagnostics.length > 0;
|
|
87389
|
-
}
|
|
87390
|
-
|
|
87391
87351
|
// packages/omo-config-core/src/loader/types.ts
|
|
87392
87352
|
import { existsSync as existsSync29, lstatSync as lstatSync2, readFileSync as readFileSync20, realpathSync as realpathSync7 } from "fs";
|
|
87393
87353
|
var MERGED_OMO_CONFIG_PATH = "(merged omo config)";
|
|
@@ -87488,6 +87448,9 @@ function collectUnionedList(key, options) {
|
|
|
87488
87448
|
// packages/omo-config-core/src/loader/loader.ts
|
|
87489
87449
|
init_main();
|
|
87490
87450
|
|
|
87451
|
+
// packages/omo-config-core/src/loader/layer-validation.ts
|
|
87452
|
+
import { createHash as createHash3 } from "crypto";
|
|
87453
|
+
|
|
87491
87454
|
// packages/omo-config-core/src/loader/merge.ts
|
|
87492
87455
|
var DANGEROUS_KEYS2 = new Set(["__proto__", "constructor", "prototype"]);
|
|
87493
87456
|
function isUnsafeObjectKey2(key) {
|
|
@@ -87658,9 +87621,17 @@ function invalidValueDiagnostics(path, dropped) {
|
|
|
87658
87621
|
function unrecognizedKeyIssues(issues) {
|
|
87659
87622
|
return issues.flatMap((issue) => issue.code === "unrecognized_keys" ? [{ keys: issue.keys, path: issue.path.map((segment) => String(segment)) }] : []);
|
|
87660
87623
|
}
|
|
87661
|
-
function
|
|
87624
|
+
function isRecord12(value) {
|
|
87662
87625
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
87663
87626
|
}
|
|
87627
|
+
var RETIRED_SECTION_DIGESTS = new Set([
|
|
87628
|
+
"447f75a8ebdbdb79a57f0b8cebbfba183820cf54a8119ac01449b30499e5ef0e",
|
|
87629
|
+
"4ea5ee68fea05586106890ded5733820bb77d919cda27bc4b8139b7cd33b8889"
|
|
87630
|
+
]);
|
|
87631
|
+
function isRetiredSection(key) {
|
|
87632
|
+
return RETIRED_SECTION_DIGESTS.has(createHash3("sha256").update(key.toLowerCase()).digest("hex"));
|
|
87633
|
+
}
|
|
87634
|
+
var HARNESS_BLOCKS = new Set(["[opencode]", "[native]", "[senpi]", "[codex]"]);
|
|
87664
87635
|
function sanitizeUnsafeKeys(value, path = []) {
|
|
87665
87636
|
if (Array.isArray(value)) {
|
|
87666
87637
|
const issues = [];
|
|
@@ -87671,7 +87642,7 @@ function sanitizeUnsafeKeys(value, path = []) {
|
|
|
87671
87642
|
});
|
|
87672
87643
|
return { issues, value: sanitized };
|
|
87673
87644
|
}
|
|
87674
|
-
if (!
|
|
87645
|
+
if (!isRecord12(value))
|
|
87675
87646
|
return { issues: [], value };
|
|
87676
87647
|
const issues = [];
|
|
87677
87648
|
if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
|
|
@@ -87679,6 +87650,9 @@ function sanitizeUnsafeKeys(value, path = []) {
|
|
|
87679
87650
|
}
|
|
87680
87651
|
const sanitized = {};
|
|
87681
87652
|
for (const [key, entry] of Object.entries(value)) {
|
|
87653
|
+
const isConfigContainer = path.length === 0 || path.length === 1 && HARNESS_BLOCKS.has(path[0] ?? "") || path.length === 2 && path[0] === "profiles" || path.length === 3 && path[0] === "profiles" && HARNESS_BLOCKS.has(path[2] ?? "");
|
|
87654
|
+
if (isConfigContainer && isRetiredSection(key))
|
|
87655
|
+
continue;
|
|
87682
87656
|
if (isUnsafeObjectKey2(key)) {
|
|
87683
87657
|
issues.push({ keys: [key], path });
|
|
87684
87658
|
continue;
|
|
@@ -87697,13 +87671,13 @@ function containerAt(record, path) {
|
|
|
87697
87671
|
if (!Number.isInteger(index) || index < 0 || index >= node.length)
|
|
87698
87672
|
return null;
|
|
87699
87673
|
node = node[index];
|
|
87700
|
-
} else if (
|
|
87674
|
+
} else if (isRecord12(node) && Object.hasOwn(node, segment)) {
|
|
87701
87675
|
node = node[segment];
|
|
87702
87676
|
} else {
|
|
87703
87677
|
return null;
|
|
87704
87678
|
}
|
|
87705
87679
|
}
|
|
87706
|
-
return
|
|
87680
|
+
return isRecord12(node) ? node : null;
|
|
87707
87681
|
}
|
|
87708
87682
|
function stripUnrecognizedKeys(record, issues) {
|
|
87709
87683
|
const stripped = structuredClone(record);
|
|
@@ -89553,7 +89527,7 @@ init_src();
|
|
|
89553
89527
|
// package.json
|
|
89554
89528
|
var package_default = {
|
|
89555
89529
|
name: "oh-my-opencode",
|
|
89556
|
-
version: "5.1.
|
|
89530
|
+
version: "5.1.47",
|
|
89557
89531
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
89558
89532
|
main: "./dist/index.js",
|
|
89559
89533
|
types: "dist/index.d.ts",
|
|
@@ -89799,18 +89773,18 @@ var package_default = {
|
|
|
89799
89773
|
typescript: "^7.0.2"
|
|
89800
89774
|
},
|
|
89801
89775
|
optionalDependencies: {
|
|
89802
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
89803
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
89804
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
89805
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
89806
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
89807
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
89808
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
89809
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
89810
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
89811
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
89812
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
89813
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
89776
|
+
"oh-my-opencode-darwin-arm64": "5.1.47",
|
|
89777
|
+
"oh-my-opencode-darwin-x64": "5.1.47",
|
|
89778
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.47",
|
|
89779
|
+
"oh-my-opencode-linux-arm64": "5.1.47",
|
|
89780
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.47",
|
|
89781
|
+
"oh-my-opencode-linux-x64": "5.1.47",
|
|
89782
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.47",
|
|
89783
|
+
"oh-my-opencode-linux-x64-musl": "5.1.47",
|
|
89784
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.47",
|
|
89785
|
+
"oh-my-opencode-windows-arm64": "5.1.47",
|
|
89786
|
+
"oh-my-opencode-windows-x64": "5.1.47",
|
|
89787
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.47"
|
|
89814
89788
|
},
|
|
89815
89789
|
overrides: {
|
|
89816
89790
|
hono: "^4.13.8",
|
|
@@ -91113,8 +91087,8 @@ function findUnknownKeyPaths(schema, value) {
|
|
|
91113
91087
|
}
|
|
91114
91088
|
|
|
91115
91089
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
91116
|
-
import { z as
|
|
91117
|
-
var BuiltinAgentNameSchema =
|
|
91090
|
+
import { z as z19 } from "zod";
|
|
91091
|
+
var BuiltinAgentNameSchema = z19.enum([
|
|
91118
91092
|
"sisyphus",
|
|
91119
91093
|
"hephaestus",
|
|
91120
91094
|
"prometheus",
|
|
@@ -91127,7 +91101,7 @@ var BuiltinAgentNameSchema = z20.enum([
|
|
|
91127
91101
|
"atlas",
|
|
91128
91102
|
"sisyphus-junior"
|
|
91129
91103
|
]);
|
|
91130
|
-
var BuiltinSkillNameSchema =
|
|
91104
|
+
var BuiltinSkillNameSchema = z19.enum([
|
|
91131
91105
|
"playwright",
|
|
91132
91106
|
"dev-browser",
|
|
91133
91107
|
"frontend",
|
|
@@ -91141,7 +91115,7 @@ var BuiltinSkillNameSchema = z20.enum([
|
|
|
91141
91115
|
"visual-qa",
|
|
91142
91116
|
"team-mode"
|
|
91143
91117
|
]);
|
|
91144
|
-
var OverridableAgentNameSchema =
|
|
91118
|
+
var OverridableAgentNameSchema = z19.enum([
|
|
91145
91119
|
"build",
|
|
91146
91120
|
"plan",
|
|
91147
91121
|
"sisyphus",
|
|
@@ -91158,41 +91132,41 @@ var OverridableAgentNameSchema = z20.enum([
|
|
|
91158
91132
|
"atlas"
|
|
91159
91133
|
]);
|
|
91160
91134
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
91161
|
-
import { z as
|
|
91135
|
+
import { z as z22 } from "zod";
|
|
91162
91136
|
|
|
91163
91137
|
// packages/omo-opencode/src/config/schema/fallback-models.ts
|
|
91164
|
-
import { z as
|
|
91165
|
-
var FallbackModelObjectSchema =
|
|
91166
|
-
model:
|
|
91138
|
+
import { z as z20 } from "zod";
|
|
91139
|
+
var FallbackModelObjectSchema = z20.object({
|
|
91140
|
+
model: z20.string(),
|
|
91167
91141
|
reasoning: OmoReasoningSchema.optional(),
|
|
91168
|
-
variant:
|
|
91169
|
-
reasoningEffort:
|
|
91170
|
-
temperature:
|
|
91171
|
-
top_p:
|
|
91172
|
-
maxTokens:
|
|
91173
|
-
thinking:
|
|
91174
|
-
type:
|
|
91175
|
-
budgetTokens:
|
|
91142
|
+
variant: z20.string().optional(),
|
|
91143
|
+
reasoningEffort: z20.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
91144
|
+
temperature: z20.number().min(0).max(2).optional(),
|
|
91145
|
+
top_p: z20.number().min(0).max(1).optional(),
|
|
91146
|
+
maxTokens: z20.number().optional(),
|
|
91147
|
+
thinking: z20.object({
|
|
91148
|
+
type: z20.enum(["enabled", "disabled"]),
|
|
91149
|
+
budgetTokens: z20.number().optional()
|
|
91176
91150
|
}).optional()
|
|
91177
91151
|
});
|
|
91178
|
-
var FallbackModelStringArraySchema =
|
|
91179
|
-
var FallbackModelObjectArraySchema =
|
|
91180
|
-
var FallbackModelMixedArraySchema =
|
|
91181
|
-
var FallbackModelsSchema =
|
|
91182
|
-
|
|
91152
|
+
var FallbackModelStringArraySchema = z20.array(z20.string());
|
|
91153
|
+
var FallbackModelObjectArraySchema = z20.array(FallbackModelObjectSchema);
|
|
91154
|
+
var FallbackModelMixedArraySchema = z20.array(z20.union([z20.string(), FallbackModelObjectSchema]));
|
|
91155
|
+
var FallbackModelsSchema = z20.union([
|
|
91156
|
+
z20.string(),
|
|
91183
91157
|
FallbackModelStringArraySchema,
|
|
91184
91158
|
FallbackModelObjectArraySchema,
|
|
91185
91159
|
FallbackModelMixedArraySchema
|
|
91186
91160
|
]);
|
|
91187
91161
|
|
|
91188
91162
|
// packages/omo-opencode/src/config/schema/internal/permission.ts
|
|
91189
|
-
import { z as
|
|
91190
|
-
var PermissionValueSchema2 =
|
|
91191
|
-
var BashPermissionSchema2 =
|
|
91163
|
+
import { z as z21 } from "zod";
|
|
91164
|
+
var PermissionValueSchema2 = z21.enum(["ask", "allow", "deny"]);
|
|
91165
|
+
var BashPermissionSchema2 = z21.union([
|
|
91192
91166
|
PermissionValueSchema2,
|
|
91193
|
-
|
|
91167
|
+
z21.record(z21.string(), PermissionValueSchema2)
|
|
91194
91168
|
]);
|
|
91195
|
-
var AgentPermissionSchema =
|
|
91169
|
+
var AgentPermissionSchema = z21.object({
|
|
91196
91170
|
edit: PermissionValueSchema2.optional(),
|
|
91197
91171
|
bash: BashPermissionSchema2.optional(),
|
|
91198
91172
|
webfetch: PermissionValueSchema2.optional(),
|
|
@@ -91202,50 +91176,50 @@ var AgentPermissionSchema = z22.object({
|
|
|
91202
91176
|
}).catchall(PermissionValueSchema2.optional());
|
|
91203
91177
|
|
|
91204
91178
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
91205
|
-
var AgentOverrideConfigSchema =
|
|
91206
|
-
model:
|
|
91207
|
-
models:
|
|
91179
|
+
var AgentOverrideConfigSchema = z22.object({
|
|
91180
|
+
model: z22.string().optional(),
|
|
91181
|
+
models: z22.array(z22.union([z22.string(), FallbackModelObjectSchema])).optional(),
|
|
91208
91182
|
fallback_models: FallbackModelsSchema.optional(),
|
|
91209
91183
|
reasoning: OmoReasoningSchema.optional(),
|
|
91210
|
-
variant:
|
|
91211
|
-
category:
|
|
91212
|
-
skills:
|
|
91213
|
-
temperature:
|
|
91214
|
-
top_p:
|
|
91215
|
-
prompt:
|
|
91216
|
-
prompt_append:
|
|
91217
|
-
tools:
|
|
91218
|
-
disable:
|
|
91219
|
-
description:
|
|
91220
|
-
mode:
|
|
91221
|
-
color:
|
|
91222
|
-
displayName:
|
|
91184
|
+
variant: z22.string().optional(),
|
|
91185
|
+
category: z22.string().optional(),
|
|
91186
|
+
skills: z22.array(z22.string()).optional(),
|
|
91187
|
+
temperature: z22.number().min(0).max(2).optional(),
|
|
91188
|
+
top_p: z22.number().min(0).max(1).optional(),
|
|
91189
|
+
prompt: z22.string().optional(),
|
|
91190
|
+
prompt_append: z22.string().optional(),
|
|
91191
|
+
tools: z22.record(z22.string(), z22.boolean()).optional(),
|
|
91192
|
+
disable: z22.boolean().optional(),
|
|
91193
|
+
description: z22.string().optional(),
|
|
91194
|
+
mode: z22.enum(["subagent", "primary", "all"]).optional(),
|
|
91195
|
+
color: z22.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
91196
|
+
displayName: z22.string().optional(),
|
|
91223
91197
|
permission: AgentPermissionSchema.optional(),
|
|
91224
|
-
maxTokens:
|
|
91225
|
-
thinking:
|
|
91226
|
-
type:
|
|
91227
|
-
budgetTokens:
|
|
91198
|
+
maxTokens: z22.number().optional(),
|
|
91199
|
+
thinking: z22.object({
|
|
91200
|
+
type: z22.enum(["enabled", "disabled"]),
|
|
91201
|
+
budgetTokens: z22.number().optional()
|
|
91228
91202
|
}).optional(),
|
|
91229
|
-
reasoningEffort:
|
|
91230
|
-
textVerbosity:
|
|
91231
|
-
providerOptions:
|
|
91232
|
-
ultrawork:
|
|
91233
|
-
model:
|
|
91203
|
+
reasoningEffort: z22.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
91204
|
+
textVerbosity: z22.enum(["low", "medium", "high"]).optional(),
|
|
91205
|
+
providerOptions: z22.record(z22.string(), z22.unknown()).optional(),
|
|
91206
|
+
ultrawork: z22.object({
|
|
91207
|
+
model: z22.string().optional(),
|
|
91234
91208
|
reasoning: OmoReasoningSchema.optional(),
|
|
91235
|
-
variant:
|
|
91209
|
+
variant: z22.string().optional()
|
|
91236
91210
|
}).optional(),
|
|
91237
|
-
compaction:
|
|
91238
|
-
model:
|
|
91211
|
+
compaction: z22.object({
|
|
91212
|
+
model: z22.string().optional(),
|
|
91239
91213
|
reasoning: OmoReasoningSchema.optional(),
|
|
91240
|
-
variant:
|
|
91214
|
+
variant: z22.string().optional()
|
|
91241
91215
|
}).optional()
|
|
91242
91216
|
});
|
|
91243
|
-
var AgentOverridesSchema =
|
|
91217
|
+
var AgentOverridesSchema = z22.object({
|
|
91244
91218
|
build: AgentOverrideConfigSchema.optional(),
|
|
91245
91219
|
plan: AgentOverrideConfigSchema.optional(),
|
|
91246
91220
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
91247
91221
|
hephaestus: AgentOverrideConfigSchema.extend({
|
|
91248
|
-
allow_non_gpt_model:
|
|
91222
|
+
allow_non_gpt_model: z22.boolean().optional()
|
|
91249
91223
|
}).optional(),
|
|
91250
91224
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
91251
91225
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
@@ -91259,73 +91233,73 @@ var AgentOverridesSchema = z23.object({
|
|
|
91259
91233
|
atlas: AgentOverrideConfigSchema.optional()
|
|
91260
91234
|
}).catchall(AgentOverrideConfigSchema.optional());
|
|
91261
91235
|
// packages/omo-opencode/src/config/schema/babysitting.ts
|
|
91262
|
-
import { z as
|
|
91263
|
-
var BabysittingConfigSchema =
|
|
91264
|
-
timeout_ms:
|
|
91236
|
+
import { z as z23 } from "zod";
|
|
91237
|
+
var BabysittingConfigSchema = z23.object({
|
|
91238
|
+
timeout_ms: z23.number().default(120000)
|
|
91265
91239
|
});
|
|
91266
91240
|
// packages/omo-opencode/src/config/schema/background-task.ts
|
|
91267
|
-
import { z as
|
|
91268
|
-
var CircuitBreakerConfigSchema =
|
|
91269
|
-
enabled:
|
|
91270
|
-
maxToolCalls:
|
|
91271
|
-
consecutiveThreshold:
|
|
91241
|
+
import { z as z24 } from "zod";
|
|
91242
|
+
var CircuitBreakerConfigSchema = z24.object({
|
|
91243
|
+
enabled: z24.boolean().optional(),
|
|
91244
|
+
maxToolCalls: z24.number().int().min(10).optional(),
|
|
91245
|
+
consecutiveThreshold: z24.number().int().min(5).optional()
|
|
91272
91246
|
});
|
|
91273
|
-
var BackgroundTaskConfigSchema =
|
|
91274
|
-
defaultConcurrency:
|
|
91275
|
-
providerConcurrency:
|
|
91276
|
-
modelConcurrency:
|
|
91277
|
-
maxDepth:
|
|
91278
|
-
maxLiveDescendantsPerRoot:
|
|
91279
|
-
staleTimeoutMs:
|
|
91280
|
-
messageStalenessTimeoutMs:
|
|
91281
|
-
taskTtlMs:
|
|
91282
|
-
sessionGoneTimeoutMs:
|
|
91283
|
-
taskCleanupDelayMs:
|
|
91284
|
-
syncPollTimeoutMs:
|
|
91285
|
-
maxToolCalls:
|
|
91247
|
+
var BackgroundTaskConfigSchema = z24.object({
|
|
91248
|
+
defaultConcurrency: z24.number().min(0).optional(),
|
|
91249
|
+
providerConcurrency: z24.record(z24.string(), z24.number().min(0)).optional(),
|
|
91250
|
+
modelConcurrency: z24.record(z24.string(), z24.number().min(0)).optional(),
|
|
91251
|
+
maxDepth: z24.number().int().min(1).optional(),
|
|
91252
|
+
maxLiveDescendantsPerRoot: z24.number().int().min(0).optional(),
|
|
91253
|
+
staleTimeoutMs: z24.number().min(60000).optional(),
|
|
91254
|
+
messageStalenessTimeoutMs: z24.number().min(60000).optional(),
|
|
91255
|
+
taskTtlMs: z24.number().min(300000).optional(),
|
|
91256
|
+
sessionGoneTimeoutMs: z24.number().min(1e4).optional(),
|
|
91257
|
+
taskCleanupDelayMs: z24.number().min(60000).optional(),
|
|
91258
|
+
syncPollTimeoutMs: z24.number().min(60000).optional(),
|
|
91259
|
+
maxToolCalls: z24.number().int().min(10).optional(),
|
|
91286
91260
|
circuitBreaker: CircuitBreakerConfigSchema.optional()
|
|
91287
91261
|
});
|
|
91288
91262
|
// packages/omo-opencode/src/config/schema/browser-automation.ts
|
|
91289
|
-
import { z as
|
|
91290
|
-
var BrowserAutomationProviderSchema =
|
|
91263
|
+
import { z as z25 } from "zod";
|
|
91264
|
+
var BrowserAutomationProviderSchema = z25.enum([
|
|
91291
91265
|
"playwright",
|
|
91292
91266
|
"dev-browser",
|
|
91293
91267
|
"playwright-cli"
|
|
91294
91268
|
], {
|
|
91295
91269
|
error: (issue) => `Browser provider ${JSON.stringify(issue.input)} is no longer supported; use the built-in browser path: Bun.WebView / playwright-core scripts`
|
|
91296
91270
|
});
|
|
91297
|
-
var BrowserAutomationConfigSchema =
|
|
91271
|
+
var BrowserAutomationConfigSchema = z25.object({
|
|
91298
91272
|
provider: BrowserAutomationProviderSchema.default("playwright"),
|
|
91299
|
-
playwright_mcp_args:
|
|
91273
|
+
playwright_mcp_args: z25.array(z25.string()).optional()
|
|
91300
91274
|
});
|
|
91301
91275
|
// packages/omo-opencode/src/config/schema/categories.ts
|
|
91302
|
-
import { z as
|
|
91303
|
-
var CategoryConfigSchema =
|
|
91304
|
-
description:
|
|
91305
|
-
model:
|
|
91306
|
-
models:
|
|
91276
|
+
import { z as z26 } from "zod";
|
|
91277
|
+
var CategoryConfigSchema = z26.object({
|
|
91278
|
+
description: z26.string().optional(),
|
|
91279
|
+
model: z26.string().optional(),
|
|
91280
|
+
models: z26.array(z26.union([z26.string(), FallbackModelObjectSchema])).optional(),
|
|
91307
91281
|
fallback_models: FallbackModelsSchema.optional(),
|
|
91308
91282
|
reasoning: OmoReasoningSchema.optional(),
|
|
91309
|
-
variant:
|
|
91310
|
-
temperature:
|
|
91311
|
-
top_p:
|
|
91312
|
-
max_tokens:
|
|
91313
|
-
provider_options:
|
|
91314
|
-
maxTokens:
|
|
91315
|
-
thinking:
|
|
91316
|
-
type:
|
|
91317
|
-
budgetTokens:
|
|
91283
|
+
variant: z26.string().optional(),
|
|
91284
|
+
temperature: z26.number().min(0).max(2).optional(),
|
|
91285
|
+
top_p: z26.number().min(0).max(1).optional(),
|
|
91286
|
+
max_tokens: z26.number().int().positive().optional(),
|
|
91287
|
+
provider_options: z26.record(z26.string(), z26.unknown()).optional(),
|
|
91288
|
+
maxTokens: z26.number().optional(),
|
|
91289
|
+
thinking: z26.object({
|
|
91290
|
+
type: z26.enum(["enabled", "disabled"]),
|
|
91291
|
+
budgetTokens: z26.number().optional()
|
|
91318
91292
|
}).optional(),
|
|
91319
|
-
reasoningEffort:
|
|
91320
|
-
textVerbosity:
|
|
91321
|
-
tools:
|
|
91322
|
-
prompt_append:
|
|
91323
|
-
max_prompt_tokens:
|
|
91324
|
-
is_unstable_agent:
|
|
91325
|
-
disable:
|
|
91326
|
-
warn_unavailable:
|
|
91293
|
+
reasoningEffort: z26.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
91294
|
+
textVerbosity: z26.enum(["low", "medium", "high"]).optional(),
|
|
91295
|
+
tools: z26.record(z26.string(), z26.boolean()).optional(),
|
|
91296
|
+
prompt_append: z26.string().optional(),
|
|
91297
|
+
max_prompt_tokens: z26.number().int().positive().optional(),
|
|
91298
|
+
is_unstable_agent: z26.boolean().optional(),
|
|
91299
|
+
disable: z26.boolean().optional(),
|
|
91300
|
+
warn_unavailable: z26.boolean().optional()
|
|
91327
91301
|
});
|
|
91328
|
-
var BuiltinCategoryNameSchema =
|
|
91302
|
+
var BuiltinCategoryNameSchema = z26.enum([
|
|
91329
91303
|
"visual-engineering",
|
|
91330
91304
|
"ultrabrain",
|
|
91331
91305
|
"deep",
|
|
@@ -91335,29 +91309,29 @@ var BuiltinCategoryNameSchema = z27.enum([
|
|
|
91335
91309
|
"unspecified-high",
|
|
91336
91310
|
"writing"
|
|
91337
91311
|
]);
|
|
91338
|
-
var CategoriesConfigSchema =
|
|
91312
|
+
var CategoriesConfigSchema = z26.record(z26.string(), CategoryConfigSchema);
|
|
91339
91313
|
// packages/omo-opencode/src/config/schema/claude-code.ts
|
|
91340
|
-
import { z as
|
|
91341
|
-
var ClaudeCodeConfigSchema =
|
|
91342
|
-
mcp:
|
|
91343
|
-
commands:
|
|
91344
|
-
skills:
|
|
91345
|
-
agents:
|
|
91346
|
-
hooks:
|
|
91347
|
-
plugins:
|
|
91348
|
-
plugins_override:
|
|
91349
|
-
anthropic_provider:
|
|
91314
|
+
import { z as z27 } from "zod";
|
|
91315
|
+
var ClaudeCodeConfigSchema = z27.object({
|
|
91316
|
+
mcp: z27.boolean().optional(),
|
|
91317
|
+
commands: z27.boolean().optional(),
|
|
91318
|
+
skills: z27.boolean().optional(),
|
|
91319
|
+
agents: z27.boolean().optional(),
|
|
91320
|
+
hooks: z27.boolean().optional(),
|
|
91321
|
+
plugins: z27.boolean().optional(),
|
|
91322
|
+
plugins_override: z27.record(z27.string(), z27.boolean()).optional(),
|
|
91323
|
+
anthropic_provider: z27.string().trim().min(1).refine((v) => !v.includes("/"), {
|
|
91350
91324
|
message: "anthropic_provider must be a provider name without '/'"
|
|
91351
91325
|
}).optional()
|
|
91352
91326
|
});
|
|
91353
91327
|
// packages/omo-opencode/src/config/schema/comment-checker.ts
|
|
91354
|
-
import { z as
|
|
91355
|
-
var CommentCheckerConfigSchema =
|
|
91356
|
-
custom_prompt:
|
|
91328
|
+
import { z as z28 } from "zod";
|
|
91329
|
+
var CommentCheckerConfigSchema = z28.object({
|
|
91330
|
+
custom_prompt: z28.string().optional()
|
|
91357
91331
|
});
|
|
91358
91332
|
// packages/omo-opencode/src/config/schema/commands.ts
|
|
91359
|
-
import { z as
|
|
91360
|
-
var BuiltinCommandNameSchema =
|
|
91333
|
+
import { z as z29 } from "zod";
|
|
91334
|
+
var BuiltinCommandNameSchema = z29.enum([
|
|
91361
91335
|
"goal",
|
|
91362
91336
|
"refactor",
|
|
91363
91337
|
"ulw-execute",
|
|
@@ -91366,21 +91340,21 @@ var BuiltinCommandNameSchema = z30.enum([
|
|
|
91366
91340
|
"hyperplan"
|
|
91367
91341
|
]);
|
|
91368
91342
|
// packages/omo-opencode/src/config/schema/default-mode.ts
|
|
91369
|
-
import { z as
|
|
91370
|
-
var DefaultModeConfigSchema =
|
|
91371
|
-
ultrawork:
|
|
91372
|
-
goal:
|
|
91343
|
+
import { z as z30 } from "zod";
|
|
91344
|
+
var DefaultModeConfigSchema = z30.object({
|
|
91345
|
+
ultrawork: z30.boolean().default(false),
|
|
91346
|
+
goal: z30.boolean().default(false)
|
|
91373
91347
|
});
|
|
91374
91348
|
// packages/omo-opencode/src/config/schema/dynamic-context-pruning.ts
|
|
91375
|
-
import { z as
|
|
91376
|
-
var DynamicContextPruningConfigSchema =
|
|
91377
|
-
enabled:
|
|
91378
|
-
notification:
|
|
91379
|
-
turn_protection:
|
|
91380
|
-
enabled:
|
|
91381
|
-
turns:
|
|
91349
|
+
import { z as z31 } from "zod";
|
|
91350
|
+
var DynamicContextPruningConfigSchema = z31.object({
|
|
91351
|
+
enabled: z31.boolean().default(false),
|
|
91352
|
+
notification: z31.enum(["off", "minimal", "detailed"]).default("detailed"),
|
|
91353
|
+
turn_protection: z31.object({
|
|
91354
|
+
enabled: z31.boolean().default(true),
|
|
91355
|
+
turns: z31.number().min(1).max(10).default(3)
|
|
91382
91356
|
}).optional(),
|
|
91383
|
-
protected_tools:
|
|
91357
|
+
protected_tools: z31.array(z31.string()).default([
|
|
91384
91358
|
"task",
|
|
91385
91359
|
"todowrite",
|
|
91386
91360
|
"todoread",
|
|
@@ -91389,45 +91363,45 @@ var DynamicContextPruningConfigSchema = z32.object({
|
|
|
91389
91363
|
"session_write",
|
|
91390
91364
|
"session_search"
|
|
91391
91365
|
]),
|
|
91392
|
-
strategies:
|
|
91393
|
-
deduplication:
|
|
91394
|
-
enabled:
|
|
91366
|
+
strategies: z31.object({
|
|
91367
|
+
deduplication: z31.object({
|
|
91368
|
+
enabled: z31.boolean().default(true)
|
|
91395
91369
|
}).optional(),
|
|
91396
|
-
supersede_writes:
|
|
91397
|
-
enabled:
|
|
91398
|
-
aggressive:
|
|
91370
|
+
supersede_writes: z31.object({
|
|
91371
|
+
enabled: z31.boolean().default(true),
|
|
91372
|
+
aggressive: z31.boolean().default(false)
|
|
91399
91373
|
}).optional(),
|
|
91400
|
-
purge_errors:
|
|
91401
|
-
enabled:
|
|
91402
|
-
turns:
|
|
91374
|
+
purge_errors: z31.object({
|
|
91375
|
+
enabled: z31.boolean().default(true),
|
|
91376
|
+
turns: z31.number().min(1).max(20).default(5)
|
|
91403
91377
|
}).optional()
|
|
91404
91378
|
}).optional()
|
|
91405
91379
|
});
|
|
91406
91380
|
// packages/omo-opencode/src/config/schema/experimental.ts
|
|
91407
|
-
import { z as
|
|
91408
|
-
var ExperimentalConfigSchema =
|
|
91409
|
-
aggressive_truncation:
|
|
91410
|
-
preemptive_compaction:
|
|
91411
|
-
truncate_all_tool_outputs:
|
|
91381
|
+
import { z as z32 } from "zod";
|
|
91382
|
+
var ExperimentalConfigSchema = z32.object({
|
|
91383
|
+
aggressive_truncation: z32.boolean().optional(),
|
|
91384
|
+
preemptive_compaction: z32.boolean().optional(),
|
|
91385
|
+
truncate_all_tool_outputs: z32.boolean().optional(),
|
|
91412
91386
|
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
91413
|
-
task_system:
|
|
91414
|
-
plugin_load_timeout_ms:
|
|
91415
|
-
safe_hook_creation:
|
|
91416
|
-
disable_omo_env:
|
|
91417
|
-
hashline_edit:
|
|
91418
|
-
model_fallback_title:
|
|
91419
|
-
max_tools:
|
|
91420
|
-
disable_live_parent_wake_routing:
|
|
91387
|
+
task_system: z32.boolean().optional(),
|
|
91388
|
+
plugin_load_timeout_ms: z32.number().min(1000).optional(),
|
|
91389
|
+
safe_hook_creation: z32.boolean().optional(),
|
|
91390
|
+
disable_omo_env: z32.boolean().optional(),
|
|
91391
|
+
hashline_edit: z32.boolean().optional(),
|
|
91392
|
+
model_fallback_title: z32.boolean().optional(),
|
|
91393
|
+
max_tools: z32.number().int().min(1).optional(),
|
|
91394
|
+
disable_live_parent_wake_routing: z32.boolean().optional()
|
|
91421
91395
|
});
|
|
91422
91396
|
// packages/omo-opencode/src/config/schema/goal.ts
|
|
91423
|
-
import { z as
|
|
91424
|
-
var GoalConfigSchema =
|
|
91425
|
-
enabled:
|
|
91426
|
-
auto_start:
|
|
91427
|
-
default_max_iterations:
|
|
91397
|
+
import { z as z33 } from "zod";
|
|
91398
|
+
var GoalConfigSchema = z33.object({
|
|
91399
|
+
enabled: z33.boolean().default(false),
|
|
91400
|
+
auto_start: z33.boolean().default(false),
|
|
91401
|
+
default_max_iterations: z33.number().min(1).max(1000).default(100)
|
|
91428
91402
|
});
|
|
91429
91403
|
// packages/skills-loader-core/src/config/git-env-prefix.ts
|
|
91430
|
-
import { z as
|
|
91404
|
+
import { z as z34 } from "zod";
|
|
91431
91405
|
var GIT_ENV_ASSIGNMENT_PATTERN2 = /^(?:[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)(?: [A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)*$/;
|
|
91432
91406
|
var GIT_ENV_PREFIX_VALIDATION_MESSAGE = 'git_env_prefix must be empty or use shell-safe env assignments like "GIT_MASTER=1"';
|
|
91433
91407
|
function isValidGitEnvPrefix(value) {
|
|
@@ -91442,17 +91416,17 @@ function assertValidGitEnvPrefix(value) {
|
|
|
91442
91416
|
}
|
|
91443
91417
|
return value;
|
|
91444
91418
|
}
|
|
91445
|
-
var GitEnvPrefixSchema2 =
|
|
91419
|
+
var GitEnvPrefixSchema2 = z34.string().refine(isValidGitEnvPrefix, { message: GIT_ENV_PREFIX_VALIDATION_MESSAGE }).default("GIT_MASTER=1");
|
|
91446
91420
|
// packages/omo-opencode/src/config/schema/git-master.ts
|
|
91447
|
-
import { z as
|
|
91448
|
-
var GitMasterConfigSchema =
|
|
91449
|
-
commit_footer:
|
|
91450
|
-
include_co_authored_by:
|
|
91421
|
+
import { z as z35 } from "zod";
|
|
91422
|
+
var GitMasterConfigSchema = z35.object({
|
|
91423
|
+
commit_footer: z35.union([z35.boolean(), z35.string()]).default(false),
|
|
91424
|
+
include_co_authored_by: z35.boolean().default(true),
|
|
91451
91425
|
git_env_prefix: GitEnvPrefixSchema2
|
|
91452
91426
|
});
|
|
91453
91427
|
// packages/omo-opencode/src/config/schema/hooks.ts
|
|
91454
|
-
import { z as
|
|
91455
|
-
var HookNameSchema =
|
|
91428
|
+
import { z as z36 } from "zod";
|
|
91429
|
+
var HookNameSchema = z36.enum([
|
|
91456
91430
|
"todo-continuation-enforcer",
|
|
91457
91431
|
"session-notification",
|
|
91458
91432
|
"comment-checker",
|
|
@@ -91511,240 +91485,240 @@ var HookNameSchema = z37.enum([
|
|
|
91511
91485
|
"native-edition-nudge"
|
|
91512
91486
|
]);
|
|
91513
91487
|
// packages/omo-opencode/src/config/schema/i18n.ts
|
|
91514
|
-
import { z as
|
|
91515
|
-
var I18nConfigSchema =
|
|
91516
|
-
locale:
|
|
91488
|
+
import { z as z37 } from "zod";
|
|
91489
|
+
var I18nConfigSchema = z37.object({
|
|
91490
|
+
locale: z37.string().optional()
|
|
91517
91491
|
});
|
|
91518
91492
|
// packages/omo-opencode/src/config/schema/keyword-detector.ts
|
|
91519
|
-
import { z as
|
|
91520
|
-
var KeywordTypeSchema =
|
|
91521
|
-
var KeywordDetectorConfigSchema =
|
|
91522
|
-
enabled_expansions:
|
|
91523
|
-
disabled_keywords:
|
|
91493
|
+
import { z as z38 } from "zod";
|
|
91494
|
+
var KeywordTypeSchema = z38.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
|
|
91495
|
+
var KeywordDetectorConfigSchema = z38.object({
|
|
91496
|
+
enabled_expansions: z38.array(KeywordTypeSchema).optional(),
|
|
91497
|
+
disabled_keywords: z38.array(KeywordTypeSchema).optional()
|
|
91524
91498
|
});
|
|
91525
91499
|
// packages/omo-opencode/src/config/schema/model-capabilities.ts
|
|
91526
|
-
import { z as
|
|
91527
|
-
var ModelCapabilitiesConfigSchema =
|
|
91528
|
-
enabled:
|
|
91529
|
-
auto_refresh_on_start:
|
|
91530
|
-
refresh_timeout_ms:
|
|
91531
|
-
source_url:
|
|
91500
|
+
import { z as z39 } from "zod";
|
|
91501
|
+
var ModelCapabilitiesConfigSchema = z39.object({
|
|
91502
|
+
enabled: z39.boolean().optional(),
|
|
91503
|
+
auto_refresh_on_start: z39.boolean().optional(),
|
|
91504
|
+
refresh_timeout_ms: z39.number().int().positive().optional(),
|
|
91505
|
+
source_url: z39.string().url().optional()
|
|
91532
91506
|
});
|
|
91533
91507
|
// packages/omo-opencode/src/config/schema/notification.ts
|
|
91534
|
-
import { z as
|
|
91535
|
-
var NotificationConfigSchema =
|
|
91536
|
-
force_enable:
|
|
91508
|
+
import { z as z40 } from "zod";
|
|
91509
|
+
var NotificationConfigSchema = z40.object({
|
|
91510
|
+
force_enable: z40.boolean().optional()
|
|
91537
91511
|
});
|
|
91538
91512
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
91539
|
-
import { z as
|
|
91513
|
+
import { z as z54 } from "zod";
|
|
91540
91514
|
|
|
91541
91515
|
// packages/omo-opencode/src/mcp/types.ts
|
|
91542
|
-
import { z as
|
|
91543
|
-
var McpNameSchema =
|
|
91544
|
-
var AnyMcpNameSchema =
|
|
91516
|
+
import { z as z41 } from "zod";
|
|
91517
|
+
var McpNameSchema = z41.enum(["websearch", "context7", "grep_app", "lsp"]);
|
|
91518
|
+
var AnyMcpNameSchema = z41.string().min(1);
|
|
91545
91519
|
|
|
91546
91520
|
// packages/omo-opencode/src/config/schema/agent-definitions.ts
|
|
91547
|
-
import { z as
|
|
91548
|
-
var AgentDefinitionPathSchema =
|
|
91549
|
-
var AgentDefinitionsConfigSchema =
|
|
91521
|
+
import { z as z42 } from "zod";
|
|
91522
|
+
var AgentDefinitionPathSchema = z42.string().min(1);
|
|
91523
|
+
var AgentDefinitionsConfigSchema = z42.array(AgentDefinitionPathSchema).optional();
|
|
91550
91524
|
|
|
91551
91525
|
// packages/omo-opencode/src/config/schema/openclaw.ts
|
|
91552
|
-
import { z as
|
|
91553
|
-
var OpenClawGatewaySchema =
|
|
91554
|
-
type:
|
|
91555
|
-
url:
|
|
91556
|
-
method:
|
|
91557
|
-
headers:
|
|
91558
|
-
command:
|
|
91559
|
-
timeout:
|
|
91526
|
+
import { z as z43 } from "zod";
|
|
91527
|
+
var OpenClawGatewaySchema = z43.object({
|
|
91528
|
+
type: z43.enum(["http", "command"]).default("http"),
|
|
91529
|
+
url: z43.string().optional(),
|
|
91530
|
+
method: z43.string().default("POST"),
|
|
91531
|
+
headers: z43.record(z43.string(), z43.string()).optional(),
|
|
91532
|
+
command: z43.string().optional(),
|
|
91533
|
+
timeout: z43.number().optional()
|
|
91560
91534
|
});
|
|
91561
|
-
var OpenClawHookSchema =
|
|
91562
|
-
enabled:
|
|
91563
|
-
gateway:
|
|
91564
|
-
instruction:
|
|
91535
|
+
var OpenClawHookSchema = z43.object({
|
|
91536
|
+
enabled: z43.boolean().default(true),
|
|
91537
|
+
gateway: z43.string(),
|
|
91538
|
+
instruction: z43.string()
|
|
91565
91539
|
});
|
|
91566
|
-
var OpenClawReplyListenerConfigSchema =
|
|
91567
|
-
discordBotToken:
|
|
91568
|
-
discordChannelId:
|
|
91569
|
-
discordMention:
|
|
91570
|
-
authorizedDiscordUserIds:
|
|
91571
|
-
telegramBotToken:
|
|
91572
|
-
telegramChatId:
|
|
91573
|
-
pollIntervalMs:
|
|
91574
|
-
rateLimitPerMinute:
|
|
91575
|
-
maxMessageLength:
|
|
91576
|
-
includePrefix:
|
|
91540
|
+
var OpenClawReplyListenerConfigSchema = z43.object({
|
|
91541
|
+
discordBotToken: z43.string().optional(),
|
|
91542
|
+
discordChannelId: z43.string().optional(),
|
|
91543
|
+
discordMention: z43.string().optional(),
|
|
91544
|
+
authorizedDiscordUserIds: z43.array(z43.string()).default([]),
|
|
91545
|
+
telegramBotToken: z43.string().optional(),
|
|
91546
|
+
telegramChatId: z43.string().optional(),
|
|
91547
|
+
pollIntervalMs: z43.number().default(3000),
|
|
91548
|
+
rateLimitPerMinute: z43.number().default(10),
|
|
91549
|
+
maxMessageLength: z43.number().default(500),
|
|
91550
|
+
includePrefix: z43.boolean().default(true)
|
|
91577
91551
|
});
|
|
91578
|
-
var OpenClawConfigSchema =
|
|
91579
|
-
enabled:
|
|
91580
|
-
gateways:
|
|
91581
|
-
hooks:
|
|
91552
|
+
var OpenClawConfigSchema = z43.object({
|
|
91553
|
+
enabled: z43.boolean().default(false),
|
|
91554
|
+
gateways: z43.record(z43.string(), OpenClawGatewaySchema).default({}),
|
|
91555
|
+
hooks: z43.record(z43.string(), OpenClawHookSchema).default({}),
|
|
91582
91556
|
replyListener: OpenClawReplyListenerConfigSchema.optional()
|
|
91583
91557
|
});
|
|
91584
91558
|
|
|
91585
91559
|
// packages/omo-opencode/src/config/schema/monitor.ts
|
|
91586
|
-
import { z as
|
|
91587
|
-
var MonitorConfigSchema =
|
|
91588
|
-
enabled:
|
|
91589
|
-
live_mode_enabled:
|
|
91590
|
-
allowed_commands:
|
|
91591
|
-
max_monitors_per_session:
|
|
91592
|
-
max_runtime_ms:
|
|
91593
|
-
batch_max_lines:
|
|
91594
|
-
batch_max_bytes:
|
|
91595
|
-
flush_interval_ms:
|
|
91596
|
-
ring_max_lines:
|
|
91597
|
-
line_max_bytes:
|
|
91598
|
-
pattern_max_length:
|
|
91560
|
+
import { z as z44 } from "zod";
|
|
91561
|
+
var MonitorConfigSchema = z44.object({
|
|
91562
|
+
enabled: z44.boolean().default(false),
|
|
91563
|
+
live_mode_enabled: z44.boolean().default(false),
|
|
91564
|
+
allowed_commands: z44.array(z44.string()).optional(),
|
|
91565
|
+
max_monitors_per_session: z44.number().int().min(1).max(16).default(3),
|
|
91566
|
+
max_runtime_ms: z44.number().int().min(1000).default(1800000),
|
|
91567
|
+
batch_max_lines: z44.number().int().min(1).default(50),
|
|
91568
|
+
batch_max_bytes: z44.number().int().min(1024).default(16384),
|
|
91569
|
+
flush_interval_ms: z44.number().int().min(250).default(1000),
|
|
91570
|
+
ring_max_lines: z44.number().int().min(1).default(1000),
|
|
91571
|
+
line_max_bytes: z44.number().int().min(256).default(8192),
|
|
91572
|
+
pattern_max_length: z44.number().int().min(1).default(512)
|
|
91599
91573
|
});
|
|
91600
91574
|
|
|
91601
91575
|
// packages/omo-opencode/src/config/schema/runtime-fallback.ts
|
|
91602
|
-
import { z as
|
|
91603
|
-
var RuntimeFallbackConfigSchema =
|
|
91604
|
-
enabled:
|
|
91605
|
-
retry_on_errors:
|
|
91606
|
-
max_fallback_attempts:
|
|
91607
|
-
cooldown_seconds:
|
|
91608
|
-
timeout_seconds:
|
|
91609
|
-
notify_on_fallback:
|
|
91610
|
-
restore_primary_after_cooldown:
|
|
91576
|
+
import { z as z45 } from "zod";
|
|
91577
|
+
var RuntimeFallbackConfigSchema = z45.object({
|
|
91578
|
+
enabled: z45.boolean().optional(),
|
|
91579
|
+
retry_on_errors: z45.array(z45.number()).optional(),
|
|
91580
|
+
max_fallback_attempts: z45.number().min(1).max(20).optional(),
|
|
91581
|
+
cooldown_seconds: z45.number().min(0).optional(),
|
|
91582
|
+
timeout_seconds: z45.number().min(0).optional(),
|
|
91583
|
+
notify_on_fallback: z45.boolean().optional(),
|
|
91584
|
+
restore_primary_after_cooldown: z45.boolean().optional()
|
|
91611
91585
|
});
|
|
91612
91586
|
|
|
91613
91587
|
// packages/team-core/src/config.ts
|
|
91614
|
-
import * as
|
|
91615
|
-
var TeamModeConfigSchema =
|
|
91616
|
-
enabled:
|
|
91617
|
-
tmux_visualization:
|
|
91618
|
-
max_parallel_members:
|
|
91619
|
-
max_members:
|
|
91620
|
-
max_messages_per_run:
|
|
91621
|
-
max_wall_clock_minutes:
|
|
91622
|
-
max_member_turns:
|
|
91623
|
-
base_dir:
|
|
91624
|
-
message_payload_max_bytes:
|
|
91625
|
-
recipient_unread_max_bytes:
|
|
91626
|
-
mailbox_poll_interval_ms:
|
|
91588
|
+
import * as z46 from "zod";
|
|
91589
|
+
var TeamModeConfigSchema = z46.object({
|
|
91590
|
+
enabled: z46.boolean().default(false),
|
|
91591
|
+
tmux_visualization: z46.boolean().default(false),
|
|
91592
|
+
max_parallel_members: z46.number().int().min(1).max(8).default(4),
|
|
91593
|
+
max_members: z46.number().int().min(1).max(8).default(8),
|
|
91594
|
+
max_messages_per_run: z46.number().int().min(1).default(1e4),
|
|
91595
|
+
max_wall_clock_minutes: z46.number().int().min(1).default(120),
|
|
91596
|
+
max_member_turns: z46.number().int().min(1).default(500),
|
|
91597
|
+
base_dir: z46.string().optional(),
|
|
91598
|
+
message_payload_max_bytes: z46.number().int().min(1024).default(32768),
|
|
91599
|
+
recipient_unread_max_bytes: z46.number().int().min(1024).default(262144),
|
|
91600
|
+
mailbox_poll_interval_ms: z46.number().int().min(500).default(3000)
|
|
91627
91601
|
});
|
|
91628
91602
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
91629
|
-
import { z as
|
|
91630
|
-
var SkillSourceSchema =
|
|
91631
|
-
|
|
91632
|
-
|
|
91633
|
-
path:
|
|
91634
|
-
recursive:
|
|
91635
|
-
glob:
|
|
91603
|
+
import { z as z47 } from "zod";
|
|
91604
|
+
var SkillSourceSchema = z47.union([
|
|
91605
|
+
z47.string(),
|
|
91606
|
+
z47.object({
|
|
91607
|
+
path: z47.string(),
|
|
91608
|
+
recursive: z47.boolean().optional(),
|
|
91609
|
+
glob: z47.string().optional()
|
|
91636
91610
|
})
|
|
91637
91611
|
]);
|
|
91638
|
-
var SkillDefinitionSchema =
|
|
91639
|
-
description:
|
|
91640
|
-
template:
|
|
91641
|
-
from:
|
|
91642
|
-
model:
|
|
91643
|
-
agent:
|
|
91644
|
-
subtask:
|
|
91645
|
-
"argument-hint":
|
|
91646
|
-
license:
|
|
91647
|
-
compatibility:
|
|
91648
|
-
metadata:
|
|
91649
|
-
"allowed-tools":
|
|
91650
|
-
disable:
|
|
91612
|
+
var SkillDefinitionSchema = z47.object({
|
|
91613
|
+
description: z47.string().optional(),
|
|
91614
|
+
template: z47.string().optional(),
|
|
91615
|
+
from: z47.string().optional(),
|
|
91616
|
+
model: z47.string().optional(),
|
|
91617
|
+
agent: z47.string().optional(),
|
|
91618
|
+
subtask: z47.boolean().optional(),
|
|
91619
|
+
"argument-hint": z47.string().optional(),
|
|
91620
|
+
license: z47.string().optional(),
|
|
91621
|
+
compatibility: z47.string().optional(),
|
|
91622
|
+
metadata: z47.record(z47.string(), z47.unknown()).optional(),
|
|
91623
|
+
"allowed-tools": z47.array(z47.string()).optional(),
|
|
91624
|
+
disable: z47.boolean().optional()
|
|
91651
91625
|
});
|
|
91652
|
-
var SkillEntrySchema =
|
|
91653
|
-
var SkillsConfigSchema =
|
|
91654
|
-
|
|
91655
|
-
|
|
91656
|
-
sources:
|
|
91657
|
-
enable:
|
|
91658
|
-
disable:
|
|
91626
|
+
var SkillEntrySchema = z47.union([z47.boolean(), SkillDefinitionSchema]);
|
|
91627
|
+
var SkillsConfigSchema = z47.union([
|
|
91628
|
+
z47.array(z47.string()),
|
|
91629
|
+
z47.object({
|
|
91630
|
+
sources: z47.array(SkillSourceSchema).optional(),
|
|
91631
|
+
enable: z47.array(z47.string()).optional(),
|
|
91632
|
+
disable: z47.array(z47.string()).optional()
|
|
91659
91633
|
}).catchall(SkillEntrySchema)
|
|
91660
91634
|
]);
|
|
91661
91635
|
|
|
91662
91636
|
// packages/omo-opencode/src/config/schema/sisyphus.ts
|
|
91663
|
-
import { z as
|
|
91664
|
-
var SisyphusTasksConfigSchema =
|
|
91665
|
-
storage_path:
|
|
91666
|
-
task_list_id:
|
|
91667
|
-
claude_code_compat:
|
|
91637
|
+
import { z as z48 } from "zod";
|
|
91638
|
+
var SisyphusTasksConfigSchema = z48.object({
|
|
91639
|
+
storage_path: z48.string().optional(),
|
|
91640
|
+
task_list_id: z48.string().optional(),
|
|
91641
|
+
claude_code_compat: z48.boolean().default(false)
|
|
91668
91642
|
});
|
|
91669
|
-
var SisyphusConfigSchema =
|
|
91643
|
+
var SisyphusConfigSchema = z48.object({
|
|
91670
91644
|
tasks: SisyphusTasksConfigSchema.optional()
|
|
91671
91645
|
});
|
|
91672
91646
|
|
|
91673
91647
|
// packages/omo-opencode/src/config/schema/sisyphus-agent.ts
|
|
91674
|
-
import { z as
|
|
91675
|
-
var SisyphusAgentConfigSchema =
|
|
91676
|
-
disabled:
|
|
91677
|
-
default_builder_enabled:
|
|
91678
|
-
planner_enabled:
|
|
91679
|
-
replace_plan:
|
|
91680
|
-
tdd:
|
|
91648
|
+
import { z as z49 } from "zod";
|
|
91649
|
+
var SisyphusAgentConfigSchema = z49.object({
|
|
91650
|
+
disabled: z49.boolean().optional(),
|
|
91651
|
+
default_builder_enabled: z49.boolean().optional(),
|
|
91652
|
+
planner_enabled: z49.boolean().optional(),
|
|
91653
|
+
replace_plan: z49.boolean().optional(),
|
|
91654
|
+
tdd: z49.boolean().default(true).optional()
|
|
91681
91655
|
});
|
|
91682
91656
|
|
|
91683
91657
|
// packages/omo-opencode/src/config/schema/tmux.ts
|
|
91684
91658
|
init_src2();
|
|
91685
|
-
import { z as
|
|
91686
|
-
var TmuxLayoutSchema =
|
|
91687
|
-
var TmuxIsolationSchema =
|
|
91688
|
-
var TmuxConfigSchema =
|
|
91689
|
-
enabled:
|
|
91659
|
+
import { z as z50 } from "zod";
|
|
91660
|
+
var TmuxLayoutSchema = z50.enum(TMUX_LAYOUT_VALUES);
|
|
91661
|
+
var TmuxIsolationSchema = z50.enum(TMUX_ISOLATION_VALUES);
|
|
91662
|
+
var TmuxConfigSchema = z50.object({
|
|
91663
|
+
enabled: z50.boolean().default(false),
|
|
91690
91664
|
layout: TmuxLayoutSchema.default("main-vertical"),
|
|
91691
|
-
main_pane_size:
|
|
91692
|
-
main_pane_min_width:
|
|
91693
|
-
agent_pane_min_width:
|
|
91665
|
+
main_pane_size: z50.number().min(20).max(80).default(60),
|
|
91666
|
+
main_pane_min_width: z50.number().min(40).default(120),
|
|
91667
|
+
agent_pane_min_width: z50.number().min(20).default(40),
|
|
91694
91668
|
isolation: TmuxIsolationSchema.default("inline")
|
|
91695
91669
|
});
|
|
91696
91670
|
|
|
91697
91671
|
// packages/omo-opencode/src/config/schema/tui.ts
|
|
91698
|
-
import { z as
|
|
91699
|
-
var TuiSidebarConfigSchema =
|
|
91700
|
-
enabled:
|
|
91672
|
+
import { z as z51 } from "zod";
|
|
91673
|
+
var TuiSidebarConfigSchema = z51.object({
|
|
91674
|
+
enabled: z51.boolean().default(true)
|
|
91701
91675
|
});
|
|
91702
|
-
var TuiConfigSchema =
|
|
91676
|
+
var TuiConfigSchema = z51.object({
|
|
91703
91677
|
sidebar: TuiSidebarConfigSchema.default({ enabled: true })
|
|
91704
91678
|
});
|
|
91705
91679
|
|
|
91706
91680
|
// packages/omo-opencode/src/config/schema/ulw-execute.ts
|
|
91707
|
-
import { z as
|
|
91708
|
-
var UlwExecuteConfigSchema =
|
|
91709
|
-
auto_commit:
|
|
91681
|
+
import { z as z52 } from "zod";
|
|
91682
|
+
var UlwExecuteConfigSchema = z52.object({
|
|
91683
|
+
auto_commit: z52.boolean().default(true)
|
|
91710
91684
|
});
|
|
91711
91685
|
|
|
91712
91686
|
// packages/omo-opencode/src/config/schema/websearch.ts
|
|
91713
|
-
import { z as
|
|
91714
|
-
var WebsearchProviderSchema =
|
|
91715
|
-
var WebsearchConfigSchema =
|
|
91687
|
+
import { z as z53 } from "zod";
|
|
91688
|
+
var WebsearchProviderSchema = z53.enum(["exa", "tavily"]);
|
|
91689
|
+
var WebsearchConfigSchema = z53.object({
|
|
91716
91690
|
provider: WebsearchProviderSchema.optional()
|
|
91717
91691
|
});
|
|
91718
91692
|
|
|
91719
91693
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
91720
|
-
var OhMyOpenCodeConfigSchema =
|
|
91721
|
-
$schema:
|
|
91722
|
-
new_task_system_enabled:
|
|
91723
|
-
default_run_agent:
|
|
91724
|
-
agent_order:
|
|
91694
|
+
var OhMyOpenCodeConfigSchema = z54.object({
|
|
91695
|
+
$schema: z54.string().optional(),
|
|
91696
|
+
new_task_system_enabled: z54.boolean().optional(),
|
|
91697
|
+
default_run_agent: z54.string().optional(),
|
|
91698
|
+
agent_order: z54.array(z54.string().max(128)).max(64).optional(),
|
|
91725
91699
|
agent_definitions: AgentDefinitionsConfigSchema,
|
|
91726
|
-
disabled_mcps:
|
|
91727
|
-
disabled_agents:
|
|
91728
|
-
disabled_skills:
|
|
91729
|
-
disabled_hooks:
|
|
91730
|
-
disabled_commands:
|
|
91731
|
-
disabled_tools:
|
|
91732
|
-
disabled_providers:
|
|
91733
|
-
mcp_env_allowlist:
|
|
91734
|
-
hashline_edit:
|
|
91735
|
-
telemetry:
|
|
91736
|
-
model_fallback:
|
|
91700
|
+
disabled_mcps: z54.array(AnyMcpNameSchema).optional(),
|
|
91701
|
+
disabled_agents: z54.array(z54.string()).optional(),
|
|
91702
|
+
disabled_skills: z54.array(z54.string()).optional(),
|
|
91703
|
+
disabled_hooks: z54.array(z54.string()).optional(),
|
|
91704
|
+
disabled_commands: z54.array(BuiltinCommandNameSchema).optional(),
|
|
91705
|
+
disabled_tools: z54.array(z54.string()).optional(),
|
|
91706
|
+
disabled_providers: z54.array(z54.string()).optional(),
|
|
91707
|
+
mcp_env_allowlist: z54.array(z54.string()).optional(),
|
|
91708
|
+
hashline_edit: z54.boolean().optional(),
|
|
91709
|
+
telemetry: z54.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable."),
|
|
91710
|
+
model_fallback: z54.boolean().optional(),
|
|
91737
91711
|
agents: AgentOverridesSchema.optional(),
|
|
91738
91712
|
categories: CategoriesConfigSchema.optional(),
|
|
91739
91713
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
91740
91714
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
91741
91715
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
91742
91716
|
experimental: ExperimentalConfigSchema.optional(),
|
|
91743
|
-
auto_update:
|
|
91717
|
+
auto_update: z54.boolean().optional(),
|
|
91744
91718
|
skills: SkillsConfigSchema.optional(),
|
|
91745
91719
|
goal: GoalConfigSchema.optional(),
|
|
91746
|
-
ralph_loop:
|
|
91747
|
-
runtime_fallback:
|
|
91720
|
+
ralph_loop: z54.record(z54.string(), z54.unknown()).optional(),
|
|
91721
|
+
runtime_fallback: z54.union([z54.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
91748
91722
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
91749
91723
|
notification: NotificationConfigSchema.optional(),
|
|
91750
91724
|
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
|
@@ -91767,7 +91741,7 @@ var OhMyOpenCodeConfigSchema = z55.object({
|
|
|
91767
91741
|
ulw_execute: UlwExecuteConfigSchema.optional(),
|
|
91768
91742
|
start_work: UlwExecuteConfigSchema.optional(),
|
|
91769
91743
|
default_mode: DefaultModeConfigSchema.optional(),
|
|
91770
|
-
_migrations:
|
|
91744
|
+
_migrations: z54.array(z54.string()).optional()
|
|
91771
91745
|
});
|
|
91772
91746
|
// packages/omo-opencode/src/config/prune-plugin-view.ts
|
|
91773
91747
|
var validatePluginRecord = (record) => {
|
|
@@ -95481,7 +95455,7 @@ function parseRuleFrontmatter2(content) {
|
|
|
95481
95455
|
}
|
|
95482
95456
|
// packages/rules-engine/src/matcher.ts
|
|
95483
95457
|
var import_picomatch2 = __toESM(require_picomatch2(), 1);
|
|
95484
|
-
import { createHash as
|
|
95458
|
+
import { createHash as createHash4 } from "crypto";
|
|
95485
95459
|
import { basename as basename13, relative as relative11 } from "path";
|
|
95486
95460
|
var matcherCache = new Map;
|
|
95487
95461
|
var MAX_MATCHER_CACHE_ENTRIES = 256;
|
|
@@ -95510,7 +95484,7 @@ function shouldApplyRule(metadata, currentFilePath, projectRoot) {
|
|
|
95510
95484
|
return { applies: false };
|
|
95511
95485
|
}
|
|
95512
95486
|
function createContentHash(content) {
|
|
95513
|
-
return
|
|
95487
|
+
return createHash4("sha256").update(content).digest("hex").slice(0, 16);
|
|
95514
95488
|
}
|
|
95515
95489
|
function isDuplicateByRealPath(realPath, cache) {
|
|
95516
95490
|
return cache.has(realPath);
|
|
@@ -103248,7 +103222,6 @@ function transformSubscriptionProviderRename(document) {
|
|
|
103248
103222
|
}
|
|
103249
103223
|
|
|
103250
103224
|
// packages/omo-opencode/src/config-migration/migration-plans.ts
|
|
103251
|
-
var DORI_SECTION_RENAME_MIGRATION_ID = "2026-10-dori-section-rename";
|
|
103252
103225
|
function backupTimestamp(value) {
|
|
103253
103226
|
return value ?? new Date().toISOString().replace(/[:.]/g, "-");
|
|
103254
103227
|
}
|
|
@@ -103350,18 +103323,6 @@ function subscriptionProviderRenamePlan(targetPath) {
|
|
|
103350
103323
|
transform: inspect
|
|
103351
103324
|
};
|
|
103352
103325
|
}
|
|
103353
|
-
function doriSectionRenamePlan(targetPath, rename) {
|
|
103354
|
-
const inspect = (sources) => rename.transform(sources[0]?.value);
|
|
103355
|
-
return {
|
|
103356
|
-
id: DORI_SECTION_RENAME_MIGRATION_ID,
|
|
103357
|
-
inspect,
|
|
103358
|
-
mode: "replace-target",
|
|
103359
|
-
shouldRun: rename.shouldRun,
|
|
103360
|
-
sources: [],
|
|
103361
|
-
targetPath,
|
|
103362
|
-
transform: inspect
|
|
103363
|
-
};
|
|
103364
|
-
}
|
|
103365
103326
|
function existingOmoConfigPath(directory, options) {
|
|
103366
103327
|
const fileSystem = discoveryFileSystem(options);
|
|
103367
103328
|
for (const fileName of ["omo.jsonc", "omo.json"]) {
|
|
@@ -103423,7 +103384,6 @@ function createLegacyConfigMigrationPlans(options) {
|
|
|
103423
103384
|
addReasoningTarget(plan.targetPath);
|
|
103424
103385
|
const inPlaceTargets = [...reasoningTargets.values()];
|
|
103425
103386
|
return [
|
|
103426
|
-
...inPlaceTargets.map((targetPath) => doriSectionRenamePlan(targetPath, options.doriSectionRename)),
|
|
103427
103387
|
...legacyPlans,
|
|
103428
103388
|
...inPlaceTargets.map(reasoningPlan),
|
|
103429
103389
|
...inPlaceTargets.map(categoryDeepSplitPlan),
|
|
@@ -103431,12 +103391,6 @@ function createLegacyConfigMigrationPlans(options) {
|
|
|
103431
103391
|
...inPlaceTargets.map(subscriptionProviderRenamePlan)
|
|
103432
103392
|
];
|
|
103433
103393
|
}
|
|
103434
|
-
// packages/omo-opencode/src/config-migration/dori-section-rename.ts
|
|
103435
|
-
var doriSectionRename = {
|
|
103436
|
-
shouldRun: hasLegacyGatewaySection,
|
|
103437
|
-
transform: migrateLegacyDoriSection
|
|
103438
|
-
};
|
|
103439
|
-
|
|
103440
103394
|
// packages/omo-opencode/src/startup-migration.ts
|
|
103441
103395
|
function homeDirectory(options) {
|
|
103442
103396
|
const environment = options.environment ?? process.env;
|
|
@@ -103475,7 +103429,6 @@ function runOpenCodeStartupMigration(options) {
|
|
|
103475
103429
|
...options.backupTimestamp === undefined ? {} : { backupTimestamp: options.backupTimestamp },
|
|
103476
103430
|
cwd: options.cwd,
|
|
103477
103431
|
...options.discoveryFileSystem === undefined ? {} : { fileSystem: options.discoveryFileSystem },
|
|
103478
|
-
doriSectionRename,
|
|
103479
103432
|
environment: options.environment ?? process.env,
|
|
103480
103433
|
homeDir,
|
|
103481
103434
|
pathOperations: options.pathOperations ?? posix8,
|
|
@@ -107498,6 +107451,335 @@ The nudge fires at most once per work. If you missed it (compaction, restart), r
|
|
|
107498
107451
|
</boulder_completion_response>
|
|
107499
107452
|
`;
|
|
107500
107453
|
|
|
107454
|
+
// packages/prompts-core/prompts/atlas/kimi-k3-1.md
|
|
107455
|
+
var kimi_k3_1_default = `<role>
|
|
107456
|
+
You are Atlas, the master orchestrator from OhMyOpenCode, running on Kimi K3.1. You hold up the whole workflow \u2014 every agent, every task, every verification \u2014 until the plan is complete. Conductor, not musician; general, not soldier. You delegate, coordinate, and verify; you never write code yourself.
|
|
107457
|
+
|
|
107458
|
+
You are outcome-first by temperament. The dispatch decisions in this loop are mostly mechanical: a batch is parallel unless something names a blocker; a checkbox gets marked; a verification command runs. Make those calls directly and keep moving \u2014 do not enumerate alternative orderings or re-open a settled dispatch. Once the decisive fact is in your context \u2014 the dependency map, a verification result, the remaining checkbox count \u2014 stop analyzing and fire the next \`task()\` call; a turn that ends with "so I will dispatch..." without the actual calls is a failure mode. Save your analytical depth for where it changes the outcome: verifying a subagent's work, diagnosing a failure, reading a dependency. That split \u2014 fast on the mechanical, deep on verification \u2014 is how you orchestrate well.
|
|
107459
|
+
</role>
|
|
107460
|
+
|
|
107461
|
+
<mission>
|
|
107462
|
+
Complete ALL tasks in a work plan via \`task()\` and pass the Final Verification Wave. The implementation tasks are the means; Final Wave approval is the goal. Parallel by default, verify everything, auto-continue.
|
|
107463
|
+
</mission>
|
|
107464
|
+
|
|
107465
|
+
<Anti_Duplication>
|
|
107466
|
+
## Anti-Duplication Rule (CRITICAL)
|
|
107467
|
+
|
|
107468
|
+
Once you delegate exploration to explore/librarian agents, **DO NOT perform the same search yourself**.
|
|
107469
|
+
|
|
107470
|
+
### What this means:
|
|
107471
|
+
|
|
107472
|
+
**FORBIDDEN:**
|
|
107473
|
+
- After firing explore/librarian, manually grep/search for the same information
|
|
107474
|
+
- Re-doing the research the agents were just tasked with
|
|
107475
|
+
- "Just quickly checking" the same files the background agents are checking
|
|
107476
|
+
|
|
107477
|
+
**ALLOWED:**
|
|
107478
|
+
- Continue with **non-overlapping work** - work that doesn't depend on the delegated research
|
|
107479
|
+
- Work on unrelated parts of the codebase
|
|
107480
|
+
- Preparation work (e.g., setting up files, configs) that can proceed independently
|
|
107481
|
+
|
|
107482
|
+
### Wait for Results Properly:
|
|
107483
|
+
|
|
107484
|
+
When you need the delegated results but they're not ready:
|
|
107485
|
+
|
|
107486
|
+
1. **End your response** - do NOT continue with work that depends on those results
|
|
107487
|
+
2. **Wait for the completion notification** - the system will trigger your next turn
|
|
107488
|
+
3. **Then** collect results via \`background_output(task_id="bg_...")\`
|
|
107489
|
+
4. **Do NOT** impatiently re-search the same topics while waiting
|
|
107490
|
+
</Anti_Duplication>
|
|
107491
|
+
|
|
107492
|
+
<delegation_system>
|
|
107493
|
+
## How to Delegate
|
|
107494
|
+
|
|
107495
|
+
Use \`task()\` with EITHER category OR agent (mutually exclusive):
|
|
107496
|
+
|
|
107497
|
+
\`\`\`typescript
|
|
107498
|
+
// Option A: Category + Skills (spawns Sisyphus-Junior with domain config)
|
|
107499
|
+
task(
|
|
107500
|
+
category="[category-name]",
|
|
107501
|
+
load_skills=["skill-1", "skill-2"],
|
|
107502
|
+
run_in_background=false,
|
|
107503
|
+
prompt="..."
|
|
107504
|
+
)
|
|
107505
|
+
|
|
107506
|
+
// Option B: Specialized Agent (for specific expert tasks)
|
|
107507
|
+
task(
|
|
107508
|
+
subagent_type="[agent-name]",
|
|
107509
|
+
load_skills=[],
|
|
107510
|
+
run_in_background=false,
|
|
107511
|
+
prompt="..."
|
|
107512
|
+
)
|
|
107513
|
+
\`\`\`
|
|
107514
|
+
|
|
107515
|
+
{CATEGORY_SECTION}
|
|
107516
|
+
|
|
107517
|
+
{AGENT_SECTION}
|
|
107518
|
+
|
|
107519
|
+
{DECISION_MATRIX}
|
|
107520
|
+
|
|
107521
|
+
{SKILLS_SECTION}
|
|
107522
|
+
|
|
107523
|
+
{{CATEGORY_SKILLS_DELEGATION_GUIDE}}
|
|
107524
|
+
|
|
107525
|
+
## 6-Section Prompt Structure (MANDATORY)
|
|
107526
|
+
|
|
107527
|
+
Every \`task()\` prompt MUST include ALL 6 sections:
|
|
107528
|
+
|
|
107529
|
+
\`\`\`markdown
|
|
107530
|
+
## 1. TASK
|
|
107531
|
+
[Quote EXACT checkbox item. Be obsessively specific.]
|
|
107532
|
+
|
|
107533
|
+
## 2. EXPECTED OUTCOME
|
|
107534
|
+
- [ ] Files created/modified: [exact paths]
|
|
107535
|
+
- [ ] Functionality: [exact behavior]
|
|
107536
|
+
- [ ] Verification: \`[command]\` passes
|
|
107537
|
+
|
|
107538
|
+
## 3. REQUIRED TOOLS
|
|
107539
|
+
- [tool]: [what to search/check]
|
|
107540
|
+
- lsp_* (PRIMARY for symbols): lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_diagnostics for definitions, callers, and impact. Fall back to Read/Grep/Glob only for plain text.
|
|
107541
|
+
- context7: Look up [library] docs
|
|
107542
|
+
- ast-grep skill: Load the ast-grep skill for structural code search/rewrite. Use \`sg --pattern '[pattern]' --lang [lang]\` or \`python3 scripts/ast_grep_helper.py search\`.
|
|
107543
|
+
|
|
107544
|
+
## 4. MUST DO
|
|
107545
|
+
- Follow pattern in [reference file:lines]
|
|
107546
|
+
- Write tests for [specific cases]
|
|
107547
|
+
- Append findings to notepad (never overwrite)
|
|
107548
|
+
|
|
107549
|
+
## 5. MUST NOT DO
|
|
107550
|
+
- Do NOT modify files outside [scope]
|
|
107551
|
+
- Do NOT add dependencies
|
|
107552
|
+
- Do NOT skip verification
|
|
107553
|
+
|
|
107554
|
+
## 6. CONTEXT
|
|
107555
|
+
### Notepad Paths
|
|
107556
|
+
- READ: .omo/notepads/{plan-name}/*.md
|
|
107557
|
+
- WRITE: Append to appropriate category
|
|
107558
|
+
|
|
107559
|
+
### Inherited Wisdom
|
|
107560
|
+
[From notepad - conventions, gotchas, decisions]
|
|
107561
|
+
|
|
107562
|
+
### Dependencies
|
|
107563
|
+
[What previous tasks built]
|
|
107564
|
+
\`\`\`
|
|
107565
|
+
|
|
107566
|
+
A prompt under 30 lines is too short.
|
|
107567
|
+
</delegation_system>
|
|
107568
|
+
|
|
107569
|
+
<auto_continue>
|
|
107570
|
+
## Auto-Continue (STRICT)
|
|
107571
|
+
|
|
107572
|
+
Never ask the user "should I continue", "proceed to the next task", or any approval-style question between plan steps. The moment a delegation completes and passes verification, dispatch the next task. You pause for the user only when the plan itself needs clarification before execution, an external dependency beyond your control blocks you, or a critical failure stops all progress. This is core to your role, not optional.
|
|
107573
|
+
</auto_continue>
|
|
107574
|
+
|
|
107575
|
+
<parallel_by_default>
|
|
107576
|
+
## Parallel by Default
|
|
107577
|
+
|
|
107578
|
+
Your default mode is parallel fan-out; sequential is the exception. For every batch, the question is not "should I parallelize these?" \u2014 it is "what blocks me from firing all of them in ONE message?" The answer is a NAMED dependency, and only two kinds count:
|
|
107579
|
+
- **Input dependency**: Task B reads what Task A produced (a file, a value, a schema).
|
|
107580
|
+
- **File conflict**: Task A and Task B modify the same file.
|
|
107581
|
+
|
|
107582
|
+
Everything else fires in the same response \u2014 one message, multiple \`task()\` calls. Decide this once per batch and execute; do not re-open the choice mid-batch unless real evidence (a file conflict, an input dependency) appears.
|
|
107583
|
+
|
|
107584
|
+
\`\`\`typescript
|
|
107585
|
+
// CORRECT: 4 independent tasks \u2192 4 task() calls in ONE response
|
|
107586
|
+
task(category="quick", load_skills=[], run_in_background=false, prompt="...task A...")
|
|
107587
|
+
task(category="quick", load_skills=[], run_in_background=false, prompt="...task B...")
|
|
107588
|
+
task(category="quick", load_skills=[], run_in_background=false, prompt="...task C...")
|
|
107589
|
+
task(category="quick", load_skills=[], run_in_background=false, prompt="...task D...")
|
|
107590
|
+
\`\`\`
|
|
107591
|
+
|
|
107592
|
+
Background vs foreground: exploration (\`explore\`, \`librarian\`) runs \`run_in_background=true\`; task execution (\`category="..."\`) runs \`run_in_background=false\` and blocks for verification. Collect background results with \`background_output(task_id="bg_...")\`, continue a session with \`task(task_id="ses_...")\`, cancel disposable background tasks individually, and NEVER \`background_cancel(all=true)\` \u2014 it kills output you have not collected.
|
|
107593
|
+
</parallel_by_default>
|
|
107594
|
+
|
|
107595
|
+
<workflow>
|
|
107596
|
+
## Step 0: Register Tracking
|
|
107597
|
+
|
|
107598
|
+
\`\`\`
|
|
107599
|
+
TodoWrite([
|
|
107600
|
+
{ id: "orchestrate-plan", content: "Complete ALL implementation tasks", status: "in_progress", priority: "high" },
|
|
107601
|
+
{ id: "pass-final-wave", content: "Pass Final Verification Wave - ALL reviewers APPROVE", status: "pending", priority: "high" }
|
|
107602
|
+
])
|
|
107603
|
+
\`\`\`
|
|
107604
|
+
|
|
107605
|
+
## Step 1: Analyze Plan
|
|
107606
|
+
|
|
107607
|
+
1. Read the plan file ONCE.
|
|
107608
|
+
2. Parse actionable **top-level** task checkboxes in \`## TODOs\` and \`## Final Verification Wave\`. Ignore nested checkboxes under Acceptance Criteria, Evidence, Definition of Done, and Final Checklist.
|
|
107609
|
+
3. Build the dependency map ONCE: a task is SEQUENTIAL only if it has a NAMED dependency (input from another task or a shared file); everything else is PARALLEL. Do not re-evaluate this later.
|
|
107610
|
+
|
|
107611
|
+
Output one block, no alternatives enumerated:
|
|
107612
|
+
\`\`\`
|
|
107613
|
+
TASK ANALYSIS:
|
|
107614
|
+
- Total: [N], Remaining: [M]
|
|
107615
|
+
- Parallel batch: [list]
|
|
107616
|
+
- Sequential (with named dependency): [list with reason]
|
|
107617
|
+
\`\`\`
|
|
107618
|
+
|
|
107619
|
+
## Step 2: Notepad (auto-scaffolded)
|
|
107620
|
+
|
|
107621
|
+
\`/ulw-execute\` creates \`.omo/notepads/{plan-name}/\` with these files automatically:
|
|
107622
|
+
- \`learnings.md\` - Conventions, patterns
|
|
107623
|
+
- \`decisions.md\` - Architectural choices
|
|
107624
|
+
- \`issues.md\` - Problems, gotchas
|
|
107625
|
+
- \`problems.md\` - Unresolved blockers
|
|
107626
|
+
|
|
107627
|
+
If the directory is missing (e.g. plan predates auto-scaffold), create it with \`mkdir -p\`. Append findings after work; never overwrite.
|
|
107628
|
+
|
|
107629
|
+
## Step 3: Execute Tasks
|
|
107630
|
+
|
|
107631
|
+
### 3.1 Fan out
|
|
107632
|
+
|
|
107633
|
+
Every task without a NAMED blocker goes in the SAME response. Multiple \`task()\` calls in one turn is the expected shape, not the exception. Make the parallel/sequential call once per batch and execute.
|
|
107634
|
+
|
|
107635
|
+
### 3.2 Before each delegation
|
|
107636
|
+
|
|
107637
|
+
\`\`\`
|
|
107638
|
+
Read(".omo/notepads/{plan-name}/learnings.md")
|
|
107639
|
+
Read(".omo/notepads/{plan-name}/issues.md")
|
|
107640
|
+
\`\`\`
|
|
107641
|
+
|
|
107642
|
+
Cap notepad reads at the two above per dispatch. Include the extracted wisdom in every dispatched prompt under "Inherited Wisdom".
|
|
107643
|
+
|
|
107644
|
+
### 3.3 Invoke task() \u2014 parallel batch in one response
|
|
107645
|
+
|
|
107646
|
+
\`\`\`typescript
|
|
107647
|
+
task(category="...", load_skills=[...], run_in_background=false, prompt="[6-SECTION PROMPT]")
|
|
107648
|
+
task(category="...", load_skills=[...], run_in_background=false, prompt="[6-SECTION PROMPT]")
|
|
107649
|
+
task(category="...", load_skills=[...], run_in_background=false, prompt="[6-SECTION PROMPT]")
|
|
107650
|
+
\`\`\`
|
|
107651
|
+
|
|
107652
|
+
Three independent tasks \u2192 three calls in this response. Stop. Wait for results. Verify each.
|
|
107653
|
+
|
|
107654
|
+
### 3.4 Verify (MANDATORY \u2014 every delegation)
|
|
107655
|
+
|
|
107656
|
+
You are the QA gate, and subagents lie. Run the four phases below in order, stopping at the first failing phase to fix and resume. This is where your analytical depth belongs \u2014 spend it here.
|
|
107657
|
+
|
|
107658
|
+
#### A. Automated Verification
|
|
107659
|
+
1. \`lsp_diagnostics\` on the project \u2192 ZERO errors.
|
|
107660
|
+
2. The build command from the plan's "Success Criteria" \u2192 exit 0. If absent, examine the project root and run the standard build for that ecosystem.
|
|
107661
|
+
3. The test command from the plan's "Success Criteria" \u2192 ALL pass. If absent, run the standard test command for that ecosystem.
|
|
107662
|
+
|
|
107663
|
+
#### B. Manual Code Review
|
|
107664
|
+
1. \`Read\` EVERY file the subagent created or modified.
|
|
107665
|
+
2. For each file, check: does the logic implement the requirement; are there stubs, TODOs, placeholders, or hardcoded values; logic errors or missing edge cases; existing patterns followed; imports correct and complete.
|
|
107666
|
+
3. Cross-reference the subagent's claims against the actual code. If you cannot explain what every changed line does, you have not reviewed it.
|
|
107667
|
+
|
|
107668
|
+
#### C. Hands-On QA (if user-facing)
|
|
107669
|
+
- **Frontend/UI**: \`/playwright\`
|
|
107670
|
+
- **TUI/CLI**: \`interactive_bash\`
|
|
107671
|
+
- **API/Backend**: \`curl\`
|
|
107672
|
+
|
|
107673
|
+
#### D. Read the Plan File Directly
|
|
107674
|
+
|
|
107675
|
+
\`\`\`
|
|
107676
|
+
Read(".omo/plans/{plan-name}.md")
|
|
107677
|
+
\`\`\`
|
|
107678
|
+
|
|
107679
|
+
Count remaining **top-level task** checkboxes (ignore nested verification/evidence ones). This is ground truth. If verification fails, resume the SAME session via \`task_id\` \u2014 do not start fresh.
|
|
107680
|
+
|
|
107681
|
+
### 3.5 Handle Failures (use task_id, never give up)
|
|
107682
|
+
|
|
107683
|
+
\`\`\`typescript
|
|
107684
|
+
task(task_id="ses_xyz789", load_skills=[...], prompt="FAILED: {actual error}. Diagnosis: {what you observed}. Fix by: {specific instruction}")
|
|
107685
|
+
\`\`\`
|
|
107686
|
+
|
|
107687
|
+
A subagent reporting success when verification fails is wrong, not a "false positive" \u2014 that phrase is not valid here. There is no retry cap: diagnose, attach a plan, and resume the same session until verification passes. If a subagent loops on the same broken approach, spawn a new one with a different angle and the failed attempts as context. Never move on with a task unverified.
|
|
107688
|
+
|
|
107689
|
+
### 3.6 Loop Until Implementation Complete
|
|
107690
|
+
|
|
107691
|
+
Repeat Step 3 until all implementation tasks are complete, then proceed to Step 4.
|
|
107692
|
+
|
|
107693
|
+
## Step 4: Final Verification Wave
|
|
107694
|
+
|
|
107695
|
+
The plan's Final Wave tasks (F1-F4) are approval gates; each reviewer returns a VERDICT of APPROVE or REJECT. They can finish in parallel before you update the plan file, so do not rely on the raw unchecked count alone.
|
|
107696
|
+
|
|
107697
|
+
1. Execute ALL Final Wave tasks IN PARALLEL \u2014 fire F1, F2, F3, F4 in ONE response.
|
|
107698
|
+
2. If any verdict is REJECT, fix via \`task(task_id=...)\`, re-run that reviewer, and repeat until ALL APPROVE.
|
|
107699
|
+
3. Mark the \`pass-final-wave\` todo \`completed\`.
|
|
107700
|
+
|
|
107701
|
+
\`\`\`
|
|
107702
|
+
ORCHESTRATION COMPLETE - FINAL WAVE PASSED
|
|
107703
|
+
|
|
107704
|
+
TODO LIST: [path]
|
|
107705
|
+
COMPLETED: [N/N]
|
|
107706
|
+
FINAL WAVE: F1 [APPROVE] | F2 [APPROVE] | F3 [APPROVE] | F4 [APPROVE]
|
|
107707
|
+
FILES MODIFIED: [list]
|
|
107708
|
+
\`\`\`
|
|
107709
|
+
</workflow>
|
|
107710
|
+
|
|
107711
|
+
<notepad_protocol>
|
|
107712
|
+
## Notepad System
|
|
107713
|
+
|
|
107714
|
+
Subagents are stateless; the notepad is your cumulative intelligence. Before every delegation, read the notepad files, extract the relevant wisdom, and include it as "Inherited Wisdom" in the prompt. After every completion, instruct the subagent to append its findings (append only; use \`edit\` or bash \`>>\`, never \`write\` which is blocked, and never overwrite).
|
|
107715
|
+
|
|
107716
|
+
Format:
|
|
107717
|
+
\`\`\`markdown
|
|
107718
|
+
## [TIMESTAMP] Task: {task-id}
|
|
107719
|
+
{content}
|
|
107720
|
+
\`\`\`
|
|
107721
|
+
|
|
107722
|
+
Paths: the plan is \`.omo/plans/{plan-name}.md\` (you may EDIT it to mark checkboxes); the notepad is \`.omo/notepads/{plan-name}/\` (READ and APPEND).
|
|
107723
|
+
</notepad_protocol>
|
|
107724
|
+
|
|
107725
|
+
<boundaries>
|
|
107726
|
+
## What You Do vs Delegate
|
|
107727
|
+
|
|
107728
|
+
**You do**: read files (for context and verification), run commands (for verification), use lsp_diagnostics/grep/glob, manage todos, coordinate and verify, and EDIT \`.omo/plans/*.md\` to change \`- [ ]\` to \`- [x]\` after a verified completion.
|
|
107729
|
+
|
|
107730
|
+
**You delegate**: all code writing and editing, all bug fixes, all test creation, all documentation, all git operations.
|
|
107731
|
+
</boundaries>
|
|
107732
|
+
|
|
107733
|
+
<critical_overrides>
|
|
107734
|
+
## Critical Rules
|
|
107735
|
+
|
|
107736
|
+
**NEVER**: write or edit code yourself; trust a subagent's claim without verification; use \`run_in_background=true\` for task execution; send a prompt under 30 lines; skip \`lsp_diagnostics\` after a delegation; batch multiple tasks into one delegation prompt; start a fresh session for a failure (use \`task_id\`); default to sequential when no NAMED dependency exists; or re-open the parallel/sequential decision mid-batch without new evidence.
|
|
107737
|
+
|
|
107738
|
+
**ALWAYS**: default to parallel fan-out (one message, multiple \`task()\` calls); decide parallel vs sequential once per batch and commit; include all 6 sections in delegation prompts; read the notepad before every delegation; run \`lsp_diagnostics\` after every delegation; pass inherited wisdom to every subagent; verify with your own tools; store the continuation \`task_id\` (\`ses_...\`) from every delegation; and use \`task(task_id="ses_...", prompt="...")\` for retries, fixes, and follow-ups.
|
|
107739
|
+
</critical_overrides>
|
|
107740
|
+
|
|
107741
|
+
<post_delegation_rule>
|
|
107742
|
+
## Post-Delegation Rule (MANDATORY)
|
|
107743
|
+
|
|
107744
|
+
After every verified \`task()\` completion, before you call a new \`task()\`:
|
|
107745
|
+
|
|
107746
|
+
1. **Edit the plan checkbox**: change \`- [ ]\` to \`- [x]\` for the completed task in \`.omo/plans/{plan-name}.md\`.
|
|
107747
|
+
2. **Read the plan to confirm**: read \`.omo/plans/{plan-name}.md\` and verify the unchecked count dropped.
|
|
107748
|
+
|
|
107749
|
+
Skip this and you lose visibility into what remains.
|
|
107750
|
+
</post_delegation_rule>
|
|
107751
|
+
|
|
107752
|
+
<boulder_completion_response>
|
|
107753
|
+
## When the Boulder-Complete Nudge Arrives
|
|
107754
|
+
|
|
107755
|
+
The system injects ONE nudge into your session when every top-level checkbox in the active plan flips to \`- [x]\`. It carries the total elapsed time and a per-task breakdown, and you recognize it by "BOULDER COMPLETE" near the top of the injected message.
|
|
107756
|
+
|
|
107757
|
+
When you see it:
|
|
107758
|
+
|
|
107759
|
+
1. In your next turn, print the final orchestration summary in this exact shape:
|
|
107760
|
+
|
|
107761
|
+
\`\`\`
|
|
107762
|
+
ORCHESTRATION COMPLETE
|
|
107763
|
+
|
|
107764
|
+
PLAN: {plan-name}
|
|
107765
|
+
TOTAL ELAPSED: {total elapsed, human readable}
|
|
107766
|
+
TASKS COMPLETED: {N}/{N}
|
|
107767
|
+
|
|
107768
|
+
PER-TASK ELAPSED:
|
|
107769
|
+
- {label} {title}: {elapsed}
|
|
107770
|
+
- {label} {title}: {elapsed}
|
|
107771
|
+
|
|
107772
|
+
FINAL WAVE: F1 [...] | F2 [...] | F3 [...] | F4 [...]
|
|
107773
|
+
\`\`\`
|
|
107774
|
+
|
|
107775
|
+
2. Confirm via your tools that the active work in \`.omo/boulder.json\` now has \`status: "completed"\` and \`elapsed_ms\` populated. The hook calls \`completeBoulder()\` for you; you are reading state, not writing it.
|
|
107776
|
+
|
|
107777
|
+
3. Mark the \`pass-final-wave\` todo \`completed\` only after the Final Verification Wave reviewers all APPROVE. If the wave has not run, run it now in parallel; the nudge does not bypass it.
|
|
107778
|
+
|
|
107779
|
+
The nudge fires at most once per work. If you missed it (compaction, restart), read \`boulder.json\` yourself and compute the same summary from \`started_at\`, \`ended_at\`, and \`task_sessions[*].elapsed_ms\`.
|
|
107780
|
+
</boulder_completion_response>
|
|
107781
|
+
`;
|
|
107782
|
+
|
|
107501
107783
|
// packages/prompts-core/prompts/atlas/opus-4-7.md
|
|
107502
107784
|
var opus_4_7_default = `<identity>
|
|
107503
107785
|
You are Atlas - the Master Orchestrator from OhMyOpenCode, running on Claude Opus 4.7.
|
|
@@ -108012,6 +108294,11 @@ var atlasPromptVariants = {
|
|
|
108012
108294
|
content: gemini_default,
|
|
108013
108295
|
filePath: "packages/prompts-core/prompts/atlas/gemini.md"
|
|
108014
108296
|
},
|
|
108297
|
+
"kimi-k3-1": {
|
|
108298
|
+
kind: "bundled",
|
|
108299
|
+
content: kimi_k3_1_default,
|
|
108300
|
+
filePath: "packages/prompts-core/prompts/atlas/kimi-k3-1.md"
|
|
108301
|
+
},
|
|
108015
108302
|
"kimi-k3": {
|
|
108016
108303
|
kind: "bundled",
|
|
108017
108304
|
content: kimi_k3_default,
|
|
@@ -109186,6 +109473,7 @@ var PLANNER_AGENT_NAMES = new Set(["prometheus"]);
|
|
|
109186
109473
|
var MODEL_MATCHERS = {
|
|
109187
109474
|
gpt: isGptModel,
|
|
109188
109475
|
gemini: isGeminiModel,
|
|
109476
|
+
"kimi-k3-1": isKimiK31Model,
|
|
109189
109477
|
"kimi-k3": isKimiK3Model,
|
|
109190
109478
|
"swe-2": isSWE2Model,
|
|
109191
109479
|
"kimi-k2-7": isKimiK2CodeModel,
|
|
@@ -111136,35 +111424,35 @@ import { mkdirSync as mkdirSync18, readFileSync as readFileSync48, renameSync as
|
|
|
111136
111424
|
import { join as join96 } from "path";
|
|
111137
111425
|
|
|
111138
111426
|
// packages/omo-opencode/src/hooks/goal/types.ts
|
|
111139
|
-
import { z as
|
|
111427
|
+
import { z as z56 } from "zod";
|
|
111140
111428
|
var GOAL_STATUS_VALUES = ["active", "paused", "complete"];
|
|
111141
|
-
var GoalStatusSchema =
|
|
111142
|
-
var GoalSchema =
|
|
111143
|
-
id:
|
|
111144
|
-
sessionID:
|
|
111145
|
-
objective:
|
|
111429
|
+
var GoalStatusSchema = z56.enum(GOAL_STATUS_VALUES);
|
|
111430
|
+
var GoalSchema = z56.object({
|
|
111431
|
+
id: z56.string(),
|
|
111432
|
+
sessionID: z56.string(),
|
|
111433
|
+
objective: z56.string(),
|
|
111146
111434
|
status: GoalStatusSchema,
|
|
111147
|
-
tokensUsed:
|
|
111148
|
-
timeUsedSeconds:
|
|
111149
|
-
createdAt:
|
|
111150
|
-
updatedAt:
|
|
111151
|
-
lastStartedAt:
|
|
111152
|
-
completedAt:
|
|
111435
|
+
tokensUsed: z56.number().int().nonnegative(),
|
|
111436
|
+
timeUsedSeconds: z56.number().int().nonnegative(),
|
|
111437
|
+
createdAt: z56.number().int().nonnegative(),
|
|
111438
|
+
updatedAt: z56.number().int().nonnegative(),
|
|
111439
|
+
lastStartedAt: z56.number().int().nonnegative().optional(),
|
|
111440
|
+
completedAt: z56.number().int().nonnegative().optional()
|
|
111153
111441
|
});
|
|
111154
|
-
var GoalFileSchema =
|
|
111155
|
-
version:
|
|
111442
|
+
var GoalFileSchema = z56.object({
|
|
111443
|
+
version: z56.literal(1),
|
|
111156
111444
|
goal: GoalSchema.nullable()
|
|
111157
111445
|
});
|
|
111158
|
-
var GoalToolSnapshotSchema =
|
|
111159
|
-
sessionID:
|
|
111160
|
-
objective:
|
|
111446
|
+
var GoalToolSnapshotSchema = z56.object({
|
|
111447
|
+
sessionID: z56.string(),
|
|
111448
|
+
objective: z56.string(),
|
|
111161
111449
|
status: GoalStatusSchema,
|
|
111162
|
-
tokensUsed:
|
|
111163
|
-
timeUsedSeconds:
|
|
111164
|
-
createdAt:
|
|
111165
|
-
updatedAt:
|
|
111450
|
+
tokensUsed: z56.number().int().nonnegative(),
|
|
111451
|
+
timeUsedSeconds: z56.number().int().nonnegative(),
|
|
111452
|
+
createdAt: z56.number().int().nonnegative(),
|
|
111453
|
+
updatedAt: z56.number().int().nonnegative()
|
|
111166
111454
|
});
|
|
111167
|
-
var GoalToolResponseSchema =
|
|
111455
|
+
var GoalToolResponseSchema = z56.object({
|
|
111168
111456
|
goal: GoalToolSnapshotSchema.nullable()
|
|
111169
111457
|
});
|
|
111170
111458
|
|
|
@@ -127972,11 +128260,11 @@ function createMonitorStatusInjectorHook(monitorManager, config) {
|
|
|
127972
128260
|
import { resolve as resolve29 } from "path";
|
|
127973
128261
|
|
|
127974
128262
|
// node_modules/.bun/@opencode-ai+plugin@1.18.31+7445fc152a67980a/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
127975
|
-
import { z as
|
|
128263
|
+
import { z as z57 } from "zod";
|
|
127976
128264
|
function tool(input) {
|
|
127977
128265
|
return input;
|
|
127978
128266
|
}
|
|
127979
|
-
tool.schema =
|
|
128267
|
+
tool.schema = z57;
|
|
127980
128268
|
|
|
127981
128269
|
// packages/omo-opencode/src/shared/ripgrep-cli.ts
|
|
127982
128270
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
@@ -135437,7 +135725,10 @@ function createSkillMcpTool(options) {
|
|
|
135437
135725
|
switch (operation.type) {
|
|
135438
135726
|
case "tool": {
|
|
135439
135727
|
const result = await manager.callTool(info, context, operation.name, parsedArgs, cdpOptions);
|
|
135440
|
-
|
|
135728
|
+
if (result.isError === true) {
|
|
135729
|
+
throw new Error(`MCP tool "${operation.name}" failed: ${JSON.stringify(result, null, 2)}`);
|
|
135730
|
+
}
|
|
135731
|
+
output = JSON.stringify(result.structuredContent !== undefined ? result : result.content, null, 2);
|
|
135441
135732
|
break;
|
|
135442
135733
|
}
|
|
135443
135734
|
case "resource": {
|
|
@@ -142029,55 +142320,55 @@ function isExplicitSyncRun(runInBackground) {
|
|
|
142029
142320
|
import { join as join127 } from "path";
|
|
142030
142321
|
|
|
142031
142322
|
// packages/omo-opencode/src/tools/task/types.ts
|
|
142032
|
-
import { z as
|
|
142033
|
-
var TaskStatusSchema =
|
|
142034
|
-
var TaskObjectSchema =
|
|
142035
|
-
id:
|
|
142036
|
-
subject:
|
|
142037
|
-
description:
|
|
142323
|
+
import { z as z58 } from "zod";
|
|
142324
|
+
var TaskStatusSchema = z58.enum(["pending", "in_progress", "completed", "deleted"]);
|
|
142325
|
+
var TaskObjectSchema = z58.object({
|
|
142326
|
+
id: z58.string(),
|
|
142327
|
+
subject: z58.string(),
|
|
142328
|
+
description: z58.string(),
|
|
142038
142329
|
status: TaskStatusSchema,
|
|
142039
|
-
activeForm:
|
|
142040
|
-
blocks:
|
|
142041
|
-
blockedBy:
|
|
142042
|
-
owner:
|
|
142043
|
-
metadata:
|
|
142044
|
-
repoURL:
|
|
142045
|
-
parentID:
|
|
142046
|
-
threadID:
|
|
142330
|
+
activeForm: z58.string().optional(),
|
|
142331
|
+
blocks: z58.array(z58.string()).default([]),
|
|
142332
|
+
blockedBy: z58.array(z58.string()).default([]),
|
|
142333
|
+
owner: z58.string().optional(),
|
|
142334
|
+
metadata: z58.record(z58.string(), z58.unknown()).optional(),
|
|
142335
|
+
repoURL: z58.string().optional(),
|
|
142336
|
+
parentID: z58.string().optional(),
|
|
142337
|
+
threadID: z58.string()
|
|
142047
142338
|
}).strict();
|
|
142048
|
-
var TaskCreateInputSchema =
|
|
142049
|
-
subject:
|
|
142050
|
-
description:
|
|
142051
|
-
activeForm:
|
|
142052
|
-
blocks:
|
|
142053
|
-
blockedBy:
|
|
142054
|
-
owner:
|
|
142055
|
-
metadata:
|
|
142056
|
-
repoURL:
|
|
142057
|
-
parentID:
|
|
142339
|
+
var TaskCreateInputSchema = z58.object({
|
|
142340
|
+
subject: z58.string(),
|
|
142341
|
+
description: z58.string().optional(),
|
|
142342
|
+
activeForm: z58.string().optional(),
|
|
142343
|
+
blocks: z58.array(z58.string()).optional(),
|
|
142344
|
+
blockedBy: z58.array(z58.string()).optional(),
|
|
142345
|
+
owner: z58.string().optional(),
|
|
142346
|
+
metadata: z58.record(z58.string(), z58.unknown()).optional(),
|
|
142347
|
+
repoURL: z58.string().optional(),
|
|
142348
|
+
parentID: z58.string().optional()
|
|
142058
142349
|
});
|
|
142059
|
-
var TaskListInputSchema =
|
|
142350
|
+
var TaskListInputSchema = z58.object({
|
|
142060
142351
|
status: TaskStatusSchema.optional(),
|
|
142061
|
-
parentID:
|
|
142352
|
+
parentID: z58.string().optional()
|
|
142062
142353
|
});
|
|
142063
|
-
var TaskGetInputSchema =
|
|
142064
|
-
id:
|
|
142354
|
+
var TaskGetInputSchema = z58.object({
|
|
142355
|
+
id: z58.string()
|
|
142065
142356
|
});
|
|
142066
|
-
var TaskUpdateInputSchema =
|
|
142067
|
-
id:
|
|
142068
|
-
subject:
|
|
142069
|
-
description:
|
|
142357
|
+
var TaskUpdateInputSchema = z58.object({
|
|
142358
|
+
id: z58.string(),
|
|
142359
|
+
subject: z58.string().optional(),
|
|
142360
|
+
description: z58.string().optional(),
|
|
142070
142361
|
status: TaskStatusSchema.optional(),
|
|
142071
|
-
activeForm:
|
|
142072
|
-
addBlocks:
|
|
142073
|
-
addBlockedBy:
|
|
142074
|
-
owner:
|
|
142075
|
-
metadata:
|
|
142076
|
-
repoURL:
|
|
142077
|
-
parentID:
|
|
142362
|
+
activeForm: z58.string().optional(),
|
|
142363
|
+
addBlocks: z58.array(z58.string()).optional(),
|
|
142364
|
+
addBlockedBy: z58.array(z58.string()).optional(),
|
|
142365
|
+
owner: z58.string().optional(),
|
|
142366
|
+
metadata: z58.record(z58.string(), z58.unknown()).optional(),
|
|
142367
|
+
repoURL: z58.string().optional(),
|
|
142368
|
+
parentID: z58.string().optional()
|
|
142078
142369
|
});
|
|
142079
|
-
var TaskDeleteInputSchema =
|
|
142080
|
-
id:
|
|
142370
|
+
var TaskDeleteInputSchema = z58.object({
|
|
142371
|
+
id: z58.string()
|
|
142081
142372
|
});
|
|
142082
142373
|
|
|
142083
142374
|
// packages/omo-opencode/src/features/claude-tasks/storage.ts
|
|
@@ -142978,7 +143269,7 @@ function createHashlineEditTool(ctx) {
|
|
|
142978
143269
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
142979
143270
|
import { randomUUID as randomUUID11 } from "crypto";
|
|
142980
143271
|
init_logger2();
|
|
142981
|
-
import { z as
|
|
143272
|
+
import { z as z59 } from "zod";
|
|
142982
143273
|
|
|
142983
143274
|
// packages/team-core/src/team-mailbox/send.ts
|
|
142984
143275
|
init_paths();
|
|
@@ -143559,18 +143850,18 @@ async function resolveTeamRuntimeDetails(teamRunId, sessionID, config, deps) {
|
|
|
143559
143850
|
|
|
143560
143851
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
143561
143852
|
var MESSAGE_TOOL_KINDS = ["message", "announcement"];
|
|
143562
|
-
var TeamReferenceArgsSchema =
|
|
143563
|
-
path:
|
|
143564
|
-
description:
|
|
143853
|
+
var TeamReferenceArgsSchema = z59.object({
|
|
143854
|
+
path: z59.string().min(1),
|
|
143855
|
+
description: z59.string().optional()
|
|
143565
143856
|
});
|
|
143566
|
-
var TeamSendMessageArgsSchema =
|
|
143567
|
-
teamRunId:
|
|
143568
|
-
to:
|
|
143569
|
-
body:
|
|
143570
|
-
kind:
|
|
143571
|
-
correlationId:
|
|
143572
|
-
summary:
|
|
143573
|
-
references:
|
|
143857
|
+
var TeamSendMessageArgsSchema = z59.object({
|
|
143858
|
+
teamRunId: z59.string().min(1),
|
|
143859
|
+
to: z59.string().min(1),
|
|
143860
|
+
body: z59.string(),
|
|
143861
|
+
kind: z59.enum(MESSAGE_TOOL_KINDS).optional(),
|
|
143862
|
+
correlationId: z59.preprocess((value) => value === "" ? undefined : value, z59.uuid().optional()),
|
|
143863
|
+
summary: z59.string().optional(),
|
|
143864
|
+
references: z59.array(TeamReferenceArgsSchema).optional()
|
|
143574
143865
|
});
|
|
143575
143866
|
function createTeamSendMessageTool(config, client, deps = defaultTeamSendMessageToolDeps) {
|
|
143576
143867
|
return tool({
|
|
@@ -151602,7 +151893,7 @@ function createMonitorManager(options) {
|
|
|
151602
151893
|
return new MonitorManager(options);
|
|
151603
151894
|
}
|
|
151604
151895
|
// packages/mcp-client-core/src/mcp-oauth/storage.ts
|
|
151605
|
-
import { createHash as
|
|
151896
|
+
import { createHash as createHash6 } from "crypto";
|
|
151606
151897
|
import {
|
|
151607
151898
|
chmodSync as chmodSync4,
|
|
151608
151899
|
existsSync as existsSync103,
|
|
@@ -151690,7 +151981,7 @@ function getMcpOauthStorageDir() {
|
|
|
151690
151981
|
return join135(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
151691
151982
|
}
|
|
151692
151983
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
151693
|
-
return
|
|
151984
|
+
return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
151694
151985
|
}
|
|
151695
151986
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
151696
151987
|
return join135(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
@@ -151990,13 +152281,13 @@ async function findAvailablePort2(startPort = DEFAULT_PORT) {
|
|
|
151990
152281
|
|
|
151991
152282
|
// packages/mcp-client-core/src/mcp-oauth/oauth-authorization-flow.ts
|
|
151992
152283
|
import { spawn as spawn4 } from "child_process";
|
|
151993
|
-
import { createHash as
|
|
152284
|
+
import { createHash as createHash7, randomBytes as randomBytes2 } from "crypto";
|
|
151994
152285
|
import { createServer as createServer2 } from "http";
|
|
151995
152286
|
function generateCodeVerifier() {
|
|
151996
152287
|
return randomBytes2(32).toString("base64url");
|
|
151997
152288
|
}
|
|
151998
152289
|
function generateCodeChallenge(verifier) {
|
|
151999
|
-
return
|
|
152290
|
+
return createHash7("sha256").update(verifier).digest("base64url");
|
|
152000
152291
|
}
|
|
152001
152292
|
function buildAuthorizationUrl(authorizationEndpoint, options) {
|
|
152002
152293
|
const url = new URL(authorizationEndpoint);
|
|
@@ -152487,63 +152778,63 @@ function getLiteralValue(schema) {
|
|
|
152487
152778
|
}
|
|
152488
152779
|
|
|
152489
152780
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.32.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
152490
|
-
import * as
|
|
152781
|
+
import * as z60 from "zod/v4";
|
|
152491
152782
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
152492
152783
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
152493
152784
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
152494
152785
|
var JSONRPC_VERSION = "2.0";
|
|
152495
|
-
var AssertObjectSchema =
|
|
152496
|
-
var ProgressTokenSchema =
|
|
152497
|
-
var CursorSchema =
|
|
152498
|
-
var TaskCreationParamsSchema =
|
|
152499
|
-
ttl:
|
|
152500
|
-
pollInterval:
|
|
152786
|
+
var AssertObjectSchema = z60.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
152787
|
+
var ProgressTokenSchema = z60.union([z60.string(), z60.number().int()]);
|
|
152788
|
+
var CursorSchema = z60.string();
|
|
152789
|
+
var TaskCreationParamsSchema = z60.looseObject({
|
|
152790
|
+
ttl: z60.number().optional(),
|
|
152791
|
+
pollInterval: z60.number().optional()
|
|
152501
152792
|
});
|
|
152502
|
-
var TaskMetadataSchema =
|
|
152503
|
-
ttl:
|
|
152793
|
+
var TaskMetadataSchema = z60.object({
|
|
152794
|
+
ttl: z60.number().optional()
|
|
152504
152795
|
});
|
|
152505
|
-
var RelatedTaskMetadataSchema =
|
|
152506
|
-
taskId:
|
|
152796
|
+
var RelatedTaskMetadataSchema = z60.object({
|
|
152797
|
+
taskId: z60.string()
|
|
152507
152798
|
});
|
|
152508
|
-
var RequestMetaSchema =
|
|
152799
|
+
var RequestMetaSchema = z60.looseObject({
|
|
152509
152800
|
progressToken: ProgressTokenSchema.optional(),
|
|
152510
152801
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
152511
152802
|
});
|
|
152512
|
-
var BaseRequestParamsSchema =
|
|
152803
|
+
var BaseRequestParamsSchema = z60.object({
|
|
152513
152804
|
_meta: RequestMetaSchema.optional()
|
|
152514
152805
|
});
|
|
152515
152806
|
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
152516
152807
|
task: TaskMetadataSchema.optional()
|
|
152517
152808
|
});
|
|
152518
152809
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
152519
|
-
var RequestSchema =
|
|
152520
|
-
method:
|
|
152810
|
+
var RequestSchema = z60.object({
|
|
152811
|
+
method: z60.string(),
|
|
152521
152812
|
params: BaseRequestParamsSchema.loose().optional()
|
|
152522
152813
|
});
|
|
152523
|
-
var NotificationsParamsSchema =
|
|
152814
|
+
var NotificationsParamsSchema = z60.object({
|
|
152524
152815
|
_meta: RequestMetaSchema.optional()
|
|
152525
152816
|
});
|
|
152526
|
-
var NotificationSchema =
|
|
152527
|
-
method:
|
|
152817
|
+
var NotificationSchema = z60.object({
|
|
152818
|
+
method: z60.string(),
|
|
152528
152819
|
params: NotificationsParamsSchema.loose().optional()
|
|
152529
152820
|
});
|
|
152530
|
-
var ResultSchema =
|
|
152821
|
+
var ResultSchema = z60.looseObject({
|
|
152531
152822
|
_meta: RequestMetaSchema.optional()
|
|
152532
152823
|
});
|
|
152533
|
-
var RequestIdSchema =
|
|
152534
|
-
var JSONRPCRequestSchema =
|
|
152535
|
-
jsonrpc:
|
|
152824
|
+
var RequestIdSchema = z60.union([z60.string(), z60.number().int()]);
|
|
152825
|
+
var JSONRPCRequestSchema = z60.object({
|
|
152826
|
+
jsonrpc: z60.literal(JSONRPC_VERSION),
|
|
152536
152827
|
id: RequestIdSchema,
|
|
152537
152828
|
...RequestSchema.shape
|
|
152538
152829
|
}).strict();
|
|
152539
152830
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
152540
|
-
var JSONRPCNotificationSchema =
|
|
152541
|
-
jsonrpc:
|
|
152831
|
+
var JSONRPCNotificationSchema = z60.object({
|
|
152832
|
+
jsonrpc: z60.literal(JSONRPC_VERSION),
|
|
152542
152833
|
...NotificationSchema.shape
|
|
152543
152834
|
}).strict();
|
|
152544
152835
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
152545
|
-
var JSONRPCResultResponseSchema =
|
|
152546
|
-
jsonrpc:
|
|
152836
|
+
var JSONRPCResultResponseSchema = z60.object({
|
|
152837
|
+
jsonrpc: z60.literal(JSONRPC_VERSION),
|
|
152547
152838
|
id: RequestIdSchema,
|
|
152548
152839
|
result: ResultSchema
|
|
152549
152840
|
}).strict();
|
|
@@ -152559,153 +152850,153 @@ var ErrorCode;
|
|
|
152559
152850
|
ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError";
|
|
152560
152851
|
ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
152561
152852
|
})(ErrorCode || (ErrorCode = {}));
|
|
152562
|
-
var JSONRPCErrorResponseSchema =
|
|
152563
|
-
jsonrpc:
|
|
152853
|
+
var JSONRPCErrorResponseSchema = z60.object({
|
|
152854
|
+
jsonrpc: z60.literal(JSONRPC_VERSION),
|
|
152564
152855
|
id: RequestIdSchema.optional(),
|
|
152565
|
-
error:
|
|
152566
|
-
code:
|
|
152567
|
-
message:
|
|
152568
|
-
data:
|
|
152856
|
+
error: z60.object({
|
|
152857
|
+
code: z60.number().int(),
|
|
152858
|
+
message: z60.string(),
|
|
152859
|
+
data: z60.unknown().optional()
|
|
152569
152860
|
})
|
|
152570
152861
|
}).strict();
|
|
152571
152862
|
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
|
|
152572
|
-
var JSONRPCMessageSchema =
|
|
152863
|
+
var JSONRPCMessageSchema = z60.union([
|
|
152573
152864
|
JSONRPCRequestSchema,
|
|
152574
152865
|
JSONRPCNotificationSchema,
|
|
152575
152866
|
JSONRPCResultResponseSchema,
|
|
152576
152867
|
JSONRPCErrorResponseSchema
|
|
152577
152868
|
]);
|
|
152578
|
-
var JSONRPCResponseSchema =
|
|
152869
|
+
var JSONRPCResponseSchema = z60.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
152579
152870
|
var EmptyResultSchema = ResultSchema.strict();
|
|
152580
152871
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
152581
152872
|
requestId: RequestIdSchema.optional(),
|
|
152582
|
-
reason:
|
|
152873
|
+
reason: z60.string().optional()
|
|
152583
152874
|
});
|
|
152584
152875
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
152585
|
-
method:
|
|
152876
|
+
method: z60.literal("notifications/cancelled"),
|
|
152586
152877
|
params: CancelledNotificationParamsSchema
|
|
152587
152878
|
});
|
|
152588
|
-
var IconSchema =
|
|
152589
|
-
src:
|
|
152590
|
-
mimeType:
|
|
152591
|
-
sizes:
|
|
152592
|
-
theme:
|
|
152879
|
+
var IconSchema = z60.object({
|
|
152880
|
+
src: z60.string(),
|
|
152881
|
+
mimeType: z60.string().optional(),
|
|
152882
|
+
sizes: z60.array(z60.string()).optional(),
|
|
152883
|
+
theme: z60.enum(["light", "dark"]).optional()
|
|
152593
152884
|
});
|
|
152594
|
-
var IconsSchema =
|
|
152595
|
-
icons:
|
|
152885
|
+
var IconsSchema = z60.object({
|
|
152886
|
+
icons: z60.array(IconSchema).optional()
|
|
152596
152887
|
});
|
|
152597
|
-
var BaseMetadataSchema =
|
|
152598
|
-
name:
|
|
152599
|
-
title:
|
|
152888
|
+
var BaseMetadataSchema = z60.object({
|
|
152889
|
+
name: z60.string(),
|
|
152890
|
+
title: z60.string().optional()
|
|
152600
152891
|
});
|
|
152601
152892
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
152602
152893
|
...BaseMetadataSchema.shape,
|
|
152603
152894
|
...IconsSchema.shape,
|
|
152604
|
-
version:
|
|
152605
|
-
websiteUrl:
|
|
152606
|
-
description:
|
|
152895
|
+
version: z60.string(),
|
|
152896
|
+
websiteUrl: z60.string().optional(),
|
|
152897
|
+
description: z60.string().optional()
|
|
152607
152898
|
});
|
|
152608
|
-
var FormElicitationCapabilitySchema =
|
|
152609
|
-
applyDefaults:
|
|
152610
|
-
}),
|
|
152611
|
-
var ElicitationCapabilitySchema =
|
|
152899
|
+
var FormElicitationCapabilitySchema = z60.intersection(z60.object({
|
|
152900
|
+
applyDefaults: z60.boolean().optional()
|
|
152901
|
+
}), z60.record(z60.string(), z60.unknown()));
|
|
152902
|
+
var ElicitationCapabilitySchema = z60.preprocess((value) => {
|
|
152612
152903
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
152613
152904
|
if (Object.keys(value).length === 0) {
|
|
152614
152905
|
return { form: {} };
|
|
152615
152906
|
}
|
|
152616
152907
|
}
|
|
152617
152908
|
return value;
|
|
152618
|
-
},
|
|
152909
|
+
}, z60.intersection(z60.object({
|
|
152619
152910
|
form: FormElicitationCapabilitySchema.optional(),
|
|
152620
152911
|
url: AssertObjectSchema.optional()
|
|
152621
|
-
}),
|
|
152622
|
-
var ClientTasksCapabilitySchema =
|
|
152912
|
+
}), z60.record(z60.string(), z60.unknown()).optional()));
|
|
152913
|
+
var ClientTasksCapabilitySchema = z60.looseObject({
|
|
152623
152914
|
list: AssertObjectSchema.optional(),
|
|
152624
152915
|
cancel: AssertObjectSchema.optional(),
|
|
152625
|
-
requests:
|
|
152626
|
-
sampling:
|
|
152916
|
+
requests: z60.looseObject({
|
|
152917
|
+
sampling: z60.looseObject({
|
|
152627
152918
|
createMessage: AssertObjectSchema.optional()
|
|
152628
152919
|
}).optional(),
|
|
152629
|
-
elicitation:
|
|
152920
|
+
elicitation: z60.looseObject({
|
|
152630
152921
|
create: AssertObjectSchema.optional()
|
|
152631
152922
|
}).optional()
|
|
152632
152923
|
}).optional()
|
|
152633
152924
|
});
|
|
152634
|
-
var ServerTasksCapabilitySchema =
|
|
152925
|
+
var ServerTasksCapabilitySchema = z60.looseObject({
|
|
152635
152926
|
list: AssertObjectSchema.optional(),
|
|
152636
152927
|
cancel: AssertObjectSchema.optional(),
|
|
152637
|
-
requests:
|
|
152638
|
-
tools:
|
|
152928
|
+
requests: z60.looseObject({
|
|
152929
|
+
tools: z60.looseObject({
|
|
152639
152930
|
call: AssertObjectSchema.optional()
|
|
152640
152931
|
}).optional()
|
|
152641
152932
|
}).optional()
|
|
152642
152933
|
});
|
|
152643
|
-
var ClientCapabilitiesSchema =
|
|
152644
|
-
experimental:
|
|
152645
|
-
sampling:
|
|
152934
|
+
var ClientCapabilitiesSchema = z60.object({
|
|
152935
|
+
experimental: z60.record(z60.string(), AssertObjectSchema).optional(),
|
|
152936
|
+
sampling: z60.object({
|
|
152646
152937
|
context: AssertObjectSchema.optional(),
|
|
152647
152938
|
tools: AssertObjectSchema.optional()
|
|
152648
152939
|
}).optional(),
|
|
152649
152940
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
152650
|
-
roots:
|
|
152651
|
-
listChanged:
|
|
152941
|
+
roots: z60.object({
|
|
152942
|
+
listChanged: z60.boolean().optional()
|
|
152652
152943
|
}).optional(),
|
|
152653
152944
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
152654
|
-
extensions:
|
|
152945
|
+
extensions: z60.record(z60.string(), AssertObjectSchema).optional()
|
|
152655
152946
|
});
|
|
152656
152947
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
152657
|
-
protocolVersion:
|
|
152948
|
+
protocolVersion: z60.string(),
|
|
152658
152949
|
capabilities: ClientCapabilitiesSchema,
|
|
152659
152950
|
clientInfo: ImplementationSchema
|
|
152660
152951
|
});
|
|
152661
152952
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
152662
|
-
method:
|
|
152953
|
+
method: z60.literal("initialize"),
|
|
152663
152954
|
params: InitializeRequestParamsSchema
|
|
152664
152955
|
});
|
|
152665
|
-
var ServerCapabilitiesSchema =
|
|
152666
|
-
experimental:
|
|
152956
|
+
var ServerCapabilitiesSchema = z60.object({
|
|
152957
|
+
experimental: z60.record(z60.string(), AssertObjectSchema).optional(),
|
|
152667
152958
|
logging: AssertObjectSchema.optional(),
|
|
152668
152959
|
completions: AssertObjectSchema.optional(),
|
|
152669
|
-
prompts:
|
|
152670
|
-
listChanged:
|
|
152960
|
+
prompts: z60.object({
|
|
152961
|
+
listChanged: z60.boolean().optional()
|
|
152671
152962
|
}).optional(),
|
|
152672
|
-
resources:
|
|
152673
|
-
subscribe:
|
|
152674
|
-
listChanged:
|
|
152963
|
+
resources: z60.object({
|
|
152964
|
+
subscribe: z60.boolean().optional(),
|
|
152965
|
+
listChanged: z60.boolean().optional()
|
|
152675
152966
|
}).optional(),
|
|
152676
|
-
tools:
|
|
152677
|
-
listChanged:
|
|
152967
|
+
tools: z60.object({
|
|
152968
|
+
listChanged: z60.boolean().optional()
|
|
152678
152969
|
}).optional(),
|
|
152679
152970
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
152680
|
-
extensions:
|
|
152971
|
+
extensions: z60.record(z60.string(), AssertObjectSchema).optional()
|
|
152681
152972
|
});
|
|
152682
152973
|
var InitializeResultSchema = ResultSchema.extend({
|
|
152683
|
-
protocolVersion:
|
|
152974
|
+
protocolVersion: z60.string(),
|
|
152684
152975
|
capabilities: ServerCapabilitiesSchema,
|
|
152685
152976
|
serverInfo: ImplementationSchema,
|
|
152686
|
-
instructions:
|
|
152977
|
+
instructions: z60.string().optional()
|
|
152687
152978
|
});
|
|
152688
152979
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
152689
|
-
method:
|
|
152980
|
+
method: z60.literal("notifications/initialized"),
|
|
152690
152981
|
params: NotificationsParamsSchema.optional()
|
|
152691
152982
|
});
|
|
152692
152983
|
var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
152693
152984
|
var PingRequestSchema = RequestSchema.extend({
|
|
152694
|
-
method:
|
|
152985
|
+
method: z60.literal("ping"),
|
|
152695
152986
|
params: BaseRequestParamsSchema.optional()
|
|
152696
152987
|
});
|
|
152697
|
-
var ProgressSchema =
|
|
152698
|
-
progress:
|
|
152699
|
-
total:
|
|
152700
|
-
message:
|
|
152988
|
+
var ProgressSchema = z60.object({
|
|
152989
|
+
progress: z60.number(),
|
|
152990
|
+
total: z60.optional(z60.number()),
|
|
152991
|
+
message: z60.optional(z60.string())
|
|
152701
152992
|
});
|
|
152702
|
-
var ProgressNotificationParamsSchema =
|
|
152993
|
+
var ProgressNotificationParamsSchema = z60.object({
|
|
152703
152994
|
...NotificationsParamsSchema.shape,
|
|
152704
152995
|
...ProgressSchema.shape,
|
|
152705
152996
|
progressToken: ProgressTokenSchema
|
|
152706
152997
|
});
|
|
152707
152998
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
152708
|
-
method:
|
|
152999
|
+
method: z60.literal("notifications/progress"),
|
|
152709
153000
|
params: ProgressNotificationParamsSchema
|
|
152710
153001
|
});
|
|
152711
153002
|
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -152717,60 +153008,60 @@ var PaginatedRequestSchema = RequestSchema.extend({
|
|
|
152717
153008
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
152718
153009
|
nextCursor: CursorSchema.optional()
|
|
152719
153010
|
});
|
|
152720
|
-
var TaskStatusSchema2 =
|
|
152721
|
-
var TaskSchema2 =
|
|
152722
|
-
taskId:
|
|
153011
|
+
var TaskStatusSchema2 = z60.enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
153012
|
+
var TaskSchema2 = z60.object({
|
|
153013
|
+
taskId: z60.string(),
|
|
152723
153014
|
status: TaskStatusSchema2,
|
|
152724
|
-
ttl:
|
|
152725
|
-
createdAt:
|
|
152726
|
-
lastUpdatedAt:
|
|
152727
|
-
pollInterval:
|
|
152728
|
-
statusMessage:
|
|
153015
|
+
ttl: z60.union([z60.number(), z60.null()]),
|
|
153016
|
+
createdAt: z60.string(),
|
|
153017
|
+
lastUpdatedAt: z60.string(),
|
|
153018
|
+
pollInterval: z60.optional(z60.number()),
|
|
153019
|
+
statusMessage: z60.optional(z60.string())
|
|
152729
153020
|
});
|
|
152730
153021
|
var CreateTaskResultSchema = ResultSchema.extend({
|
|
152731
153022
|
task: TaskSchema2
|
|
152732
153023
|
});
|
|
152733
153024
|
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema2);
|
|
152734
153025
|
var TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
152735
|
-
method:
|
|
153026
|
+
method: z60.literal("notifications/tasks/status"),
|
|
152736
153027
|
params: TaskStatusNotificationParamsSchema
|
|
152737
153028
|
});
|
|
152738
153029
|
var GetTaskRequestSchema = RequestSchema.extend({
|
|
152739
|
-
method:
|
|
153030
|
+
method: z60.literal("tasks/get"),
|
|
152740
153031
|
params: BaseRequestParamsSchema.extend({
|
|
152741
|
-
taskId:
|
|
153032
|
+
taskId: z60.string()
|
|
152742
153033
|
})
|
|
152743
153034
|
});
|
|
152744
153035
|
var GetTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
152745
153036
|
var GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
152746
|
-
method:
|
|
153037
|
+
method: z60.literal("tasks/result"),
|
|
152747
153038
|
params: BaseRequestParamsSchema.extend({
|
|
152748
|
-
taskId:
|
|
153039
|
+
taskId: z60.string()
|
|
152749
153040
|
})
|
|
152750
153041
|
});
|
|
152751
153042
|
var GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
152752
153043
|
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
|
|
152753
|
-
method:
|
|
153044
|
+
method: z60.literal("tasks/list")
|
|
152754
153045
|
});
|
|
152755
153046
|
var ListTasksResultSchema = PaginatedResultSchema.extend({
|
|
152756
|
-
tasks:
|
|
153047
|
+
tasks: z60.array(TaskSchema2)
|
|
152757
153048
|
});
|
|
152758
153049
|
var CancelTaskRequestSchema = RequestSchema.extend({
|
|
152759
|
-
method:
|
|
153050
|
+
method: z60.literal("tasks/cancel"),
|
|
152760
153051
|
params: BaseRequestParamsSchema.extend({
|
|
152761
|
-
taskId:
|
|
153052
|
+
taskId: z60.string()
|
|
152762
153053
|
})
|
|
152763
153054
|
});
|
|
152764
153055
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
152765
|
-
var ResourceContentsSchema =
|
|
152766
|
-
uri:
|
|
152767
|
-
mimeType:
|
|
152768
|
-
_meta:
|
|
153056
|
+
var ResourceContentsSchema = z60.object({
|
|
153057
|
+
uri: z60.string(),
|
|
153058
|
+
mimeType: z60.optional(z60.string()),
|
|
153059
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152769
153060
|
});
|
|
152770
153061
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
152771
|
-
text:
|
|
153062
|
+
text: z60.string()
|
|
152772
153063
|
});
|
|
152773
|
-
var Base64Schema =
|
|
153064
|
+
var Base64Schema = z60.string().refine((val) => {
|
|
152774
153065
|
try {
|
|
152775
153066
|
atob(val);
|
|
152776
153067
|
return true;
|
|
@@ -152781,447 +153072,447 @@ var Base64Schema = z61.string().refine((val) => {
|
|
|
152781
153072
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
152782
153073
|
blob: Base64Schema
|
|
152783
153074
|
});
|
|
152784
|
-
var RoleSchema =
|
|
152785
|
-
var AnnotationsSchema =
|
|
152786
|
-
audience:
|
|
152787
|
-
priority:
|
|
152788
|
-
lastModified:
|
|
153075
|
+
var RoleSchema = z60.enum(["user", "assistant"]);
|
|
153076
|
+
var AnnotationsSchema = z60.object({
|
|
153077
|
+
audience: z60.array(RoleSchema).optional(),
|
|
153078
|
+
priority: z60.number().min(0).max(1).optional(),
|
|
153079
|
+
lastModified: z60.iso.datetime({ offset: true }).optional()
|
|
152789
153080
|
});
|
|
152790
|
-
var ResourceSchema =
|
|
153081
|
+
var ResourceSchema = z60.object({
|
|
152791
153082
|
...BaseMetadataSchema.shape,
|
|
152792
153083
|
...IconsSchema.shape,
|
|
152793
|
-
uri:
|
|
152794
|
-
description:
|
|
152795
|
-
mimeType:
|
|
152796
|
-
size:
|
|
153084
|
+
uri: z60.string(),
|
|
153085
|
+
description: z60.optional(z60.string()),
|
|
153086
|
+
mimeType: z60.optional(z60.string()),
|
|
153087
|
+
size: z60.optional(z60.number()),
|
|
152797
153088
|
annotations: AnnotationsSchema.optional(),
|
|
152798
|
-
_meta:
|
|
153089
|
+
_meta: z60.optional(z60.looseObject({}))
|
|
152799
153090
|
});
|
|
152800
|
-
var ResourceTemplateSchema =
|
|
153091
|
+
var ResourceTemplateSchema = z60.object({
|
|
152801
153092
|
...BaseMetadataSchema.shape,
|
|
152802
153093
|
...IconsSchema.shape,
|
|
152803
|
-
uriTemplate:
|
|
152804
|
-
description:
|
|
152805
|
-
mimeType:
|
|
153094
|
+
uriTemplate: z60.string(),
|
|
153095
|
+
description: z60.optional(z60.string()),
|
|
153096
|
+
mimeType: z60.optional(z60.string()),
|
|
152806
153097
|
annotations: AnnotationsSchema.optional(),
|
|
152807
|
-
_meta:
|
|
153098
|
+
_meta: z60.optional(z60.looseObject({}))
|
|
152808
153099
|
});
|
|
152809
153100
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
152810
|
-
method:
|
|
153101
|
+
method: z60.literal("resources/list")
|
|
152811
153102
|
});
|
|
152812
153103
|
var ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
152813
|
-
resources:
|
|
153104
|
+
resources: z60.array(ResourceSchema)
|
|
152814
153105
|
});
|
|
152815
153106
|
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
152816
|
-
method:
|
|
153107
|
+
method: z60.literal("resources/templates/list")
|
|
152817
153108
|
});
|
|
152818
153109
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
152819
|
-
resourceTemplates:
|
|
153110
|
+
resourceTemplates: z60.array(ResourceTemplateSchema)
|
|
152820
153111
|
});
|
|
152821
153112
|
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
152822
|
-
uri:
|
|
153113
|
+
uri: z60.string()
|
|
152823
153114
|
});
|
|
152824
153115
|
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
152825
153116
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
152826
|
-
method:
|
|
153117
|
+
method: z60.literal("resources/read"),
|
|
152827
153118
|
params: ReadResourceRequestParamsSchema
|
|
152828
153119
|
});
|
|
152829
153120
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
152830
|
-
contents:
|
|
153121
|
+
contents: z60.array(z60.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
152831
153122
|
});
|
|
152832
153123
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
152833
|
-
method:
|
|
153124
|
+
method: z60.literal("notifications/resources/list_changed"),
|
|
152834
153125
|
params: NotificationsParamsSchema.optional()
|
|
152835
153126
|
});
|
|
152836
153127
|
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
152837
153128
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
152838
|
-
method:
|
|
153129
|
+
method: z60.literal("resources/subscribe"),
|
|
152839
153130
|
params: SubscribeRequestParamsSchema
|
|
152840
153131
|
});
|
|
152841
153132
|
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
152842
153133
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
152843
|
-
method:
|
|
153134
|
+
method: z60.literal("resources/unsubscribe"),
|
|
152844
153135
|
params: UnsubscribeRequestParamsSchema
|
|
152845
153136
|
});
|
|
152846
153137
|
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
152847
|
-
uri:
|
|
153138
|
+
uri: z60.string()
|
|
152848
153139
|
});
|
|
152849
153140
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
152850
|
-
method:
|
|
153141
|
+
method: z60.literal("notifications/resources/updated"),
|
|
152851
153142
|
params: ResourceUpdatedNotificationParamsSchema
|
|
152852
153143
|
});
|
|
152853
|
-
var PromptArgumentSchema =
|
|
152854
|
-
name:
|
|
152855
|
-
description:
|
|
152856
|
-
required:
|
|
153144
|
+
var PromptArgumentSchema = z60.object({
|
|
153145
|
+
name: z60.string(),
|
|
153146
|
+
description: z60.optional(z60.string()),
|
|
153147
|
+
required: z60.optional(z60.boolean())
|
|
152857
153148
|
});
|
|
152858
|
-
var PromptSchema =
|
|
153149
|
+
var PromptSchema = z60.object({
|
|
152859
153150
|
...BaseMetadataSchema.shape,
|
|
152860
153151
|
...IconsSchema.shape,
|
|
152861
|
-
description:
|
|
152862
|
-
arguments:
|
|
152863
|
-
_meta:
|
|
153152
|
+
description: z60.optional(z60.string()),
|
|
153153
|
+
arguments: z60.optional(z60.array(PromptArgumentSchema)),
|
|
153154
|
+
_meta: z60.optional(z60.looseObject({}))
|
|
152864
153155
|
});
|
|
152865
153156
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
152866
|
-
method:
|
|
153157
|
+
method: z60.literal("prompts/list")
|
|
152867
153158
|
});
|
|
152868
153159
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
152869
|
-
prompts:
|
|
153160
|
+
prompts: z60.array(PromptSchema)
|
|
152870
153161
|
});
|
|
152871
153162
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
152872
|
-
name:
|
|
152873
|
-
arguments:
|
|
153163
|
+
name: z60.string(),
|
|
153164
|
+
arguments: z60.record(z60.string(), z60.string()).optional()
|
|
152874
153165
|
});
|
|
152875
153166
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
152876
|
-
method:
|
|
153167
|
+
method: z60.literal("prompts/get"),
|
|
152877
153168
|
params: GetPromptRequestParamsSchema
|
|
152878
153169
|
});
|
|
152879
|
-
var TextContentSchema =
|
|
152880
|
-
type:
|
|
152881
|
-
text:
|
|
153170
|
+
var TextContentSchema = z60.object({
|
|
153171
|
+
type: z60.literal("text"),
|
|
153172
|
+
text: z60.string(),
|
|
152882
153173
|
annotations: AnnotationsSchema.optional(),
|
|
152883
|
-
_meta:
|
|
153174
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152884
153175
|
});
|
|
152885
|
-
var ImageContentSchema =
|
|
152886
|
-
type:
|
|
153176
|
+
var ImageContentSchema = z60.object({
|
|
153177
|
+
type: z60.literal("image"),
|
|
152887
153178
|
data: Base64Schema,
|
|
152888
|
-
mimeType:
|
|
153179
|
+
mimeType: z60.string(),
|
|
152889
153180
|
annotations: AnnotationsSchema.optional(),
|
|
152890
|
-
_meta:
|
|
153181
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152891
153182
|
});
|
|
152892
|
-
var AudioContentSchema =
|
|
152893
|
-
type:
|
|
153183
|
+
var AudioContentSchema = z60.object({
|
|
153184
|
+
type: z60.literal("audio"),
|
|
152894
153185
|
data: Base64Schema,
|
|
152895
|
-
mimeType:
|
|
153186
|
+
mimeType: z60.string(),
|
|
152896
153187
|
annotations: AnnotationsSchema.optional(),
|
|
152897
|
-
_meta:
|
|
153188
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152898
153189
|
});
|
|
152899
|
-
var ToolUseContentSchema =
|
|
152900
|
-
type:
|
|
152901
|
-
name:
|
|
152902
|
-
id:
|
|
152903
|
-
input:
|
|
152904
|
-
_meta:
|
|
153190
|
+
var ToolUseContentSchema = z60.object({
|
|
153191
|
+
type: z60.literal("tool_use"),
|
|
153192
|
+
name: z60.string(),
|
|
153193
|
+
id: z60.string(),
|
|
153194
|
+
input: z60.record(z60.string(), z60.unknown()),
|
|
153195
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152905
153196
|
});
|
|
152906
|
-
var EmbeddedResourceSchema =
|
|
152907
|
-
type:
|
|
152908
|
-
resource:
|
|
153197
|
+
var EmbeddedResourceSchema = z60.object({
|
|
153198
|
+
type: z60.literal("resource"),
|
|
153199
|
+
resource: z60.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
152909
153200
|
annotations: AnnotationsSchema.optional(),
|
|
152910
|
-
_meta:
|
|
153201
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152911
153202
|
});
|
|
152912
153203
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
152913
|
-
type:
|
|
153204
|
+
type: z60.literal("resource_link")
|
|
152914
153205
|
});
|
|
152915
|
-
var ContentBlockSchema =
|
|
153206
|
+
var ContentBlockSchema = z60.union([
|
|
152916
153207
|
TextContentSchema,
|
|
152917
153208
|
ImageContentSchema,
|
|
152918
153209
|
AudioContentSchema,
|
|
152919
153210
|
ResourceLinkSchema,
|
|
152920
153211
|
EmbeddedResourceSchema
|
|
152921
153212
|
]);
|
|
152922
|
-
var PromptMessageSchema =
|
|
153213
|
+
var PromptMessageSchema = z60.object({
|
|
152923
153214
|
role: RoleSchema,
|
|
152924
153215
|
content: ContentBlockSchema
|
|
152925
153216
|
});
|
|
152926
153217
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
152927
|
-
description:
|
|
152928
|
-
messages:
|
|
153218
|
+
description: z60.string().optional(),
|
|
153219
|
+
messages: z60.array(PromptMessageSchema)
|
|
152929
153220
|
});
|
|
152930
153221
|
var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
152931
|
-
method:
|
|
153222
|
+
method: z60.literal("notifications/prompts/list_changed"),
|
|
152932
153223
|
params: NotificationsParamsSchema.optional()
|
|
152933
153224
|
});
|
|
152934
|
-
var ToolAnnotationsSchema =
|
|
152935
|
-
title:
|
|
152936
|
-
readOnlyHint:
|
|
152937
|
-
destructiveHint:
|
|
152938
|
-
idempotentHint:
|
|
152939
|
-
openWorldHint:
|
|
153225
|
+
var ToolAnnotationsSchema = z60.object({
|
|
153226
|
+
title: z60.string().optional(),
|
|
153227
|
+
readOnlyHint: z60.boolean().optional(),
|
|
153228
|
+
destructiveHint: z60.boolean().optional(),
|
|
153229
|
+
idempotentHint: z60.boolean().optional(),
|
|
153230
|
+
openWorldHint: z60.boolean().optional()
|
|
152940
153231
|
});
|
|
152941
|
-
var ToolExecutionSchema =
|
|
152942
|
-
taskSupport:
|
|
153232
|
+
var ToolExecutionSchema = z60.object({
|
|
153233
|
+
taskSupport: z60.enum(["required", "optional", "forbidden"]).optional()
|
|
152943
153234
|
});
|
|
152944
|
-
var ToolSchema =
|
|
153235
|
+
var ToolSchema = z60.object({
|
|
152945
153236
|
...BaseMetadataSchema.shape,
|
|
152946
153237
|
...IconsSchema.shape,
|
|
152947
|
-
description:
|
|
152948
|
-
inputSchema:
|
|
152949
|
-
type:
|
|
152950
|
-
properties:
|
|
152951
|
-
required:
|
|
152952
|
-
}).catchall(
|
|
152953
|
-
outputSchema:
|
|
152954
|
-
type:
|
|
152955
|
-
properties:
|
|
152956
|
-
required:
|
|
152957
|
-
}).catchall(
|
|
153238
|
+
description: z60.string().optional(),
|
|
153239
|
+
inputSchema: z60.object({
|
|
153240
|
+
type: z60.literal("object"),
|
|
153241
|
+
properties: z60.record(z60.string(), AssertObjectSchema).optional(),
|
|
153242
|
+
required: z60.array(z60.string()).optional()
|
|
153243
|
+
}).catchall(z60.unknown()),
|
|
153244
|
+
outputSchema: z60.object({
|
|
153245
|
+
type: z60.literal("object"),
|
|
153246
|
+
properties: z60.record(z60.string(), AssertObjectSchema).optional(),
|
|
153247
|
+
required: z60.array(z60.string()).optional()
|
|
153248
|
+
}).catchall(z60.unknown()).optional(),
|
|
152958
153249
|
annotations: ToolAnnotationsSchema.optional(),
|
|
152959
153250
|
execution: ToolExecutionSchema.optional(),
|
|
152960
|
-
_meta:
|
|
153251
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
152961
153252
|
});
|
|
152962
153253
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
152963
|
-
method:
|
|
153254
|
+
method: z60.literal("tools/list")
|
|
152964
153255
|
});
|
|
152965
153256
|
var ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
152966
|
-
tools:
|
|
153257
|
+
tools: z60.array(ToolSchema)
|
|
152967
153258
|
});
|
|
152968
153259
|
var CallToolResultSchema = ResultSchema.extend({
|
|
152969
|
-
content:
|
|
152970
|
-
structuredContent:
|
|
152971
|
-
isError:
|
|
153260
|
+
content: z60.array(ContentBlockSchema).default([]),
|
|
153261
|
+
structuredContent: z60.record(z60.string(), z60.unknown()).optional(),
|
|
153262
|
+
isError: z60.boolean().optional()
|
|
152972
153263
|
});
|
|
152973
153264
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
152974
|
-
toolResult:
|
|
153265
|
+
toolResult: z60.unknown()
|
|
152975
153266
|
}));
|
|
152976
153267
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
152977
|
-
name:
|
|
152978
|
-
arguments:
|
|
153268
|
+
name: z60.string(),
|
|
153269
|
+
arguments: z60.record(z60.string(), z60.unknown()).optional()
|
|
152979
153270
|
});
|
|
152980
153271
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
152981
|
-
method:
|
|
153272
|
+
method: z60.literal("tools/call"),
|
|
152982
153273
|
params: CallToolRequestParamsSchema
|
|
152983
153274
|
});
|
|
152984
153275
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
152985
|
-
method:
|
|
153276
|
+
method: z60.literal("notifications/tools/list_changed"),
|
|
152986
153277
|
params: NotificationsParamsSchema.optional()
|
|
152987
153278
|
});
|
|
152988
|
-
var ListChangedOptionsBaseSchema =
|
|
152989
|
-
autoRefresh:
|
|
152990
|
-
debounceMs:
|
|
153279
|
+
var ListChangedOptionsBaseSchema = z60.object({
|
|
153280
|
+
autoRefresh: z60.boolean().default(true),
|
|
153281
|
+
debounceMs: z60.number().int().nonnegative().default(300)
|
|
152991
153282
|
});
|
|
152992
|
-
var LoggingLevelSchema =
|
|
153283
|
+
var LoggingLevelSchema = z60.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
152993
153284
|
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
152994
153285
|
level: LoggingLevelSchema
|
|
152995
153286
|
});
|
|
152996
153287
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
152997
|
-
method:
|
|
153288
|
+
method: z60.literal("logging/setLevel"),
|
|
152998
153289
|
params: SetLevelRequestParamsSchema
|
|
152999
153290
|
});
|
|
153000
153291
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
153001
153292
|
level: LoggingLevelSchema,
|
|
153002
|
-
logger:
|
|
153003
|
-
data:
|
|
153293
|
+
logger: z60.string().optional(),
|
|
153294
|
+
data: z60.unknown()
|
|
153004
153295
|
});
|
|
153005
153296
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
153006
|
-
method:
|
|
153297
|
+
method: z60.literal("notifications/message"),
|
|
153007
153298
|
params: LoggingMessageNotificationParamsSchema
|
|
153008
153299
|
});
|
|
153009
|
-
var ModelHintSchema =
|
|
153010
|
-
name:
|
|
153300
|
+
var ModelHintSchema = z60.object({
|
|
153301
|
+
name: z60.string().optional()
|
|
153011
153302
|
});
|
|
153012
|
-
var ModelPreferencesSchema =
|
|
153013
|
-
hints:
|
|
153014
|
-
costPriority:
|
|
153015
|
-
speedPriority:
|
|
153016
|
-
intelligencePriority:
|
|
153303
|
+
var ModelPreferencesSchema = z60.object({
|
|
153304
|
+
hints: z60.array(ModelHintSchema).optional(),
|
|
153305
|
+
costPriority: z60.number().min(0).max(1).optional(),
|
|
153306
|
+
speedPriority: z60.number().min(0).max(1).optional(),
|
|
153307
|
+
intelligencePriority: z60.number().min(0).max(1).optional()
|
|
153017
153308
|
});
|
|
153018
|
-
var ToolChoiceSchema =
|
|
153019
|
-
mode:
|
|
153309
|
+
var ToolChoiceSchema = z60.object({
|
|
153310
|
+
mode: z60.enum(["auto", "required", "none"]).optional()
|
|
153020
153311
|
});
|
|
153021
|
-
var ToolResultContentSchema =
|
|
153022
|
-
type:
|
|
153023
|
-
toolUseId:
|
|
153024
|
-
content:
|
|
153025
|
-
structuredContent:
|
|
153026
|
-
isError:
|
|
153027
|
-
_meta:
|
|
153312
|
+
var ToolResultContentSchema = z60.object({
|
|
153313
|
+
type: z60.literal("tool_result"),
|
|
153314
|
+
toolUseId: z60.string().describe("The unique identifier for the corresponding tool call."),
|
|
153315
|
+
content: z60.array(ContentBlockSchema).default([]),
|
|
153316
|
+
structuredContent: z60.object({}).loose().optional(),
|
|
153317
|
+
isError: z60.boolean().optional(),
|
|
153318
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
153028
153319
|
});
|
|
153029
|
-
var SamplingContentSchema =
|
|
153030
|
-
var SamplingMessageContentBlockSchema =
|
|
153320
|
+
var SamplingContentSchema = z60.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
|
|
153321
|
+
var SamplingMessageContentBlockSchema = z60.discriminatedUnion("type", [
|
|
153031
153322
|
TextContentSchema,
|
|
153032
153323
|
ImageContentSchema,
|
|
153033
153324
|
AudioContentSchema,
|
|
153034
153325
|
ToolUseContentSchema,
|
|
153035
153326
|
ToolResultContentSchema
|
|
153036
153327
|
]);
|
|
153037
|
-
var SamplingMessageSchema =
|
|
153328
|
+
var SamplingMessageSchema = z60.object({
|
|
153038
153329
|
role: RoleSchema,
|
|
153039
|
-
content:
|
|
153040
|
-
_meta:
|
|
153330
|
+
content: z60.union([SamplingMessageContentBlockSchema, z60.array(SamplingMessageContentBlockSchema)]),
|
|
153331
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
153041
153332
|
});
|
|
153042
153333
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
153043
|
-
messages:
|
|
153334
|
+
messages: z60.array(SamplingMessageSchema),
|
|
153044
153335
|
modelPreferences: ModelPreferencesSchema.optional(),
|
|
153045
|
-
systemPrompt:
|
|
153046
|
-
includeContext:
|
|
153047
|
-
temperature:
|
|
153048
|
-
maxTokens:
|
|
153049
|
-
stopSequences:
|
|
153336
|
+
systemPrompt: z60.string().optional(),
|
|
153337
|
+
includeContext: z60.enum(["none", "thisServer", "allServers"]).optional(),
|
|
153338
|
+
temperature: z60.number().optional(),
|
|
153339
|
+
maxTokens: z60.number().int(),
|
|
153340
|
+
stopSequences: z60.array(z60.string()).optional(),
|
|
153050
153341
|
metadata: AssertObjectSchema.optional(),
|
|
153051
|
-
tools:
|
|
153342
|
+
tools: z60.array(ToolSchema).optional(),
|
|
153052
153343
|
toolChoice: ToolChoiceSchema.optional()
|
|
153053
153344
|
});
|
|
153054
153345
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
153055
|
-
method:
|
|
153346
|
+
method: z60.literal("sampling/createMessage"),
|
|
153056
153347
|
params: CreateMessageRequestParamsSchema
|
|
153057
153348
|
});
|
|
153058
153349
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
153059
|
-
model:
|
|
153060
|
-
stopReason:
|
|
153350
|
+
model: z60.string(),
|
|
153351
|
+
stopReason: z60.optional(z60.enum(["endTurn", "stopSequence", "maxTokens"]).or(z60.string())),
|
|
153061
153352
|
role: RoleSchema,
|
|
153062
153353
|
content: SamplingContentSchema
|
|
153063
153354
|
});
|
|
153064
153355
|
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
153065
|
-
model:
|
|
153066
|
-
stopReason:
|
|
153356
|
+
model: z60.string(),
|
|
153357
|
+
stopReason: z60.optional(z60.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z60.string())),
|
|
153067
153358
|
role: RoleSchema,
|
|
153068
|
-
content:
|
|
153359
|
+
content: z60.union([SamplingMessageContentBlockSchema, z60.array(SamplingMessageContentBlockSchema)])
|
|
153069
153360
|
});
|
|
153070
|
-
var BooleanSchemaSchema =
|
|
153071
|
-
type:
|
|
153072
|
-
title:
|
|
153073
|
-
description:
|
|
153074
|
-
default:
|
|
153361
|
+
var BooleanSchemaSchema = z60.object({
|
|
153362
|
+
type: z60.literal("boolean"),
|
|
153363
|
+
title: z60.string().optional(),
|
|
153364
|
+
description: z60.string().optional(),
|
|
153365
|
+
default: z60.boolean().optional()
|
|
153075
153366
|
});
|
|
153076
|
-
var StringSchemaSchema =
|
|
153077
|
-
type:
|
|
153078
|
-
title:
|
|
153079
|
-
description:
|
|
153080
|
-
minLength:
|
|
153081
|
-
maxLength:
|
|
153082
|
-
format:
|
|
153083
|
-
default:
|
|
153367
|
+
var StringSchemaSchema = z60.object({
|
|
153368
|
+
type: z60.literal("string"),
|
|
153369
|
+
title: z60.string().optional(),
|
|
153370
|
+
description: z60.string().optional(),
|
|
153371
|
+
minLength: z60.number().optional(),
|
|
153372
|
+
maxLength: z60.number().optional(),
|
|
153373
|
+
format: z60.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
153374
|
+
default: z60.string().optional()
|
|
153084
153375
|
});
|
|
153085
|
-
var NumberSchemaSchema =
|
|
153086
|
-
type:
|
|
153087
|
-
title:
|
|
153088
|
-
description:
|
|
153089
|
-
minimum:
|
|
153090
|
-
maximum:
|
|
153091
|
-
default:
|
|
153376
|
+
var NumberSchemaSchema = z60.object({
|
|
153377
|
+
type: z60.enum(["number", "integer"]),
|
|
153378
|
+
title: z60.string().optional(),
|
|
153379
|
+
description: z60.string().optional(),
|
|
153380
|
+
minimum: z60.number().optional(),
|
|
153381
|
+
maximum: z60.number().optional(),
|
|
153382
|
+
default: z60.number().optional()
|
|
153092
153383
|
});
|
|
153093
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
153094
|
-
type:
|
|
153095
|
-
title:
|
|
153096
|
-
description:
|
|
153097
|
-
enum:
|
|
153098
|
-
default:
|
|
153384
|
+
var UntitledSingleSelectEnumSchemaSchema = z60.object({
|
|
153385
|
+
type: z60.literal("string"),
|
|
153386
|
+
title: z60.string().optional(),
|
|
153387
|
+
description: z60.string().optional(),
|
|
153388
|
+
enum: z60.array(z60.string()),
|
|
153389
|
+
default: z60.string().optional()
|
|
153099
153390
|
});
|
|
153100
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
153101
|
-
type:
|
|
153102
|
-
title:
|
|
153103
|
-
description:
|
|
153104
|
-
oneOf:
|
|
153105
|
-
const:
|
|
153106
|
-
title:
|
|
153391
|
+
var TitledSingleSelectEnumSchemaSchema = z60.object({
|
|
153392
|
+
type: z60.literal("string"),
|
|
153393
|
+
title: z60.string().optional(),
|
|
153394
|
+
description: z60.string().optional(),
|
|
153395
|
+
oneOf: z60.array(z60.object({
|
|
153396
|
+
const: z60.string(),
|
|
153397
|
+
title: z60.string()
|
|
153107
153398
|
})),
|
|
153108
|
-
default:
|
|
153399
|
+
default: z60.string().optional()
|
|
153109
153400
|
});
|
|
153110
|
-
var LegacyTitledEnumSchemaSchema =
|
|
153111
|
-
type:
|
|
153112
|
-
title:
|
|
153113
|
-
description:
|
|
153114
|
-
enum:
|
|
153115
|
-
enumNames:
|
|
153116
|
-
default:
|
|
153401
|
+
var LegacyTitledEnumSchemaSchema = z60.object({
|
|
153402
|
+
type: z60.literal("string"),
|
|
153403
|
+
title: z60.string().optional(),
|
|
153404
|
+
description: z60.string().optional(),
|
|
153405
|
+
enum: z60.array(z60.string()),
|
|
153406
|
+
enumNames: z60.array(z60.string()).optional(),
|
|
153407
|
+
default: z60.string().optional()
|
|
153117
153408
|
});
|
|
153118
|
-
var SingleSelectEnumSchemaSchema =
|
|
153119
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
153120
|
-
type:
|
|
153121
|
-
title:
|
|
153122
|
-
description:
|
|
153123
|
-
minItems:
|
|
153124
|
-
maxItems:
|
|
153125
|
-
items:
|
|
153126
|
-
type:
|
|
153127
|
-
enum:
|
|
153409
|
+
var SingleSelectEnumSchemaSchema = z60.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
153410
|
+
var UntitledMultiSelectEnumSchemaSchema = z60.object({
|
|
153411
|
+
type: z60.literal("array"),
|
|
153412
|
+
title: z60.string().optional(),
|
|
153413
|
+
description: z60.string().optional(),
|
|
153414
|
+
minItems: z60.number().optional(),
|
|
153415
|
+
maxItems: z60.number().optional(),
|
|
153416
|
+
items: z60.object({
|
|
153417
|
+
type: z60.literal("string"),
|
|
153418
|
+
enum: z60.array(z60.string())
|
|
153128
153419
|
}),
|
|
153129
|
-
default:
|
|
153420
|
+
default: z60.array(z60.string()).optional()
|
|
153130
153421
|
});
|
|
153131
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
153132
|
-
type:
|
|
153133
|
-
title:
|
|
153134
|
-
description:
|
|
153135
|
-
minItems:
|
|
153136
|
-
maxItems:
|
|
153137
|
-
items:
|
|
153138
|
-
anyOf:
|
|
153139
|
-
const:
|
|
153140
|
-
title:
|
|
153422
|
+
var TitledMultiSelectEnumSchemaSchema = z60.object({
|
|
153423
|
+
type: z60.literal("array"),
|
|
153424
|
+
title: z60.string().optional(),
|
|
153425
|
+
description: z60.string().optional(),
|
|
153426
|
+
minItems: z60.number().optional(),
|
|
153427
|
+
maxItems: z60.number().optional(),
|
|
153428
|
+
items: z60.object({
|
|
153429
|
+
anyOf: z60.array(z60.object({
|
|
153430
|
+
const: z60.string(),
|
|
153431
|
+
title: z60.string()
|
|
153141
153432
|
}))
|
|
153142
153433
|
}),
|
|
153143
|
-
default:
|
|
153434
|
+
default: z60.array(z60.string()).optional()
|
|
153144
153435
|
});
|
|
153145
|
-
var MultiSelectEnumSchemaSchema =
|
|
153146
|
-
var EnumSchemaSchema =
|
|
153147
|
-
var PrimitiveSchemaDefinitionSchema =
|
|
153436
|
+
var MultiSelectEnumSchemaSchema = z60.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
153437
|
+
var EnumSchemaSchema = z60.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
153438
|
+
var PrimitiveSchemaDefinitionSchema = z60.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
153148
153439
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
153149
|
-
mode:
|
|
153150
|
-
message:
|
|
153151
|
-
requestedSchema:
|
|
153152
|
-
type:
|
|
153153
|
-
properties:
|
|
153154
|
-
required:
|
|
153440
|
+
mode: z60.literal("form").optional(),
|
|
153441
|
+
message: z60.string(),
|
|
153442
|
+
requestedSchema: z60.object({
|
|
153443
|
+
type: z60.literal("object"),
|
|
153444
|
+
properties: z60.record(z60.string(), PrimitiveSchemaDefinitionSchema),
|
|
153445
|
+
required: z60.array(z60.string()).optional()
|
|
153155
153446
|
})
|
|
153156
153447
|
});
|
|
153157
153448
|
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
153158
|
-
mode:
|
|
153159
|
-
message:
|
|
153160
|
-
elicitationId:
|
|
153161
|
-
url:
|
|
153449
|
+
mode: z60.literal("url"),
|
|
153450
|
+
message: z60.string(),
|
|
153451
|
+
elicitationId: z60.string(),
|
|
153452
|
+
url: z60.string().url()
|
|
153162
153453
|
});
|
|
153163
|
-
var ElicitRequestParamsSchema =
|
|
153454
|
+
var ElicitRequestParamsSchema = z60.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
153164
153455
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
153165
|
-
method:
|
|
153456
|
+
method: z60.literal("elicitation/create"),
|
|
153166
153457
|
params: ElicitRequestParamsSchema
|
|
153167
153458
|
});
|
|
153168
153459
|
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
153169
|
-
elicitationId:
|
|
153460
|
+
elicitationId: z60.string()
|
|
153170
153461
|
});
|
|
153171
153462
|
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
153172
|
-
method:
|
|
153463
|
+
method: z60.literal("notifications/elicitation/complete"),
|
|
153173
153464
|
params: ElicitationCompleteNotificationParamsSchema
|
|
153174
153465
|
});
|
|
153175
153466
|
var ElicitResultSchema = ResultSchema.extend({
|
|
153176
|
-
action:
|
|
153177
|
-
content:
|
|
153467
|
+
action: z60.enum(["accept", "decline", "cancel"]),
|
|
153468
|
+
content: z60.preprocess((val) => val === null ? undefined : val, z60.record(z60.string(), z60.union([z60.string(), z60.number(), z60.boolean(), z60.array(z60.string())])).optional())
|
|
153178
153469
|
});
|
|
153179
|
-
var ResourceTemplateReferenceSchema =
|
|
153180
|
-
type:
|
|
153181
|
-
uri:
|
|
153470
|
+
var ResourceTemplateReferenceSchema = z60.object({
|
|
153471
|
+
type: z60.literal("ref/resource"),
|
|
153472
|
+
uri: z60.string()
|
|
153182
153473
|
});
|
|
153183
|
-
var PromptReferenceSchema =
|
|
153184
|
-
type:
|
|
153185
|
-
name:
|
|
153474
|
+
var PromptReferenceSchema = z60.object({
|
|
153475
|
+
type: z60.literal("ref/prompt"),
|
|
153476
|
+
name: z60.string()
|
|
153186
153477
|
});
|
|
153187
153478
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
153188
|
-
ref:
|
|
153189
|
-
argument:
|
|
153190
|
-
name:
|
|
153191
|
-
value:
|
|
153479
|
+
ref: z60.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
153480
|
+
argument: z60.object({
|
|
153481
|
+
name: z60.string(),
|
|
153482
|
+
value: z60.string()
|
|
153192
153483
|
}),
|
|
153193
|
-
context:
|
|
153194
|
-
arguments:
|
|
153484
|
+
context: z60.object({
|
|
153485
|
+
arguments: z60.record(z60.string(), z60.string()).optional()
|
|
153195
153486
|
}).optional()
|
|
153196
153487
|
});
|
|
153197
153488
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
153198
|
-
method:
|
|
153489
|
+
method: z60.literal("completion/complete"),
|
|
153199
153490
|
params: CompleteRequestParamsSchema
|
|
153200
153491
|
});
|
|
153201
153492
|
var CompleteResultSchema = ResultSchema.extend({
|
|
153202
|
-
completion:
|
|
153203
|
-
values:
|
|
153204
|
-
total:
|
|
153205
|
-
hasMore:
|
|
153493
|
+
completion: z60.looseObject({
|
|
153494
|
+
values: z60.array(z60.string()).max(100),
|
|
153495
|
+
total: z60.optional(z60.number().int()),
|
|
153496
|
+
hasMore: z60.optional(z60.boolean())
|
|
153206
153497
|
})
|
|
153207
153498
|
});
|
|
153208
|
-
var RootSchema =
|
|
153209
|
-
uri:
|
|
153210
|
-
name:
|
|
153211
|
-
_meta:
|
|
153499
|
+
var RootSchema = z60.object({
|
|
153500
|
+
uri: z60.string().startsWith("file://"),
|
|
153501
|
+
name: z60.string().optional(),
|
|
153502
|
+
_meta: z60.record(z60.string(), z60.unknown()).optional()
|
|
153212
153503
|
});
|
|
153213
153504
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
153214
|
-
method:
|
|
153505
|
+
method: z60.literal("roots/list"),
|
|
153215
153506
|
params: BaseRequestParamsSchema.optional()
|
|
153216
153507
|
});
|
|
153217
153508
|
var ListRootsResultSchema = ResultSchema.extend({
|
|
153218
|
-
roots:
|
|
153509
|
+
roots: z60.array(RootSchema)
|
|
153219
153510
|
});
|
|
153220
153511
|
var RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
153221
|
-
method:
|
|
153512
|
+
method: z60.literal("notifications/roots/list_changed"),
|
|
153222
153513
|
params: NotificationsParamsSchema.optional()
|
|
153223
153514
|
});
|
|
153224
|
-
var ClientRequestSchema =
|
|
153515
|
+
var ClientRequestSchema = z60.union([
|
|
153225
153516
|
PingRequestSchema,
|
|
153226
153517
|
InitializeRequestSchema,
|
|
153227
153518
|
CompleteRequestSchema,
|
|
@@ -153240,14 +153531,14 @@ var ClientRequestSchema = z61.union([
|
|
|
153240
153531
|
ListTasksRequestSchema,
|
|
153241
153532
|
CancelTaskRequestSchema
|
|
153242
153533
|
]);
|
|
153243
|
-
var ClientNotificationSchema =
|
|
153534
|
+
var ClientNotificationSchema = z60.union([
|
|
153244
153535
|
CancelledNotificationSchema,
|
|
153245
153536
|
ProgressNotificationSchema,
|
|
153246
153537
|
InitializedNotificationSchema,
|
|
153247
153538
|
RootsListChangedNotificationSchema,
|
|
153248
153539
|
TaskStatusNotificationSchema
|
|
153249
153540
|
]);
|
|
153250
|
-
var ClientResultSchema =
|
|
153541
|
+
var ClientResultSchema = z60.union([
|
|
153251
153542
|
EmptyResultSchema,
|
|
153252
153543
|
CreateMessageResultSchema,
|
|
153253
153544
|
CreateMessageResultWithToolsSchema,
|
|
@@ -153257,7 +153548,7 @@ var ClientResultSchema = z61.union([
|
|
|
153257
153548
|
ListTasksResultSchema,
|
|
153258
153549
|
CreateTaskResultSchema
|
|
153259
153550
|
]);
|
|
153260
|
-
var ServerRequestSchema =
|
|
153551
|
+
var ServerRequestSchema = z60.union([
|
|
153261
153552
|
PingRequestSchema,
|
|
153262
153553
|
CreateMessageRequestSchema,
|
|
153263
153554
|
ElicitRequestSchema,
|
|
@@ -153267,7 +153558,7 @@ var ServerRequestSchema = z61.union([
|
|
|
153267
153558
|
ListTasksRequestSchema,
|
|
153268
153559
|
CancelTaskRequestSchema
|
|
153269
153560
|
]);
|
|
153270
|
-
var ServerNotificationSchema =
|
|
153561
|
+
var ServerNotificationSchema = z60.union([
|
|
153271
153562
|
CancelledNotificationSchema,
|
|
153272
153563
|
ProgressNotificationSchema,
|
|
153273
153564
|
LoggingMessageNotificationSchema,
|
|
@@ -153278,7 +153569,7 @@ var ServerNotificationSchema = z61.union([
|
|
|
153278
153569
|
TaskStatusNotificationSchema,
|
|
153279
153570
|
ElicitationCompleteNotificationSchema
|
|
153280
153571
|
]);
|
|
153281
|
-
var ServerResultSchema =
|
|
153572
|
+
var ServerResultSchema = z60.union([
|
|
153282
153573
|
EmptyResultSchema,
|
|
153283
153574
|
InitializeResultSchema,
|
|
153284
153575
|
CompleteResultSchema,
|
|
@@ -155040,151 +155331,151 @@ async function pkceChallenge(length) {
|
|
|
155040
155331
|
}
|
|
155041
155332
|
|
|
155042
155333
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.32.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
155043
|
-
import * as
|
|
155044
|
-
var SafeUrlSchema =
|
|
155334
|
+
import * as z61 from "zod/v4";
|
|
155335
|
+
var SafeUrlSchema = z61.url().superRefine((val, ctx) => {
|
|
155045
155336
|
if (!URL.canParse(val)) {
|
|
155046
155337
|
ctx.addIssue({
|
|
155047
|
-
code:
|
|
155338
|
+
code: z61.ZodIssueCode.custom,
|
|
155048
155339
|
message: "URL must be parseable",
|
|
155049
155340
|
fatal: true
|
|
155050
155341
|
});
|
|
155051
|
-
return
|
|
155342
|
+
return z61.NEVER;
|
|
155052
155343
|
}
|
|
155053
155344
|
}).refine((url) => {
|
|
155054
155345
|
const u = new URL(url);
|
|
155055
155346
|
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
155056
155347
|
}, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
|
|
155057
|
-
var OAuthProtectedResourceMetadataSchema =
|
|
155058
|
-
resource:
|
|
155059
|
-
authorization_servers:
|
|
155060
|
-
jwks_uri:
|
|
155061
|
-
scopes_supported:
|
|
155062
|
-
bearer_methods_supported:
|
|
155063
|
-
resource_signing_alg_values_supported:
|
|
155064
|
-
resource_name:
|
|
155065
|
-
resource_documentation:
|
|
155066
|
-
resource_policy_uri:
|
|
155067
|
-
resource_tos_uri:
|
|
155068
|
-
tls_client_certificate_bound_access_tokens:
|
|
155069
|
-
authorization_details_types_supported:
|
|
155070
|
-
dpop_signing_alg_values_supported:
|
|
155071
|
-
dpop_bound_access_tokens_required:
|
|
155348
|
+
var OAuthProtectedResourceMetadataSchema = z61.looseObject({
|
|
155349
|
+
resource: z61.string().url(),
|
|
155350
|
+
authorization_servers: z61.array(SafeUrlSchema).optional(),
|
|
155351
|
+
jwks_uri: z61.string().url().optional(),
|
|
155352
|
+
scopes_supported: z61.array(z61.string()).optional(),
|
|
155353
|
+
bearer_methods_supported: z61.array(z61.string()).optional(),
|
|
155354
|
+
resource_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155355
|
+
resource_name: z61.string().optional(),
|
|
155356
|
+
resource_documentation: z61.string().optional(),
|
|
155357
|
+
resource_policy_uri: z61.string().url().optional(),
|
|
155358
|
+
resource_tos_uri: z61.string().url().optional(),
|
|
155359
|
+
tls_client_certificate_bound_access_tokens: z61.boolean().optional(),
|
|
155360
|
+
authorization_details_types_supported: z61.array(z61.string()).optional(),
|
|
155361
|
+
dpop_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155362
|
+
dpop_bound_access_tokens_required: z61.boolean().optional()
|
|
155072
155363
|
});
|
|
155073
|
-
var OAuthMetadataSchema =
|
|
155074
|
-
issuer:
|
|
155364
|
+
var OAuthMetadataSchema = z61.looseObject({
|
|
155365
|
+
issuer: z61.string(),
|
|
155075
155366
|
authorization_endpoint: SafeUrlSchema,
|
|
155076
155367
|
token_endpoint: SafeUrlSchema,
|
|
155077
155368
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
155078
|
-
scopes_supported:
|
|
155079
|
-
response_types_supported:
|
|
155080
|
-
response_modes_supported:
|
|
155081
|
-
grant_types_supported:
|
|
155082
|
-
token_endpoint_auth_methods_supported:
|
|
155083
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
155369
|
+
scopes_supported: z61.array(z61.string()).optional(),
|
|
155370
|
+
response_types_supported: z61.array(z61.string()),
|
|
155371
|
+
response_modes_supported: z61.array(z61.string()).optional(),
|
|
155372
|
+
grant_types_supported: z61.array(z61.string()).optional(),
|
|
155373
|
+
token_endpoint_auth_methods_supported: z61.array(z61.string()).optional(),
|
|
155374
|
+
token_endpoint_auth_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155084
155375
|
service_documentation: SafeUrlSchema.optional(),
|
|
155085
155376
|
revocation_endpoint: SafeUrlSchema.optional(),
|
|
155086
|
-
revocation_endpoint_auth_methods_supported:
|
|
155087
|
-
revocation_endpoint_auth_signing_alg_values_supported:
|
|
155088
|
-
introspection_endpoint:
|
|
155089
|
-
introspection_endpoint_auth_methods_supported:
|
|
155090
|
-
introspection_endpoint_auth_signing_alg_values_supported:
|
|
155091
|
-
code_challenge_methods_supported:
|
|
155092
|
-
client_id_metadata_document_supported:
|
|
155377
|
+
revocation_endpoint_auth_methods_supported: z61.array(z61.string()).optional(),
|
|
155378
|
+
revocation_endpoint_auth_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155379
|
+
introspection_endpoint: z61.string().optional(),
|
|
155380
|
+
introspection_endpoint_auth_methods_supported: z61.array(z61.string()).optional(),
|
|
155381
|
+
introspection_endpoint_auth_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155382
|
+
code_challenge_methods_supported: z61.array(z61.string()).optional(),
|
|
155383
|
+
client_id_metadata_document_supported: z61.boolean().optional()
|
|
155093
155384
|
});
|
|
155094
|
-
var OpenIdProviderMetadataSchema =
|
|
155095
|
-
issuer:
|
|
155385
|
+
var OpenIdProviderMetadataSchema = z61.looseObject({
|
|
155386
|
+
issuer: z61.string(),
|
|
155096
155387
|
authorization_endpoint: SafeUrlSchema,
|
|
155097
155388
|
token_endpoint: SafeUrlSchema,
|
|
155098
155389
|
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
155099
155390
|
jwks_uri: SafeUrlSchema,
|
|
155100
155391
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
155101
|
-
scopes_supported:
|
|
155102
|
-
response_types_supported:
|
|
155103
|
-
response_modes_supported:
|
|
155104
|
-
grant_types_supported:
|
|
155105
|
-
acr_values_supported:
|
|
155106
|
-
subject_types_supported:
|
|
155107
|
-
id_token_signing_alg_values_supported:
|
|
155108
|
-
id_token_encryption_alg_values_supported:
|
|
155109
|
-
id_token_encryption_enc_values_supported:
|
|
155110
|
-
userinfo_signing_alg_values_supported:
|
|
155111
|
-
userinfo_encryption_alg_values_supported:
|
|
155112
|
-
userinfo_encryption_enc_values_supported:
|
|
155113
|
-
request_object_signing_alg_values_supported:
|
|
155114
|
-
request_object_encryption_alg_values_supported:
|
|
155115
|
-
request_object_encryption_enc_values_supported:
|
|
155116
|
-
token_endpoint_auth_methods_supported:
|
|
155117
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
155118
|
-
display_values_supported:
|
|
155119
|
-
claim_types_supported:
|
|
155120
|
-
claims_supported:
|
|
155121
|
-
service_documentation:
|
|
155122
|
-
claims_locales_supported:
|
|
155123
|
-
ui_locales_supported:
|
|
155124
|
-
claims_parameter_supported:
|
|
155125
|
-
request_parameter_supported:
|
|
155126
|
-
request_uri_parameter_supported:
|
|
155127
|
-
require_request_uri_registration:
|
|
155392
|
+
scopes_supported: z61.array(z61.string()).optional(),
|
|
155393
|
+
response_types_supported: z61.array(z61.string()),
|
|
155394
|
+
response_modes_supported: z61.array(z61.string()).optional(),
|
|
155395
|
+
grant_types_supported: z61.array(z61.string()).optional(),
|
|
155396
|
+
acr_values_supported: z61.array(z61.string()).optional(),
|
|
155397
|
+
subject_types_supported: z61.array(z61.string()),
|
|
155398
|
+
id_token_signing_alg_values_supported: z61.array(z61.string()),
|
|
155399
|
+
id_token_encryption_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155400
|
+
id_token_encryption_enc_values_supported: z61.array(z61.string()).optional(),
|
|
155401
|
+
userinfo_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155402
|
+
userinfo_encryption_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155403
|
+
userinfo_encryption_enc_values_supported: z61.array(z61.string()).optional(),
|
|
155404
|
+
request_object_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155405
|
+
request_object_encryption_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155406
|
+
request_object_encryption_enc_values_supported: z61.array(z61.string()).optional(),
|
|
155407
|
+
token_endpoint_auth_methods_supported: z61.array(z61.string()).optional(),
|
|
155408
|
+
token_endpoint_auth_signing_alg_values_supported: z61.array(z61.string()).optional(),
|
|
155409
|
+
display_values_supported: z61.array(z61.string()).optional(),
|
|
155410
|
+
claim_types_supported: z61.array(z61.string()).optional(),
|
|
155411
|
+
claims_supported: z61.array(z61.string()).optional(),
|
|
155412
|
+
service_documentation: z61.string().optional(),
|
|
155413
|
+
claims_locales_supported: z61.array(z61.string()).optional(),
|
|
155414
|
+
ui_locales_supported: z61.array(z61.string()).optional(),
|
|
155415
|
+
claims_parameter_supported: z61.boolean().optional(),
|
|
155416
|
+
request_parameter_supported: z61.boolean().optional(),
|
|
155417
|
+
request_uri_parameter_supported: z61.boolean().optional(),
|
|
155418
|
+
require_request_uri_registration: z61.boolean().optional(),
|
|
155128
155419
|
op_policy_uri: SafeUrlSchema.optional(),
|
|
155129
155420
|
op_tos_uri: SafeUrlSchema.optional(),
|
|
155130
|
-
client_id_metadata_document_supported:
|
|
155421
|
+
client_id_metadata_document_supported: z61.boolean().optional()
|
|
155131
155422
|
});
|
|
155132
|
-
var OpenIdProviderDiscoveryMetadataSchema =
|
|
155423
|
+
var OpenIdProviderDiscoveryMetadataSchema = z61.object({
|
|
155133
155424
|
...OpenIdProviderMetadataSchema.shape,
|
|
155134
155425
|
...OAuthMetadataSchema.pick({
|
|
155135
155426
|
code_challenge_methods_supported: true
|
|
155136
155427
|
}).shape
|
|
155137
155428
|
});
|
|
155138
|
-
var OAuthTokensSchema =
|
|
155139
|
-
access_token:
|
|
155140
|
-
id_token:
|
|
155141
|
-
token_type:
|
|
155142
|
-
expires_in:
|
|
155143
|
-
scope:
|
|
155144
|
-
refresh_token:
|
|
155145
|
-
issuer:
|
|
155429
|
+
var OAuthTokensSchema = z61.object({
|
|
155430
|
+
access_token: z61.string(),
|
|
155431
|
+
id_token: z61.string().optional(),
|
|
155432
|
+
token_type: z61.string(),
|
|
155433
|
+
expires_in: z61.coerce.number().optional(),
|
|
155434
|
+
scope: z61.string().optional(),
|
|
155435
|
+
refresh_token: z61.string().optional(),
|
|
155436
|
+
issuer: z61.string().optional().catch(undefined)
|
|
155146
155437
|
}).strip();
|
|
155147
|
-
var OAuthErrorResponseSchema =
|
|
155148
|
-
error:
|
|
155149
|
-
error_description:
|
|
155150
|
-
error_uri:
|
|
155438
|
+
var OAuthErrorResponseSchema = z61.object({
|
|
155439
|
+
error: z61.string(),
|
|
155440
|
+
error_description: z61.string().optional(),
|
|
155441
|
+
error_uri: z61.string().optional()
|
|
155151
155442
|
});
|
|
155152
|
-
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(
|
|
155443
|
+
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z61.literal("").transform(() => {
|
|
155153
155444
|
return;
|
|
155154
155445
|
}));
|
|
155155
|
-
var OAuthClientMetadataSchema =
|
|
155156
|
-
redirect_uris:
|
|
155157
|
-
token_endpoint_auth_method:
|
|
155158
|
-
grant_types:
|
|
155159
|
-
response_types:
|
|
155160
|
-
client_name:
|
|
155446
|
+
var OAuthClientMetadataSchema = z61.object({
|
|
155447
|
+
redirect_uris: z61.array(SafeUrlSchema),
|
|
155448
|
+
token_endpoint_auth_method: z61.string().optional(),
|
|
155449
|
+
grant_types: z61.array(z61.string()).optional(),
|
|
155450
|
+
response_types: z61.array(z61.string()).optional(),
|
|
155451
|
+
client_name: z61.string().optional(),
|
|
155161
155452
|
client_uri: SafeUrlSchema.optional(),
|
|
155162
155453
|
logo_uri: OptionalSafeUrlSchema,
|
|
155163
|
-
scope:
|
|
155164
|
-
contacts:
|
|
155454
|
+
scope: z61.string().optional(),
|
|
155455
|
+
contacts: z61.array(z61.string()).optional(),
|
|
155165
155456
|
tos_uri: OptionalSafeUrlSchema,
|
|
155166
|
-
policy_uri:
|
|
155457
|
+
policy_uri: z61.string().optional(),
|
|
155167
155458
|
jwks_uri: SafeUrlSchema.optional(),
|
|
155168
|
-
jwks:
|
|
155169
|
-
software_id:
|
|
155170
|
-
software_version:
|
|
155171
|
-
software_statement:
|
|
155459
|
+
jwks: z61.any().optional(),
|
|
155460
|
+
software_id: z61.string().optional(),
|
|
155461
|
+
software_version: z61.string().optional(),
|
|
155462
|
+
software_statement: z61.string().optional()
|
|
155172
155463
|
}).strip();
|
|
155173
|
-
var OAuthClientInformationSchema =
|
|
155174
|
-
client_id:
|
|
155175
|
-
client_secret:
|
|
155176
|
-
client_id_issued_at:
|
|
155177
|
-
client_secret_expires_at:
|
|
155178
|
-
issuer:
|
|
155464
|
+
var OAuthClientInformationSchema = z61.object({
|
|
155465
|
+
client_id: z61.string(),
|
|
155466
|
+
client_secret: z61.string().optional(),
|
|
155467
|
+
client_id_issued_at: z61.number().optional(),
|
|
155468
|
+
client_secret_expires_at: z61.number().optional(),
|
|
155469
|
+
issuer: z61.string().optional().catch(undefined)
|
|
155179
155470
|
}).strip();
|
|
155180
155471
|
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
155181
|
-
var OAuthClientRegistrationErrorSchema =
|
|
155182
|
-
error:
|
|
155183
|
-
error_description:
|
|
155472
|
+
var OAuthClientRegistrationErrorSchema = z61.object({
|
|
155473
|
+
error: z61.string(),
|
|
155474
|
+
error_description: z61.string().optional()
|
|
155184
155475
|
}).strip();
|
|
155185
|
-
var OAuthTokenRevocationRequestSchema =
|
|
155186
|
-
token:
|
|
155187
|
-
token_type_hint:
|
|
155476
|
+
var OAuthTokenRevocationRequestSchema = z61.object({
|
|
155477
|
+
token: z61.string(),
|
|
155478
|
+
token_type_hint: z61.string().optional()
|
|
155188
155479
|
}).strip();
|
|
155189
155480
|
|
|
155190
155481
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.32.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
@@ -157155,7 +157446,7 @@ import { resolve as resolve37 } from "path";
|
|
|
157155
157446
|
|
|
157156
157447
|
// packages/mcp-client-core/src/skill-mcp-manager/env-grants-store.ts
|
|
157157
157448
|
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
157158
|
-
import { createHash as
|
|
157449
|
+
import { createHash as createHash8, randomUUID as randomUUID12 } from "crypto";
|
|
157159
157450
|
import { watch } from "fs";
|
|
157160
157451
|
import { mkdir as mkdir6, open as open3, rename as rename4, rm as rm4, stat as stat9 } from "fs/promises";
|
|
157161
157452
|
import { homedir as homedir28 } from "os";
|
|
@@ -157167,15 +157458,15 @@ var digestPattern = /^[a-f0-9]{64}$/;
|
|
|
157167
157458
|
function resolveGrantsStorePath(configDir) {
|
|
157168
157459
|
return join136(resolve36(configDir ?? join136(process.env.XDG_CONFIG_HOME ?? join136(homedir28(), ".config"), "omo")), "mcp-env-grants.json");
|
|
157169
157460
|
}
|
|
157170
|
-
function
|
|
157461
|
+
function record15(value) {
|
|
157171
157462
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
157172
157463
|
}
|
|
157173
157464
|
function parse5(value) {
|
|
157174
|
-
if (!
|
|
157465
|
+
if (!record15(value) || value.version !== 1 || !Number.isSafeInteger(value.generation) || typeof value.generation !== "number" || value.generation < 0 || !record15(value.grants))
|
|
157175
157466
|
return;
|
|
157176
157467
|
const grants = {};
|
|
157177
157468
|
for (const [digest, entry] of Object.entries(value.grants)) {
|
|
157178
|
-
if (!digestPattern.test(digest) || !
|
|
157469
|
+
if (!digestPattern.test(digest) || !record15(entry) || !record15(entry.label) || !Array.isArray(entry.names))
|
|
157179
157470
|
return;
|
|
157180
157471
|
const { project, skill, server } = entry.label;
|
|
157181
157472
|
if (typeof project !== "string" || typeof skill !== "string" || typeof server !== "string" || !entry.names.every((name) => typeof name === "string" && namePattern.test(name)))
|
|
@@ -157204,12 +157495,12 @@ async function read(path = resolveGrantsStorePath()) {
|
|
|
157204
157495
|
function canonical(value) {
|
|
157205
157496
|
if (Array.isArray(value))
|
|
157206
157497
|
return `[${value.map(canonical).join(",")}]`;
|
|
157207
|
-
if (
|
|
157498
|
+
if (record15(value))
|
|
157208
157499
|
return `{${Object.keys(value).filter((key) => value[key] !== undefined).sort().map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`).join(",")}}`;
|
|
157209
157500
|
return JSON.stringify(value) ?? "null";
|
|
157210
157501
|
}
|
|
157211
157502
|
function declarationDigest(identity) {
|
|
157212
|
-
return
|
|
157503
|
+
return createHash8("sha256").update(canonical(identity)).digest("hex");
|
|
157213
157504
|
}
|
|
157214
157505
|
|
|
157215
157506
|
class GrantsLockLostError extends Error {
|
|
@@ -157253,7 +157544,7 @@ async function update(path, mutate) {
|
|
|
157253
157544
|
await rename4(temporary, path);
|
|
157254
157545
|
break;
|
|
157255
157546
|
} catch (error) {
|
|
157256
|
-
if (process.platform !== "win32" || !
|
|
157547
|
+
if (process.platform !== "win32" || !record15(error) || !["EPERM", "EACCES", "EBUSY"].includes(String(error.code)) || attempt >= 5)
|
|
157257
157548
|
throw error;
|
|
157258
157549
|
await delay7(50 * 2 ** attempt);
|
|
157259
157550
|
}
|
|
@@ -157927,23 +158218,40 @@ class SkillMcpManager {
|
|
|
157927
158218
|
}
|
|
157928
158219
|
async listTools(info, context, options) {
|
|
157929
158220
|
const client = await this.getOrCreateClientWithRetry(info, context.config, options);
|
|
157930
|
-
|
|
157931
|
-
|
|
158221
|
+
return this.collectPages(async (cursor) => {
|
|
158222
|
+
const result = await client.listTools(cursor === undefined ? undefined : { cursor });
|
|
158223
|
+
return { items: result.tools, nextCursor: result.nextCursor };
|
|
158224
|
+
});
|
|
157932
158225
|
}
|
|
157933
158226
|
async listResources(info, context, options) {
|
|
157934
158227
|
const client = await this.getOrCreateClientWithRetry(info, context.config, options);
|
|
157935
|
-
|
|
157936
|
-
|
|
158228
|
+
return this.collectPages(async (cursor) => {
|
|
158229
|
+
const result = await client.listResources(cursor === undefined ? undefined : { cursor });
|
|
158230
|
+
return { items: result.resources, nextCursor: result.nextCursor };
|
|
158231
|
+
});
|
|
157937
158232
|
}
|
|
157938
158233
|
async listPrompts(info, context, options) {
|
|
157939
158234
|
const client = await this.getOrCreateClientWithRetry(info, context.config, options);
|
|
157940
|
-
|
|
157941
|
-
|
|
158235
|
+
return this.collectPages(async (cursor) => {
|
|
158236
|
+
const result = await client.listPrompts(cursor === undefined ? undefined : { cursor });
|
|
158237
|
+
return { items: result.prompts, nextCursor: result.nextCursor };
|
|
158238
|
+
});
|
|
158239
|
+
}
|
|
158240
|
+
async collectPages(request) {
|
|
158241
|
+
const items = [];
|
|
158242
|
+
let cursor;
|
|
158243
|
+
for (let page = 0;page < 100; page++) {
|
|
158244
|
+
const result = await request(cursor);
|
|
158245
|
+
items.push(...result.items);
|
|
158246
|
+
if (result.nextCursor === undefined)
|
|
158247
|
+
return items;
|
|
158248
|
+
cursor = result.nextCursor;
|
|
158249
|
+
}
|
|
158250
|
+
throw new Error("MCP list pagination exceeded 100 pages.");
|
|
157942
158251
|
}
|
|
157943
158252
|
async callTool(info, context, name, args, options) {
|
|
157944
158253
|
return await this.withOperationRetry(info, context.config, options, async (client) => {
|
|
157945
|
-
|
|
157946
|
-
return result.content;
|
|
158254
|
+
return await client.callTool({ name, arguments: args });
|
|
157947
158255
|
});
|
|
157948
158256
|
}
|
|
157949
158257
|
async readResource(info, context, uri, options) {
|
|
@@ -158077,7 +158385,7 @@ import { mkdirSync as mkdirSync24, readFileSync as readFileSync68 } from "fs";
|
|
|
158077
158385
|
import { dirname as dirname53 } from "path";
|
|
158078
158386
|
|
|
158079
158387
|
// packages/omo-opencode/src/features/tui-sidebar/mirror-path.ts
|
|
158080
|
-
import { createHash as
|
|
158388
|
+
import { createHash as createHash9 } from "crypto";
|
|
158081
158389
|
import { realpathSync as realpathSync24 } from "fs";
|
|
158082
158390
|
import { homedir as homedir29 } from "os";
|
|
158083
158391
|
import { join as join137, resolve as resolve38 } from "path";
|
|
@@ -158095,12 +158403,12 @@ function canonicalProjectDir(projectDir) {
|
|
|
158095
158403
|
}
|
|
158096
158404
|
}
|
|
158097
158405
|
function mirrorFilePath(projectDir) {
|
|
158098
|
-
const projectHash =
|
|
158406
|
+
const projectHash = createHash9("sha1").update(canonicalProjectDir(projectDir)).digest("hex").slice(0, 16);
|
|
158099
158407
|
return join137(mirrorStorageDir(), `${projectHash}.json`);
|
|
158100
158408
|
}
|
|
158101
158409
|
|
|
158102
158410
|
// packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
|
|
158103
|
-
import { z as
|
|
158411
|
+
import { z as z62 } from "zod";
|
|
158104
158412
|
var AGENT_STATUS_VALUES = [
|
|
158105
158413
|
"busy",
|
|
158106
158414
|
"idle",
|
|
@@ -158116,32 +158424,32 @@ var BACKGROUND_TASK_STATUS_VALUES = [
|
|
|
158116
158424
|
"cancelled",
|
|
158117
158425
|
"interrupt"
|
|
158118
158426
|
];
|
|
158119
|
-
var AgentRowSchema =
|
|
158120
|
-
name:
|
|
158121
|
-
status:
|
|
158427
|
+
var AgentRowSchema = z62.object({
|
|
158428
|
+
name: z62.string(),
|
|
158429
|
+
status: z62.enum(AGENT_STATUS_VALUES)
|
|
158122
158430
|
});
|
|
158123
|
-
var JobRowSchema =
|
|
158124
|
-
title:
|
|
158125
|
-
status:
|
|
158126
|
-
toolCalls:
|
|
158127
|
-
lastTool:
|
|
158431
|
+
var JobRowSchema = z62.object({
|
|
158432
|
+
title: z62.string(),
|
|
158433
|
+
status: z62.enum(BACKGROUND_TASK_STATUS_VALUES),
|
|
158434
|
+
toolCalls: z62.number().int().nonnegative().nullable(),
|
|
158435
|
+
lastTool: z62.string().nullable()
|
|
158128
158436
|
});
|
|
158129
|
-
var LoopLiveSchema =
|
|
158130
|
-
kind:
|
|
158131
|
-
goalsDone:
|
|
158132
|
-
goalsTotal:
|
|
158133
|
-
pass:
|
|
158134
|
-
fail:
|
|
158135
|
-
pending:
|
|
158136
|
-
blocked:
|
|
158137
|
-
activeGoal:
|
|
158437
|
+
var LoopLiveSchema = z62.object({
|
|
158438
|
+
kind: z62.literal("live"),
|
|
158439
|
+
goalsDone: z62.number().int().nonnegative(),
|
|
158440
|
+
goalsTotal: z62.number().int().nonnegative(),
|
|
158441
|
+
pass: z62.number().int().nonnegative(),
|
|
158442
|
+
fail: z62.number().int().nonnegative(),
|
|
158443
|
+
pending: z62.number().int().nonnegative(),
|
|
158444
|
+
blocked: z62.number().int().nonnegative(),
|
|
158445
|
+
activeGoal: z62.string().nullable()
|
|
158138
158446
|
});
|
|
158139
|
-
var TuiRuntimeSnapshotSchema =
|
|
158140
|
-
version:
|
|
158141
|
-
projectDir:
|
|
158142
|
-
updatedAt:
|
|
158143
|
-
activeAgents:
|
|
158144
|
-
jobBoard:
|
|
158447
|
+
var TuiRuntimeSnapshotSchema = z62.object({
|
|
158448
|
+
version: z62.literal(MIRROR_SCHEMA_VERSION),
|
|
158449
|
+
projectDir: z62.string(),
|
|
158450
|
+
updatedAt: z62.number(),
|
|
158451
|
+
activeAgents: z62.array(AgentRowSchema),
|
|
158452
|
+
jobBoard: z62.array(JobRowSchema),
|
|
158145
158453
|
loop: LoopLiveSchema.nullable()
|
|
158146
158454
|
});
|
|
158147
158455
|
|
|
@@ -158156,25 +158464,25 @@ function writeMirror(projectDir, snapshot) {
|
|
|
158156
158464
|
// packages/omo-opencode/src/features/tui-sidebar/loop-reader.ts
|
|
158157
158465
|
import { readdirSync as readdirSync32, readFileSync as readFileSync69, statSync as statSync16 } from "fs";
|
|
158158
158466
|
import { join as join138 } from "path";
|
|
158159
|
-
import { z as
|
|
158160
|
-
var CriterionSchema =
|
|
158161
|
-
status:
|
|
158467
|
+
import { z as z63 } from "zod";
|
|
158468
|
+
var CriterionSchema = z63.object({
|
|
158469
|
+
status: z63.string()
|
|
158162
158470
|
});
|
|
158163
|
-
var GoalBaseSchema =
|
|
158164
|
-
id:
|
|
158165
|
-
title:
|
|
158166
|
-
status:
|
|
158471
|
+
var GoalBaseSchema = z63.object({
|
|
158472
|
+
id: z63.string(),
|
|
158473
|
+
title: z63.string(),
|
|
158474
|
+
status: z63.string()
|
|
158167
158475
|
});
|
|
158168
|
-
var CurrentLoopSchema =
|
|
158169
|
-
version:
|
|
158170
|
-
activeGoalId:
|
|
158171
|
-
goals:
|
|
158172
|
-
successCriteria:
|
|
158476
|
+
var CurrentLoopSchema = z63.object({
|
|
158477
|
+
version: z63.literal(1),
|
|
158478
|
+
activeGoalId: z63.string().optional(),
|
|
158479
|
+
goals: z63.array(GoalBaseSchema.extend({
|
|
158480
|
+
successCriteria: z63.array(CriterionSchema)
|
|
158173
158481
|
}))
|
|
158174
158482
|
});
|
|
158175
|
-
var LegacyLoopSchema =
|
|
158176
|
-
goals:
|
|
158177
|
-
criteria:
|
|
158483
|
+
var LegacyLoopSchema = z63.object({
|
|
158484
|
+
goals: z63.array(GoalBaseSchema.extend({
|
|
158485
|
+
criteria: z63.array(CriterionSchema)
|
|
158178
158486
|
}))
|
|
158179
158487
|
});
|
|
158180
158488
|
function readActiveLoop(projectDir) {
|
|
@@ -168723,9 +169031,204 @@ ${tasksSection}
|
|
|
168723
169031
|
${styleBlock}`;
|
|
168724
169032
|
}
|
|
168725
169033
|
|
|
169034
|
+
// packages/omo-opencode/src/agents/sisyphus/kimi-k3-1.ts
|
|
169035
|
+
function buildKimiK31TasksSection(useTaskSystem) {
|
|
169036
|
+
if (useTaskSystem) {
|
|
169037
|
+
return `<tasks>
|
|
169038
|
+
Track multi-step work; skip the ceremony for everything else. Create tasks when the work spans three or more files or includes delegated, cross-cutting steps, not for trivial fixes, single-step requests, or pure exploration and answer turns.
|
|
169039
|
+
|
|
169040
|
+
When you track: \`TaskCreate\` the atomic steps up front (only for implementation the user asked for), mark one \`in_progress\` at a time, mark it \`completed\` the moment it lands, and revise the list before you change scope. Never batch completions.
|
|
169041
|
+
|
|
169042
|
+
When you have to ask for clarification, state what you understood, what is unclear, two or three options with their effort, and the one you recommend.
|
|
169043
|
+
</tasks>`;
|
|
169044
|
+
}
|
|
169045
|
+
return `<tasks>
|
|
169046
|
+
Track multi-step work; skip the ceremony for everything else. Create todos when the work spans three or more files or includes delegated, cross-cutting steps, not for trivial fixes, single-step requests, or pure exploration and answer turns.
|
|
169047
|
+
|
|
169048
|
+
When you track: \`todowrite\` the atomic steps up front (only for implementation the user explicitly requested), mark one \`in_progress\` at a time, mark it \`completed\` the moment it lands, and revise the list before you change scope. Never batch completions.
|
|
169049
|
+
|
|
169050
|
+
When you have to ask for clarification, state what you understood, what is unclear, two or three options with their effort, and the one you recommend.
|
|
169051
|
+
</tasks>`;
|
|
169052
|
+
}
|
|
169053
|
+
function buildKimiK31SisyphusPrompt(model, availableAgents, availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
|
|
169054
|
+
const keyTriggers = buildKeyTriggersSection(availableAgents, availableSkills);
|
|
169055
|
+
const toolSelection = buildToolSelectionTable(availableAgents, availableTools, availableSkills);
|
|
169056
|
+
const exploreSection = buildExploreSection(availableAgents);
|
|
169057
|
+
const librarianSection = buildLibrarianSection(availableAgents);
|
|
169058
|
+
const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
|
|
169059
|
+
const delegationTable = buildDelegationTable(availableAgents);
|
|
169060
|
+
const oracleSection = buildOracleSection(availableAgents);
|
|
169061
|
+
const hardBlocks = buildHardBlocksSection();
|
|
169062
|
+
const antiPatterns = buildAntiPatternsSection();
|
|
169063
|
+
const nonClaudePlannerSection = buildNonClaudePlannerSection(model);
|
|
169064
|
+
const tasksSection = buildKimiK31TasksSection(useTaskSystem);
|
|
169065
|
+
const todoHookNote = useTaskSystem ? "Your task creations are tracked by a hook ([SYSTEM REMINDER - TASK CONTINUATION])." : "Your todo creations are tracked by a hook ([SYSTEM REMINDER - TODO CONTINUATION]).";
|
|
169066
|
+
const agentIdentity = buildAgentIdentitySection("Sisyphus", "Powerful AI Agent with orchestration capabilities from OhMyOpenCode");
|
|
169067
|
+
const roleBlock = `<role>
|
|
169068
|
+
You are Sisyphus, the orchestration lead from OhMyOpenCode, running on Kimi K3.1.
|
|
169069
|
+
|
|
169070
|
+
You are a senior SF Bay Area engineer who scales output by delegating well. You read a request for the outcome it wants, route the work to the right specialist, supervise it, verify it, and ship. What you deliver (directly or through a subagent) is indistinguishable from a senior engineer's work.
|
|
169071
|
+
|
|
169072
|
+
You are outcome-first by temperament. You settle on a path and commit to it, you write lean, and you save deep reasoning for the places where correctness is genuinely at risk and move quickly everywhere else.
|
|
169073
|
+
|
|
169074
|
+
Instruction priority: the user overrides these defaults, newer instructions override older ones, and the safety and type-safety constraints below never yield. ${todoHookNote}
|
|
169075
|
+
</role>`;
|
|
169076
|
+
const k3CalibrationBlock = `<k3_calibration>
|
|
169077
|
+
K3's reasoning strength can become inertia. Apply these stop conditions on every turn:
|
|
169078
|
+
|
|
169079
|
+
- **Terminal condition rule.** Once the decisive fact is in your context (the file path, the failing test, the user's explicit choice, the converged search result) stop analyzing and act. Do not re-derive it, do not re-verify it, and do not add a "just to be sure" pass.
|
|
169080
|
+
- **Commitment rule.** Choose an approach and execute it. Reopen the choice only when new evidence contradicts it, never to reassure yourself.
|
|
169081
|
+
- **No unused alternatives.** If the user did not ask for a comparison, do not enumerate approaches you are not going to take. State the chosen path in one line and proceed.
|
|
169082
|
+
- **Go-work rule.** If the next action is obvious, take it. Favor a small forward tool call over a paragraph of analysis. A response that ends with "so I will..." without the actual tool call is a failure mode.
|
|
169083
|
+
- **Thinking budget.** Reserve extended reasoning for: hidden state, failing runtime behavior, security implications, irreversible operations, or genuine ambiguity with materially different outcomes. Everything else is direct execution.
|
|
169084
|
+
- **Confirmation turns.** When the user confirms or refines something you already verbalized, acknowledge in one line and act. Do not emit a fresh "I read this as..." preamble.
|
|
169085
|
+
</k3_calibration>`;
|
|
169086
|
+
const operatingRulesBlock = `<operating_rules>
|
|
169087
|
+
Decision rules, not rituals: apply judgment.
|
|
169088
|
+
|
|
169089
|
+
- Commit once. Choose an approach and execute it; reopen the choice only when new evidence contradicts it, never to reassure yourself.
|
|
169090
|
+
- Orchestrate by default. Do the work yourself only when it is small, local, and you already hold full context.
|
|
169091
|
+
- Parallelize. Independent reads, searches, and agent fires go out in one response; sequence only a real dependency.
|
|
169092
|
+
- Stop when you can act. Once you have enough to proceed correctly, proceed: sufficient beats complete.
|
|
169093
|
+
- Verify what you ship. A passing type check is not a working feature; confirm behavior before calling anything done.
|
|
169094
|
+
</operating_rules>`;
|
|
169095
|
+
const constraintsBlock = `<constraints>
|
|
169096
|
+
${hardBlocks}
|
|
169097
|
+
|
|
169098
|
+
${antiPatterns}
|
|
169099
|
+
</constraints>`;
|
|
169100
|
+
const intentBlock = `<intent>
|
|
169101
|
+
Every message passes this gate before you act. Classify from the CURRENT message: never carry implementation mode over from a previous turn. If the turn is a question, an explanation, or an investigation, answer or analyze only. If the user is still handing you context, gather and confirm it first.
|
|
169102
|
+
|
|
169103
|
+
${keyTriggers}
|
|
169104
|
+
|
|
169105
|
+
Read the surface form for the true intent:
|
|
169106
|
+
|
|
169107
|
+
| The user says | They want | You |
|
|
169108
|
+
|---|---|---|
|
|
169109
|
+
| "explain X", "how does Y work" | understanding | explore, then answer in prose |
|
|
169110
|
+
| "implement X", "add Y", "create Z" | code changes | plan, then delegate or execute |
|
|
169111
|
+
| "look into X", "check Y" | investigation, not a fix | explore, report, wait |
|
|
169112
|
+
| "what do you think about X?" | your judgment first | evaluate, propose, wait |
|
|
169113
|
+
| "X is broken", "error Y" | a minimal fix | diagnose, fix at the root, verify |
|
|
169114
|
+
| "refactor", "clean up", "improve" | an open-ended change | assess the codebase, propose, wait |
|
|
169115
|
+
| "yesterday's work seems off" | a recent regression found and fixed | check recent changes, hypothesize, verify, fix |
|
|
169116
|
+
| "fix this whole thing" | a thorough multi-issue pass | scope it, make a todo list, work through it |
|
|
169117
|
+
|
|
169118
|
+
Then say it in one line ("I read this as [complexity]-[domain]: [one-line plan]") and proceed. Once you name implementation, fix, or investigation, that line is a commitment for the turn. When the user is confirming or refining something you already verbalized, or has already chosen in plain words ("yes do it", "A\uB85C \uAC00\uC790"), skip the fresh read: acknowledge in one line and act. When the answer is already in your context, return it rather than re-deriving it.
|
|
169119
|
+
|
|
169120
|
+
Implement only when the current message holds an explicit implementation verb (implement / add / create / fix / change / write / build), the scope is concrete enough to execute without guessing, and no specialist result you depend on is still pending. If any of those fail, research or clarify and end the turn: do not invent authorization.
|
|
169121
|
+
|
|
169122
|
+
Ask only when the action is irreversible, has external side effects (sending, deleting, publishing, pushing to production), or critical missing information would change the outcome. Otherwise proceed and state what you did and what remains. For minor choices (naming, defaults, equivalent approaches) pick a sensible one and note it; do not stop to ask.
|
|
169123
|
+
</intent>`;
|
|
169124
|
+
const explorationBlock = `<exploration>
|
|
169125
|
+
On first contact with a repo or module, read its signals (linter, formatter, and type configs plus two or three similar files) and match what you find. Disciplined codebase: follow its style strictly. Mixed: ask which pattern to follow. Chaotic: propose conventions and confirm. Greenfield: apply modern defaults. Different patterns may be intentional or a migration in progress; verify before assuming.
|
|
169126
|
+
|
|
169127
|
+
${toolSelection}
|
|
169128
|
+
|
|
169129
|
+
${exploreSection}
|
|
169130
|
+
|
|
169131
|
+
${librarianSection}
|
|
169132
|
+
|
|
169133
|
+
Use tools whenever they improve correctness: your memory of file contents is unreliable. Prefer them over internal knowledge for anything specific, and read the full cluster of related files rather than one at a time. If a tool returns empty or partial results, retry with a different strategy before concluding.
|
|
169134
|
+
|
|
169135
|
+
Issue independent calls together (three file reads, a grep plus a read, two explore agents, diagnostics across files) in one response. Sequence only when one call needs another's output. When you are unsure whether two calls are independent, assume they are and parallelize.
|
|
169136
|
+
|
|
169137
|
+
${KIMI_TOOL_LOOP_GUARD}
|
|
169138
|
+
|
|
169139
|
+
Budget the search to the task: a clear single target is zero to two calls; a known domain with an unclear location is one parallel wave plus synthesis; a genuinely open question may take a few waves. Stop the moment the answer is in your context, the user already stated the fact, sources converge, or one wave plus synthesis is done. Launch another wave only for a new unknown the synthesis surfaced: never a "to be sure" pass.
|
|
169140
|
+
|
|
169141
|
+
Fire explore and librarian agents in the background (\`run_in_background=true\`), always in parallel. Give each one [CONTEXT] (the task and modules), [GOAL] (the decision it unblocks), [DOWNSTREAM] (how you will use it), and [REQUEST] (what to find, in what format, what to skip). After firing, either do non-overlapping work or end your turn; collect results with \`background_output(task_id="bg_...")\` only after the system's completion reminder arrives, never before. Cancel disposable tasks individually; never \`background_cancel(all=true)\`. Continue a subagent's session with \`task(task_id="ses_...")\`.
|
|
169142
|
+
|
|
169143
|
+
${buildAntiDuplicationSection()}
|
|
169144
|
+
</exploration>`;
|
|
169145
|
+
const executionBlock = `<execution>
|
|
169146
|
+
Implementation work runs this loop.
|
|
169147
|
+
|
|
169148
|
+
**Plan.** List the files you will touch, the changes, and the dependencies. Two or more steps \u2192 consult the Plan agent via \`task(subagent_type="plan", ...)\`; a single step needs only a mental plan. Resolve any prerequisite lookup before the action that depends on it, even when the final step looks obvious.
|
|
169149
|
+
|
|
169150
|
+
**Route.** Decide who does the work:
|
|
169151
|
+
- Delegate (the default) for a specialized domain, multi-file work, anything over roughly 50 lines, or an unfamiliar module, to the matching category. Visual work goes to visual-engineering without exception.
|
|
169152
|
+
- Do it yourself only for small, local, fully-understood changes.
|
|
169153
|
+
- Answer when the request was for analysis.
|
|
169154
|
+
- Challenge when the user's design will clearly cause problems: name the concern, propose an alternative, ask whether to proceed.
|
|
169155
|
+
If any available skill's domain touches the task, load it now via \`skill\` and pass it in \`load_skills\`: a spare skill costs almost nothing, a missing relevant one costs a lot.
|
|
169156
|
+
|
|
169157
|
+
**Execute or supervise.** Yourself: surgical changes, match existing patterns, minimal diff, never suppress a type error, never commit unless asked, fix bugs minimally without refactoring around them. Delegating: write the six-section prompt below and reuse the session for follow-ups.
|
|
169158
|
+
|
|
169159
|
+
**Verify.** Scope the rigor to the change; never skip it.
|
|
169160
|
+
|
|
169161
|
+
<verification>
|
|
169162
|
+
- Trivial change (one file, under ~10 lines, no behavior change): \`lsp_diagnostics\` on the file.
|
|
169163
|
+
- Local behavioral change (a few files, one domain): diagnostics across the changed files in parallel; run the tests that import the changed module and watch them actually pass; if an entry point is affected, run it once.
|
|
169164
|
+
- Cross-cutting change, or ANY delegated work: diagnostics clean on every changed file; related tests actually pass; the build exits 0 where there is one; and when behavior is runnable or user-visible, RUN IT through its real surface: interactive_bash for a TUI or CLI, a real browser for the web, curl for an HTTP API, a driver script for a library. Read every file a subagent touched and check it against the contract; a subagent's self-report is not evidence.
|
|
169165
|
+
|
|
169166
|
+
Every verification claim rests on tool output from this turn, not memory: "should pass" means you have not verified. Delegated work always takes the top tier. Fix only what your change broke; note pre-existing issues without fixing them unless asked.
|
|
169167
|
+
</verification>
|
|
169168
|
+
|
|
169169
|
+
**Recover.** A failed trivial fix goes back to the user: do not auto-retry. For larger work, fix the root cause and re-verify after each attempt; if an approach fails, switch to a materially different one rather than retrying blindly. After three failed attempts, stop, revert to the last good state, document what you tried, consult Oracle with the full context, and ask the user if Oracle cannot resolve it. Never leave code broken; never delete a failing test to get green.
|
|
169170
|
+
|
|
169171
|
+
**Done.** Exit only when every planned item is complete, diagnostics are clean, the build passes where applicable, and the user's explicit request is fully addressed, not partially, not "you could extend it later." Keep scope tight: "could also improve X" belongs in a closing note, not in the diff.
|
|
169172
|
+
|
|
169173
|
+
Report at the transitions (before exploring, after discovery, before a large edit, on a blocker) in a sentence or two with one concrete detail. No upfront narration, no scripted preambles.
|
|
169174
|
+
</execution>`;
|
|
169175
|
+
const delegationBlock = `<delegation>
|
|
169176
|
+
Find and load relevant skills first: if the task context touches any available skill, even loosely, load it without hesitation.
|
|
169177
|
+
|
|
169178
|
+
${categorySkillsGuide}
|
|
169179
|
+
|
|
169180
|
+
${nonClaudePlannerSection}
|
|
169181
|
+
|
|
169182
|
+
${delegationTable}
|
|
169183
|
+
|
|
169184
|
+
Every \`task()\` prompt carries all six sections: a vague prompt buys a vague result you will have to redo:
|
|
169185
|
+
1. TASK: the one specific goal.
|
|
169186
|
+
2. EXPECTED OUTCOME: concrete deliverables and how to check them.
|
|
169187
|
+
3. REQUIRED TOOLS: the explicit whitelist.
|
|
169188
|
+
4. MUST DO: every requirement, nothing implicit.
|
|
169189
|
+
5. MUST NOT DO: the forbidden actions, anticipating rogue behavior.
|
|
169190
|
+
6. CONTEXT: file paths, patterns to follow, constraints.
|
|
169191
|
+
|
|
169192
|
+
Every \`task()\` returns a continuation id (\`ses_...\`). Reuse it for every follow-up (fixes, questions, multi-turn refinement) instead of starting fresh; it keeps the subagent's context and saves most of the tokens a new session would burn. Keep the id kinds straight: \`bg_...\` is for \`background_output\`, \`ses_...\` is for \`task\`. Delegation never replaces verification: run the checks above on whatever comes back.
|
|
169193
|
+
${oracleSection ? `
|
|
169194
|
+
${oracleSection}
|
|
169195
|
+
` : ""}</delegation>`;
|
|
169196
|
+
const styleBlock = `<style>
|
|
169197
|
+
Write like a knowledgeable colleague, in complete sentences: not a spec sheet, not bullet fragments. Explain the why behind a tradeoff, a pattern choice, or a risk; the user gains more from understanding than from a menu of options. Stay concise in volume but never so terse that you drop the evidence, reasoning, or completion checks that matter.
|
|
169198
|
+
|
|
169199
|
+
Default to three to six sentences or up to five bullets; a yes/no answer is one or two sentences; a complex multi-file result is a short overview plus up to five tagged bullets (What, Where, Risks, Next, Open). Before a non-trivial action, give a two- or three-sentence plan.
|
|
169200
|
+
|
|
169201
|
+
Skip the filler (no "Great question!", no restating the user's request back to them, no "let me double-check" narration), but keep the context that helps the user follow your reasoning. State verification concretely: "Tests pass: 142/142", never "tests should pass." The one-line intent read from the gate above is always required before you act.
|
|
169202
|
+
|
|
169203
|
+
When the user's approach has a problem, say so directly and explain the alternative you would choose and why: framed as what you found, not a tentative suggestion.
|
|
169204
|
+
</style>`;
|
|
169205
|
+
return `${agentIdentity}
|
|
169206
|
+
${roleBlock}
|
|
169207
|
+
|
|
169208
|
+
${k3CalibrationBlock}
|
|
169209
|
+
|
|
169210
|
+
${operatingRulesBlock}
|
|
169211
|
+
|
|
169212
|
+
${constraintsBlock}
|
|
169213
|
+
|
|
169214
|
+
${intentBlock}
|
|
169215
|
+
|
|
169216
|
+
${explorationBlock}
|
|
169217
|
+
|
|
169218
|
+
${executionBlock}
|
|
169219
|
+
|
|
169220
|
+
${delegationBlock}
|
|
169221
|
+
|
|
169222
|
+
${tasksSection}
|
|
169223
|
+
|
|
169224
|
+
${styleBlock}`;
|
|
169225
|
+
}
|
|
169226
|
+
|
|
168726
169227
|
// packages/omo-opencode/src/agents/sisyphus-agent-factory.ts
|
|
168727
169228
|
var MODE = "primary";
|
|
168728
169229
|
function resolveSisyphusPromptFamily(model) {
|
|
169230
|
+
if (isKimiK31Model(model))
|
|
169231
|
+
return "kimi-k3-1";
|
|
168729
169232
|
if (isKimiK3Model(model))
|
|
168730
169233
|
return "kimi-k3";
|
|
168731
169234
|
if (isKimiK2CodeModel(model))
|
|
@@ -168756,6 +169259,8 @@ function createSisyphusAgent(model, availableAgents, availableToolNames, availab
|
|
|
168756
169259
|
const categories = availableCategories ?? [];
|
|
168757
169260
|
const agents = availableAgents ?? [];
|
|
168758
169261
|
switch (resolveSisyphusPromptFamily(model)) {
|
|
169262
|
+
case "kimi-k3-1":
|
|
169263
|
+
return buildGptSisyphusAgentConfig(MODE, model, buildKimiK31SisyphusPrompt(model, agents, tools, skills, categories, useTaskSystem));
|
|
168759
169264
|
case "kimi-k3":
|
|
168760
169265
|
return buildGptSisyphusAgentConfig(MODE, model, buildKimiK3SisyphusPrompt(model, agents, tools, skills, categories, useTaskSystem));
|
|
168761
169266
|
case "kimi-k2-7":
|
|
@@ -172221,6 +172726,77 @@ A failed trivial fix goes back to the user: do not auto-retry. Otherwise fix the
|
|
|
172221
172726
|
|
|
172222
172727
|
## Report
|
|
172223
172728
|
|
|
172729
|
+
Lead with the outcome in one or two short paragraphs; reach for a few flat bullets only when the content is genuinely a list. Start working immediately (no "Got it" or "You're right" openers, no restating the request), but send a clear line before any significant action. Explain the why, not just the what, and state verification concretely ("Tests pass: 142/142"), never "should pass."`;
|
|
172730
|
+
if (!promptAppend)
|
|
172731
|
+
return prompt;
|
|
172732
|
+
return prompt + `
|
|
172733
|
+
|
|
172734
|
+
` + resolvePromptAppend(promptAppend);
|
|
172735
|
+
}
|
|
172736
|
+
// packages/omo-opencode/src/agents/sisyphus-junior/kimi-k3-1.ts
|
|
172737
|
+
function buildKimiK31TaskDisciplineSection(useTaskSystem) {
|
|
172738
|
+
const create = useTaskSystem ? "`task_create`" : "`todowrite`";
|
|
172739
|
+
const progress = useTaskSystem ? '`task_update(status="in_progress")`' : "mark in_progress";
|
|
172740
|
+
const complete = useTaskSystem ? '`task_update(status="completed")`' : "mark completed";
|
|
172741
|
+
return `## Track multi-step work
|
|
172742
|
+
|
|
172743
|
+
When the work spans three or more files or multiple steps, ${create} the atomic breakdown first, ${progress} one step at a time, ${complete} the moment a step lands, and never batch completions. Skip this for trivial single-step fixes.`;
|
|
172744
|
+
}
|
|
172745
|
+
function buildKimiK31SisyphusJuniorPrompt(useTaskSystem, promptAppend) {
|
|
172746
|
+
const taskDiscipline = buildKimiK31TaskDisciplineSection(useTaskSystem);
|
|
172747
|
+
const trackingTool = useTaskSystem ? "`task_update`" : "`todowrite`";
|
|
172748
|
+
const prompt = `You are Sisyphus-Junior, a focused task executor from OhMyOpenCode, running on Kimi K3.1.
|
|
172749
|
+
|
|
172750
|
+
You take one delegated task and carry it to completion yourself. You build context from the codebase before assuming anything, you decide and commit instead of deliberating, and you keep going until the work is genuinely done, not until it looks plausible. Your reasoning depth is the point of this model: spend it where correctness is genuinely at risk (hidden state, failing runtime behavior, irreversible operations, genuine ambiguity) and act directly everywhere else. Once the decisive fact is in your context (the file path, the failing test, the converged search result), stop analyzing and make the change. Never trade verification away for speed.
|
|
172751
|
+
|
|
172752
|
+
You execute; you do not orchestrate. You may fire explore or librarian via call_omo_agent for research, but the implementation is yours.
|
|
172753
|
+
|
|
172754
|
+
## Keep going
|
|
172755
|
+
|
|
172756
|
+
Solve the problem. When blocked, try a different approach, decompose it, challenge your assumptions, look at how the codebase already solves something similar. Then continue. Ask only when it is genuinely impossible to proceed.
|
|
172757
|
+
|
|
172758
|
+
Decide rather than ask permission. Run the lint, tests, and build yourself; make the reasonable call on a minor choice and note it; fix what you notice or record it in the final message. Never stop mid-task to ask "should I proceed?" or "do you want me to run tests?". When the next action is obvious, take it: favor a small forward tool call over a paragraph of analysis; a response that ends with "so I will..." without the actual tool call is a failure mode. Finish the work, then surface your assumptions in the final message, not as questions partway through.
|
|
172759
|
+
|
|
172760
|
+
## Read the task once
|
|
172761
|
+
|
|
172762
|
+
State your read in one line ("I read this as [what]: [plan].") and proceed. Commit to it; reopen only if new evidence contradicts it, never to reassure yourself. Do not enumerate approaches you are not going to take: state the chosen path and execute it. When the user is confirming or refining something you already stated, or the answer is already in your context, act or return it in one line without re-deriving.
|
|
172763
|
+
|
|
172764
|
+
Implement exactly and only what was asked: no extra features, no embellishment, no scope creep, no invented requirements. If you notice changes you did not make, they belong to the user or another agent; work around them unless they directly block your task, then ask.
|
|
172765
|
+
|
|
172766
|
+
When the task is ambiguous: a single valid reading means proceed; missing information that might exist means find it with tools first; several plausible readings means state yours and take the simplest; genuinely impossible means ask one precise question, as a last resort.
|
|
172767
|
+
|
|
172768
|
+
## Work with tools, not guesses
|
|
172769
|
+
|
|
172770
|
+
Fire independent calls together (several reads, greps, and agent fires in one response), and sequence only a real dependency. Prefer tools over memory for any specific fact (file contents, configs, patterns); if a tool returns empty, retry with a different strategy before concluding. After each edit, restate what changed, where, and what verification follows.
|
|
172771
|
+
|
|
172772
|
+
${KIMI_TOOL_LOOP_GUARD}
|
|
172773
|
+
|
|
172774
|
+
Budget the search to the task: a clear target is a call or two; a known domain with an unclear location is one parallel wave plus synthesis; a genuinely open question may take a few. Stop once the answer is in your context, the user stated the fact, sources converge, or a wave plus synthesis is done: launch a second wave only for a genuinely new unknown, never a "to be sure" pass.
|
|
172775
|
+
|
|
172776
|
+
${buildAntiDuplicationSection()}
|
|
172777
|
+
|
|
172778
|
+
## Before you write code
|
|
172779
|
+
|
|
172780
|
+
Search for the existing pattern and match it: naming, imports, error handling, indentation. Default to ASCII and comment only the non-obvious. Keep each shell command in its own call rather than chaining with separators.
|
|
172781
|
+
|
|
172782
|
+
## Verify before you claim done
|
|
172783
|
+
|
|
172784
|
+
Scope the rigor to the change; never skip it.
|
|
172785
|
+
|
|
172786
|
+
- Trivial change (one file, under ~10 lines, no behavior change): \`lsp_diagnostics\` on the file.
|
|
172787
|
+
- Local behavioral change (a few files): diagnostics across the changed files in parallel; run the tests that import the changed module and watch them actually pass; run an affected entry point once.
|
|
172788
|
+
- Cross-cutting change, or anything an explore/librarian agent helped shape: diagnostics clean everywhere; related tests actually pass; the build exits 0 where there is one; and when behavior is runnable or user-visible, RUN IT through its real surface via Bash. Type checks catch type errors, not logic bugs, and "should work" is not verification.
|
|
172789
|
+
|
|
172790
|
+
Every claim rests on tool output from this turn, not memory. Verify once, then stop; a fact established this turn does not need a second pass. Note pre-existing issues without fixing them unless asked. Track completion with ${trackingTool}. No evidence means not complete.
|
|
172791
|
+
|
|
172792
|
+
${taskDiscipline}
|
|
172793
|
+
|
|
172794
|
+
## Recover from failure
|
|
172795
|
+
|
|
172796
|
+
A failed trivial fix goes back to the user: do not auto-retry. Otherwise fix the root cause, re-verify after each attempt, and switch to a materially different approach when one fails rather than retrying blindly. After three different approaches fail, stop and report clearly what you tried. Never leave code broken; never delete a failing test to get green.
|
|
172797
|
+
|
|
172798
|
+
## Report
|
|
172799
|
+
|
|
172224
172800
|
Lead with the outcome in one or two short paragraphs; reach for a few flat bullets only when the content is genuinely a list. Start working immediately (no "Got it" or "You're right" openers, no restating the request), but send a clear line before any significant action. Explain the why, not just the what, and state verification concretely ("Tests pass: 142/142"), never "should pass."`;
|
|
172225
172801
|
if (!promptAppend)
|
|
172226
172802
|
return prompt;
|
|
@@ -173096,6 +173672,8 @@ var SISYPHUS_JUNIOR_DEFAULTS = {
|
|
|
173096
173672
|
temperature: 0.1
|
|
173097
173673
|
};
|
|
173098
173674
|
function getSisyphusJuniorPromptSource(model) {
|
|
173675
|
+
if (model && isKimiK31Model(model))
|
|
173676
|
+
return "kimi-k3-1";
|
|
173099
173677
|
if (model && isKimiK3Model(model))
|
|
173100
173678
|
return "kimi-k3";
|
|
173101
173679
|
if (model && isKimiK2CodeModel(model))
|
|
@@ -173120,6 +173698,8 @@ function getSisyphusJuniorPromptSource(model) {
|
|
|
173120
173698
|
function buildSisyphusJuniorPrompt(model, useTaskSystem, promptAppend) {
|
|
173121
173699
|
const source = getSisyphusJuniorPromptSource(model);
|
|
173122
173700
|
switch (source) {
|
|
173701
|
+
case "kimi-k3-1":
|
|
173702
|
+
return buildKimiK31SisyphusJuniorPrompt(useTaskSystem, promptAppend);
|
|
173123
173703
|
case "kimi-k3":
|
|
173124
173704
|
return buildKimiK3SisyphusJuniorPrompt(useTaskSystem, promptAppend);
|
|
173125
173705
|
case "kimi-k2-7":
|
|
@@ -174865,7 +175445,7 @@ var grep_app = {
|
|
|
174865
175445
|
import { existsSync as existsSync111, readFileSync as readFileSync76 } from "fs";
|
|
174866
175446
|
import { delimiter as delimiter2, dirname as dirname56, resolve as resolve41 } from "path";
|
|
174867
175447
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
174868
|
-
import { z as
|
|
175448
|
+
import { z as z64 } from "zod";
|
|
174869
175449
|
|
|
174870
175450
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
174871
175451
|
function normalizeCliPath(path) {
|
|
@@ -174966,8 +175546,8 @@ var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-clie
|
|
|
174966
175546
|
var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
|
|
174967
175547
|
var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
|
|
174968
175548
|
var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
174969
|
-
var DaemonPackageSchema =
|
|
174970
|
-
version:
|
|
175549
|
+
var DaemonPackageSchema = z64.object({
|
|
175550
|
+
version: z64.string().min(1)
|
|
174971
175551
|
});
|
|
174972
175552
|
var LSP_BOOTSTRAP_SCRIPT = [
|
|
174973
175553
|
"const { existsSync } = require('node:fs')",
|
|
@@ -175811,14 +176391,14 @@ function createTeamModeToolsRecord(args) {
|
|
|
175811
176391
|
// node_modules/.bun/@opencode-ai+sdk@1.18.31/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
175812
176392
|
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
175813
176393
|
// packages/omo-opencode/src/plugin/native-skills.ts
|
|
175814
|
-
import { z as
|
|
175815
|
-
var NativeSkillEntrySchema =
|
|
175816
|
-
name:
|
|
175817
|
-
description:
|
|
175818
|
-
location:
|
|
175819
|
-
content:
|
|
176394
|
+
import { z as z65 } from "zod";
|
|
176395
|
+
var NativeSkillEntrySchema = z65.object({
|
|
176396
|
+
name: z65.string(),
|
|
176397
|
+
description: z65.string().default(""),
|
|
176398
|
+
location: z65.string(),
|
|
176399
|
+
content: z65.string()
|
|
175820
176400
|
});
|
|
175821
|
-
var NativeSkillEntriesSchema =
|
|
176401
|
+
var NativeSkillEntriesSchema = z65.array(NativeSkillEntrySchema);
|
|
175822
176402
|
function getObjectProperty(value, property) {
|
|
175823
176403
|
if (typeof value !== "object" || value === null)
|
|
175824
176404
|
return;
|
|
@@ -176969,7 +177549,7 @@ async function resolveParticipant2(teamRunId, sessionID, config, deps) {
|
|
|
176969
177549
|
}
|
|
176970
177550
|
|
|
176971
177551
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
|
|
176972
|
-
import { z as
|
|
177552
|
+
import { z as z66 } from "zod";
|
|
176973
177553
|
init_types2();
|
|
176974
177554
|
var TEAM_CREATE_USAGE = 'team_create requires exactly one of teamName or inline_spec. Use team_create({ teamName: "existing-team" }) or team_create({ inline_spec: { name: "team-name", members: [{ name: "worker", category: "quick", prompt: "Do the assigned work." }] } }).';
|
|
176975
177555
|
function omitEmptyStringArgs(rawArgs) {
|
|
@@ -176978,10 +177558,10 @@ function omitEmptyStringArgs(rawArgs) {
|
|
|
176978
177558
|
}
|
|
176979
177559
|
return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
|
|
176980
177560
|
}
|
|
176981
|
-
var TeamCreateArgsSchema =
|
|
176982
|
-
teamName:
|
|
176983
|
-
inline_spec:
|
|
176984
|
-
leadSessionId:
|
|
177561
|
+
var TeamCreateArgsSchema = z66.preprocess(omitEmptyStringArgs, z66.object({
|
|
177562
|
+
teamName: z66.string().min(1).nullish(),
|
|
177563
|
+
inline_spec: z66.unknown().nullish(),
|
|
177564
|
+
leadSessionId: z66.string().nullish()
|
|
176985
177565
|
}).superRefine((value, ctx) => {
|
|
176986
177566
|
const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
|
|
176987
177567
|
if (optionCount !== 1) {
|
|
@@ -177103,7 +177683,7 @@ function createTeamCreateTool(config, client, bgMgr, tmuxMgr, executorConfig, de
|
|
|
177103
177683
|
});
|
|
177104
177684
|
}
|
|
177105
177685
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
177106
|
-
import { z as
|
|
177686
|
+
import { z as z67 } from "zod";
|
|
177107
177687
|
// packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
|
|
177108
177688
|
init_store2();
|
|
177109
177689
|
init_shutdown_helpers();
|
|
@@ -177192,13 +177772,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
|
|
|
177192
177772
|
|
|
177193
177773
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
177194
177774
|
init_store();
|
|
177195
|
-
var TeamDeleteArgsSchema =
|
|
177196
|
-
var TeamShutdownRequestArgsSchema =
|
|
177197
|
-
var TeamApproveShutdownArgsSchema =
|
|
177198
|
-
var TeamRejectShutdownArgsSchema =
|
|
177199
|
-
teamRunId:
|
|
177200
|
-
memberName:
|
|
177201
|
-
reason:
|
|
177775
|
+
var TeamDeleteArgsSchema = z67.object({ teamRunId: z67.string().min(1), force: z67.boolean().optional() });
|
|
177776
|
+
var TeamShutdownRequestArgsSchema = z67.object({ teamRunId: z67.string().min(1), targetMemberName: z67.string().min(1) });
|
|
177777
|
+
var TeamApproveShutdownArgsSchema = z67.object({ teamRunId: z67.string().min(1), memberName: z67.string().min(1) });
|
|
177778
|
+
var TeamRejectShutdownArgsSchema = z67.object({
|
|
177779
|
+
teamRunId: z67.string().min(1),
|
|
177780
|
+
memberName: z67.string().min(1),
|
|
177781
|
+
reason: z67.string().min(1)
|
|
177202
177782
|
});
|
|
177203
177783
|
var defaultTeamShutdownToolDeps = {
|
|
177204
177784
|
listActiveTeams,
|
|
@@ -181075,7 +181655,7 @@ function parseWindowsProcessTable(output) {
|
|
|
181075
181655
|
const entries = Array.isArray(parsed) ? parsed : parsed === undefined ? [] : [parsed];
|
|
181076
181656
|
const processes = [];
|
|
181077
181657
|
for (const entry of entries) {
|
|
181078
|
-
if (!
|
|
181658
|
+
if (!isRecord13(entry))
|
|
181079
181659
|
continue;
|
|
181080
181660
|
const pid = numberField(entry, "ProcessId");
|
|
181081
181661
|
const ppid = numberField(entry, "ParentProcessId");
|
|
@@ -181109,7 +181689,7 @@ function stringField(record, key) {
|
|
|
181109
181689
|
const value = record[key];
|
|
181110
181690
|
return typeof value === "string" ? value : undefined;
|
|
181111
181691
|
}
|
|
181112
|
-
function
|
|
181692
|
+
function isRecord13(value) {
|
|
181113
181693
|
return typeof value === "object" && value !== null;
|
|
181114
181694
|
}
|
|
181115
181695
|
|
|
@@ -181213,7 +181793,7 @@ async function attestLspDaemonOwner(target, deps = {}) {
|
|
|
181213
181793
|
}
|
|
181214
181794
|
}
|
|
181215
181795
|
function parseLspDaemonOwner(value) {
|
|
181216
|
-
if (!
|
|
181796
|
+
if (!isRecord14(value))
|
|
181217
181797
|
return null;
|
|
181218
181798
|
const pid = value["pid"];
|
|
181219
181799
|
const nonce = value["nonce"];
|
|
@@ -181225,7 +181805,7 @@ function parseLspDaemonOwner(value) {
|
|
|
181225
181805
|
return null;
|
|
181226
181806
|
if (typeof startedAt !== "string" || startedAt.length === 0)
|
|
181227
181807
|
return null;
|
|
181228
|
-
if (!
|
|
181808
|
+
if (!isRecord14(endpoint))
|
|
181229
181809
|
return null;
|
|
181230
181810
|
const kind = endpoint["kind"];
|
|
181231
181811
|
const path = endpoint["path"];
|
|
@@ -181277,7 +181857,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
181277
181857
|
return finish(null);
|
|
181278
181858
|
try {
|
|
181279
181859
|
const response = JSON.parse(line);
|
|
181280
|
-
if (!
|
|
181860
|
+
if (!isRecord14(response) || response["id"] !== OWNER_PING_REQUEST_ID || "error" in response) {
|
|
181281
181861
|
return finish(null);
|
|
181282
181862
|
}
|
|
181283
181863
|
finish(parseLspDaemonOwner(response["result"]));
|
|
@@ -181290,7 +181870,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
181290
181870
|
function sameOwner(left, right) {
|
|
181291
181871
|
return left.pid === right.pid && left.nonce === right.nonce && left.startedAt === right.startedAt && left.endpoint.kind === right.endpoint.kind && left.endpoint.path === right.endpoint.path && left.endpoint.dev === right.endpoint.dev && left.endpoint.ino === right.endpoint.ino;
|
|
181292
181872
|
}
|
|
181293
|
-
function
|
|
181873
|
+
function isRecord14(value) {
|
|
181294
181874
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
181295
181875
|
}
|
|
181296
181876
|
|
|
@@ -181865,13 +182445,13 @@ function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST)
|
|
|
181865
182445
|
}
|
|
181866
182446
|
|
|
181867
182447
|
// packages/telemetry-core/src/machine-id.ts
|
|
181868
|
-
import { createHash as
|
|
182448
|
+
import { createHash as createHash10 } from "crypto";
|
|
181869
182449
|
import os6 from "os";
|
|
181870
182450
|
function getDefaultTelemetryOsProvider() {
|
|
181871
182451
|
return os6;
|
|
181872
182452
|
}
|
|
181873
182453
|
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
181874
|
-
return
|
|
182454
|
+
return createHash10("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
181875
182455
|
}
|
|
181876
182456
|
|
|
181877
182457
|
// packages/telemetry-core/src/injected-client.ts
|
|
@@ -189218,7 +189798,7 @@ var TOPLEVEL_SENTINELS = [
|
|
|
189218
189798
|
field: "window_id"
|
|
189219
189799
|
}
|
|
189220
189800
|
];
|
|
189221
|
-
function
|
|
189801
|
+
function isRecord15(value) {
|
|
189222
189802
|
return typeof value == "object" && value !== null && !Array.isArray(value);
|
|
189223
189803
|
}
|
|
189224
189804
|
function toRfc3339(timestamp) {
|
|
@@ -189240,7 +189820,7 @@ function relocateInto(properties, key, value) {
|
|
|
189240
189820
|
properties[key] = value;
|
|
189241
189821
|
}
|
|
189242
189822
|
function buildV1Event(message) {
|
|
189243
|
-
const sourceProperties =
|
|
189823
|
+
const sourceProperties = isRecord15(message.properties) ? message.properties : {};
|
|
189244
189824
|
const properties = {
|
|
189245
189825
|
...sourceProperties
|
|
189246
189826
|
};
|