lazycodex-ai 5.0.0-beta.9 → 5.0.0
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/README.ja.md +64 -69
- package/README.ko.md +65 -70
- package/README.md +108 -182
- package/README.ru.md +60 -68
- package/README.zh-cn.md +60 -69
- package/dist/cli/config-manager/parse-opencode-config-file.d.ts +2 -1
- package/dist/cli/config-manager/refresh-opencode-plugin-sandbox.d.ts +31 -0
- package/dist/cli/doctor/checks/browser-provider.d.ts +2 -0
- package/dist/cli/doctor/checks/index.d.ts +2 -0
- package/dist/cli/doctor/checks/latest-version.d.ts +11 -0
- package/dist/cli/doctor/checks/system-plugin.d.ts +4 -3
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +11 -0
- package/dist/cli/doctor/framework/constants.d.ts +5 -0
- package/dist/cli/doctor/framework/types.d.ts +2 -0
- package/dist/cli/fallback-lane-policy.d.ts +1 -0
- package/dist/cli/index.js +60340 -63161
- package/dist/cli/install-codex/install-codex-test-fixtures.d.ts +1 -1
- package/dist/cli/install-native/index.d.ts +12 -0
- package/dist/cli/install-native/legacy-omo-bin.d.ts +27 -0
- package/dist/cli/install-native/offer-native-setup.d.ts +31 -0
- package/dist/cli/install-native/omo-bin-test-fixtures.d.ts +35 -0
- package/dist/cli/install-native/plan.d.ts +21 -0
- package/dist/cli/install-native/repair-legacy-omo-bin.d.ts +26 -0
- package/dist/cli/install-native/run-native-install.d.ts +33 -0
- package/dist/cli/install-native/verify-omo-command.d.ts +22 -0
- package/dist/cli/install-native-dev/index.d.ts +4 -0
- package/dist/cli/native-dev-platform-flag.d.ts +5 -0
- package/dist/cli/native-edition-hint.d.ts +10 -0
- package/dist/cli/runtime-commands.d.ts +1 -1
- package/dist/cli/types.d.ts +3 -2
- package/dist/cli/worktree-sweep/classify.d.ts +16 -0
- package/dist/cli/worktree-sweep/format.d.ts +8 -0
- package/dist/cli/worktree-sweep/git.d.ts +19 -0
- package/dist/cli/worktree-sweep/index.d.ts +7 -0
- package/dist/cli/worktree-sweep/options.d.ts +2 -0
- package/dist/cli/worktree-sweep/parse-worktree-list.d.ts +8 -0
- package/dist/cli/worktree-sweep/sweep.d.ts +2 -0
- package/dist/cli/worktree-sweep/types.d.ts +65 -0
- package/dist/cli/worktree-sweep/worktree-sweep.d.ts +2 -0
- package/dist/cli-node/index.js +61667 -64465
- package/package.json +15 -14
- package/packages/git-bash-mcp/dist/cli.js +6 -1
- package/packages/lsp-daemon/dist/cli.js +1421 -960
- package/packages/lsp-daemon/dist/client.d.ts +10 -0
- package/packages/lsp-daemon/dist/client.js +956 -498
- package/packages/lsp-daemon/dist/daemon-client.d.ts +3 -0
- package/packages/lsp-daemon/dist/daemon-client.js +23 -3
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +6 -1
- package/packages/lsp-daemon/dist/ensure-daemon.js +27 -5
- package/packages/lsp-daemon/dist/index.js +860 -407
- package/packages/lsp-daemon/dist/ownership.js +2 -2
- package/packages/lsp-daemon/dist/proxy.js +3 -0
- package/packages/lsp-daemon/dist/version-reap.js +1 -1
- package/packages/lsp-daemon/package.json +5 -4
- package/packages/lsp-tools-mcp/dist/cli.js +764 -341
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +274 -138
- package/packages/lsp-tools-mcp/dist/mcp.js +789 -368
- package/packages/lsp-tools-mcp/dist/request-context.js +12 -13
- package/packages/lsp-tools-mcp/dist/tools.js +719 -302
- package/packages/lsp-tools-mcp/package.json +5 -4
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +4 -6
- package/packages/omo-codex/plugin/.mcp.json +0 -6
- package/packages/omo-codex/plugin/AGENTS.md +47 -0
- package/packages/omo-codex/plugin/README.md +6 -2
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +8504 -408
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -0
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +7 -1
- package/packages/omo-codex/plugin/components/comment-checker/AGENTS.md +9 -0
- package/packages/omo-codex/plugin/components/comment-checker/biome.json +2 -2
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +2 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +6 -5
- package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +2 -8
- package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +1 -2
- package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +1 -0
- package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.js +1 -1
- package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.js +2 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +3 -4
- package/packages/omo-codex/plugin/components/git-bash/src/codex-hook.ts +2 -1
- package/packages/omo-codex/plugin/components/git-bash/test/codex-hook.test.ts +6 -7
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/directive.md +2 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +36 -29
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +32 -26
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/types.d.ts +3 -0
- 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 +6 -5
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +32 -28
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/types.ts +3 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +134 -11
- package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/lcx/skills/lcx-doctor/SKILL.md +7 -5
- package/packages/omo-codex/plugin/components/lcx/skills/lcx-report-bug/SKILL.md +5 -5
- package/packages/omo-codex/plugin/components/lsp/AGENTS.md +30 -15
- package/packages/omo-codex/plugin/components/lsp/biome.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +4 -4
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +977 -545
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +1 -1
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +6 -5
- package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +1 -5
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +6 -7
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +1 -2
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +11 -1
- package/packages/omo-codex/plugin/components/rules/AGENTS.md +12 -0
- package/packages/omo-codex/plugin/components/rules/README.md +2 -0
- package/packages/omo-codex/plugin/components/rules/biome.json +2 -2
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-6.md +127 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +103 -68
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +8 -7
- package/packages/omo-codex/plugin/components/rules/src/config.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +27 -5
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +1 -4
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +4 -9
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/dynamic-target-fingerprints.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +7 -4
- package/packages/omo-codex/plugin/components/rules/test/finder.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +38 -3
- package/packages/omo-codex/plugin/components/rules/test/matcher.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +29 -6
- package/packages/omo-codex/plugin/components/rules/test/rules-engine-consumption.test.ts +3 -6
- package/packages/omo-codex/plugin/components/rules/test/scanner.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/sources.test.ts +2 -5
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -2
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +6 -5
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +1 -1
- package/packages/omo-codex/plugin/components/telemetry/AGENTS.md +8 -0
- package/packages/omo-codex/plugin/components/telemetry/biome.json +2 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +5328 -1382
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +5524 -1579
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +6 -5
- package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +1 -4
- package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +4 -14
- package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +1 -1
- package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +10 -4
- package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-low.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +20 -7
- package/packages/omo-codex/plugin/components/ultrawork/biome.json +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +478 -4
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +6 -6
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +30 -14
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +9 -10
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +17 -13
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +5 -6
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/plan-templates.mjs +180 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +3 -153
- package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +4 -0
- package/packages/omo-codex/plugin/components/ultrawork/src/directive.ts +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +9 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +14 -8
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +12 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/AGENTS.md +4 -4
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/NOTICE +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/README.md +6 -6
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/biome.json +2 -2
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/directive.md +13 -13
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/dist/cli.js +16 -16
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +16 -0
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/package.json +13 -12
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/boulder-reader.ts +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/codex-hook.ts +4 -4
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/directive.ts +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/index.ts +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/types.ts +1 -1
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/boulder-reader.test.ts +3 -3
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/cli.test.ts +4 -8
- package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/codex-hook.test.ts +22 -6
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +17 -1
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/biome.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +102 -107
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.d.ts +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.js +30 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +10 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.d.ts +2 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +5 -78
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.js +114 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +7 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +57 -46
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +21 -8
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +40 -37
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +2205 -737
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +28 -8
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +8 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +35 -23
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +25 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/driver-objective-ack.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/driver-objective-ack.js +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence-artifacts.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence-artifacts.js +37 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +24 -12
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.js +39 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +19 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.d.ts +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.js +108 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +6 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +54 -25
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.d.ts +10 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.js +38 -31
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +10 -7
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +121 -100
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.js +115 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.js +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.js +104 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.d.ts +13 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.js +65 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +72 -117
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +25 -13
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/factory.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/factory.js +157 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/manifest.d.ts +381 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/manifest.js +127 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/types.d.ts +130 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk.js +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.js +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +7 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +190 -59
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.js +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.d.ts +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.js +259 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +9 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.d.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +11 -11
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +28 -23
- package/packages/omo-codex/plugin/components/ulw-loop/dist/success-criteria-input.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/success-criteria-input.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.d.ts +21 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.js +100 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +18 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +7 -6
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +7 -2
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +2 -3
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +34 -11
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-codex-validation.ts +52 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +8 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +5 -98
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-template.ts +134 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +59 -77
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +10 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +24 -8
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +14 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +52 -46
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +8 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +35 -7
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +51 -33
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +27 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/driver-objective-ack.ts +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence-artifacts.ts +45 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence.ts +23 -16
- package/packages/omo-codex/plugin/components/ulw-loop/src/ledger.ts +38 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +32 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-commit.ts +132 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +67 -54
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-goal-factory.ts +63 -31
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +140 -119
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-log.ts +112 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +61 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-aggregate.ts +11 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-artifacts.ts +123 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-fields.ts +71 -15
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +92 -136
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +38 -13
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/factory.ts +218 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/manifest.ts +156 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/types.ts +143 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-budget-io.ts +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +201 -52
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-role-guard.ts +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/state-lock.ts +257 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/status-next-actions.ts +45 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +13 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +12 -10
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +27 -22
- package/packages/omo-codex/plugin/components/ulw-loop/src/success-criteria-input.ts +56 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/surface.ts +133 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-final.test.ts +131 -82
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-template.test.ts +147 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +16 -22
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint.test.ts +31 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-complete-goals.test.ts +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +35 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +38 -4
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-json-errors.test.ts +27 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-scope-required.test.ts +144 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-status-next-actions.test.ts +185 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +8 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +35 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +88 -11
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/barrier.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/cli-session.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-child.ts +65 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-cli-qa.mjs +76 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-crash.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +58 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-writer.ts +65 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/lease-clock.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +9 -4
- package/packages/omo-codex/plugin/components/ulw-loop/test/guided-recovery.test.ts +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-log.test.ts +252 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-recovery.test.ts +190 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io-cross-process.test.ts +106 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +74 -25
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-log-legacy-projection.test.ts +228 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-log-newest.test.ts +72 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-aggregate-basics.test.ts +258 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-cap-and-dedupe.test.ts +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-fields-messages.test.ts +98 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-lazycodex-surface.test.ts +93 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-poisoning-cascades.test.ts +97 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +51 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-senpi-surface.test.ts +131 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-single-report.test.ts +241 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +58 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/review-blockers.test.ts +9 -7
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-completed-plan.test.ts +43 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-contract.test.ts +137 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-driver-states.test.ts +174 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-dx.test.ts +219 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-session-context.test.ts +169 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard-native-reviewer.test.ts +207 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +452 -7
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-role-matrix.test.ts +113 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/state-lock.test.ts +310 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/status-next-actions-surface.test.ts +133 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +12 -12
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +12 -6
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/surface.test.ts +113 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +9 -3
- package/packages/omo-codex/plugin/components/ulw-loop/vitest.config.ts +1 -0
- 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 +18 -0
- 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 +17 -0
- 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/model-catalog.json +16 -7
- package/packages/omo-codex/plugin/package-lock.json +992 -681
- package/packages/omo-codex/plugin/package.json +6 -3
- package/packages/omo-codex/plugin/scripts/AGENTS.md +39 -0
- package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +1 -2
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +0 -9
- package/packages/omo-codex/plugin/scripts/canonical-ultrawork-directive.mjs +17 -0
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +0 -1
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +8 -2
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +16 -7
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +8 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +19 -90
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.d.mts +4 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +114 -67
- package/packages/omo-codex/plugin/shared/package.json +3 -4
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +2 -102
- package/packages/omo-codex/plugin/shared/src/config-migration.ts +0 -1
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +41 -130
- package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +51 -0
- package/packages/omo-codex/plugin/skills/ast-grep/SKILL.md +13 -1
- package/packages/omo-codex/plugin/skills/browser/ATTRIBUTION.md +37 -0
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +109 -0
- package/packages/omo-codex/plugin/skills/browser/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/browser/references/commands.md +105 -0
- package/packages/omo-codex/plugin/skills/browser/references/install.md +97 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +62 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +52 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/ladder.md +61 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +62 -0
- package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +61 -0
- package/packages/omo-codex/plugin/skills/browser/references/remote.md +25 -0
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +1534 -0
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +9 -0
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/page-bundle.js +1395 -0
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +57 -0
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +50 -0
- package/packages/omo-codex/plugin/skills/browser/scripts/omowright.mjs +25 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +62 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +99 -239
- package/packages/omo-codex/plugin/skills/data-scientist/references/execution-surfaces.md +91 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/placement.md +74 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/polars-lane.md +95 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +1 -1
- package/packages/omo-codex/plugin/skills/data-scientist/references/visualization.md +64 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +5 -3
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +12 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +26 -5
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +3 -3
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/08-qa.md +1 -1
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +15 -1
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +38 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +25 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +13 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +41 -0
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +267 -0
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/browser-qa.md +104 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +103 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +193 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -0
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +13 -4
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ambience-skill.md +146 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/aside.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/clone-from-url.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +30 -6
- package/packages/omo-codex/plugin/skills/frontend/references/design/interaction-skill.md +19 -5
- package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +76 -0
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-a-direction.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +11 -11
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-d-memory.md +3 -3
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/orchestration.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/routing.md +5 -5
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
- package/packages/omo-codex/plugin/skills/git-master/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +20 -18
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +7 -5
- package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +5 -5
- package/packages/omo-codex/plugin/skills/lsp-setup/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +12 -18
- package/packages/omo-codex/plugin/skills/programming/references/rust/README.md +43 -15
- package/packages/omo-codex/plugin/skills/programming/references/rust/api-design.md +81 -0
- package/packages/omo-codex/plugin/skills/programming/references/rust/async-tokio.md +60 -28
- package/packages/omo-codex/plugin/skills/programming/references/rust/axum-stack.md +1 -13
- package/packages/omo-codex/plugin/skills/programming/references/rust/cargo-strict.md +44 -8
- package/packages/omo-codex/plugin/skills/programming/references/rust/clap-stack.md +8 -3
- package/packages/omo-codex/plugin/skills/programming/references/rust/concurrency.md +66 -52
- package/packages/omo-codex/plugin/skills/programming/references/rust/libraries.md +35 -25
- package/packages/omo-codex/plugin/skills/programming/references/rust/macros.md +63 -0
- package/packages/omo-codex/plugin/skills/programming/references/rust/one-liners.md +5 -3
- package/packages/omo-codex/plugin/skills/programming/references/rust/proptest-insta.md +8 -0
- package/packages/omo-codex/plugin/skills/programming/references/rust/type-state.md +50 -12
- package/packages/omo-codex/plugin/skills/programming/references/rust/unsafe-discipline.md +34 -6
- package/packages/omo-codex/plugin/skills/programming/references/rust/zero-cost-safety.md +62 -52
- package/packages/omo-codex/plugin/skills/programming/references/rust-ub/miri-sanitizers-loom.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/references/rust-ub/ub-taxonomy.md +6 -3
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/check-no-excuse-rules.sh +86 -75
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.py +31 -28
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +11 -9
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +11 -9
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +116 -424
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +40 -28
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +2 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +34 -111
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +14 -7
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +22 -36
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +102 -107
- package/packages/omo-codex/plugin/skills/{start-work → ulw-execute}/SKILL.md +38 -39
- package/packages/omo-codex/plugin/skills/ulw-execute/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +31 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +2 -3
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +34 -11
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +9 -10
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +17 -13
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +5 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/plan-templates.mjs +180 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +3 -153
- package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +63 -0
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +52 -33
- package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +187 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +66 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +102 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +162 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-lite.mjs +204 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/design-spec.mjs +161 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/entities.mjs +39 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/entry-guard.mjs +21 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract-css.mjs +122 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract.mjs +229 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-figures.mjs +173 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-layout.mjs +146 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +167 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +118 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +190 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +239 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/layout-probe.mjs +83 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +250 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/repair-tracker.mjs +171 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +214 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +61 -0
- package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +58 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +77 -0
- package/packages/omo-codex/plugin/test/AGENTS.md +47 -0
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +12 -12
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +13 -28
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +2 -3
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +2 -7
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +14 -4
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -29
- package/packages/omo-codex/plugin/test/bootstrap-default-role.test.mjs +66 -0
- package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +0 -31
- package/packages/omo-codex/plugin/test/canonical-ultrawork-directive.test.mjs +53 -0
- package/packages/omo-codex/plugin/test/component-bin-names.test.mjs +2 -2
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +1 -51
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +100 -2
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +5 -6
- package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +1 -3
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +35 -35
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +107 -15
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +81 -3
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +57 -26
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +37 -0
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +5 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +16238 -4291
- package/packages/{omo-codex/plugin/components/ultrawork/directive.md → prompts-core/prompts/ultrawork/codex.md} +102 -107
- package/packages/shared-skills/package.json +7 -1
- package/packages/shared-skills/skill-source-filter.d.ts +16 -0
- package/packages/shared-skills/skill-source-filter.mjs +44 -0
- package/packages/shared-skills/skills/ast-grep/AGENTS.md +51 -0
- package/packages/shared-skills/skills/ast-grep/SKILL.md +13 -1
- package/packages/shared-skills/skills/browser/ATTRIBUTION.md +37 -0
- package/packages/shared-skills/skills/browser/SKILL.md +109 -0
- package/packages/shared-skills/skills/browser/references/commands.md +105 -0
- package/packages/shared-skills/skills/browser/references/install.md +97 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/README.md +62 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +52 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/ladder.md +61 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/network.md +62 -0
- package/packages/shared-skills/skills/browser/references/recipes/1password.md +61 -0
- package/packages/shared-skills/skills/browser/references/remote.md +25 -0
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +1534 -0
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +9 -0
- package/packages/shared-skills/skills/browser/runtime/omowright/page-bundle.js +1395 -0
- package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +57 -0
- package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +50 -0
- package/packages/shared-skills/skills/browser/scripts/omowright.mjs +25 -0
- package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +62 -0
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +1 -1
- package/packages/shared-skills/skills/data-scientist/SKILL.md +99 -239
- package/packages/shared-skills/skills/data-scientist/references/execution-surfaces.md +91 -0
- package/packages/shared-skills/skills/data-scientist/references/placement.md +74 -0
- package/packages/shared-skills/skills/data-scientist/references/polars-lane.md +95 -0
- package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +1 -1
- package/packages/shared-skills/skills/data-scientist/references/visualization.md +64 -0
- package/packages/shared-skills/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
- package/packages/shared-skills/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
- package/packages/shared-skills/skills/debugging/SKILL.md +5 -3
- package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +12 -0
- package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +26 -5
- package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +3 -3
- package/packages/shared-skills/skills/debugging/references/methodology/08-qa.md +1 -1
- package/packages/shared-skills/skills/debugging/references/runtimes/go.md +15 -1
- package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +38 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/node.md +25 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/python.md +13 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +41 -0
- package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +267 -0
- package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +86 -0
- package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
- package/packages/shared-skills/skills/debugging/references/tools/browser-qa.md +104 -0
- package/packages/shared-skills/skills/debugging/references/tools/dap.md +103 -0
- package/packages/shared-skills/skills/debugging/references/tools/frida.md +193 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -0
- package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
- package/packages/shared-skills/skills/frontend/references/design/README.md +13 -4
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/shared-skills/skills/frontend/references/design/ambience-skill.md +146 -0
- package/packages/shared-skills/skills/frontend/references/design/aside.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/clone-from-url.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +30 -6
- package/packages/shared-skills/skills/frontend/references/design/interaction-skill.md +19 -5
- package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +76 -0
- package/packages/shared-skills/skills/frontend/references/designpowers/README.md +1 -1
- package/packages/shared-skills/skills/frontend/references/designpowers/lane-a-direction.md +1 -1
- package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +11 -11
- package/packages/shared-skills/skills/frontend/references/designpowers/lane-d-memory.md +3 -3
- package/packages/shared-skills/skills/frontend/references/designpowers/orchestration.md +1 -1
- package/packages/shared-skills/skills/frontend/references/designpowers/routing.md +5 -5
- package/packages/shared-skills/skills/frontend/references/perfection/README.md +1 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
- package/packages/shared-skills/skills/git-master/SKILL.md +1 -1
- package/packages/shared-skills/skills/init-deep/SKILL.md +14 -14
- package/packages/shared-skills/skills/lsp-setup/SKILL.md +1 -1
- package/packages/shared-skills/skills/programming/SKILL.md +12 -18
- package/packages/shared-skills/skills/programming/references/rust/README.md +43 -15
- package/packages/shared-skills/skills/programming/references/rust/api-design.md +81 -0
- package/packages/shared-skills/skills/programming/references/rust/async-tokio.md +60 -28
- package/packages/shared-skills/skills/programming/references/rust/axum-stack.md +1 -13
- package/packages/shared-skills/skills/programming/references/rust/cargo-strict.md +44 -8
- package/packages/shared-skills/skills/programming/references/rust/clap-stack.md +8 -3
- package/packages/shared-skills/skills/programming/references/rust/concurrency.md +66 -52
- package/packages/shared-skills/skills/programming/references/rust/libraries.md +35 -25
- package/packages/shared-skills/skills/programming/references/rust/macros.md +63 -0
- package/packages/shared-skills/skills/programming/references/rust/one-liners.md +5 -3
- package/packages/shared-skills/skills/programming/references/rust/proptest-insta.md +8 -0
- package/packages/shared-skills/skills/programming/references/rust/type-state.md +50 -12
- package/packages/shared-skills/skills/programming/references/rust/unsafe-discipline.md +34 -6
- package/packages/shared-skills/skills/programming/references/rust/zero-cost-safety.md +62 -52
- package/packages/shared-skills/skills/programming/references/rust-ub/miri-sanitizers-loom.md +1 -1
- package/packages/shared-skills/skills/programming/references/rust-ub/ub-taxonomy.md +6 -3
- package/packages/shared-skills/skills/programming/scripts/rust/check-no-excuse-rules.sh +86 -75
- package/packages/shared-skills/skills/programming/scripts/rust/check-no-excuse-rules.test.ts +83 -0
- package/packages/shared-skills/skills/programming/scripts/rust/new-project.py +31 -28
- package/packages/shared-skills/skills/refactor/SKILL.md +5 -5
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +5 -5
- package/packages/shared-skills/skills/review-work/SKILL.md +101 -419
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +40 -28
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +2 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +34 -111
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +14 -7
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +22 -36
- package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
- package/packages/shared-skills/skills/{start-work → ulw-execute}/SKILL.md +27 -25
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +10 -11
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +18 -13
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +5 -6
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/shared-skills/skills/ulw-plan/scripts/plan-templates.mjs +180 -0
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +3 -153
- package/packages/shared-skills/skills/ulw-research/AGENTS.md +63 -0
- package/packages/shared-skills/skills/ulw-research/SKILL.md +47 -30
- package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +187 -0
- package/packages/shared-skills/skills/ulw-research/references/report-gates.md +66 -0
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +102 -0
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +88 -0
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +162 -0
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +177 -0
- package/packages/shared-skills/skills/ulw-research/scripts/css-lite.mjs +204 -0
- package/packages/shared-skills/skills/ulw-research/scripts/css-lite.test.ts +159 -0
- package/packages/shared-skills/skills/ulw-research/scripts/design-spec.mjs +161 -0
- package/packages/shared-skills/skills/ulw-research/scripts/design-spec.test.ts +162 -0
- package/packages/shared-skills/skills/ulw-research/scripts/entities.mjs +39 -0
- package/packages/shared-skills/skills/ulw-research/scripts/entry-guard.mjs +21 -0
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract-css.mjs +122 -0
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract.mjs +229 -0
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract.test.ts +243 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-figures.mjs +173 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.mjs +146 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.test.ts +236 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +167 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.test.ts +265 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +118 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +190 -0
- package/packages/shared-skills/skills/ulw-research/scripts/glossary-vocabulary.test.ts +43 -0
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +239 -0
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.test.ts +191 -0
- package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.mjs +83 -0
- package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.test.ts +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +250 -0
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +281 -0
- package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.mjs +171 -0
- package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.test.ts +246 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +214 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +61 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +213 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/assets/figure-1.svg +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/bad-report.html +44 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/boxes.json +90 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/design-spec.md +29 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/good-report.html +57 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/reference-report.html +86 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/reference.md +23 -0
- package/packages/shared-skills/skills/visual-qa/AGENTS.md +58 -0
- package/packages/shared-skills/skills/visual-qa/SKILL.md +4 -3
- package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +77 -0
- package/script/qa/web-terminal-visual-qa.mjs +2 -0
- package/script/qa/xterm-live-terminal.mjs +18 -2
- package/dist/cli/install-senpi/index.d.ts +0 -1
- package/dist/cli/senpi-platform-flag.d.ts +0 -4
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.d.ts +0 -1
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +0 -58
- package/packages/omo-codex/plugin/components/codegraph/NODE-RUNTIME-LICENSES.md +0 -2951
- package/packages/omo-codex/plugin/components/codegraph/NOTICE +0 -16
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +0 -12244
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +0 -9842
- package/packages/omo-codex/plugin/components/codegraph/package.json +0 -33
- package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +0 -29
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +0 -79
- package/packages/omo-codex/plugin/components/codegraph/src/hook-input.ts +0 -33
- package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +0 -25
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +0 -131
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +0 -258
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +0 -309
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +0 -80
- package/packages/omo-codex/plugin/components/codegraph/src/post-tool-use-hook.ts +0 -34
- package/packages/omo-codex/plugin/components/codegraph/src/serve-invocation.ts +0 -29
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +0 -263
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-command.ts +0 -106
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-cooldown.ts +0 -145
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +0 -21
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-lock.ts +0 -139
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-outcome.ts +0 -15
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-paths.ts +0 -32
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-project.ts +0 -109
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker-result.ts +0 -148
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +0 -175
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +0 -81
- package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +0 -34
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +0 -112
- package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +0 -26
- package/packages/omo-codex/plugin/components/codegraph/test/hook-session-start-guard.test.ts +0 -160
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +0 -50
- package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +0 -29
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +0 -320
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +0 -172
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +0 -91
- package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +0 -100
- package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +0 -76
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +0 -133
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +0 -245
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +0 -69
- package/packages/omo-codex/plugin/components/codegraph/test/serve-node-support.test.ts +0 -43
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +0 -147
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +0 -175
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +0 -385
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +0 -206
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-project.test.ts +0 -58
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-state.test.ts +0 -104
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-trust-boundary.test.ts +0 -65
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-availability.test.ts +0 -106
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-cooldown.test.ts +0 -116
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +0 -258
- package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +0 -56
- package/packages/omo-codex/plugin/components/codegraph/tsconfig.build.json +0 -13
- package/packages/omo-codex/plugin/components/codegraph/tsconfig.json +0 -25
- package/packages/omo-codex/plugin/components/start-work-continuation/LICENSE +0 -21
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +0 -28
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +0 -484
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +0 -18
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +0 -17
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +0 -17
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +0 -17
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/editor.mjs +0 -125
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/jsonc.mjs +0 -43
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/scaffold.mjs +0 -29
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +0 -121
- package/packages/omo-codex/plugin/skills/data-scientist/references/common-scenarios.md +0 -176
- package/packages/omo-codex/plugin/skills/data-scientist/references/execution-templates.md +0 -197
- package/packages/omo-codex/plugin/skills/data-scientist/references/integration-patterns.md +0 -153
- package/packages/omo-codex/plugin/skills/data-scientist/references/performance-benchmarks.md +0 -37
- package/packages/omo-codex/plugin/skills/debugging/references/tools/playwright-cli.md +0 -194
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/check-no-excuse-rules.py +0 -296
- package/packages/omo-codex/plugin/skills/start-work/agents/openai.yaml +0 -2
- package/packages/omo-codex/plugin/skills/visual-qa/references/agent-browser-setup.md +0 -45
- package/packages/omo-codex/plugin/test/component-codegraph-mcp-smoke.test.mjs +0 -76
- package/packages/omo-codex/plugin/test/migrate-omo-sot.test.mjs +0 -179
- package/packages/shared-skills/skills/data-scientist/references/common-scenarios.md +0 -176
- package/packages/shared-skills/skills/data-scientist/references/execution-templates.md +0 -197
- package/packages/shared-skills/skills/data-scientist/references/integration-patterns.md +0 -153
- package/packages/shared-skills/skills/data-scientist/references/performance-benchmarks.md +0 -37
- package/packages/shared-skills/skills/debugging/references/tools/playwright-cli.md +0 -194
- package/packages/shared-skills/skills/programming/scripts/rust/check-no-excuse-rules.py +0 -296
- package/packages/shared-skills/skills/visual-qa/references/agent-browser-setup.md +0 -45
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/.gitattributes +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/CHANGELOG.md +0 -0
- /package/packages/omo-codex/plugin/components/{codegraph → ulw-execute-continuation}/LICENSE +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/plan-checklist.ts +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-completed.json +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-mixed-platforms.json +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-single-codex-work.json +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-all-done.md +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-scaffold.md +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-with-nested-checkboxes.md +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-with-unchecked.md +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/tsconfig.build.json +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/tsconfig.json +0 -0
- /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/vitest.config.ts +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// repair-tracker.mjs - the bounded repair loop as a pure state machine.
|
|
2
|
+
//
|
|
3
|
+
// Every decide() call is one check of the current artifact: the first call is attempt 0 (the
|
|
4
|
+
// initial check), each later call follows one repair already taken. The loop stops on max
|
|
5
|
+
// attempts, a measure plateau, a repeated defect signature (oscillation), or the wall clock.
|
|
6
|
+
// On a stop the artifact is delivered with its residual defects unless a content-integrity
|
|
7
|
+
// code remains, which blocks delivery. Time is always injected; this module never reads a
|
|
8
|
+
// clock. Severities come from contracts.mjs only, so no caller can demote a defect.
|
|
9
|
+
|
|
10
|
+
import { DEFECT_CODES, INTEGRITY_CODES, REPAIR_DEFAULTS, SCHEMA_VERSION, validateRepairState } from "./contracts.mjs"
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {{ code: string, message?: string }} Defect
|
|
14
|
+
* @typedef {{ at: string, measure: number[], signature: string, action: string }} Attempt
|
|
15
|
+
* @typedef {{ schemaVersion: number, startedAt: string, budget: { maxAttempts: number, plateauLimit: number, wallClockMs: number }, integrityCodes: string[], attempts: Attempt[], consecutiveNonProgress: number, seenSignatures: string[] }} RepairState
|
|
16
|
+
* @typedef {{ action: "repair"|"deliver"|"block", reason: string|null, residual: Defect[], blocking: Defect[] }} Decision
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const SEVERITY_INDEX = Object.freeze({ blocker: 0, major: 1, minor: 2 })
|
|
20
|
+
const MIN_ARTIFACT_BYTES = 512
|
|
21
|
+
const MIN_RENDERS = 1
|
|
22
|
+
|
|
23
|
+
export class RepairTrackerError extends Error {
|
|
24
|
+
/** @param {string} code @param {string} message */
|
|
25
|
+
constructor(code, message) {
|
|
26
|
+
super(message)
|
|
27
|
+
this.name = "RepairTrackerError"
|
|
28
|
+
this.code = code
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function toIso(value, label) {
|
|
33
|
+
const date = value instanceof Date ? value : typeof value === "string" || typeof value === "number" ? new Date(value) : null
|
|
34
|
+
if (date === null || !Number.isFinite(date.getTime())) {
|
|
35
|
+
throw new RepairTrackerError("invalid_time", `${label} must be a Date, an ISO timestamp, or epoch milliseconds`)
|
|
36
|
+
}
|
|
37
|
+
return date.toISOString()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function assertKnownCode(code, label) {
|
|
41
|
+
if (typeof code !== "string" || !Object.hasOwn(DEFECT_CODES, code)) {
|
|
42
|
+
throw new RepairTrackerError("unknown_defect_code", `${label} ${JSON.stringify(code)} is not a known defect code`)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Callers may add integrity codes; the contract set is always included, so none can be removed. */
|
|
47
|
+
function integritySet(extra) {
|
|
48
|
+
return new Set([...INTEGRITY_CODES, ...(extra ?? [])])
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @param {{ maxAttempts?: number, plateauLimit?: number, wallClockMs?: number, integrityCodes?: Iterable<string>, startedAt: Date|string|number }} options
|
|
53
|
+
* @returns {RepairState}
|
|
54
|
+
*/
|
|
55
|
+
export function createTracker({ maxAttempts, plateauLimit, wallClockMs, integrityCodes, startedAt }) {
|
|
56
|
+
if (startedAt === undefined) throw new RepairTrackerError("invalid_time", "startedAt is required (the tracker never reads the clock)")
|
|
57
|
+
const codes = [...integritySet(integrityCodes)].sort()
|
|
58
|
+
for (const code of codes) assertKnownCode(code, "integrity code")
|
|
59
|
+
const state = {
|
|
60
|
+
schemaVersion: SCHEMA_VERSION,
|
|
61
|
+
startedAt: toIso(startedAt, "startedAt"),
|
|
62
|
+
budget: {
|
|
63
|
+
maxAttempts: maxAttempts ?? REPAIR_DEFAULTS.maxAttempts,
|
|
64
|
+
plateauLimit: plateauLimit ?? REPAIR_DEFAULTS.plateauLimit,
|
|
65
|
+
wallClockMs: wallClockMs ?? REPAIR_DEFAULTS.wallClockMs,
|
|
66
|
+
},
|
|
67
|
+
integrityCodes: codes,
|
|
68
|
+
attempts: [],
|
|
69
|
+
consecutiveNonProgress: 0,
|
|
70
|
+
seenSignatures: [],
|
|
71
|
+
}
|
|
72
|
+
assertValid(state)
|
|
73
|
+
return state
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** The artifact is worth delivering with residual defects only when it exists and was rendered. */
|
|
77
|
+
export function isArtifactOk({ bytes, renders }) {
|
|
78
|
+
return Number.isFinite(bytes) && bytes >= MIN_ARTIFACT_BYTES && Number.isFinite(renders) && renders >= MIN_RENDERS
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function measureOf(defects) {
|
|
82
|
+
const measure = [0, 0, 0]
|
|
83
|
+
for (const defect of defects) measure[SEVERITY_INDEX[DEFECT_CODES[defect.code].severity]] += 1
|
|
84
|
+
return measure
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function signatureOf(defects) {
|
|
88
|
+
return [...new Set(defects.map((defect) => defect.code))].sort().join("|")
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function lessThan(a, b) {
|
|
92
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
93
|
+
if (a[i] !== b[i]) return a[i] < b[i]
|
|
94
|
+
}
|
|
95
|
+
return false
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function stopReason(state, { signature, consecutiveNonProgress, repairsTaken, elapsedMs }) {
|
|
99
|
+
const { maxAttempts, plateauLimit, wallClockMs } = state.budget
|
|
100
|
+
if (state.seenSignatures.includes(signature)) return "oscillation"
|
|
101
|
+
if (consecutiveNonProgress >= plateauLimit) return "plateau"
|
|
102
|
+
if (repairsTaken >= maxAttempts) return "max_attempts"
|
|
103
|
+
if (elapsedMs >= wallClockMs) return "wall_clock"
|
|
104
|
+
return null
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @param {RepairState} state a tracker state (createTracker or deserializeState)
|
|
109
|
+
* @param {Defect[]} defects the current check's defects
|
|
110
|
+
* @param {Date|string|number} now injected time of this check
|
|
111
|
+
* @param {{ artifactOk?: boolean }} [artifact] caller-supplied; see isArtifactOk
|
|
112
|
+
* @returns {{ state: RepairState, decision: Decision }}
|
|
113
|
+
*/
|
|
114
|
+
export function decide(state, defects, now, { artifactOk = false } = {}) {
|
|
115
|
+
if (!Array.isArray(defects)) throw new RepairTrackerError("invalid_defects", "defects must be an array")
|
|
116
|
+
defects.forEach((defect, index) => assertKnownCode(defect?.code, `defects[${index}].code`))
|
|
117
|
+
const at = toIso(now, "now")
|
|
118
|
+
const measure = measureOf(defects)
|
|
119
|
+
const signature = signatureOf(defects)
|
|
120
|
+
const previous = state.attempts.at(-1)
|
|
121
|
+
const consecutiveNonProgress = previous && !lessThan(measure, previous.measure) ? state.consecutiveNonProgress + 1 : 0
|
|
122
|
+
const repairsTaken = state.attempts.filter((attempt) => attempt.action === "repair").length
|
|
123
|
+
const integrity = integritySet(state.integrityCodes)
|
|
124
|
+
const blocking = defects.filter((defect) => integrity.has(defect.code))
|
|
125
|
+
|
|
126
|
+
/** @type {Decision} */
|
|
127
|
+
let decision
|
|
128
|
+
if (defects.length === 0) decision = { action: "deliver", reason: "clean", residual: [], blocking: [] }
|
|
129
|
+
else {
|
|
130
|
+
const elapsedMs = Date.parse(at) - Date.parse(state.startedAt)
|
|
131
|
+
const reason = stopReason(state, { signature, consecutiveNonProgress, repairsTaken, elapsedMs })
|
|
132
|
+
if (reason === null) decision = { action: "repair", reason: null, residual: [...defects], blocking }
|
|
133
|
+
else if (blocking.length > 0) decision = { action: "block", reason: "blocking", residual: [...defects], blocking }
|
|
134
|
+
else decision = { action: artifactOk ? "deliver" : "block", reason, residual: [...defects], blocking }
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const next = {
|
|
138
|
+
...state,
|
|
139
|
+
budget: { ...state.budget },
|
|
140
|
+
integrityCodes: [...state.integrityCodes],
|
|
141
|
+
attempts: [...state.attempts, { at, measure, signature, action: decision.action }],
|
|
142
|
+
consecutiveNonProgress,
|
|
143
|
+
seenSignatures: state.seenSignatures.includes(signature) ? [...state.seenSignatures] : [...state.seenSignatures, signature],
|
|
144
|
+
}
|
|
145
|
+
return { state: next, decision }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function assertValid(state) {
|
|
149
|
+
const { ok, errors } = validateRepairState(state)
|
|
150
|
+
if (!ok) throw new RepairTrackerError("invalid_repair_state", `invalid repair state: ${errors.join("; ")}`)
|
|
151
|
+
if (!Array.isArray(state.integrityCodes)) throw new RepairTrackerError("invalid_repair_state", "integrityCodes must be an array")
|
|
152
|
+
for (const code of state.integrityCodes) assertKnownCode(code, "integrity code")
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @returns {string} the repair-state.json text */
|
|
156
|
+
export function serializeState(state) {
|
|
157
|
+
assertValid(state)
|
|
158
|
+
return `${JSON.stringify(state, null, 2)}\n`
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @param {string} text repair-state.json contents @returns {RepairState} */
|
|
162
|
+
export function deserializeState(text) {
|
|
163
|
+
let state
|
|
164
|
+
try {
|
|
165
|
+
state = JSON.parse(text)
|
|
166
|
+
} catch (error) {
|
|
167
|
+
throw new RepairTrackerError("invalid_repair_state", `repair state is not JSON: ${error.message}`)
|
|
168
|
+
}
|
|
169
|
+
assertValid(state)
|
|
170
|
+
return state
|
|
171
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test"
|
|
2
|
+
|
|
3
|
+
import { REPAIR_DEFAULTS, validateRepairState } from "./contracts.mjs"
|
|
4
|
+
import {
|
|
5
|
+
RepairTrackerError,
|
|
6
|
+
createTracker,
|
|
7
|
+
decide,
|
|
8
|
+
deserializeState,
|
|
9
|
+
isArtifactOk,
|
|
10
|
+
serializeState,
|
|
11
|
+
} from "./repair-tracker.mjs"
|
|
12
|
+
|
|
13
|
+
const START = "2026-09-24T00:00:00.000Z"
|
|
14
|
+
const MINUTE = 60 * 1000
|
|
15
|
+
const OK = { artifactOk: true }
|
|
16
|
+
|
|
17
|
+
function at(minutes: number): string {
|
|
18
|
+
return new Date(Date.parse(START) + minutes * MINUTE).toISOString()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function defects(...codes: string[]) {
|
|
22
|
+
return codes.map((code) => ({ code, message: `${code} found` }))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type Step = { codes: string[]; minutes?: number }
|
|
26
|
+
|
|
27
|
+
function runSequence(options: Record<string, unknown>, steps: Step[], extra: Record<string, unknown> = OK) {
|
|
28
|
+
let state = createTracker({ startedAt: START, ...options })
|
|
29
|
+
const decisions = []
|
|
30
|
+
for (const [index, step] of steps.entries()) {
|
|
31
|
+
const result = decide(state, defects(...step.codes), at(step.minutes ?? index), extra)
|
|
32
|
+
state = result.state
|
|
33
|
+
decisions.push(result.decision)
|
|
34
|
+
}
|
|
35
|
+
return { state, decisions }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
describe("createTracker", () => {
|
|
39
|
+
test("#given no budget #when a tracker is created #then it uses REPAIR_DEFAULTS and validates", () => {
|
|
40
|
+
const state = createTracker({ startedAt: START })
|
|
41
|
+
|
|
42
|
+
expect(state.budget).toEqual({ ...REPAIR_DEFAULTS })
|
|
43
|
+
expect(state.attempts).toEqual([])
|
|
44
|
+
expect(state.consecutiveNonProgress).toBe(0)
|
|
45
|
+
expect(validateRepairState(state)).toEqual({ ok: true, errors: [] })
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
test("#given no startedAt #when a tracker is created #then it throws instead of reading the clock", () => {
|
|
49
|
+
// @ts-expect-error startedAt is deliberately omitted to prove the runtime guard
|
|
50
|
+
expect(() => createTracker({})).toThrow(RepairTrackerError)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
test("#given an empty integrityCodes list #when a blocker remains at stop #then the integrity code is still blocking", () => {
|
|
54
|
+
const { decisions } = runSequence({ maxAttempts: 1, integrityCodes: [] }, [
|
|
55
|
+
{ codes: ["missing_citation_section"] },
|
|
56
|
+
{ codes: ["missing_citation_section", "heading_generic"] },
|
|
57
|
+
])
|
|
58
|
+
|
|
59
|
+
expect(decisions[1]).toMatchObject({ action: "block", reason: "blocking" })
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
test("#given an extra integrity code #when it remains at stop #then delivery is blocked on it", () => {
|
|
63
|
+
const { decisions } = runSequence({ maxAttempts: 1, integrityCodes: ["em_dash_in_prose"] }, [
|
|
64
|
+
{ codes: ["em_dash_in_prose"] },
|
|
65
|
+
{ codes: ["em_dash_in_prose", "heading_generic"] },
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
expect(decisions[1].action).toBe("block")
|
|
69
|
+
expect(decisions[1].blocking.map((d: { code: string }) => d.code)).toEqual(["em_dash_in_prose"])
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
test("#given an unknown integrity code #when a tracker is created #then it throws a typed error", () => {
|
|
73
|
+
expect(() => createTracker({ startedAt: START, integrityCodes: ["not_a_code"] })).toThrow(RepairTrackerError)
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
describe("decide stop conditions", () => {
|
|
78
|
+
test("#given plateauLimit 2 #when the measure stops improving twice #then the fourth decide stops with plateau", () => {
|
|
79
|
+
// [0,3,1] -> [0,2,1] -> [0,2,1] -> [0,2,1], every signature distinct
|
|
80
|
+
const { decisions, state } = runSequence({ maxAttempts: 5, plateauLimit: 2 }, [
|
|
81
|
+
{ codes: ["emoji_in_prose", "em_dash_in_prose", "unsourced_number", "heading_generic"] },
|
|
82
|
+
{ codes: ["chart_without_figure", "chart_svg_no_text", "heading_too_long"] },
|
|
83
|
+
{ codes: ["korean_no_keep_all", "korean_serif_font", "palette_off_token"] },
|
|
84
|
+
{ codes: ["layout_overflow", "layout_text_clipped", "en_dash_in_prose"] },
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
expect(decisions.slice(0, 3).map((d) => d.action)).toEqual(["repair", "repair", "repair"])
|
|
88
|
+
expect(decisions[3]).toMatchObject({ action: "deliver", reason: "plateau" })
|
|
89
|
+
expect(decisions[3].residual.map((d: { code: string }) => d.code)).toEqual([
|
|
90
|
+
"layout_overflow",
|
|
91
|
+
"layout_text_clipped",
|
|
92
|
+
"en_dash_in_prose",
|
|
93
|
+
])
|
|
94
|
+
expect(state.consecutiveNonProgress).toBe(2)
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
test("#given the literal blocker plateau sequence #when it stops #then the integrity codes block delivery", () => {
|
|
98
|
+
// [2,1,0] -> [1,1,0] -> [1,1,0] -> [1,1,0]
|
|
99
|
+
const { decisions } = runSequence({ maxAttempts: 5, plateauLimit: 2 }, [
|
|
100
|
+
{ codes: ["missing_citation_section", "missing_closing_section", "emoji_in_prose"] },
|
|
101
|
+
{ codes: ["missing_citation_section", "em_dash_in_prose"] },
|
|
102
|
+
{ codes: ["missing_closing_section", "unsourced_number"] },
|
|
103
|
+
{ codes: ["broken_asset_reference", "layout_overflow"] },
|
|
104
|
+
])
|
|
105
|
+
|
|
106
|
+
expect(decisions.slice(0, 3).map((d) => d.action)).toEqual(["repair", "repair", "repair"])
|
|
107
|
+
expect(decisions[3]).toMatchObject({ action: "block", reason: "blocking" })
|
|
108
|
+
expect(decisions[3].blocking.map((d: { code: string }) => d.code)).toEqual(["broken_asset_reference"])
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
test("#given signatures A, B, A #when the third decide runs #then it stops with oscillation", () => {
|
|
112
|
+
const { decisions } = runSequence({ maxAttempts: 5 }, [
|
|
113
|
+
{ codes: ["emoji_in_prose", "heading_generic"] },
|
|
114
|
+
{ codes: ["unsourced_number"] },
|
|
115
|
+
{ codes: ["heading_generic", "emoji_in_prose"] },
|
|
116
|
+
])
|
|
117
|
+
|
|
118
|
+
expect(decisions.map((d) => d.action)).toEqual(["repair", "repair", "deliver"])
|
|
119
|
+
expect(decisions[2].reason).toBe("oscillation")
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
test("#given oscillation and plateau both hold #when decided #then oscillation wins by precedence", () => {
|
|
123
|
+
const { decisions } = runSequence({ maxAttempts: 5, plateauLimit: 1 }, [
|
|
124
|
+
{ codes: ["unsourced_number"] },
|
|
125
|
+
{ codes: ["unsourced_number"] },
|
|
126
|
+
])
|
|
127
|
+
|
|
128
|
+
expect(decisions[1]).toMatchObject({ action: "deliver", reason: "oscillation" })
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
test("#given maxAttempts 3 and improving measures #when the fourth decide runs #then it stops with max_attempts", () => {
|
|
132
|
+
// [0,3,0] -> [0,2,0] -> [0,1,0] -> [0,1,0], every signature distinct
|
|
133
|
+
const { decisions } = runSequence({ maxAttempts: 3 }, [
|
|
134
|
+
{ codes: ["emoji_in_prose", "em_dash_in_prose", "unsourced_number"] },
|
|
135
|
+
{ codes: ["chart_without_figure", "chart_svg_no_text"] },
|
|
136
|
+
{ codes: ["korean_serif_font"] },
|
|
137
|
+
{ codes: ["layout_text_clipped"] },
|
|
138
|
+
])
|
|
139
|
+
|
|
140
|
+
expect(decisions.slice(0, 3).map((d) => d.action)).toEqual(["repair", "repair", "repair"])
|
|
141
|
+
expect(decisions[3]).toMatchObject({ action: "deliver", reason: "max_attempts" })
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
test("#given the literal blocker max_attempts sequence #when the fourth decide runs #then it blocks", () => {
|
|
145
|
+
// [3,0,0] -> [2,0,0] -> [1,0,0] -> [1,0,0]
|
|
146
|
+
const { decisions } = runSequence({ maxAttempts: 3 }, [
|
|
147
|
+
{ codes: ["missing_citation_section", "missing_closing_section", "broken_asset_reference"] },
|
|
148
|
+
{ codes: ["missing_citation_section", "missing_required_section"] },
|
|
149
|
+
{ codes: ["missing_closing_section"] },
|
|
150
|
+
{ codes: ["missing_citation_section"] },
|
|
151
|
+
])
|
|
152
|
+
|
|
153
|
+
expect(decisions.slice(0, 3).map((d) => d.action)).toEqual(["repair", "repair", "repair"])
|
|
154
|
+
expect(decisions[3]).toMatchObject({ action: "block", reason: "blocking" })
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
test("#given wallClockMs 900000 and improving measures #when now is start + 15 min #then it stops with wall_clock", () => {
|
|
158
|
+
const { decisions } = runSequence({ maxAttempts: 5, wallClockMs: 900000 }, [
|
|
159
|
+
{ codes: ["emoji_in_prose", "em_dash_in_prose"], minutes: 0 },
|
|
160
|
+
{ codes: ["unsourced_number"], minutes: 7 },
|
|
161
|
+
{ codes: ["heading_generic"], minutes: 15 },
|
|
162
|
+
])
|
|
163
|
+
|
|
164
|
+
expect(decisions.map((d) => d.action)).toEqual(["repair", "repair", "deliver"])
|
|
165
|
+
expect(decisions[2].reason).toBe("wall_clock")
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
test("#given an integrity code and no stop condition #when decided #then it schedules a repair", () => {
|
|
169
|
+
const { decisions } = runSequence({}, [{ codes: ["missing_citation_section"] }])
|
|
170
|
+
|
|
171
|
+
expect(decisions[0]).toMatchObject({ action: "repair", reason: null })
|
|
172
|
+
expect(decisions[0].blocking.map((d: { code: string }) => d.code)).toEqual(["missing_citation_section"])
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
test("#given a stop without a usable artifact #when decided #then it blocks with the stop reason", () => {
|
|
176
|
+
const { decisions } = runSequence({ maxAttempts: 1 }, [{ codes: ["emoji_in_prose"] }, { codes: ["heading_generic"] }], {
|
|
177
|
+
artifactOk: false,
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
expect(decisions[1]).toMatchObject({ action: "block", reason: "max_attempts", blocking: [] })
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
test("#given zero defects #when decided #then it delivers clean", () => {
|
|
184
|
+
const { decisions } = runSequence({ maxAttempts: 1 }, [{ codes: ["emoji_in_prose"] }, { codes: [] }], { artifactOk: false })
|
|
185
|
+
|
|
186
|
+
expect(decisions[1]).toEqual({ action: "deliver", reason: "clean", residual: [], blocking: [] })
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
test("#given a defect with an unknown code #when decided #then it throws a typed error", () => {
|
|
190
|
+
const state = createTracker({ startedAt: START })
|
|
191
|
+
let caught: unknown
|
|
192
|
+
try {
|
|
193
|
+
decide(state, [{ code: "made_up_code", message: "x" }], at(1), OK)
|
|
194
|
+
} catch (error) {
|
|
195
|
+
caught = error
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
expect(caught).toBeInstanceOf(RepairTrackerError)
|
|
199
|
+
expect((caught as RepairTrackerError).code).toBe("unknown_defect_code")
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
test("#given an invalid now #when decided #then it throws a typed error", () => {
|
|
203
|
+
const state = createTracker({ startedAt: START })
|
|
204
|
+
|
|
205
|
+
expect(() => decide(state, [], "not a date", OK)).toThrow(RepairTrackerError)
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
test("#given a state #when decided #then the input state is not mutated", () => {
|
|
209
|
+
const state = createTracker({ startedAt: START })
|
|
210
|
+
const before = serializeState(state)
|
|
211
|
+
decide(state, defects("emoji_in_prose"), at(1), OK)
|
|
212
|
+
|
|
213
|
+
expect(serializeState(state)).toBe(before)
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
describe("isArtifactOk", () => {
|
|
218
|
+
test("#given bytes and renders #when checked #then it needs at least 512 bytes and one render", () => {
|
|
219
|
+
expect(isArtifactOk({ bytes: 512, renders: 1 })).toBe(true)
|
|
220
|
+
expect(isArtifactOk({ bytes: 511, renders: 1 })).toBe(false)
|
|
221
|
+
expect(isArtifactOk({ bytes: 4096, renders: 0 })).toBe(false)
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
describe("serializeState / deserializeState", () => {
|
|
226
|
+
test("#given a state after several decides #when round-tripped #then the bytes are identical and valid", () => {
|
|
227
|
+
const { state } = runSequence({ maxAttempts: 5 }, [{ codes: ["emoji_in_prose"] }, { codes: ["heading_generic"] }])
|
|
228
|
+
const text = serializeState(state)
|
|
229
|
+
const restored = deserializeState(text)
|
|
230
|
+
|
|
231
|
+
expect(serializeState(restored)).toBe(text)
|
|
232
|
+
expect(validateRepairState(restored)).toEqual({ ok: true, errors: [] })
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
test("#given a restored state #when decide continues #then it keeps the attempt history", () => {
|
|
236
|
+
const { state } = runSequence({ maxAttempts: 5 }, [{ codes: ["emoji_in_prose"] }, { codes: ["heading_generic"] }])
|
|
237
|
+
const { decision } = decide(deserializeState(serializeState(state)), defects("emoji_in_prose"), at(3), OK)
|
|
238
|
+
|
|
239
|
+
expect(decision.reason).toBe("oscillation")
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
test("#given an invalid state file #when deserialized #then it throws a typed error", () => {
|
|
243
|
+
expect(() => deserializeState('{"schemaVersion":1}')).toThrow(RepairTrackerError)
|
|
244
|
+
expect(() => deserializeState("not json")).toThrow(RepairTrackerError)
|
|
245
|
+
})
|
|
246
|
+
})
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// report-tools-commands.mjs - one function per report-tools subcommand. Each returns
|
|
2
|
+
// { json | text, summary?, exitCode } and never exits the process; report-tools.mjs dispatches.
|
|
3
|
+
|
|
4
|
+
import { existsSync, readFileSync, statSync, writeFileSync } from "node:fs"
|
|
5
|
+
import { dirname, join, resolve } from "node:path"
|
|
6
|
+
|
|
7
|
+
import { CliError, parseArgs, readJsonFile, writeJsonAtomic } from "./cli-support.mjs"
|
|
8
|
+
import { REPAIR_DEFAULTS } from "./contracts.mjs"
|
|
9
|
+
import { parseLineageMode, parsePalette, renderDesignSpec } from "./design-spec.mjs"
|
|
10
|
+
import { extractFromHtml, extractFromPath, fetchHtml } from "./format-extract.mjs"
|
|
11
|
+
import { checkLayout } from "./gates-layout.mjs"
|
|
12
|
+
import { checkStatic } from "./gates-static.mjs"
|
|
13
|
+
import { parseHtml } from "./html-lite.mjs"
|
|
14
|
+
import { buildProbeSource } from "./layout-probe.mjs"
|
|
15
|
+
import * as outcome from "./outcome.mjs"
|
|
16
|
+
import { createTracker, decide, deserializeState, isArtifactOk, serializeState } from "./repair-tracker.mjs"
|
|
17
|
+
|
|
18
|
+
const SEVERITY_ORDER = { blocker: 0, major: 1, minor: 2 }
|
|
19
|
+
|
|
20
|
+
function readText(path) {
|
|
21
|
+
try {
|
|
22
|
+
return readFileSync(path, "utf8")
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw new CliError(`cannot read ${path}: ${error.code ?? error.message}`)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function nowFrom(flags) {
|
|
29
|
+
if (flags.now === undefined) return new Date()
|
|
30
|
+
const date = new Date(flags.now)
|
|
31
|
+
if (Number.isNaN(date.getTime())) throw new CliError("--now requires an ISO timestamp")
|
|
32
|
+
return date
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function sessionDirFrom(flags) {
|
|
36
|
+
const dir = flags["session-dir"] ?? process.env.SESSION_DIR
|
|
37
|
+
if (!dir) throw new CliError("--session-dir is required (or set SESSION_DIR)")
|
|
38
|
+
return resolve(dir)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function runCheck(argv) {
|
|
42
|
+
const args = parseArgs(argv, { repeatable: ["require-section"] })
|
|
43
|
+
const reportPath = args.positionals[0]
|
|
44
|
+
if (!reportPath) throw new CliError("usage: check <report.html> --design-spec <design-spec.md> [--layout <boxes.json>] [--require-section <regex>]... [--max-defects N]")
|
|
45
|
+
const specText = readText(args.required("design-spec"))
|
|
46
|
+
const doc = parseHtml(readText(reportPath))
|
|
47
|
+
const requireSections = (args.flags["require-section"] ?? []).map((source) => new RegExp(source, "i"))
|
|
48
|
+
const result = checkStatic(doc, {
|
|
49
|
+
palette: parsePalette(specText),
|
|
50
|
+
lineageMode: parseLineageMode(specText),
|
|
51
|
+
requireSections,
|
|
52
|
+
baseDir: dirname(resolve(reportPath)),
|
|
53
|
+
})
|
|
54
|
+
const defects = [...result.defects]
|
|
55
|
+
const gatesRun = [...result.gatesRun]
|
|
56
|
+
let layout = "not_run"
|
|
57
|
+
if (args.flags.layout !== undefined) {
|
|
58
|
+
const layoutResult = checkLayout(readJsonFile(args.flags.layout))
|
|
59
|
+
defects.push(...layoutResult.defects)
|
|
60
|
+
gatesRun.push("layout")
|
|
61
|
+
layout = layoutResult.defects.some((d) => d.severity === "blocker") ? "fail" : "pass"
|
|
62
|
+
}
|
|
63
|
+
defects.sort((a, b) => SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity] || (a.line ?? 0) - (b.line ?? 0) || a.code.localeCompare(b.code))
|
|
64
|
+
const counts = { blocker: 0, major: 0, minor: 0, total: defects.length }
|
|
65
|
+
for (const defect of defects) counts[defect.severity] += 1
|
|
66
|
+
const max = args.int("max-defects", 200)
|
|
67
|
+
const status = counts.blocker > 0 ? "fail" : "pass"
|
|
68
|
+
const exitCode = status === "fail" ? 1 : 0
|
|
69
|
+
return {
|
|
70
|
+
json: { command: "check", status, exitCode, layout, defects: defects.slice(0, max), counts, gatesRun, gatesSkipped: result.gatesSkipped },
|
|
71
|
+
summary: `check: ${status.toUpperCase()} - ${counts.blocker} blocker, ${counts.major} major, ${counts.minor} minor; layout ${layout}`,
|
|
72
|
+
exitCode,
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function runLayoutProbe(argv) {
|
|
77
|
+
const args = parseArgs(argv, { booleans: ["json"] })
|
|
78
|
+
const source = buildProbeSource({ cap: args.int("cap", 400), root: args.flags.root ?? "main, article" })
|
|
79
|
+
return args.flags.json ? { json: { command: "layout-probe", source }, exitCode: 0 } : { text: source, exitCode: 0 }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function runRepairDecide(argv) {
|
|
83
|
+
const args = parseArgs(argv)
|
|
84
|
+
const statePath = args.required("state")
|
|
85
|
+
const now = nowFrom(args.flags)
|
|
86
|
+
const defectsInput = readJsonFile(args.required("defects"))
|
|
87
|
+
const defects = Array.isArray(defectsInput) ? defectsInput : defectsInput.defects
|
|
88
|
+
if (!Array.isArray(defects)) throw new CliError("--defects must be a JSON array or a check result with a defects array")
|
|
89
|
+
const state = existsSync(statePath)
|
|
90
|
+
? deserializeState(readText(statePath))
|
|
91
|
+
: createTracker({
|
|
92
|
+
maxAttempts: args.int("max-attempts", REPAIR_DEFAULTS.maxAttempts),
|
|
93
|
+
plateauLimit: args.int("plateau-limit", REPAIR_DEFAULTS.plateauLimit),
|
|
94
|
+
wallClockMs: args.int("wall-clock-ms", REPAIR_DEFAULTS.wallClockMs),
|
|
95
|
+
startedAt: now,
|
|
96
|
+
})
|
|
97
|
+
// Fail closed: deliver-on-exhaustion needs proof of a usable artifact (bytes and renders).
|
|
98
|
+
const artifactOk =
|
|
99
|
+
args.flags["artifact-bytes"] !== undefined && args.flags.renders !== undefined
|
|
100
|
+
? isArtifactOk({ bytes: Number(args.flags["artifact-bytes"]), renders: Number(args.flags.renders) })
|
|
101
|
+
: false
|
|
102
|
+
const { state: next, decision } = decide(state, defects, now, { artifactOk })
|
|
103
|
+
writeFileSync(statePath, serializeState(next))
|
|
104
|
+
recordRepair(args.flags, next, decision)
|
|
105
|
+
const exitCode = decision.action === "block" ? 1 : 0
|
|
106
|
+
return { json: { command: "repair decide", decision }, summary: `repair: ${decision.action}${decision.reason ? ` (${decision.reason})` : ""}`, exitCode }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** With a session dir that holds outcome.json, the repair summary and residual list land in the manifest. */
|
|
110
|
+
function recordRepair(flags, state, decision) {
|
|
111
|
+
const dir = flags["session-dir"] ?? process.env.SESSION_DIR
|
|
112
|
+
if (!dir) return
|
|
113
|
+
const file = join(resolve(dir), outcome.MANIFEST_FILENAME)
|
|
114
|
+
if (!existsSync(file)) return
|
|
115
|
+
const manifest = outcome.readManifest(file)
|
|
116
|
+
manifest.repair = { attempts: state.attempts.length, action: decision.action, reason: decision.reason }
|
|
117
|
+
if (decision.action !== "repair") manifest.residualDefects = decision.residual.map((defect) => ({ ...defect, message: defect.message ?? defect.code }))
|
|
118
|
+
outcome.writeManifest(file, manifest)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function manifestPath(flags) {
|
|
122
|
+
return join(sessionDirFrom(flags), outcome.MANIFEST_FILENAME)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function runOutcome(argv) {
|
|
126
|
+
const [sub, ...rest] = argv
|
|
127
|
+
const args = parseArgs(rest, { booleans: ["json"] })
|
|
128
|
+
const file = sub === "state" ? null : manifestPath(args.flags)
|
|
129
|
+
switch (sub) {
|
|
130
|
+
case "init": {
|
|
131
|
+
const promised = args.required("promised").split(",").map((s) => s.trim()).filter(Boolean)
|
|
132
|
+
const manifest = outcome.initManifest({ sessionDir: sessionDirFrom(args.flags), promised, lane: args.flags.lane ?? null, now: nowFrom(args.flags) })
|
|
133
|
+
outcome.writeManifest(file, manifest)
|
|
134
|
+
return { json: { command: "outcome init", path: file, deliverables: manifest.deliverables }, exitCode: 0 }
|
|
135
|
+
}
|
|
136
|
+
case "set": {
|
|
137
|
+
const [format, status] = args.positionals
|
|
138
|
+
if (!format || !status) throw new CliError("usage: outcome set <format> <status> [--path p] [--reason r] [--pages n]")
|
|
139
|
+
const manifest = outcome.readManifest(file)
|
|
140
|
+
const detail = {}
|
|
141
|
+
if (args.flags.path !== undefined) {
|
|
142
|
+
detail.path = resolve(args.flags.path)
|
|
143
|
+
if (existsSync(detail.path)) detail.bytes = statSync(detail.path).size
|
|
144
|
+
}
|
|
145
|
+
if (args.flags.reason !== undefined) detail.reason = args.flags.reason
|
|
146
|
+
if (args.flags.pages !== undefined) detail.pages = args.int("pages")
|
|
147
|
+
outcome.writeManifest(file, outcome.setDeliverable(manifest, format, status, { ...detail, now: nowFrom(args.flags) }))
|
|
148
|
+
return { json: { command: "outcome set", format, status }, exitCode: 0 }
|
|
149
|
+
}
|
|
150
|
+
case "gate": {
|
|
151
|
+
const [gate, status] = args.positionals
|
|
152
|
+
if (!gate || !status) throw new CliError("usage: outcome gate <static|layout|visual|proofread> <pass|fail|not_run>")
|
|
153
|
+
outcome.writeManifest(file, outcome.setGate(outcome.readManifest(file), gate, status))
|
|
154
|
+
return { json: { command: "outcome gate", gate, status }, exitCode: 0 }
|
|
155
|
+
}
|
|
156
|
+
case "render": {
|
|
157
|
+
const [path] = args.positionals
|
|
158
|
+
if (!path) throw new CliError("usage: outcome render <path> --page N")
|
|
159
|
+
outcome.writeManifest(file, outcome.addRender(outcome.readManifest(file), resolve(path), args.int("page")))
|
|
160
|
+
return { json: { command: "outcome render", path: resolve(path) }, exitCode: 0 }
|
|
161
|
+
}
|
|
162
|
+
case "state": {
|
|
163
|
+
const deliverable = args.required("deliverable")
|
|
164
|
+
const sibling = join(dirname(resolve(deliverable)), outcome.MANIFEST_FILENAME)
|
|
165
|
+
const dir = args.flags["session-dir"] ?? process.env.SESSION_DIR
|
|
166
|
+
const candidate = dir ? join(resolve(dir), outcome.MANIFEST_FILENAME) : sibling
|
|
167
|
+
const manifest = existsSync(candidate) ? outcome.readManifest(candidate) : null
|
|
168
|
+
const state = outcome.deliverableState(resolve(deliverable), manifest)
|
|
169
|
+
return { json: { command: "outcome state", state }, summary: `state: ${state}`, exitCode: 0 }
|
|
170
|
+
}
|
|
171
|
+
case "verify": {
|
|
172
|
+
const result = outcome.verifyManifest(outcome.readManifest(file))
|
|
173
|
+
return { json: { command: "outcome verify", ...result }, summary: `verify: ${result.ok ? "OK" : `${result.problems.length} problem(s)`}`, exitCode: result.ok ? 0 : 1 }
|
|
174
|
+
}
|
|
175
|
+
case "finish": {
|
|
176
|
+
const manifest = outcome.readManifest(file)
|
|
177
|
+
const ledgerPath = args.flags.ledger ?? join(sessionDirFrom(args.flags), "sources-ledger.md")
|
|
178
|
+
const now = nowFrom(args.flags)
|
|
179
|
+
const facts = outcome.briefingFacts(manifest, existsSync(ledgerPath) ? readText(ledgerPath) : "", now)
|
|
180
|
+
manifest.finishedAt = now.toISOString()
|
|
181
|
+
manifest.elapsedMinutes = facts.minutes
|
|
182
|
+
manifest.sources = { total: facts.sources, domains: facts.domains }
|
|
183
|
+
outcome.writeManifest(file, manifest)
|
|
184
|
+
return { json: { command: "outcome finish", finishedAt: manifest.finishedAt, elapsedMinutes: facts.minutes, sources: manifest.sources }, exitCode: 0 }
|
|
185
|
+
}
|
|
186
|
+
case "briefing": {
|
|
187
|
+
const manifest = outcome.readManifest(file)
|
|
188
|
+
const ledgerPath = args.flags.ledger ?? join(sessionDirFrom(args.flags), "sources-ledger.md")
|
|
189
|
+
const ledger = existsSync(ledgerPath) ? readText(ledgerPath) : ""
|
|
190
|
+
const now = nowFrom(args.flags)
|
|
191
|
+
if (args.flags.json) return { json: { command: "outcome briefing", ...outcome.briefingFacts(manifest, ledger, now) }, exitCode: 0 }
|
|
192
|
+
return { text: outcome.buildBriefing(manifest, ledger, now), exitCode: 0 }
|
|
193
|
+
}
|
|
194
|
+
default:
|
|
195
|
+
throw new CliError("usage: outcome <init|set|gate|render|state|verify|finish|briefing> ...")
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export async function runFormatExtract(argv) {
|
|
200
|
+
const args = parseArgs(argv, { booleans: ["from-url"] })
|
|
201
|
+
const [reference] = args.positionals
|
|
202
|
+
if (!reference) throw new CliError("usage: format-extract <reference> --out <design-spec.md> [--from-url]")
|
|
203
|
+
const out = args.required("out")
|
|
204
|
+
let extract
|
|
205
|
+
try {
|
|
206
|
+
extract = args.flags["from-url"] ? extractFromHtml(await fetchHtml(reference), { origin: reference }) : extractFromPath(reference)
|
|
207
|
+
} catch (error) {
|
|
208
|
+
// An unsupported, unreadable, or unreachable reference is an input problem (exit 2), not a gate result.
|
|
209
|
+
throw new CliError(`format-extract ${reference}: ${error.message}`)
|
|
210
|
+
}
|
|
211
|
+
writeJsonAtomic(`${out}.extract.json`, { ...extract, tokens: { light: Object.fromEntries(extract.tokens?.light ?? []), dark: Object.fromEntries(extract.tokens?.dark ?? []) } })
|
|
212
|
+
writeFileSync(out, renderDesignSpec(extract))
|
|
213
|
+
return { json: { command: "format-extract", out: resolve(out), origin: extract.origin, lineageMode: extract.lineageMode, notes: extract.notes ?? [] }, summary: `format-extract: wrote ${out}`, exitCode: 0 }
|
|
214
|
+
}
|