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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Precision is stored independently from display strings; generated fields are rederived on replay.
|
|
2
|
+
import { sigFigsOf, toDecimal } from "./rational.mjs"
|
|
3
|
+
import { refuse } from "./unit-errors.mjs"
|
|
4
|
+
|
|
5
|
+
export const toBig = (r) => ({ num: BigInt(r.num), den: BigInt(r.den) })
|
|
6
|
+
export const toText = (r) => ({ num: String(r.num), den: String(r.den) })
|
|
7
|
+
export const placesOf = (decimal) => (String(decimal).split(".")[1] ?? "").length
|
|
8
|
+
export function terminates(r) {
|
|
9
|
+
let den = r.den
|
|
10
|
+
for (const prime of [2n, 5n]) while (den % prime === 0n) den /= prime
|
|
11
|
+
return den === 1n
|
|
12
|
+
}
|
|
13
|
+
export function precisionOf(row) {
|
|
14
|
+
if (row.precision !== null && row.precision !== undefined) {
|
|
15
|
+
const p = row.precision
|
|
16
|
+
if (!p || typeof p !== "object" || Object.keys(p).sort().join(",") !== "places,sigfigs" || !Number.isSafeInteger(p.places) || p.places < 0 || !Number.isSafeInteger(p.sigfigs) || p.sigfigs < 1) refuse("invalid stored precision", undefined, "precision_field", "{ places: nonnegative integer, sigfigs: positive integer }")
|
|
17
|
+
return p
|
|
18
|
+
}
|
|
19
|
+
return { places: placesOf(row.value), sigfigs: sigFigsOf(row.value) }
|
|
20
|
+
}
|
|
21
|
+
export function resultPrecision(rows, literals, exact, mode) {
|
|
22
|
+
const inputs = [...rows.map(precisionOf), ...literals.map((value) => precisionOf({ value }))]
|
|
23
|
+
const places = Math.min(...inputs.map((p) => p.places))
|
|
24
|
+
const sigfigs = Math.min(...inputs.map((p) => p.sigfigs))
|
|
25
|
+
if (mode === "places") return { places, sigfigs: sigFigsOf(roundPlaces(exact, places)) }
|
|
26
|
+
const rendered = toDecimal(exact, sigfigs)
|
|
27
|
+
return { places: placesOf(rendered), sigfigs }
|
|
28
|
+
}
|
|
29
|
+
export function roundPlaces(r, places) {
|
|
30
|
+
const digits = ((r.num < 0n ? -r.num : r.num) * 10n ** BigInt(places) * 2n + r.den) / (r.den * 2n)
|
|
31
|
+
const text = digits.toString().padStart(places + 1, "0")
|
|
32
|
+
return (r.num < 0n && digits !== 0n ? "-" : "") + (places ? `${text.slice(0, -places)}.${text.slice(-places)}` : text)
|
|
33
|
+
}
|
|
34
|
+
export function renderValue(exact, precision, mode) {
|
|
35
|
+
const plain = terminates(exact) ? toDecimal(exact) : null
|
|
36
|
+
const n = precision[mode]
|
|
37
|
+
if (plain !== null && (mode === "places" ? placesOf(plain) <= n : sigFigsOf(plain) < n)) return plain
|
|
38
|
+
return mode === "places" ? roundPlaces(exact, n) : toDecimal(exact, n)
|
|
39
|
+
}
|
|
40
|
+
export function display(value, unit) {
|
|
41
|
+
const [whole, fraction] = value.split(".")
|
|
42
|
+
const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (fraction === undefined ? "" : `.${fraction}`)
|
|
43
|
+
return unit === null ? grouped : unit === "%" ? `${grouped}%` : `${grouped} ${unit}`
|
|
44
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Structural rules used by the operation table, shared by schema and recomputation.
|
|
2
|
+
import { leaves, parseExpr } from "./fact-expr.mjs"
|
|
3
|
+
import { isRational } from "./fact-ledger-kinds.mjs"
|
|
4
|
+
import { canonicalUnit, RuleError } from "./unit-algebra.mjs"
|
|
5
|
+
import { nonEmpty, object } from "./unit-metadata.mjs"
|
|
6
|
+
import { show } from "./unit-pairs.mjs"
|
|
7
|
+
|
|
8
|
+
export const COMMON = ["operands null", "operands empty", "wrong arity", "missing operand id", "invalid rational", "no operation", "repeated operand", "self reference",
|
|
9
|
+
"kind operation", "audit fields", "precision field", "compatibility field", "metadata fields", "noncanonical operand"]
|
|
10
|
+
export const shapes = (...own) => Object.freeze([...COMMON, ...own])
|
|
11
|
+
export const needsContext = (row) => object(row.context) ? null : `${row.operation} rows carry a context object, got ${show(row.context)}`
|
|
12
|
+
export const noContext = (row) => row.context === null ? null : `${row.operation} rows carry no context, got ${show(row.context)}`
|
|
13
|
+
export const repeatedOperand = (ids) => new Set(ids).size !== ids.length ? `operand ${ids.find((id, i) => ids.indexOf(id) !== i)} is repeated: the operands of one row are distinct facts` : null
|
|
14
|
+
|
|
15
|
+
export function sumShape(row) {
|
|
16
|
+
const missing = needsContext(row)
|
|
17
|
+
if (missing) return missing
|
|
18
|
+
const c = row.context
|
|
19
|
+
if (Object.keys(c).sort().join(",") !== "disjoint,reference" || typeof c.disjoint !== "boolean" || !(c.reference === null || nonEmpty(c.reference) || object(c.reference))) return "sum context needs exactly boolean disjoint and null, text, or map reference"
|
|
20
|
+
if (object(c.reference) && (Object.keys(c.reference).sort().join(",") !== [...row.operands].sort().join(",") || !Object.values(c.reference).every(nonEmpty))) return "reference map must name exactly the supplied operands"
|
|
21
|
+
return null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function convertShape(row) {
|
|
25
|
+
const target = object(row.context) ? row.context.target : undefined
|
|
26
|
+
if (!nonEmpty(target)) return needsContext(row) ?? "a convert row carries its target in context.target"
|
|
27
|
+
if (Object.keys(row.context).join(",") !== "target") return "convert context has exactly target"
|
|
28
|
+
try {
|
|
29
|
+
const canonical = canonicalUnit(target)
|
|
30
|
+
return canonical === target ? null : `context.target ${show(target)} is not canonical unit text (canonical: ${show(canonical)})`
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error instanceof RuleError) return `context.target ${show(target)} is not unit text: ${error.detail}`
|
|
33
|
+
throw error
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function exprShape(row) {
|
|
38
|
+
try {
|
|
39
|
+
const ids = leaves(parseExpr(row.formula)).ids
|
|
40
|
+
if (ids.length !== row.operands.length || ids.some((id) => !row.operands.includes(id))) return `formula ids ${ids.join(", ")} do not match operands ${row.operands.join(", ")}`
|
|
41
|
+
return null
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (error instanceof RuleError) return error.detail
|
|
44
|
+
throw error
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function rowShape(row, rules) {
|
|
49
|
+
if (!object(row)) return "the row is not an object"
|
|
50
|
+
if (!Object.hasOwn(rules, row.operation)) return `operation ${show(row.operation)} is not one of ${Object.keys(rules).join(", ")}`
|
|
51
|
+
const rule = rules[row.operation]
|
|
52
|
+
const { operands, exact } = row
|
|
53
|
+
if (!Array.isArray(operands) || !operands.length || !operands.every(nonEmpty)) return `operands must be a non-empty array of fact ids, got ${show(operands)}`
|
|
54
|
+
const repeated = repeatedOperand(operands)
|
|
55
|
+
if (repeated) return repeated
|
|
56
|
+
if (operands.includes(row.fact_id)) return `${row.fact_id} cites itself as an operand`
|
|
57
|
+
if (!rule.arity(operands.length)) return `${row.operation} takes ${rule.arityText}, got ${operands.length}`
|
|
58
|
+
if (!isRational(exact)) return `exact must be { num, den } reduced integer strings, got ${show(exact)}`
|
|
59
|
+
if (row.kind !== rule.kind) return `kind ${row.kind} must be ${rule.kind} for ${row.operation}`
|
|
60
|
+
const own = rule.shape(row)
|
|
61
|
+
if (own) return own
|
|
62
|
+
if (!nonEmpty(row.formula) || !Array.isArray(row.derived_from) || row.derived_from.length !== operands.length) return "formula and derived_from are required audit fields"
|
|
63
|
+
return null
|
|
64
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// The sole per-operation registry: guards, context, arithmetic, precision, audit and compatibility.
|
|
2
|
+
import { evaluate, leaves } from "./fact-expr.mjs"
|
|
3
|
+
import { add, div, mul, sub, toDecimal } from "./rational.mjs"
|
|
4
|
+
import { canonicalUnit, inputScale, isAffine, isCurrencyRate, isPercentish, refuse, RuleError, unitOver } from "./unit-algebra.mjs"
|
|
5
|
+
import { checkMetadata, nonEmpty, object, propagatedMetadata } from "./unit-metadata.mjs"
|
|
6
|
+
import { equalUnits, inferExpr, listed, minusUnit, notAffine, show } from "./unit-pairs.mjs"
|
|
7
|
+
import { display, terminates, toBig } from "./unit-precision.mjs"
|
|
8
|
+
import { convertShape, exprShape, noContext, repeatedOperand, rowShape, shapes, sumShape } from "./unit-rules-shapes.mjs"
|
|
9
|
+
import { convertFactor, dimensionOf } from "./units.mjs"
|
|
10
|
+
export { canonicalUnit, inferExpr, isAffine, RuleError }
|
|
11
|
+
|
|
12
|
+
const EXPR_HINT = "currencies never convert by table: add a dated rate row and use --op expr"
|
|
13
|
+
const compare = (a, b) => a.num * b.den - b.num * a.den
|
|
14
|
+
const SNAPSHOT = ["population", "snapshot_window"]
|
|
15
|
+
const ADDITIVE = [...SNAPSHOT, "accounting_basis"]
|
|
16
|
+
const pair = (a, b) => (spec) => [spec[a], spec[b]]
|
|
17
|
+
const listOf = (spec) => spec.operands
|
|
18
|
+
const generated = (exact, formula, factor = null) => ({ exact, formula, factor })
|
|
19
|
+
const idsOf = (rows) => rows.map((r) => r.fact_id)
|
|
20
|
+
const valuesOf = (rows) => rows.map((r) => toBig(r.exact))
|
|
21
|
+
const ordinary = {
|
|
22
|
+
kind: "derived", compatibility: "checked", context: () => null, shape: noContext,
|
|
23
|
+
precision: () => "sigfigs", render: (shown) => shown, metadataResult: propagatedMetadata,
|
|
24
|
+
}
|
|
25
|
+
const binary = { ...ordinary, arity: (n) => n === 2, arityText: "two operands" }
|
|
26
|
+
|
|
27
|
+
function sharedReference(rows, reference) {
|
|
28
|
+
if (nonEmpty(reference)) return
|
|
29
|
+
if (object(reference)) {
|
|
30
|
+
const named = rows.map((r) => reference[r.fact_id])
|
|
31
|
+
if (Object.keys(reference).length === rows.length && named.every(nonEmpty) && named.every((v) => v === named[0])) return
|
|
32
|
+
refuse("% operands name different references or missing/extra ids", undefined, "reference", "one denominator for exactly the operands")
|
|
33
|
+
}
|
|
34
|
+
refuse("summing % operands needs one shared reference (denominator): pass reference")
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Registry rows own every operation-specific choice; consumers only dispatch through these rows. */
|
|
38
|
+
export const OPERATION_RULES = Object.freeze({
|
|
39
|
+
sum: Object.freeze({
|
|
40
|
+
...ordinary, arity: (n) => n >= 2, arityText: "two or more operands", operandIds: listOf,
|
|
41
|
+
inputFields: ["operands", "disjoint", "reference"],
|
|
42
|
+
context: (s) => ({ disjoint: Object.hasOwn(s, "disjoint") ? s.disjoint : false, reference: Object.hasOwn(s, "reference") ? s.reference : null }),
|
|
43
|
+
metadata: ADDITIVE, precision: () => "places", shape: sumShape,
|
|
44
|
+
resultUnit(rows, units, context) {
|
|
45
|
+
notAffine("sum", rows, units)
|
|
46
|
+
const unit = equalUnits(rows, units)
|
|
47
|
+
if (unit === "%") {
|
|
48
|
+
if (context.disjoint !== true) refuse("summing % operands needs disjoint shares: pass disjoint")
|
|
49
|
+
sharedReference(rows, context.reference)
|
|
50
|
+
if (!nonEmpty(context.rationale)) refuse("summing % operands needs a rationale for the disjoint shares")
|
|
51
|
+
const values = valuesOf(rows)
|
|
52
|
+
if (values.some((r) => r.num < 0n || r.num > 100n * r.den) || compare(values.reduce(add), { num: 100n, den: 1n }) > 0n) refuse("disjoint shares must each be in [0, 100] and total <= 100", undefined, "share_total", "valid disjoint shares totaling at most 100%")
|
|
53
|
+
}
|
|
54
|
+
return unit
|
|
55
|
+
},
|
|
56
|
+
calculate: (rows) => generated(valuesOf(rows).reduce(add), idsOf(rows).join(" + ")),
|
|
57
|
+
malformed: shapes("no context", "% without disjoint", "% without reference", "% without rationale", "unequal units", "affine units", "closed context", "share total"),
|
|
58
|
+
}),
|
|
59
|
+
diff: Object.freeze({
|
|
60
|
+
...binary, operandIds: listOf, metadata: ADDITIVE, precision: () => "places",
|
|
61
|
+
inputFields: ["operands"],
|
|
62
|
+
resultUnit: (rows, units) => minusUnit(units[0], units[1], `diff ${listed(rows, units)}`),
|
|
63
|
+
calculate: (rows) => generated(sub(...valuesOf(rows)), idsOf(rows).join(" - ")),
|
|
64
|
+
malformed: shapes("%p - % pair", "unit - other unit pair", "affine units", "stray context"),
|
|
65
|
+
}),
|
|
66
|
+
growth: Object.freeze({
|
|
67
|
+
...binary, arityText: "two operands (from, to)", operandIds: pair("from", "to"), metadata: ["population", "accounting_basis"],
|
|
68
|
+
inputFields: ["from", "to"],
|
|
69
|
+
resultUnit(rows, units) {
|
|
70
|
+
const [from, to] = rows
|
|
71
|
+
notAffine("growth", rows, units)
|
|
72
|
+
equalUnits(rows, units)
|
|
73
|
+
if (!nonEmpty(from.entity) || from.entity !== to.entity) refuse(`growth needs one declared entity: ${from.entity} vs ${to.entity}`)
|
|
74
|
+
if (!nonEmpty(from.valid_at) || !nonEmpty(to.valid_at) || from.valid_at === to.valid_at) refuse(`growth needs two different valid_at periods: ${from.valid_at} vs ${to.valid_at}`)
|
|
75
|
+
if (toBig(from.exact).num <= 0n) refuse(`growth needs a positive starting value in ${from.fact_id}`)
|
|
76
|
+
return "%"
|
|
77
|
+
},
|
|
78
|
+
calculate(rows) { const [a, b] = valuesOf(rows); const [x, y] = idsOf(rows); return generated(mul(div(sub(b, a), a), 100n), `(${y} - ${x}) / ${x} * 100`) },
|
|
79
|
+
malformed: shapes("affine units", "unequal units", "entity mismatch", "one period", "from <= 0", "stray context"),
|
|
80
|
+
}),
|
|
81
|
+
share: Object.freeze({
|
|
82
|
+
...binary, arityText: "two operands (part, whole)", operandIds: pair("part", "whole"), metadata: SNAPSHOT,
|
|
83
|
+
inputFields: ["part", "whole"],
|
|
84
|
+
resultUnit(rows, units) {
|
|
85
|
+
notAffine("share", rows, units)
|
|
86
|
+
equalUnits(rows, units)
|
|
87
|
+
const [part, whole] = valuesOf(rows)
|
|
88
|
+
if (whole.num <= 0n) refuse(`share needs a positive whole in ${rows[1].fact_id}`)
|
|
89
|
+
if (part.num < 0n || compare(part, whole) > 0n) refuse(`share needs 0 <= part <= whole: ${rows[0].fact_id} is outside [0, ${rows[1].fact_id}]`)
|
|
90
|
+
return "%"
|
|
91
|
+
},
|
|
92
|
+
calculate: (rows) => generated(mul(div(...valuesOf(rows)), 100n), `${idsOf(rows).join(" / ")} * 100`),
|
|
93
|
+
malformed: shapes("affine units", "unequal units", "whole <= 0", "part < 0", "part above whole", "stray context"),
|
|
94
|
+
}),
|
|
95
|
+
ratio: Object.freeze({
|
|
96
|
+
...binary, arityText: "two operands (num, den)", operandIds: pair("num", "den"), metadata: SNAPSHOT,
|
|
97
|
+
inputFields: ["num", "den"],
|
|
98
|
+
resultUnit(rows, units) {
|
|
99
|
+
notAffine("ratio", rows, units)
|
|
100
|
+
if (toBig(rows[1].exact).num === 0n) refuse(`ratio denominator ${rows[1].fact_id} is zero`)
|
|
101
|
+
if (units[0] === units[1]) return null
|
|
102
|
+
if (units.some(isPercentish)) refuse(`a ratio over % or %p needs equal units: ${listed(rows, units)}; use expr`)
|
|
103
|
+
return unitOver(units[0], units[1])
|
|
104
|
+
},
|
|
105
|
+
calculate: (rows) => generated(div(...valuesOf(rows)), idsOf(rows).join(" / ")),
|
|
106
|
+
malformed: shapes("affine units", "divides by zero", "stray context"),
|
|
107
|
+
}),
|
|
108
|
+
convert: Object.freeze({
|
|
109
|
+
...ordinary, kind: "converted", arity: (n) => n === 1, arityText: "one operand", operandIds: listOf, metadata: [],
|
|
110
|
+
inputFields: ["operands", "to"],
|
|
111
|
+
context: (s) => ({ target: canonicalUnit(s.to) }), shape: convertShape,
|
|
112
|
+
defaultUnit: (s) => s.to,
|
|
113
|
+
resultUnit(rows, units, context) {
|
|
114
|
+
if (!nonEmpty(context.target)) refuse("convert needs a target unit")
|
|
115
|
+
const [from] = units
|
|
116
|
+
const target = context.target
|
|
117
|
+
if (from === target) refuse(`${rows[0].fact_id} is already in ${target}`)
|
|
118
|
+
if ([from, target].some((u) => dimensionOf(u)?.startsWith("currency:"))) refuse(`${rows[0].fact_id} in ${show(from)} has no table conversion to ${target} (a currency)`, EXPR_HINT)
|
|
119
|
+
if (!convertFactor(from, target)) refuse(`${rows[0].fact_id} in ${show(from)} has no table conversion to ${target}`)
|
|
120
|
+
return target
|
|
121
|
+
},
|
|
122
|
+
calculate(rows, context) {
|
|
123
|
+
const row = rows[0]
|
|
124
|
+
const f = convertFactor(row.unit, context.target)
|
|
125
|
+
const scale = { num: f.num, den: f.den }
|
|
126
|
+
const text = terminates(scale) ? toDecimal(scale) : `${scale.num}/${scale.den}`
|
|
127
|
+
return generated(add(mul(toBig(row.exact), scale), f.offset ?? 0n), `${row.fact_id} * ${text}${f.offset ? ` + ${f.offset.num}/${f.offset.den}` : ""}`, terminates(scale) ? text : null)
|
|
128
|
+
},
|
|
129
|
+
render: (shown, rows) => `${shown} (${display(rows[0].value, rows[0].unit)})`,
|
|
130
|
+
malformed: shapes("no context", "empty target", "alias target", "currency target", "no factor to target", "closed context"),
|
|
131
|
+
}),
|
|
132
|
+
expr: Object.freeze({
|
|
133
|
+
...ordinary, arity: (n) => n >= 1, arityText: "one or more operands", compatibility: "unchecked",
|
|
134
|
+
expression: true, operandIds: (s, ast) => Object.hasOwn(s, "operands") ? s.operands : leaves(ast).ids,
|
|
135
|
+
inputFields: ["formula", "operands"],
|
|
136
|
+
metadata: [], precision: (ast) => ast?.op === "+" || ast?.op === "-" ? "places" : "sigfigs",
|
|
137
|
+
resultUnit(rows, units, _context, ast) {
|
|
138
|
+
for (const r of rows) if (isCurrencyRate(r.unit) && !nonEmpty(r.valid_at)) refuse(`FX rate ${r.fact_id} needs a dated valid_at; date compatibility remains unchecked`, EXPR_HINT, "undated_rate", "a dated FX rate row")
|
|
139
|
+
const inferred = inferExpr(ast, new Map(rows.map((r, i) => [r.fact_id, units[i]])), new Map(rows.map((r) => [r.fact_id, r]))).unit
|
|
140
|
+
notAffine("expr", rows, units)
|
|
141
|
+
return inferred
|
|
142
|
+
},
|
|
143
|
+
calculate(rows, _context, ast, formula) {
|
|
144
|
+
const { units } = inferExpr(ast, new Map(rows.map((r) => [r.fact_id, r.unit])))
|
|
145
|
+
return generated(evaluate(ast, new Map(rows.map((r) => [r.fact_id, toBig(r.exact)])), units), formula.trim())
|
|
146
|
+
},
|
|
147
|
+
shape: (row) => noContext(row) ?? exprShape(row),
|
|
148
|
+
malformed: shapes("formula id mismatch", "parse error", "divides by zero", "uninferable unit", "affine sum", "stray context", "undated rate"),
|
|
149
|
+
}),
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
export function ruleOf(op) {
|
|
153
|
+
if (!Object.hasOwn(OPERATION_RULES, op)) refuse(`unknown operation ${String(op)}; use one of ${Object.keys(OPERATION_RULES).join(", ")}`, undefined, "operation", Object.keys(OPERATION_RULES))
|
|
154
|
+
return OPERATION_RULES[op]
|
|
155
|
+
}
|
|
156
|
+
export function operandUnit(row) {
|
|
157
|
+
if (canonicalUnit(row.unit) !== row.unit || inputScale(row.unit)) refuse(`${row.fact_id} unit must be canonical stored text`, undefined, "noncanonical_operand", { unit: canonicalUnit(row.unit) })
|
|
158
|
+
return row.unit
|
|
159
|
+
}
|
|
160
|
+
export function expectedUnit(op, rows, { ast = null, context = null } = {}) {
|
|
161
|
+
const rule = ruleOf(op)
|
|
162
|
+
const repeated = repeatedOperand(idsOf(rows))
|
|
163
|
+
if (repeated) refuse(repeated, undefined, "repeated_operand", "distinct operand ids")
|
|
164
|
+
if (!rule.arity(rows.length)) refuse(`${op} takes ${rule.arityText}, got ${rows.length}`, undefined, "arity", rule.arityText)
|
|
165
|
+
const units = rows.map(operandUnit)
|
|
166
|
+
checkMetadata(rows, rule.metadata)
|
|
167
|
+
return rule.resultUnit(rows, units, context ?? {}, ast)
|
|
168
|
+
}
|
|
169
|
+
export function renderPrecision(op, unit, ast = null) {
|
|
170
|
+
return unit === "%p" ? "places" : ruleOf(op).precision(ast)
|
|
171
|
+
}
|
|
172
|
+
export const unitMismatch = (op, rows, unit, expected) => `unit ${show(unit)} does not follow from ${op} over ${rows.map((r) => `${r.fact_id} ${r.unit ?? "null"}`).join(", ")}: expected unit ${show(expected)}`
|
|
173
|
+
export const malformed = (row) => rowShape(row, OPERATION_RULES)
|
|
@@ -10,10 +10,10 @@ import { div, fromDecimal, sub } from "./rational.mjs"
|
|
|
10
10
|
|
|
11
11
|
/** [token, dimension, factor, reading, aliases, offset?]; the Korean reading is noted per row. */
|
|
12
12
|
const TABLE = [
|
|
13
|
-
["mm", "length", "0.001", "open", ["millimeter", "millimeters", "\uBC00\uB9AC\uBBF8\uD130"]], // millimiteo
|
|
14
|
-
["cm", "length", "0.01", "open", ["centimeter", "centimeters", "\uC13C\uD2F0\uBBF8\uD130"]], // sentimiteo
|
|
13
|
+
["mm", "length", "0.001", "open", ["millimeter", "millimeters", "millimetre", "millimetres", "\uBC00\uB9AC\uBBF8\uD130"]], // millimiteo
|
|
14
|
+
["cm", "length", "0.01", "open", ["centimeter", "centimeters", "centimetre", "centimetres", "\uC13C\uD2F0\uBBF8\uD130"]], // sentimiteo
|
|
15
15
|
["m", "length", "1", "open", ["meter", "meters", "metre", "metres", "\uBBF8\uD130"]], // miteo
|
|
16
|
-
["km", "length", "1000", "open", ["kilometer", "kilometers", "\uD0AC\uB85C\uBBF8\uD130"]], // killomiteo
|
|
16
|
+
["km", "length", "1000", "open", ["kilometer", "kilometers", "kilometre", "kilometres", "\uD0AC\uB85C\uBBF8\uD130"]], // killomiteo
|
|
17
17
|
["g", "mass", "1", "closed", ["gram", "grams", "\uADF8\uB7A8"]], // geuraem
|
|
18
18
|
["kg", "mass", "1000", "closed", ["kilogram", "kilograms", "\uD0AC\uB85C\uADF8\uB7A8"]], // killogeuraem
|
|
19
19
|
["t", "mass", "1000000", "closed", ["ton", "tons", "tonne", "tonnes", "\uD1A4"]], // ton
|
|
@@ -65,7 +65,7 @@ for (const [token, dimension, factor, reading, aliases, offset] of TABLE) {
|
|
|
65
65
|
for (const alias of [token, ...aliases]) {
|
|
66
66
|
const key = squash(alias)
|
|
67
67
|
EXACT.set(key, entry)
|
|
68
|
-
if (key.length >
|
|
68
|
+
if (alias !== token && key.length > 2 && /^[a-z]+$/.test(key) && !WORD.has(key.toLowerCase())) WORD.set(key.toLowerCase(), entry)
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
ulwExecuteOriginalCompletion,
|
|
17
17
|
ulwExecuteOriginalHardRule,
|
|
18
18
|
} from "../scripts/sync-skills.mjs";
|
|
19
|
+
import { removeCodexSkillOverlays } from "./sync-skills-test-support.mjs";
|
|
19
20
|
|
|
20
21
|
const frontmatter = "---\nname: fixture-sentinel\n---\n\n";
|
|
21
22
|
const opencodeExample = "# SENTINEL_SECTION\ntask(SENTINEL_INPUT)\n";
|
|
@@ -177,3 +178,21 @@ test("#given the shared ulw-research skill #when the Codex overlay runs #then th
|
|
|
177
178
|
// then
|
|
178
179
|
assert.notEqual(actual, shared, "the ulw-research overlay anchor no longer matches the shared SKILL.md");
|
|
179
180
|
});
|
|
181
|
+
|
|
182
|
+
test("#given the ulw-research delivery gates are renumbered #when the Codex overlay runs #then only the proofread gate is dropped", async () => {
|
|
183
|
+
// given
|
|
184
|
+
const shared = await readFile(join(sharedSkillsRoot, "ulw-research", "SKILL.md"), "utf8");
|
|
185
|
+
const renumbered = shared
|
|
186
|
+
.replace(/^(\d+)(\. \*\*Proofread gate:)/m, (_, numeral, rest) => `${Number(numeral) + 1}${rest}`)
|
|
187
|
+
.replace(/^(\d+)(\. \*\*Visual QA\.\*\*)/m, (_, numeral, rest) => `${Number(numeral) + 1}${rest}`);
|
|
188
|
+
assert.notEqual(renumbered, shared, "the renumbering fixture must change the delivery gates");
|
|
189
|
+
|
|
190
|
+
// when
|
|
191
|
+
const actual = applyCodexSkillOverlays("ulw-research", renumbered);
|
|
192
|
+
|
|
193
|
+
// then: generated Codex edition contract (no `task(category="writing")` gate; tool-based gates kept)
|
|
194
|
+
assert.doesNotMatch(actual, /\*\*Proofread gate:/);
|
|
195
|
+
assert.match(actual, /\*\*Fidelity gate\.\*\*/);
|
|
196
|
+
assert.match(actual, /inspect the pixels\.\n\n/);
|
|
197
|
+
assert.equal(removeCodexSkillOverlays("ulw-research", actual), renumbered);
|
|
198
|
+
});
|
|
@@ -158,12 +158,16 @@ prefixes when identity is needed.
|
|
|
158
158
|
`;
|
|
159
159
|
const reviewWorkCodexGatePattern = new RegExp(reviewWorkCodexGate.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
160
160
|
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const ulwResearchProofreadGate = "**Proofread gate: `task(category=\"writing\", ...)`.** Hand the final text to a dedicated `writing` worker whose only job is language: grammar, spelling, punctuation, terminology consistency, and whether the prose reads NATIVELY in the report's own language. It proofreads only and never composes, and it never edits the file: it returns `$SESSION_DIR/polish-edits.json`, an array of `{\"before\": ..., \"after\": ..., \"reason\": ...}` where `before` is the exact current text of one or more adjacent sentences. Edits change text only; an edit whose before/after would alter any tag, attribute, comment, or script/style content is rejected, and markup changes go through the full fidelity gates instead. Apply it with `node \"$SKILL_DIR/scripts/report-tools.mjs\" fact polish-apply \"$SESSION_DIR/report.html\" --edits \"$SESSION_DIR/polish-edits.json\" --out \"$SESSION_DIR/report.polished.html\" --session-dir \"$SESSION_DIR\"`: each edit is applied alone, and an edit that changes a fact span, a numeral, a link, or a claim id, or drops a hedge or qualifier the source carries, is `polish_edit_rejected` (a `before` not found exactly once is `polish_edit_unlocated`) and leaves its text unchanged. Send the rejected and unlocated edits back to the same worker with their reasons, plus `$SESSION_DIR/polish-defects.json` and the pre-polish `report.html` the backstop compared against, so the worker sees why each edit was refused; it returns either a rewritten sentence or a new edit list, and the repair round re-runs `fact polish-apply` with `\"$SESSION_DIR/report.polished.html\"` as both input and output, within the repair budget. Then run the backstop `fact polish-diff --before \"$SESSION_DIR/report.html\" --after \"$SESSION_DIR/report.polished.html\" --session-dir \"$SESSION_DIR\"` (exit `1` on `polish_diff_fail`), `fact verify` on `report.polished.html`, and `fact pairs \"$SESSION_DIR/report.polished.html\" --changed-since \"$SESSION_DIR/report.html.fill-map.json\" --session-dir \"$SESSION_DIR\"`, which keeps only the quote and claim pairs whose sentence text changed during polish; run the meaning readers above (cheap, then strong on the flagged pairs) on exactly those pairs and `fact meaning-check` before recording `outcome gate fidelity`. A rewording that keeps every number, hedge, qualifier, and link but swaps who did what to whom therefore still reaches a meaning reader on the delivered text. `report.polished.html` is the report that is delivered. Deliver only on a clean pass. This gate runs BEFORE the first delivery, not after the user finds the typo. Edits must not span entities (such as & or <) or markup; narrow the edit to the surrounding words instead, and a rejected edit comes back with the reason to act on.";
|
|
162
|
+
// The shared skill numbers the proofread gate right after the Visual QA item the Codex edition ends on.
|
|
163
|
+
const ulwResearchVisualQaItemPattern = /^(\d+)\. \*\*Visual QA\.\*\*[^\n]*inspect the pixels\.$/m;
|
|
163
164
|
|
|
164
165
|
export function removeCodexSkillOverlays(skillName, content) {
|
|
165
166
|
if (skillName === "ulw-research") {
|
|
166
|
-
return content.replace(
|
|
167
|
+
return content.replace(
|
|
168
|
+
ulwResearchVisualQaItemPattern,
|
|
169
|
+
(item, numeral) => `${item}\n${Number(numeral) + 1}. ${ulwResearchProofreadGate}`,
|
|
170
|
+
);
|
|
167
171
|
}
|
|
168
172
|
if (skillName === "ulw-execute") {
|
|
169
173
|
return content
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// omo-codex-install:
|
|
2
|
+
// omo-codex-install:3bfe60748136282b06d702bcba5697d924bfdeb7b8416acf24716fd7741de83d:1b18a3321d7501168ee91e2d0c0a937af0f36e681e8bfdfef274f2fc5ce9c26e
|
|
3
3
|
var __esm = (fn, res, err) => () => {
|
|
4
4
|
if (fn)
|
|
5
5
|
try {
|
|
@@ -453,13 +453,13 @@ var init_event_id = __esm(() => {
|
|
|
453
453
|
});
|
|
454
454
|
|
|
455
455
|
// packages/telemetry-core/src/machine-id.ts
|
|
456
|
-
import { createHash as
|
|
456
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
457
457
|
import os2 from "node:os";
|
|
458
458
|
function getDefaultTelemetryOsProvider() {
|
|
459
459
|
return os2;
|
|
460
460
|
}
|
|
461
461
|
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
462
|
-
return
|
|
462
|
+
return createHash5("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
463
463
|
}
|
|
464
464
|
var init_machine_id = () => {};
|
|
465
465
|
|
|
@@ -10123,7 +10123,7 @@ var package_default;
|
|
|
10123
10123
|
var init_package = __esm(() => {
|
|
10124
10124
|
package_default = {
|
|
10125
10125
|
name: "@oh-my-opencode/omo-codex",
|
|
10126
|
-
version: "5.1.
|
|
10126
|
+
version: "5.1.47",
|
|
10127
10127
|
type: "module",
|
|
10128
10128
|
private: true,
|
|
10129
10129
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -10380,7 +10380,7 @@ function resolveStdio(options) {
|
|
|
10380
10380
|
return [options.stdin ?? "ignore", options.stdout ?? "pipe", options.stderr ?? "inherit"];
|
|
10381
10381
|
}
|
|
10382
10382
|
function createBunSpawnOptions(options) {
|
|
10383
|
-
return { ...options, windowsHide: true };
|
|
10383
|
+
return { ...options, env: options.env ?? process.env, windowsHide: true };
|
|
10384
10384
|
}
|
|
10385
10385
|
function createNodeSpawnOptions(options, platform = process.platform) {
|
|
10386
10386
|
const nodeOptions = {
|
|
@@ -10612,8 +10612,7 @@ function windowsNodeDiscoveryLines() {
|
|
|
10612
10612
|
' for /f "tokens=* delims= " %%N in ("!OMO_NODE_BINARY!") do set "OMO_NODE_BINARY=%%N"',
|
|
10613
10613
|
` if "!OMO_NODE_BINARY:~0,1!"=="'" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~1!"`,
|
|
10614
10614
|
` if "!OMO_NODE_BINARY:~-1!"=="'" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~0,-1!"`,
|
|
10615
|
-
'
|
|
10616
|
-
' if "!OMO_NODE_BINARY:~-1!"=="^"" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~0,-1!"',
|
|
10615
|
+
' set "OMO_NODE_BINARY=!OMO_NODE_BINARY:"=!"',
|
|
10617
10616
|
' if defined OMO_NODE_BINARY if not exist "!OMO_NODE_BINARY!" set "OMO_NODE_BINARY="',
|
|
10618
10617
|
")",
|
|
10619
10618
|
'if not defined OMO_NODE_BINARY where node >nul 2>nul && set "OMO_NODE_BINARY=node"'
|
|
@@ -19616,6 +19615,7 @@ var OmoMemoryReflectionSchema = object({
|
|
|
19616
19615
|
merge: _enum(["auto", "integration"]).default("auto"),
|
|
19617
19616
|
category: string2().min(1).default("quick"),
|
|
19618
19617
|
timeout_minutes: number2().int().positive().default(15),
|
|
19618
|
+
max_concurrent_runs: number2().int().positive().default(1),
|
|
19619
19619
|
sandbox: _enum(["auto", "required", "off"]).default("auto")
|
|
19620
19620
|
}).strict();
|
|
19621
19621
|
var OmoMemorySyncSchema = object({
|
|
@@ -19687,6 +19687,7 @@ var OmoMemoryReflectionLayerSchema = object({
|
|
|
19687
19687
|
merge: _enum(["auto", "integration"]).optional(),
|
|
19688
19688
|
category: string2().min(1).optional(),
|
|
19689
19689
|
timeout_minutes: number2().int().positive().optional(),
|
|
19690
|
+
max_concurrent_runs: number2().int().positive().optional(),
|
|
19690
19691
|
sandbox: _enum(["auto", "required", "off"]).optional()
|
|
19691
19692
|
}).strict();
|
|
19692
19693
|
var OmoMemorySyncLayerSchema = object({
|
|
@@ -19751,7 +19752,7 @@ var OmoMemoryProjectionLayerSchema = object({
|
|
|
19751
19752
|
var OmoMemoryAgentOverridesSchema = object({
|
|
19752
19753
|
enabled: boolean2().optional(),
|
|
19753
19754
|
agent: string2().min(1).optional(),
|
|
19754
|
-
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
19755
|
+
reflection: OmoMemoryReflectionLayerSchema.omit({ max_concurrent_runs: true }).optional(),
|
|
19755
19756
|
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
19756
19757
|
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
19757
19758
|
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
@@ -19776,6 +19777,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
19776
19777
|
merge: "auto",
|
|
19777
19778
|
category: "quick",
|
|
19778
19779
|
timeout_minutes: 15,
|
|
19780
|
+
max_concurrent_runs: 1,
|
|
19779
19781
|
sandbox: "auto"
|
|
19780
19782
|
}),
|
|
19781
19783
|
nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
|
|
@@ -20119,9 +20121,6 @@ var OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
|
20119
20121
|
timeoutMs: number2().int().positive().default(3000)
|
|
20120
20122
|
}).strict();
|
|
20121
20123
|
|
|
20122
|
-
// packages/omo-config-core/src/schema/dori.ts
|
|
20123
|
-
var OmoDoriSectionSchema = record(string2(), unknown()).describe("Chat-surface dori settings, owned and validated by a separately installed dori package. omo accepts the key and never reads it.");
|
|
20124
|
-
|
|
20125
20124
|
// packages/omo-config-core/src/schema/provenance.ts
|
|
20126
20125
|
var OmoProvenanceSettingsSchema = object({
|
|
20127
20126
|
workspaces: array(object({
|
|
@@ -20138,7 +20137,6 @@ var OmoExcludedModelsSchema = array(string2());
|
|
|
20138
20137
|
var OmoTypedHarnessConfigSchema = object({
|
|
20139
20138
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
20140
20139
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20141
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
20142
20140
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20143
20141
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20144
20142
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
@@ -20157,7 +20155,6 @@ var OmoTypedHarnessConfigSchema = object({
|
|
|
20157
20155
|
var OmoConfigProfileSchema = object({
|
|
20158
20156
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
20159
20157
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20160
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
20161
20158
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20162
20159
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20163
20160
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
@@ -20180,7 +20177,6 @@ var OmoConfigProfileSchema = object({
|
|
|
20180
20177
|
var OmoConfigSchema = object({
|
|
20181
20178
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
20182
20179
|
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
20183
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
20184
20180
|
$schema: string2().optional(),
|
|
20185
20181
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20186
20182
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20207,7 +20203,6 @@ var OmoConfigSchema = object({
|
|
|
20207
20203
|
var OmoConfigLayerSchema = object({
|
|
20208
20204
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
20209
20205
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20210
|
-
dori: OmoDoriSectionSchema.optional(),
|
|
20211
20206
|
$schema: string2().optional(),
|
|
20212
20207
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20213
20208
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -21231,6 +21226,9 @@ function printParseErrorCode(code) {
|
|
|
21231
21226
|
return "<unknown ParseErrorCode>";
|
|
21232
21227
|
}
|
|
21233
21228
|
|
|
21229
|
+
// packages/omo-config-core/src/loader/layer-validation.ts
|
|
21230
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
21231
|
+
|
|
21234
21232
|
// packages/omo-config-core/src/loader/merge.ts
|
|
21235
21233
|
var DANGEROUS_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
21236
21234
|
function isUnsafeObjectKey(key) {
|
|
@@ -21404,6 +21402,14 @@ function unrecognizedKeyIssues(issues) {
|
|
|
21404
21402
|
function isRecord9(value) {
|
|
21405
21403
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21406
21404
|
}
|
|
21405
|
+
var RETIRED_SECTION_DIGESTS = new Set([
|
|
21406
|
+
"447f75a8ebdbdb79a57f0b8cebbfba183820cf54a8119ac01449b30499e5ef0e",
|
|
21407
|
+
"4ea5ee68fea05586106890ded5733820bb77d919cda27bc4b8139b7cd33b8889"
|
|
21408
|
+
]);
|
|
21409
|
+
function isRetiredSection(key) {
|
|
21410
|
+
return RETIRED_SECTION_DIGESTS.has(createHash2("sha256").update(key.toLowerCase()).digest("hex"));
|
|
21411
|
+
}
|
|
21412
|
+
var HARNESS_BLOCKS = new Set(["[opencode]", "[native]", "[senpi]", "[codex]"]);
|
|
21407
21413
|
function sanitizeUnsafeKeys(value, path = []) {
|
|
21408
21414
|
if (Array.isArray(value)) {
|
|
21409
21415
|
const issues = [];
|
|
@@ -21422,6 +21428,9 @@ function sanitizeUnsafeKeys(value, path = []) {
|
|
|
21422
21428
|
}
|
|
21423
21429
|
const sanitized = {};
|
|
21424
21430
|
for (const [key, entry] of Object.entries(value)) {
|
|
21431
|
+
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] ?? "");
|
|
21432
|
+
if (isConfigContainer && isRetiredSection(key))
|
|
21433
|
+
continue;
|
|
21425
21434
|
if (isUnsafeObjectKey(key)) {
|
|
21426
21435
|
issues.push({ keys: [key], path });
|
|
21427
21436
|
continue;
|
|
@@ -22441,7 +22450,7 @@ function nodeErrorCode2(error) {
|
|
|
22441
22450
|
}
|
|
22442
22451
|
|
|
22443
22452
|
// packages/omo-codex/src/install/default-agent-role.ts
|
|
22444
|
-
import { createHash as
|
|
22453
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
22445
22454
|
import { lstat as lstat9, readFile as readFile16, rm as rm10 } from "node:fs/promises";
|
|
22446
22455
|
import { join as join23 } from "node:path";
|
|
22447
22456
|
var REGISTRATION = { name: "default", configFile: "./agents/default.toml" };
|
|
@@ -22497,7 +22506,7 @@ async function readIfPresent(path) {
|
|
|
22497
22506
|
}
|
|
22498
22507
|
}
|
|
22499
22508
|
function hash(content) {
|
|
22500
|
-
return
|
|
22509
|
+
return createHash3("sha256").update(content).digest("hex");
|
|
22501
22510
|
}
|
|
22502
22511
|
|
|
22503
22512
|
// packages/omo-codex/src/install/link-cached-plugin-agents.ts
|
|
@@ -23134,7 +23143,7 @@ function formatUnknownError(error) {
|
|
|
23134
23143
|
}
|
|
23135
23144
|
|
|
23136
23145
|
// packages/omo-codex/src/install/lsp-daemon-reaper.ts
|
|
23137
|
-
import { createHash as
|
|
23146
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
23138
23147
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir10, rm as rm12 } from "node:fs/promises";
|
|
23139
23148
|
import { tmpdir } from "node:os";
|
|
23140
23149
|
import { join as join28, posix as posix2 } from "node:path";
|
|
@@ -23412,7 +23421,7 @@ async function readRegularTrimmedFile(path) {
|
|
|
23412
23421
|
return content.length > 0 ? content : null;
|
|
23413
23422
|
}
|
|
23414
23423
|
function shortDigest(value) {
|
|
23415
|
-
return
|
|
23424
|
+
return createHash4("sha256").update(value).digest("hex").slice(0, 16);
|
|
23416
23425
|
}
|
|
23417
23426
|
async function removeVersionDir(path) {
|
|
23418
23427
|
await rm12(path, { recursive: true, force: true });
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## OVERVIEW
|
|
6
6
|
|
|
7
|
-
Vendored skill teaching agents ast-grep (`sg`) structural search/rewrite, plus a stdlib-Python helper CLI that wraps the `sg` binary.
|
|
7
|
+
Vendored skill teaching agents ast-grep (`sg`) structural search/rewrite, plus a stdlib-Python helper CLI that wraps the `sg` binary. Upstream pin in `SOURCE`: upstream `code-yeongyu/ast-grep-skill @ 3148c69` (ast-grep 0.45.0), "vendored as a sync; do not fork-drift". Earned this file: own executable surface (749-LOC helper + installers + smoke tests) and a no-fork-drift upstream contract that has no analogue elsewhere in `shared-skills`.
|
|
8
8
|
|
|
9
9
|
## STRUCTURE
|
|
10
10
|
|
|
@@ -215,7 +215,7 @@ operating guide for consulting the beui.dev animated-component registry during i
|
|
|
215
215
|
and motion work, written from live endpoint verification; no beui.dev source code,
|
|
216
216
|
documentation text, or component implementations are vendored. beui.dev names remain the
|
|
217
217
|
property of their owner, and the guide instructs reading component source for mechanism
|
|
218
|
-
extraction only, not
|
|
218
|
+
extraction only, not copying it into references or projects.
|
|
219
219
|
|
|
220
220
|
`frontend/references/design/ambience-skill.md` is a project-original, curl-only operating
|
|
221
221
|
guide for consulting the react-bits (reactbits.dev) animated-component registry during hero
|
|
@@ -223,7 +223,7 @@ atmosphere, background, typographic-motion, and card-surface work, written from
|
|
|
223
223
|
verification; no react-bits source code, documentation text, or component implementations are
|
|
224
224
|
vendored. react-bits is distributed under MIT plus the Commons Clause, which permits use inside
|
|
225
225
|
applications but forbids redistributing or porting the components themselves; the guide
|
|
226
|
-
therefore instructs reading component source for mechanism extraction only and never
|
|
226
|
+
therefore instructs reading component source for mechanism extraction only and never copying
|
|
227
227
|
it into references, design documents, or this repository. React Bits names remain the property
|
|
228
228
|
of their owner.
|
|
229
229
|
|
|
@@ -15,7 +15,7 @@ we run on is a deliberate choice, not an accident of neglect.
|
|
|
15
15
|
| Fact | Value |
|
|
16
16
|
|---|---|
|
|
17
17
|
| Upstream project | `https://github.com/fivetaku/insane-search` |
|
|
18
|
-
|
|
|
18
|
+
| Import commit | `a4e4ed797` (2026-06-21) `feat(ultimate-browsing): vendor insane-search engine (junk-excluded)` |
|
|
19
19
|
| De-personalization | `4743199a5` (2026-06-21) |
|
|
20
20
|
| Pinned upstream baseline | upstream state as of 2026-06-21, **pre-0.7.0** (0.7.0 is dated 2026-06-22) |
|
|
21
21
|
| Re-vendors since | none — every later change here is ours |
|