@quickchatai/pi-quickreview 0.0.0-stage → 1.1.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/LICENSE +23 -0
- package/README.md +75 -2
- package/assets/agents/pass-abstraction.md +64 -0
- package/assets/agents/pass-ask-human.md +134 -0
- package/assets/agents/pass-backcompat.md +67 -0
- package/assets/agents/pass-baseline.md +61 -0
- package/assets/agents/pass-behaviour-delta.md +64 -0
- package/assets/agents/pass-bounds.md +36 -0
- package/assets/agents/pass-claims.md +31 -0
- package/assets/agents/pass-concurrency.md +168 -0
- package/assets/agents/pass-consistency.md +57 -0
- package/assets/agents/pass-contracts.md +30 -0
- package/assets/agents/pass-data-safety.md +54 -0
- package/assets/agents/pass-deferred.md +35 -0
- package/assets/agents/pass-delivery.md +37 -0
- package/assets/agents/pass-duplication.md +60 -0
- package/assets/agents/pass-intent.md +63 -0
- package/assets/agents/pass-lint-conformance.md +46 -0
- package/assets/agents/pass-maintainability.md +67 -0
- package/assets/agents/pass-placement.md +68 -0
- package/assets/agents/pass-prod-risk.md +24 -0
- package/assets/agents/pass-rollout.md +32 -0
- package/assets/agents/pass-roundtrip.md +46 -0
- package/assets/agents/pass-security.md +31 -0
- package/assets/agents/pass-simplicity.md +68 -0
- package/assets/agents/pass-statelessness.md +27 -0
- package/assets/agents/pass-style.md +37 -0
- package/assets/agents/pass-sweep.md +57 -0
- package/assets/agents/pass-tests.md +58 -0
- package/assets/agents/pass-ui.md +23 -0
- package/assets/agents/pass-validate.md +50 -0
- package/assets/agents/pass-widened.md +46 -0
- package/assets/agents/scan/pass-scan.md +86 -0
- package/assets/config.example.toml +1067 -0
- package/assets/deploy/reviewer/AGENTS.override.md +12 -0
- package/assets/profiles/default/README.md +21 -0
- package/assets/profiles/default/addenda/.gitkeep +0 -0
- package/assets/profiles/default/profile.toml +17 -0
- package/assets/profiles/example-django/README.md +21 -0
- package/assets/profiles/example-django/addenda/10-migration-discipline.md +13 -0
- package/assets/profiles/example-django/addenda/20-new-column-nullability.md +12 -0
- package/assets/profiles/example-django/addenda/30-test-doctrine.md +12 -0
- package/assets/profiles/example-django/addenda/40-orm-usage.md +19 -0
- package/assets/profiles/example-django/addenda/50-declared-shape.md +10 -0
- package/assets/profiles/example-django/addenda/60-config-placement.md +14 -0
- package/assets/profiles/example-django/heuristics.toml +24 -0
- package/assets/profiles/example-django/profile.toml +9 -0
- package/assets/profiles/fast/README.md +24 -0
- package/assets/profiles/fast/profile.toml +59 -0
- package/assets/profiles/minimal/README.md +17 -0
- package/assets/profiles/minimal/addenda/.gitkeep +0 -0
- package/assets/profiles/minimal/profile.toml +8 -0
- package/assets/profiles/snappy/README.md +24 -0
- package/assets/profiles/snappy/addenda/10-race-as-question.md +6 -0
- package/assets/profiles/snappy/profile.toml +46 -0
- package/assets/prompts/companion-day-open.md +46 -0
- package/assets/prompts/companion-first-run.md +104 -0
- package/assets/prompts/companion.md +821 -0
- package/assets/prompts/conversation-system.md +117 -0
- package/assets/prompts/eod-sweep.md +120 -0
- package/assets/prompts/onboarding.md +74 -0
- package/assets/prompts/pass-common.md +52 -0
- package/assets/prompts/pass-quality-common.md +22 -0
- package/assets/prompts/round-first.md +874 -0
- package/assets/prompts/round-follow-up.md +991 -0
- package/assets/prompts/round-re-review.md +889 -0
- package/assets/prompts/round-recheck.md +196 -0
- package/assets/prompts/round-staleness.md +856 -0
- package/assets/schemas/review-result.v1.json +391 -0
- package/assets/schemas/scan-result.v1.json +421 -0
- package/assets/schemas/version.v1.json +57 -0
- package/assets/seed-manifest.json +19 -0
- package/assets/seeds/agents/pass-baseline.md +61 -0
- package/assets/seeds/agents/pass-contracts.md +30 -0
- package/assets/seeds/agents/pass-data-safety.md +54 -0
- package/assets/seeds/agents/pass-delivery.md +37 -0
- package/assets/seeds/agents/pass-prod-risk.md +24 -0
- package/assets/seeds/agents/pass-security.md +31 -0
- package/assets/seeds/agents/pass-statelessness.md +27 -0
- package/assets/seeds/agents/pass-ui.md +23 -0
- package/assets/seeds/agents/pass-validate.md +50 -0
- package/assets/seeds/prompts/conversation-system.md +117 -0
- package/assets/seeds/prompts/eod-sweep.md +120 -0
- package/assets/seeds/prompts/pass-common.md +52 -0
- package/dist/extensions/bash-guard.d.ts +467 -0
- package/dist/extensions/bash-guard.d.ts.map +1 -0
- package/dist/extensions/bash-guard.js +3058 -0
- package/dist/extensions/bash-guard.js.map +1 -0
- package/dist/extensions/finding-clusters.d.ts +33 -0
- package/dist/extensions/finding-clusters.d.ts.map +1 -0
- package/dist/extensions/finding-clusters.js +218 -0
- package/dist/extensions/finding-clusters.js.map +1 -0
- package/dist/extensions/ledger-pin.d.ts +76 -0
- package/dist/extensions/ledger-pin.d.ts.map +1 -0
- package/dist/extensions/ledger-pin.js +331 -0
- package/dist/extensions/ledger-pin.js.map +1 -0
- package/dist/extensions/lens.d.ts +43 -0
- package/dist/extensions/lens.d.ts.map +1 -0
- package/dist/extensions/lens.js +150 -0
- package/dist/extensions/lens.js.map +1 -0
- package/dist/extensions/pi-tool.d.ts +22 -0
- package/dist/extensions/pi-tool.d.ts.map +1 -0
- package/dist/extensions/pi-tool.js +20 -0
- package/dist/extensions/pi-tool.js.map +1 -0
- package/dist/extensions/quickreview.d.ts +21 -0
- package/dist/extensions/quickreview.d.ts.map +1 -0
- package/dist/extensions/quickreview.js +132 -0
- package/dist/extensions/quickreview.js.map +1 -0
- package/dist/src/anchors.d.ts +54 -0
- package/dist/src/anchors.d.ts.map +1 -0
- package/dist/src/anchors.js +127 -0
- package/dist/src/anchors.js.map +1 -0
- package/dist/src/assetroot.d.ts +16 -0
- package/dist/src/assetroot.d.ts.map +1 -0
- package/dist/src/assetroot.js +77 -0
- package/dist/src/assetroot.js.map +1 -0
- package/dist/src/authwatch.d.ts +61 -0
- package/dist/src/authwatch.d.ts.map +1 -0
- package/dist/src/authwatch.js +210 -0
- package/dist/src/authwatch.js.map +1 -0
- package/dist/src/budget.d.ts +15 -0
- package/dist/src/budget.d.ts.map +1 -0
- package/dist/src/budget.js +32 -0
- package/dist/src/budget.js.map +1 -0
- package/dist/src/casebudget.d.ts +3 -0
- package/dist/src/casebudget.d.ts.map +1 -0
- package/dist/src/casebudget.js +3 -0
- package/dist/src/casebudget.js.map +1 -0
- package/dist/src/cigate.d.ts +116 -0
- package/dist/src/cigate.d.ts.map +1 -0
- package/dist/src/cigate.js +176 -0
- package/dist/src/cigate.js.map +1 -0
- package/dist/src/codespan.d.ts +46 -0
- package/dist/src/codespan.d.ts.map +1 -0
- package/dist/src/codespan.js +75 -0
- package/dist/src/codespan.js.map +1 -0
- package/dist/src/contextpack.d.ts +56 -0
- package/dist/src/contextpack.d.ts.map +1 -0
- package/dist/src/contextpack.js +195 -0
- package/dist/src/contextpack.js.map +1 -0
- package/dist/src/contract.d.ts +8 -0
- package/dist/src/contract.d.ts.map +1 -0
- package/dist/src/contract.js +21 -0
- package/dist/src/contract.js.map +1 -0
- package/dist/src/coverage.d.ts +32 -0
- package/dist/src/coverage.d.ts.map +1 -0
- package/dist/src/coverage.js +85 -0
- package/dist/src/coverage.js.map +1 -0
- package/dist/src/datafence.d.ts +19 -0
- package/dist/src/datafence.d.ts.map +1 -0
- package/dist/src/datafence.js +60 -0
- package/dist/src/datafence.js.map +1 -0
- package/dist/src/dedup.d.ts +65 -0
- package/dist/src/dedup.d.ts.map +1 -0
- package/dist/src/dedup.js +459 -0
- package/dist/src/dedup.js.map +1 -0
- package/dist/src/depsources.d.ts +304 -0
- package/dist/src/depsources.d.ts.map +1 -0
- package/dist/src/depsources.js +3367 -0
- package/dist/src/depsources.js.map +1 -0
- package/dist/src/diffinput.d.ts +10 -0
- package/dist/src/diffinput.d.ts.map +1 -0
- package/dist/src/diffinput.js +172 -0
- package/dist/src/diffinput.js.map +1 -0
- package/dist/src/doubtwords.d.ts +10 -0
- package/dist/src/doubtwords.d.ts.map +1 -0
- package/dist/src/doubtwords.js +13 -0
- package/dist/src/doubtwords.js.map +1 -0
- package/dist/src/ecosystem.d.ts +148 -0
- package/dist/src/ecosystem.d.ts.map +1 -0
- package/dist/src/ecosystem.js +338 -0
- package/dist/src/ecosystem.js.map +1 -0
- package/dist/src/engine/agentdir.d.ts +5 -0
- package/dist/src/engine/agentdir.d.ts.map +1 -0
- package/dist/src/engine/agentdir.js +21 -0
- package/dist/src/engine/agentdir.js.map +1 -0
- package/dist/src/engine/auth.d.ts +214 -0
- package/dist/src/engine/auth.d.ts.map +1 -0
- package/dist/src/engine/auth.js +374 -0
- package/dist/src/engine/auth.js.map +1 -0
- package/dist/src/engine/budget.d.ts +60 -0
- package/dist/src/engine/budget.d.ts.map +1 -0
- package/dist/src/engine/budget.js +113 -0
- package/dist/src/engine/budget.js.map +1 -0
- package/dist/src/engine/capfd.d.ts +6 -0
- package/dist/src/engine/capfd.d.ts.map +1 -0
- package/dist/src/engine/capfd.js +21 -0
- package/dist/src/engine/capfd.js.map +1 -0
- package/dist/src/engine/caseout.d.ts +66 -0
- package/dist/src/engine/caseout.d.ts.map +1 -0
- package/dist/src/engine/caseout.js +107 -0
- package/dist/src/engine/caseout.js.map +1 -0
- package/dist/src/engine/context.d.ts +57 -0
- package/dist/src/engine/context.d.ts.map +1 -0
- package/dist/src/engine/context.js +212 -0
- package/dist/src/engine/context.js.map +1 -0
- package/dist/src/engine/envmap.d.ts +13 -0
- package/dist/src/engine/envmap.d.ts.map +1 -0
- package/dist/src/engine/envmap.js +372 -0
- package/dist/src/engine/envmap.js.map +1 -0
- package/dist/src/engine/extfiles.d.ts +7 -0
- package/dist/src/engine/extfiles.d.ts.map +1 -0
- package/dist/src/engine/extfiles.js +23 -0
- package/dist/src/engine/extfiles.js.map +1 -0
- package/dist/src/engine/keyroute.d.ts +21 -0
- package/dist/src/engine/keyroute.d.ts.map +1 -0
- package/dist/src/engine/keyroute.js +58 -0
- package/dist/src/engine/keyroute.js.map +1 -0
- package/dist/src/engine/lens/cache-group.d.ts +20 -0
- package/dist/src/engine/lens/cache-group.d.ts.map +1 -0
- package/dist/src/engine/lens/cache-group.js +31 -0
- package/dist/src/engine/lens/cache-group.js.map +1 -0
- package/dist/src/engine/lens/cache-run.d.ts +65 -0
- package/dist/src/engine/lens/cache-run.d.ts.map +1 -0
- package/dist/src/engine/lens/cache-run.js +159 -0
- package/dist/src/engine/lens/cache-run.js.map +1 -0
- package/dist/src/engine/lens/deadline.d.ts +54 -0
- package/dist/src/engine/lens/deadline.d.ts.map +1 -0
- package/dist/src/engine/lens/deadline.js +111 -0
- package/dist/src/engine/lens/deadline.js.map +1 -0
- package/dist/src/engine/lens/engine-tools.d.ts +13 -0
- package/dist/src/engine/lens/engine-tools.d.ts.map +1 -0
- package/dist/src/engine/lens/engine-tools.js +37 -0
- package/dist/src/engine/lens/engine-tools.js.map +1 -0
- package/dist/src/engine/lens/env.d.ts +23 -0
- package/dist/src/engine/lens/env.d.ts.map +1 -0
- package/dist/src/engine/lens/env.js +42 -0
- package/dist/src/engine/lens/env.js.map +1 -0
- package/dist/src/engine/lens/launch-plan.d.ts +63 -0
- package/dist/src/engine/lens/launch-plan.d.ts.map +1 -0
- package/dist/src/engine/lens/launch-plan.js +203 -0
- package/dist/src/engine/lens/launch-plan.js.map +1 -0
- package/dist/src/engine/lens/leaf-cache.d.ts +22 -0
- package/dist/src/engine/lens/leaf-cache.d.ts.map +1 -0
- package/dist/src/engine/lens/leaf-cache.js +115 -0
- package/dist/src/engine/lens/leaf-cache.js.map +1 -0
- package/dist/src/engine/lens/permits.d.ts +14 -0
- package/dist/src/engine/lens/permits.d.ts.map +1 -0
- package/dist/src/engine/lens/permits.js +18 -0
- package/dist/src/engine/lens/permits.js.map +1 -0
- package/dist/src/engine/lens/registry.d.ts +55 -0
- package/dist/src/engine/lens/registry.d.ts.map +1 -0
- package/dist/src/engine/lens/registry.js +140 -0
- package/dist/src/engine/lens/registry.js.map +1 -0
- package/dist/src/engine/lens/round-lens.d.ts +16 -0
- package/dist/src/engine/lens/round-lens.d.ts.map +1 -0
- package/dist/src/engine/lens/round-lens.js +46 -0
- package/dist/src/engine/lens/round-lens.js.map +1 -0
- package/dist/src/engine/lens/runlens.d.ts +103 -0
- package/dist/src/engine/lens/runlens.d.ts.map +1 -0
- package/dist/src/engine/lens/runlens.js +538 -0
- package/dist/src/engine/lens/runlens.js.map +1 -0
- package/dist/src/engine/lens/section.d.ts +19 -0
- package/dist/src/engine/lens/section.d.ts.map +1 -0
- package/dist/src/engine/lens/section.js +40 -0
- package/dist/src/engine/lens/section.js.map +1 -0
- package/dist/src/engine/lens/semaphore.d.ts +13 -0
- package/dist/src/engine/lens/semaphore.d.ts.map +1 -0
- package/dist/src/engine/lens/semaphore.js +44 -0
- package/dist/src/engine/lens/semaphore.js.map +1 -0
- package/dist/src/engine/lens/tool.d.ts +34 -0
- package/dist/src/engine/lens/tool.d.ts.map +1 -0
- package/dist/src/engine/lens/tool.js +345 -0
- package/dist/src/engine/lens/tool.js.map +1 -0
- package/dist/src/engine/lens/wave.d.ts +63 -0
- package/dist/src/engine/lens/wave.d.ts.map +1 -0
- package/dist/src/engine/lens/wave.js +95 -0
- package/dist/src/engine/lens/wave.js.map +1 -0
- package/dist/src/engine/livesessions.d.ts +21 -0
- package/dist/src/engine/livesessions.d.ts.map +1 -0
- package/dist/src/engine/livesessions.js +57 -0
- package/dist/src/engine/livesessions.js.map +1 -0
- package/dist/src/engine/livewire.d.ts +18 -0
- package/dist/src/engine/livewire.d.ts.map +1 -0
- package/dist/src/engine/livewire.js +31 -0
- package/dist/src/engine/livewire.js.map +1 -0
- package/dist/src/engine/openable.d.ts +37 -0
- package/dist/src/engine/openable.d.ts.map +1 -0
- package/dist/src/engine/openable.js +120 -0
- package/dist/src/engine/openable.js.map +1 -0
- package/dist/src/engine/pisdk.d.ts +226 -0
- package/dist/src/engine/pisdk.d.ts.map +1 -0
- package/dist/src/engine/pisdk.js +552 -0
- package/dist/src/engine/pisdk.js.map +1 -0
- package/dist/src/engine/port.d.ts +144 -0
- package/dist/src/engine/port.d.ts.map +1 -0
- package/dist/src/engine/port.js +16 -0
- package/dist/src/engine/port.js.map +1 -0
- package/dist/src/engine/prompts.d.ts +159 -0
- package/dist/src/engine/prompts.d.ts.map +1 -0
- package/dist/src/engine/prompts.js +339 -0
- package/dist/src/engine/prompts.js.map +1 -0
- package/dist/src/engine/render.d.ts +10 -0
- package/dist/src/engine/render.d.ts.map +1 -0
- package/dist/src/engine/render.js +23 -0
- package/dist/src/engine/render.js.map +1 -0
- package/dist/src/engine/reviewruntime.d.ts +13 -0
- package/dist/src/engine/reviewruntime.d.ts.map +1 -0
- package/dist/src/engine/reviewruntime.js +35 -0
- package/dist/src/engine/reviewruntime.js.map +1 -0
- package/dist/src/engine/reviewsdk.d.ts +75 -0
- package/dist/src/engine/reviewsdk.d.ts.map +1 -0
- package/dist/src/engine/reviewsdk.js +180 -0
- package/dist/src/engine/reviewsdk.js.map +1 -0
- package/dist/src/engine/round.d.ts +166 -0
- package/dist/src/engine/round.d.ts.map +1 -0
- package/dist/src/engine/round.js +543 -0
- package/dist/src/engine/round.js.map +1 -0
- package/dist/src/engine/roundagents.d.ts +17 -0
- package/dist/src/engine/roundagents.d.ts.map +1 -0
- package/dist/src/engine/roundagents.js +49 -0
- package/dist/src/engine/roundagents.js.map +1 -0
- package/dist/src/engine/roundevents.d.ts +110 -0
- package/dist/src/engine/roundevents.d.ts.map +1 -0
- package/dist/src/engine/roundevents.js +276 -0
- package/dist/src/engine/roundevents.js.map +1 -0
- package/dist/src/engine/roundsdk.d.ts +33 -0
- package/dist/src/engine/roundsdk.d.ts.map +1 -0
- package/dist/src/engine/roundsdk.js +76 -0
- package/dist/src/engine/roundsdk.js.map +1 -0
- package/dist/src/engine/sdkruntime.d.ts +23 -0
- package/dist/src/engine/sdkruntime.d.ts.map +1 -0
- package/dist/src/engine/sdkruntime.js +340 -0
- package/dist/src/engine/sdkruntime.js.map +1 -0
- package/dist/src/engine/select.d.ts +16 -0
- package/dist/src/engine/select.d.ts.map +1 -0
- package/dist/src/engine/select.js +32 -0
- package/dist/src/engine/select.js.map +1 -0
- package/dist/src/engine/sessionwrap.d.ts +4 -0
- package/dist/src/engine/sessionwrap.d.ts.map +1 -0
- package/dist/src/engine/sessionwrap.js +31 -0
- package/dist/src/engine/sessionwrap.js.map +1 -0
- package/dist/src/engine/toolfence.d.ts +90 -0
- package/dist/src/engine/toolfence.d.ts.map +1 -0
- package/dist/src/engine/toolfence.js +378 -0
- package/dist/src/engine/toolfence.js.map +1 -0
- package/dist/src/engine/tooluid.d.ts +128 -0
- package/dist/src/engine/tooluid.d.ts.map +1 -0
- package/dist/src/engine/tooluid.js +401 -0
- package/dist/src/engine/tooluid.js.map +1 -0
- package/dist/src/envstrip.d.ts +10 -0
- package/dist/src/envstrip.d.ts.map +1 -0
- package/dist/src/envstrip.js +15 -0
- package/dist/src/envstrip.js.map +1 -0
- package/dist/src/escalationprompt.d.ts +22 -0
- package/dist/src/escalationprompt.d.ts.map +1 -0
- package/dist/src/escalationprompt.js +54 -0
- package/dist/src/escalationprompt.js.map +1 -0
- package/dist/src/execfn.d.ts +29 -0
- package/dist/src/execfn.d.ts.map +1 -0
- package/dist/src/execfn.js +55 -0
- package/dist/src/execfn.js.map +1 -0
- package/dist/src/finding-chain.d.ts +40 -0
- package/dist/src/finding-chain.d.ts.map +1 -0
- package/dist/src/finding-chain.js +76 -0
- package/dist/src/finding-chain.js.map +1 -0
- package/dist/src/finding-row.d.ts +24 -0
- package/dist/src/finding-row.d.ts.map +1 -0
- package/dist/src/finding-row.js +26 -0
- package/dist/src/finding-row.js.map +1 -0
- package/dist/src/findingkey.d.ts +99 -0
- package/dist/src/findingkey.d.ts.map +1 -0
- package/dist/src/findingkey.js +210 -0
- package/dist/src/findingkey.js.map +1 -0
- package/dist/src/findingsrecord.d.ts +175 -0
- package/dist/src/findingsrecord.d.ts.map +1 -0
- package/dist/src/findingsrecord.js +410 -0
- package/dist/src/findingsrecord.js.map +1 -0
- package/dist/src/followup-mode.d.ts +4 -0
- package/dist/src/followup-mode.d.ts.map +1 -0
- package/dist/src/followup-mode.js +6 -0
- package/dist/src/followup-mode.js.map +1 -0
- package/dist/src/gate.d.ts +199 -0
- package/dist/src/gate.d.ts.map +1 -0
- package/dist/src/gate.js +315 -0
- package/dist/src/gate.js.map +1 -0
- package/dist/src/ghcred.d.ts +58 -0
- package/dist/src/ghcred.d.ts.map +1 -0
- package/dist/src/ghcred.js +139 -0
- package/dist/src/ghcred.js.map +1 -0
- package/dist/src/githubAuth.d.ts +32 -0
- package/dist/src/githubAuth.d.ts.map +1 -0
- package/dist/src/githubAuth.js +116 -0
- package/dist/src/githubAuth.js.map +1 -0
- package/dist/src/githubcore.d.ts +20 -0
- package/dist/src/githubcore.d.ts.map +1 -0
- package/dist/src/githubcore.js +20 -0
- package/dist/src/githubcore.js.map +1 -0
- package/dist/src/glob.d.ts +11 -0
- package/dist/src/glob.d.ts.map +1 -0
- package/dist/src/glob.js +69 -0
- package/dist/src/glob.js.map +1 -0
- package/dist/src/guards.d.ts +93 -0
- package/dist/src/guards.d.ts.map +1 -0
- package/dist/src/guards.js +306 -0
- package/dist/src/guards.js.map +1 -0
- package/dist/src/heartbeat.d.ts +29 -0
- package/dist/src/heartbeat.d.ts.map +1 -0
- package/dist/src/heartbeat.js +87 -0
- package/dist/src/heartbeat.js.map +1 -0
- package/dist/src/heuristics.d.ts +247 -0
- package/dist/src/heuristics.d.ts.map +1 -0
- package/dist/src/heuristics.js +927 -0
- package/dist/src/heuristics.js.map +1 -0
- package/dist/src/homes.d.ts +181 -0
- package/dist/src/homes.d.ts.map +1 -0
- package/dist/src/homes.js +242 -0
- package/dist/src/homes.js.map +1 -0
- package/dist/src/hunkheader.d.ts +11 -0
- package/dist/src/hunkheader.d.ts.map +1 -0
- package/dist/src/hunkheader.js +18 -0
- package/dist/src/hunkheader.js.map +1 -0
- package/dist/src/include.d.ts +435 -0
- package/dist/src/include.d.ts.map +1 -0
- package/dist/src/include.js +1692 -0
- package/dist/src/include.js.map +1 -0
- package/dist/src/launchvocab.d.ts +36 -0
- package/dist/src/launchvocab.d.ts.map +1 -0
- package/dist/src/launchvocab.js +59 -0
- package/dist/src/launchvocab.js.map +1 -0
- package/dist/src/ledgercarry.d.ts +24 -0
- package/dist/src/ledgercarry.d.ts.map +1 -0
- package/dist/src/ledgercarry.js +109 -0
- package/dist/src/ledgercarry.js.map +1 -0
- package/dist/src/lensids.d.ts +7 -0
- package/dist/src/lensids.d.ts.map +1 -0
- package/dist/src/lensids.js +53 -0
- package/dist/src/lensids.js.map +1 -0
- package/dist/src/lensplanning.d.ts +8 -0
- package/dist/src/lensplanning.d.ts.map +1 -0
- package/dist/src/lensplanning.js +126 -0
- package/dist/src/lensplanning.js.map +1 -0
- package/dist/src/lensresult.d.ts +94 -0
- package/dist/src/lensresult.d.ts.map +1 -0
- package/dist/src/lensresult.js +162 -0
- package/dist/src/lensresult.js.map +1 -0
- package/dist/src/lenstuning.d.ts +97 -0
- package/dist/src/lenstuning.d.ts.map +1 -0
- package/dist/src/lenstuning.js +326 -0
- package/dist/src/lenstuning.js.map +1 -0
- package/dist/src/lintconfig.d.ts +31 -0
- package/dist/src/lintconfig.d.ts.map +1 -0
- package/dist/src/lintconfig.js +543 -0
- package/dist/src/lintconfig.js.map +1 -0
- package/dist/src/live/events.d.ts +188 -0
- package/dist/src/live/events.d.ts.map +1 -0
- package/dist/src/live/events.js +136 -0
- package/dist/src/live/events.js.map +1 -0
- package/dist/src/live/writer.d.ts +54 -0
- package/dist/src/live/writer.d.ts.map +1 -0
- package/dist/src/live/writer.js +516 -0
- package/dist/src/live/writer.js.map +1 -0
- package/dist/src/localreview.d.ts +128 -0
- package/dist/src/localreview.d.ts.map +1 -0
- package/dist/src/localreview.js +426 -0
- package/dist/src/localreview.js.map +1 -0
- package/dist/src/loosenedtests.d.ts +13 -0
- package/dist/src/loosenedtests.d.ts.map +1 -0
- package/dist/src/loosenedtests.js +188 -0
- package/dist/src/loosenedtests.js.map +1 -0
- package/dist/src/memoryport.d.ts +264 -0
- package/dist/src/memoryport.d.ts.map +1 -0
- package/dist/src/memoryport.js +445 -0
- package/dist/src/memoryport.js.map +1 -0
- package/dist/src/migrations.d.ts +106 -0
- package/dist/src/migrations.d.ts.map +1 -0
- package/dist/src/migrations.js +373 -0
- package/dist/src/migrations.js.map +1 -0
- package/dist/src/oneshot.d.ts +12 -0
- package/dist/src/oneshot.d.ts.map +1 -0
- package/dist/src/oneshot.js +8 -0
- package/dist/src/oneshot.js.map +1 -0
- package/dist/src/packing.d.ts +11 -0
- package/dist/src/packing.d.ts.map +1 -0
- package/dist/src/packing.js +31 -0
- package/dist/src/packing.js.map +1 -0
- package/dist/src/passes.d.ts +16 -0
- package/dist/src/passes.d.ts.map +1 -0
- package/dist/src/passes.js +104 -0
- package/dist/src/passes.js.map +1 -0
- package/dist/src/passtasks.d.ts +68 -0
- package/dist/src/passtasks.d.ts.map +1 -0
- package/dist/src/passtasks.js +360 -0
- package/dist/src/passtasks.js.map +1 -0
- package/dist/src/pathinside.d.ts +5 -0
- package/dist/src/pathinside.d.ts.map +1 -0
- package/dist/src/pathinside.js +9 -0
- package/dist/src/pathinside.js.map +1 -0
- package/dist/src/pibuiltins.d.ts +36 -0
- package/dist/src/pibuiltins.d.ts.map +1 -0
- package/dist/src/pibuiltins.js +83 -0
- package/dist/src/pibuiltins.js.map +1 -0
- package/dist/src/plankey.d.ts +4 -0
- package/dist/src/plankey.d.ts.map +1 -0
- package/dist/src/plankey.js +10 -0
- package/dist/src/plankey.js.map +1 -0
- package/dist/src/planner.d.ts +375 -0
- package/dist/src/planner.d.ts.map +1 -0
- package/dist/src/planner.js +722 -0
- package/dist/src/planner.js.map +1 -0
- package/dist/src/plugin/args.d.ts +19 -0
- package/dist/src/plugin/args.d.ts.map +1 -0
- package/dist/src/plugin/args.js +107 -0
- package/dist/src/plugin/args.js.map +1 -0
- package/dist/src/plugin/index.d.ts +3 -0
- package/dist/src/plugin/index.d.ts.map +1 -0
- package/dist/src/plugin/index.js +14 -0
- package/dist/src/plugin/index.js.map +1 -0
- package/dist/src/plugin/login.d.ts +39 -0
- package/dist/src/plugin/login.d.ts.map +1 -0
- package/dist/src/plugin/login.js +73 -0
- package/dist/src/plugin/login.js.map +1 -0
- package/dist/src/plugin/review.d.ts +27 -0
- package/dist/src/plugin/review.d.ts.map +1 -0
- package/dist/src/plugin/review.js +298 -0
- package/dist/src/plugin/review.js.map +1 -0
- package/dist/src/plugin/runner.d.ts +6 -0
- package/dist/src/plugin/runner.d.ts.map +1 -0
- package/dist/src/plugin/runner.js +65 -0
- package/dist/src/plugin/runner.js.map +1 -0
- package/dist/src/plugin/scan.d.ts +79 -0
- package/dist/src/plugin/scan.d.ts.map +1 -0
- package/dist/src/plugin/scan.js +348 -0
- package/dist/src/plugin/scan.js.map +1 -0
- package/dist/src/plugin/session.d.ts +56 -0
- package/dist/src/plugin/session.d.ts.map +1 -0
- package/dist/src/plugin/session.js +2 -0
- package/dist/src/plugin/session.js.map +1 -0
- package/dist/src/plugin/setup.d.ts +19 -0
- package/dist/src/plugin/setup.d.ts.map +1 -0
- package/dist/src/plugin/setup.js +142 -0
- package/dist/src/plugin/setup.js.map +1 -0
- package/dist/src/plugin/versiongate.d.ts +26 -0
- package/dist/src/plugin/versiongate.d.ts.map +1 -0
- package/dist/src/plugin/versiongate.js +83 -0
- package/dist/src/plugin/versiongate.js.map +1 -0
- package/dist/src/postingkey.d.ts +8 -0
- package/dist/src/postingkey.d.ts.map +1 -0
- package/dist/src/postingkey.js +25 -0
- package/dist/src/postingkey.js.map +1 -0
- package/dist/src/postingpolicy.d.ts +108 -0
- package/dist/src/postingpolicy.d.ts.map +1 -0
- package/dist/src/postingpolicy.js +341 -0
- package/dist/src/postingpolicy.js.map +1 -0
- package/dist/src/pr-identity.d.ts +3 -0
- package/dist/src/pr-identity.d.ts.map +1 -0
- package/dist/src/pr-identity.js +9 -0
- package/dist/src/pr-identity.js.map +1 -0
- package/dist/src/prdelta.d.ts +181 -0
- package/dist/src/prdelta.d.ts.map +1 -0
- package/dist/src/prdelta.js +501 -0
- package/dist/src/prdelta.js.map +1 -0
- package/dist/src/pricing.d.ts +94 -0
- package/dist/src/pricing.d.ts.map +1 -0
- package/dist/src/pricing.js +209 -0
- package/dist/src/pricing.js.map +1 -0
- package/dist/src/priorfindings.d.ts +167 -0
- package/dist/src/priorfindings.d.ts.map +1 -0
- package/dist/src/priorfindings.js +445 -0
- package/dist/src/priorfindings.js.map +1 -0
- package/dist/src/priortasks.d.ts +31 -0
- package/dist/src/priortasks.d.ts.map +1 -0
- package/dist/src/priortasks.js +119 -0
- package/dist/src/priortasks.js.map +1 -0
- package/dist/src/profilelookup.d.ts +59 -0
- package/dist/src/profilelookup.d.ts.map +1 -0
- package/dist/src/profilelookup.js +98 -0
- package/dist/src/profilelookup.js.map +1 -0
- package/dist/src/profileoverrides.d.ts +91 -0
- package/dist/src/profileoverrides.d.ts.map +1 -0
- package/dist/src/profileoverrides.js +313 -0
- package/dist/src/profileoverrides.js.map +1 -0
- package/dist/src/profiles.d.ts +144 -0
- package/dist/src/profiles.d.ts.map +1 -0
- package/dist/src/profiles.js +604 -0
- package/dist/src/profiles.js.map +1 -0
- package/dist/src/promptdoc.d.ts +3 -0
- package/dist/src/promptdoc.d.ts.map +1 -0
- package/dist/src/promptdoc.js +18 -0
- package/dist/src/promptdoc.js.map +1 -0
- package/dist/src/prtarget.d.ts +70 -0
- package/dist/src/prtarget.d.ts.map +1 -0
- package/dist/src/prtarget.js +181 -0
- package/dist/src/prtarget.js.map +1 -0
- package/dist/src/recheckorder.d.ts +32 -0
- package/dist/src/recheckorder.d.ts.map +1 -0
- package/dist/src/recheckorder.js +5 -0
- package/dist/src/recheckorder.js.map +1 -0
- package/dist/src/reviewapi.d.ts +207 -0
- package/dist/src/reviewapi.d.ts.map +1 -0
- package/dist/src/reviewapi.js +939 -0
- package/dist/src/reviewapi.js.map +1 -0
- package/dist/src/reviewbotfindings.d.ts +33 -0
- package/dist/src/reviewbotfindings.d.ts.map +1 -0
- package/dist/src/reviewbotfindings.js +80 -0
- package/dist/src/reviewbotfindings.js.map +1 -0
- package/dist/src/reviewconfig.d.ts +741 -0
- package/dist/src/reviewconfig.d.ts.map +1 -0
- package/dist/src/reviewconfig.js +797 -0
- package/dist/src/reviewconfig.js.map +1 -0
- package/dist/src/reviewdelta.d.ts +51 -0
- package/dist/src/reviewdelta.d.ts.map +1 -0
- package/dist/src/reviewdelta.js +119 -0
- package/dist/src/reviewdelta.js.map +1 -0
- package/dist/src/reviewdest.d.ts +86 -0
- package/dist/src/reviewdest.d.ts.map +1 -0
- package/dist/src/reviewdest.js +142 -0
- package/dist/src/reviewdest.js.map +1 -0
- package/dist/src/reviewerstub.d.ts +12 -0
- package/dist/src/reviewerstub.d.ts.map +1 -0
- package/dist/src/reviewerstub.js +28 -0
- package/dist/src/reviewerstub.js.map +1 -0
- package/dist/src/reviewhost.d.ts +58 -0
- package/dist/src/reviewhost.d.ts.map +1 -0
- package/dist/src/reviewhost.js +135 -0
- package/dist/src/reviewhost.js.map +1 -0
- package/dist/src/reviewpost.d.ts +79 -0
- package/dist/src/reviewpost.d.ts.map +1 -0
- package/dist/src/reviewpost.js +233 -0
- package/dist/src/reviewpost.js.map +1 -0
- package/dist/src/reviewrender.d.ts +154 -0
- package/dist/src/reviewrender.d.ts.map +1 -0
- package/dist/src/reviewrender.js +480 -0
- package/dist/src/reviewrender.js.map +1 -0
- package/dist/src/reviewstate.d.ts +62 -0
- package/dist/src/reviewstate.d.ts.map +1 -0
- package/dist/src/reviewstate.js +167 -0
- package/dist/src/reviewstate.js.map +1 -0
- package/dist/src/reviewstore.d.ts +17 -0
- package/dist/src/reviewstore.d.ts.map +1 -0
- package/dist/src/reviewstore.js +105 -0
- package/dist/src/reviewstore.js.map +1 -0
- package/dist/src/round-progress.d.ts +120 -0
- package/dist/src/round-progress.d.ts.map +1 -0
- package/dist/src/round-progress.js +172 -0
- package/dist/src/round-progress.js.map +1 -0
- package/dist/src/round-stage-deadlines.d.ts +12 -0
- package/dist/src/round-stage-deadlines.d.ts.map +1 -0
- package/dist/src/round-stage-deadlines.js +10 -0
- package/dist/src/round-stage-deadlines.js.map +1 -0
- package/dist/src/session-command.d.ts +19 -0
- package/dist/src/session-command.d.ts.map +1 -0
- package/dist/src/session-command.js +20 -0
- package/dist/src/session-command.js.map +1 -0
- package/dist/src/settledread.d.ts +61 -0
- package/dist/src/settledread.d.ts.map +1 -0
- package/dist/src/settledread.js +135 -0
- package/dist/src/settledread.js.map +1 -0
- package/dist/src/severity.d.ts +167 -0
- package/dist/src/severity.d.ts.map +1 -0
- package/dist/src/severity.js +364 -0
- package/dist/src/severity.js.map +1 -0
- package/dist/src/severityrank.d.ts +8 -0
- package/dist/src/severityrank.d.ts.map +1 -0
- package/dist/src/severityrank.js +16 -0
- package/dist/src/severityrank.js.map +1 -0
- package/dist/src/standing-review.d.ts +45 -0
- package/dist/src/standing-review.d.ts.map +1 -0
- package/dist/src/standing-review.js +43 -0
- package/dist/src/standing-review.js.map +1 -0
- package/dist/src/storerows.d.ts +225 -0
- package/dist/src/storerows.d.ts.map +1 -0
- package/dist/src/storerows.js +7 -0
- package/dist/src/storerows.js.map +1 -0
- package/dist/src/styleguide.d.ts +25 -0
- package/dist/src/styleguide.d.ts.map +1 -0
- package/dist/src/styleguide.js +272 -0
- package/dist/src/styleguide.js.map +1 -0
- package/dist/src/sweepstatus.d.ts +42 -0
- package/dist/src/sweepstatus.d.ts.map +1 -0
- package/dist/src/sweepstatus.js +97 -0
- package/dist/src/sweepstatus.js.map +1 -0
- package/dist/src/templates.d.ts +243 -0
- package/dist/src/templates.d.ts.map +1 -0
- package/dist/src/templates.js +847 -0
- package/dist/src/templates.js.map +1 -0
- package/dist/src/types.d.ts +639 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +90 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/unifieddiff.d.ts +22 -0
- package/dist/src/unifieddiff.d.ts.map +1 -0
- package/dist/src/unifieddiff.js +176 -0
- package/dist/src/unifieddiff.js.map +1 -0
- package/dist/src/yieldloop.d.ts +2 -0
- package/dist/src/yieldloop.d.ts.map +1 -0
- package/dist/src/yieldloop.js +14 -0
- package/dist/src/yieldloop.js.map +1 -0
- package/package.json +60 -4
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
import type { LensTuningMap } from "./lenstuning.js";
|
|
2
|
+
import type { PostingPolicy } from "./postingpolicy.js";
|
|
3
|
+
import { type PassTier } from "./types.js";
|
|
4
|
+
export interface GithubConfig {
|
|
5
|
+
repo: string;
|
|
6
|
+
app_slug: string;
|
|
7
|
+
bot_login: string;
|
|
8
|
+
review_team: string;
|
|
9
|
+
trigger_label: string;
|
|
10
|
+
in_progress_label: string;
|
|
11
|
+
reviewed_label: string;
|
|
12
|
+
improvement_label: string;
|
|
13
|
+
issue_label: string;
|
|
14
|
+
/** Always an absolute-or-given path after parse: an empty (or the legacy
|
|
15
|
+
* default `~/.config/quickreview-bot`) value is resolved by the install
|
|
16
|
+
* locator to `<config home>/secrets` (the legacy dir itself is never read).
|
|
17
|
+
* A value the operator set is taken as given. */
|
|
18
|
+
secrets_dir: string;
|
|
19
|
+
/** The reviewed repo's default branch: the base the improvement
|
|
20
|
+
* filer targets, the branch replay diffs against, and the fixture base for
|
|
21
|
+
* CLI ops. Default "main"; a repo whose default is "master" sets it. PR rounds do NOT
|
|
22
|
+
* read this — a round's base is always the PR's own `base_ref` from the
|
|
23
|
+
* GitHub API. */
|
|
24
|
+
base_branch: string;
|
|
25
|
+
/** Directory name of the base clone under the sandbox root.
|
|
26
|
+
* "" (the default) derives from the repo slug's basename via
|
|
27
|
+
* `githubCloneDir` — "owner/name" ⇒ "name". */
|
|
28
|
+
clone_dir: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* [guards] — the posting-time guards. Every one but `no_checks_is_red` is on
|
|
32
|
+
* by default; a knob exists only so a guard can be taken out of the path
|
|
33
|
+
* deliberately, in one place, rather than by editing the gate.
|
|
34
|
+
*/
|
|
35
|
+
export interface GuardsConfig {
|
|
36
|
+
/** A non-author human APPROVED at the head ⇒ post COMMENT, not REQUEST_CHANGES. */
|
|
37
|
+
downgrade_on_human_approval: boolean;
|
|
38
|
+
/** Same head as the last review and no author reply since ⇒ post nothing. */
|
|
39
|
+
skip_unchanged_head: boolean;
|
|
40
|
+
/** Re-read the PR immediately before every posting mutation; merged/closed ⇒ refuse. */
|
|
41
|
+
recheck_pr_state_before_post: boolean;
|
|
42
|
+
/** No green CI at this head ⇒ APPROVE is unavailable; the review posts as a
|
|
43
|
+
* COMMENT with approval withheld. */
|
|
44
|
+
block_approve_on_red_ci: boolean;
|
|
45
|
+
/** A head with ZERO check-runs also withholds approval: in a CI-running
|
|
46
|
+
* repo that is a conflicted PR or CI that has not started — no execution
|
|
47
|
+
* evidence. Off by default so a repo with no CI at all is never wedged (the
|
|
48
|
+
* `none` exemption). */
|
|
49
|
+
no_checks_is_red: boolean;
|
|
50
|
+
/** The head the review is ABOUT must still be the PR's live head at posting
|
|
51
|
+
* time: a push landing between the round's validation and
|
|
52
|
+
* its posting step otherwise lands a stale review against the new head. */
|
|
53
|
+
refuse_on_head_drift: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare const GUARDS_DEFAULTS: GuardsConfig;
|
|
56
|
+
/**
|
|
57
|
+
* [review.directives] — EXTENSIONS to the first-party directive-path
|
|
58
|
+
* vocabulary (`packages/pi-plugin/src/severity.ts DEFAULT_DIRECTIVE_VOCABULARY`). Extend-only by
|
|
59
|
+
* design: config ADDS names, nothing can remove a built-in — dropping, say,
|
|
60
|
+
* `CLAUDE.md` would silently re-enable auto-blocking on first-party directive
|
|
61
|
+
* edits by config typo. The shape mirrors
|
|
62
|
+
* `severity.ts DirectiveVocabularyExtras`.
|
|
63
|
+
*/
|
|
64
|
+
export interface ReviewDirectivesConfig {
|
|
65
|
+
/** Extra vendored/third-party path segments (matched case-insensitively). */
|
|
66
|
+
extra_vendored_segments: string[];
|
|
67
|
+
/** Extra directive-file basenames (any depth), e.g. "COPILOT.md". */
|
|
68
|
+
extra_basenames: string[];
|
|
69
|
+
/** Extra directory segments whose whole subtree is directive content. */
|
|
70
|
+
extra_dir_segments: string[];
|
|
71
|
+
/** Extra ROOT-level directory names (bind at the repo root only). */
|
|
72
|
+
extra_root_dirs: string[];
|
|
73
|
+
/** Extra exact repo-relative directive file paths. */
|
|
74
|
+
extra_files: string[];
|
|
75
|
+
}
|
|
76
|
+
export declare const REVIEW_DIRECTIVES_DEFAULTS: ReviewDirectivesConfig;
|
|
77
|
+
/**
|
|
78
|
+
* [review] — review-content knobs. Distinct from [guards] (posting-time
|
|
79
|
+
* refusals) and [recheck] (post-approval triggers): these shape what a review
|
|
80
|
+
* says, not whether it posts.
|
|
81
|
+
*/
|
|
82
|
+
export interface ReviewConfig {
|
|
83
|
+
/**
|
|
84
|
+
* Fallback @-mention for the first-party-directive escalation comment when
|
|
85
|
+
* git history yields no attributable human author login for the touched
|
|
86
|
+
* directive files. "" ⇒ the comment renders without an @ (addressed to
|
|
87
|
+
* "a maintainer") — it still posts.
|
|
88
|
+
*/
|
|
89
|
+
escalation_mention_default: string;
|
|
90
|
+
/**
|
|
91
|
+
* Repo profile: names a directory under `profiles/` — the install's config
|
|
92
|
+
* home first, then the checkout's generic examples
|
|
93
|
+
* (`src/install.ts locateProfile`; a non-plain name is refused) — whose
|
|
94
|
+
* house-rule addenda pack (`profiles/<name>/addenda/*.md`) is composed onto
|
|
95
|
+
* the built pass bodies AFTER the built-in generic registry and BEFORE the
|
|
96
|
+
* dynamic same-day feedback addendum — and whose optional
|
|
97
|
+
* `heuristics.toml` extends lens selection with repo-shaped predicates.
|
|
98
|
+
* "" ⇒ no profile: exactly the generic addenda set and the generic
|
|
99
|
+
* selection core. Loaded once at daemon assembly (src/wire.ts) — a
|
|
100
|
+
* malformed pack or heuristics file fails the boot loudly, never a silent
|
|
101
|
+
* skip.
|
|
102
|
+
*/
|
|
103
|
+
profile: string;
|
|
104
|
+
/** Directive-path vocabulary extensions — see the type above. */
|
|
105
|
+
directives: ReviewDirectivesConfig;
|
|
106
|
+
/** The named review configuration (`REVIEW_PRESETS`): the reasoning level
|
|
107
|
+
* and every lever below in one word. A key set explicitly in `[review]` (or
|
|
108
|
+
* `[models] effort`) overrides what the preset would give it. */
|
|
109
|
+
preset: ReviewPreset;
|
|
110
|
+
/** Content-triggered sub-lenses (`SUBLENS_TRIGGERS` in packages/pi-plugin/src/heuristics.ts):
|
|
111
|
+
* narrow passes, each a fixed procedure, planned when the diff or the PR
|
|
112
|
+
* text shows the shape its procedure exists for. Off ⇒ the path-shaped
|
|
113
|
+
* plan alone. */
|
|
114
|
+
sublenses: boolean;
|
|
115
|
+
/** The per-file sweep (`agents/pass-sweep.md`): changed files are grouped
|
|
116
|
+
* into a few small batches and each batch gets its own line-by-line pass —
|
|
117
|
+
* the local slips a whole-PR reading skims past. */
|
|
118
|
+
sweep: boolean;
|
|
119
|
+
/** At most this many sweep passes per round; files beyond them are listed
|
|
120
|
+
* as not swept. */
|
|
121
|
+
sweep_max_groups: number;
|
|
122
|
+
/** Files and changed lines per sweep group (heuristics.ts sweepGroups). */
|
|
123
|
+
sweep_group_files: number;
|
|
124
|
+
sweep_group_lines: number;
|
|
125
|
+
/** Files per sweep group on a WIDE change — more files than
|
|
126
|
+
* `sweep_group_files × sweep_max_groups` — packed by `sweep_group_lines`
|
|
127
|
+
* instead (heuristics.ts SWEEP_WIDE_FILES_PER_GROUP). 0 = off. */
|
|
128
|
+
sweep_wide_files: number;
|
|
129
|
+
/** The behaviour-delta lens (`agents/pass-behaviour-delta.md`): base versus
|
|
130
|
+
* head on every modified or deleted line of non-test code, one row per group
|
|
131
|
+
* of modifying files packed by `sweep_group_lines` changed lines, at most
|
|
132
|
+
* `behaviour_delta_max_groups` rows (heuristics.ts behaviourDeltaGroups). */
|
|
133
|
+
behaviour_delta: boolean;
|
|
134
|
+
behaviour_delta_max_groups: number;
|
|
135
|
+
/** Over this many changed lines (heuristics.ts `baselineSplitLines` — the
|
|
136
|
+
* sweep's sizing: prose half, lockfiles, generated and vendored files
|
|
137
|
+
* nothing) pass-baseline is planned as 2–3 rows, each STARTING from one
|
|
138
|
+
* group of the change's files with the whole PR as its charter
|
|
139
|
+
* (heuristics.ts `baselineGroups`). 0 ⇒ never: one row. At 2000 only the
|
|
140
|
+
* largest PRs split — those where a lone baseline row sets the round's
|
|
141
|
+
* critical path; every PR under it plans as one row. */
|
|
142
|
+
baseline_split_lines: number;
|
|
143
|
+
/** The loosened-test hint (packages/pi-plugin/src/loosenedtests.ts): weakened assertions in
|
|
144
|
+
* the PR's test files are found deterministically and named in pass-tests'
|
|
145
|
+
* plan reason; their presence also plans pass-tests. Off ⇒ neither. */
|
|
146
|
+
loosened_test_hint: boolean;
|
|
147
|
+
/** Selection cost knobs (heuristics.ts SelectionTuning): pass-intent's
|
|
148
|
+
* substance bar in words, and when pass-placement runs — this many code
|
|
149
|
+
* files, or a new code file with this many added lines. */
|
|
150
|
+
intent_min_words: number;
|
|
151
|
+
placement_min_code_files: number;
|
|
152
|
+
placement_min_new_file_lines: number;
|
|
153
|
+
/** Unpack the sources of the third-party packages this PR touches, at
|
|
154
|
+
* their locked versions, so passes can read what a library actually does
|
|
155
|
+
* (packages/pi-plugin/src/depsources.ts). Download-and-unpack only — nothing is installed or
|
|
156
|
+
* run. */
|
|
157
|
+
dependency_sources: boolean;
|
|
158
|
+
/** The tests lens (`agents/pass-tests.md`) on every PR that
|
|
159
|
+
* changes code — which existing tests the change breaks, and whether the
|
|
160
|
+
* PR's own tests exercise the code or mock the failure point away. */
|
|
161
|
+
tests_lens: boolean;
|
|
162
|
+
/** The code-quality lenses (`agents/pass-maintainability.md`,
|
|
163
|
+
* `pass-duplication.md`, `pass-abstraction.md`; heuristics.ts
|
|
164
|
+
* QUALITY_PASSES) on every PR whose non-test code adds at least
|
|
165
|
+
* `quality_min_added_lines` lines. Style is none of them. */
|
|
166
|
+
quality_lenses: boolean;
|
|
167
|
+
quality_min_added_lines: number;
|
|
168
|
+
/** The style lens (`agents/pass-style.md`) — planned only when the repo has
|
|
169
|
+
* a written style guide (packages/pi-plugin/src/styleguide.ts), and judging only against it. */
|
|
170
|
+
style_lens: boolean;
|
|
171
|
+
/** The lint-conformance sub-lens (`agents/pass-lint-conformance.md`) —
|
|
172
|
+
* planned only when a CI job of the repo runs a linter or formatter whose
|
|
173
|
+
* rules cover a changed file (packages/pi-plugin/src/lintconfig.ts), reporting only changed
|
|
174
|
+
* lines that would fail that job. */
|
|
175
|
+
lint_conformance: boolean;
|
|
176
|
+
/** How many nits a review may post. `strict` (the default, production's
|
|
177
|
+
* behaviour): the validator drops true-but-trivial candidates (`below-bar`),
|
|
178
|
+
* a nit must name the change it asks for, and review volume comes
|
|
179
|
+
* out of nits. `open`: none of those limits — every true nit posts. Meant
|
|
180
|
+
* for benchmarks whose references reward nits; a repo that wants every nit
|
|
181
|
+
* can set it too. Style still needs the repo's written guide either way. */
|
|
182
|
+
nits: NitPolicy;
|
|
183
|
+
/** The validator demotes a confirmed, actionable observation instead of
|
|
184
|
+
* killing it for a small consequence (`validate-demote-not-kill`).
|
|
185
|
+
* On by default; off reproduces the earlier validator for a benchmark. */
|
|
186
|
+
validate_demote: boolean;
|
|
187
|
+
/** Passes never planned and never addable this round (cost tuning). `[]`
|
|
188
|
+
* (the default) plans every lens selection picks. Names must be known
|
|
189
|
+
* passes; `pass-validate` is refused here — switching the validator off is
|
|
190
|
+
* the profile's `enabled = false`. Not a preset lever. */
|
|
191
|
+
skip_lenses: string[];
|
|
192
|
+
/** The validator's consequence rules (`validate-consequence-rule`):
|
|
193
|
+
* intent/contract appeals, dead code, CI-enabled lint rules and
|
|
194
|
+
* merges judged by consequence. Off by default; opt-in for a benchmark arm. */
|
|
195
|
+
validate_consequence_rule: boolean;
|
|
196
|
+
/** Review latency levers (bench/aacr/PERF.md §6). None changes
|
|
197
|
+
* which lenses run or what they are asked; each removes serial time.
|
|
198
|
+
*
|
|
199
|
+
* `wide_lens_fanout`: a batched `tasks:[…]` lens launch runs as wide as
|
|
200
|
+
* `[engine] lens_max_concurrency`.
|
|
201
|
+
* Deprecated: it steered only the retired native glue, and is a no-op on an
|
|
202
|
+
* SDK session, where our lens tool sets its own width. */
|
|
203
|
+
wide_lens_fanout: boolean;
|
|
204
|
+
/** `task_files`: the daemon (or the bench) writes each plan row's complete
|
|
205
|
+
* lens task to a file (packages/pi-plugin/src/passtasks.ts), so the session launches a lens
|
|
206
|
+
* with a short pointer instead of generating its whole task string. */
|
|
207
|
+
task_files: boolean;
|
|
208
|
+
/** `render_outputs`: the posted review body and inline-comments JSON are
|
|
209
|
+
* rendered deterministically from the findings record (packages/pi-plugin/src/reviewrender.ts)
|
|
210
|
+
* instead of being written out by the session a second time. */
|
|
211
|
+
render_outputs: boolean;
|
|
212
|
+
/** `validator_shards`: how many `pass-validate` children split the
|
|
213
|
+
* candidates (by file); 1 = one validator. */
|
|
214
|
+
validator_shards: number;
|
|
215
|
+
/** `dedup_merge` (docs/duplicate-merge.md): candidates are grouped
|
|
216
|
+
* deterministically before the validator (the `cluster_findings` tool,
|
|
217
|
+
* packages/pi-plugin/src/dedup.ts), the validator judges each group as one root cause or
|
|
218
|
+
* splits it, and a post-check at render time merges two posted findings
|
|
219
|
+
* that are one root cause posted twice. Off ⇒ none of that: no grouping,
|
|
220
|
+
* no merge. */
|
|
221
|
+
dedup_merge: boolean;
|
|
222
|
+
/** `coverage_check` (packages/pi-plugin/src/coverage.ts): after the lenses return, every
|
|
223
|
+
* changed non-test source file no lens raised a finding on gets a targeted
|
|
224
|
+
* pass-sweep row (at most two, packed by line budget), each saying why. Off
|
|
225
|
+
* ⇒ no coverage rows. */
|
|
226
|
+
coverage_check: boolean;
|
|
227
|
+
/** `follow_up` (docs/follow-up-rounds.md): `"delta"` ⇒ every round after
|
|
228
|
+
* the first is a FOLLOW-UP round — prior findings verified, the PR-owned
|
|
229
|
+
* change since the last reviewed head reviewed, one pre-approval sweep when
|
|
230
|
+
* owed — falling back to a full re-review on any doubt. `"full"` ⇒ every
|
|
231
|
+
* later round is a full re-review. */
|
|
232
|
+
follow_up: "delta" | "full";
|
|
233
|
+
/** Above this share of the PR's diff lines (additions + deletions), the
|
|
234
|
+
* delta is too large to be worth a follow-up round: the round runs in full. */
|
|
235
|
+
follow_up_max_delta_ratio: number;
|
|
236
|
+
/** false ⇒ a follow-up round never plans the pre-approval sweep. */
|
|
237
|
+
follow_up_sweep: boolean;
|
|
238
|
+
/** After a POSTED approval the sweep is owed only when the PR-owned change
|
|
239
|
+
* since it reaches this many lines (additions + deletions); 0 ⇒ never.
|
|
240
|
+
* The default of 500 reflects measurement: post-approval blockers outside
|
|
241
|
+
* the change sat behind 600+-line pushes, while most post-approval rounds
|
|
242
|
+
* change fewer than 500 lines. */
|
|
243
|
+
follow_up_post_approval_sweep_lines: number;
|
|
244
|
+
/** A follow-up delta of at most this many lines (additions + deletions)
|
|
245
|
+
* gets a LEAN plan: no per-file pass-sweep rows (pass-baseline reads a small
|
|
246
|
+
* change whole) and the quality and style lenses offered as addable instead
|
|
247
|
+
* of planned (they judged the PR in round 1; on a fix push they mostly
|
|
248
|
+
* re-raise nits). 0 ⇒ never lean. A follow-up round's time tracks its
|
|
249
|
+
* agent count, and small deltas otherwise fan out to 15–20 agents. */
|
|
250
|
+
follow_up_small_delta_lines: number;
|
|
251
|
+
/** `context_pack` (packages/pi-plugin/src/contextpack.ts): `"pack-first"` ⇒ the
|
|
252
|
+
* daemon writes the round's CONTEXT PACK (the diff, the change since the
|
|
253
|
+
* last review, the most-changed files' full text) beside its task files, and
|
|
254
|
+
* every lens session carries it at the very start of its prompt, ahead of its
|
|
255
|
+
* lens instructions (packages/pi-plugin/src/engine/lens/leaf-cache.ts) — one shared, cached prefix
|
|
256
|
+
* instead of every lens re-reading the same text uncached. `"off"` ⇒ no
|
|
257
|
+
* pack. Takes effect only with `[engine] lens_cache_group` > 0 (an unshared
|
|
258
|
+
* pack would cost more, not less). On by default: measured ~40% cheaper,
|
|
259
|
+
* with verdicts and recall unchanged. */
|
|
260
|
+
context_pack: "off" | "pack-first";
|
|
261
|
+
/** The pack's size cap in tokens (≈4 characters each). */
|
|
262
|
+
context_pack_max_tokens: number;
|
|
263
|
+
/** A benchmark lever until measured: a pass-sweep row whose files are ALL
|
|
264
|
+
* tests, prose or config/data (heuristics.ts `isLightSweepFile`) runs at
|
|
265
|
+
* this tier instead of the sweep's own. `""` ⇒ off: every sweep row at the
|
|
266
|
+
* sweep's tier. A profile `min_tier`
|
|
267
|
+
* for pass-sweep still floors it, and a tier at or above the sweep's own
|
|
268
|
+
* changes nothing. */
|
|
269
|
+
sweep_light_tier: "" | PassTier;
|
|
270
|
+
/** The validator answers with a DECISION TABLE keyed by
|
|
271
|
+
* candidate id instead of restating every survivor — only a finding whose
|
|
272
|
+
* text it changed is written out in full (`validate-compact-output`
|
|
273
|
+
* addendum; the session's half is `{{validator_output_note}}`). What it
|
|
274
|
+
* decides is unchanged. `false` ⇒ the frozen output format. */
|
|
275
|
+
validate_compact: boolean;
|
|
276
|
+
/** Who sizes a FOLLOW-UP round.
|
|
277
|
+
* `"session"` ⇒ every follow-up round plans the lean core (pass-baseline,
|
|
278
|
+
* the risk lenses, behaviour-delta, the validator) and offers the full
|
|
279
|
+
* plan's per-file sweep rows and quality/style lenses as OPTIONAL rows the
|
|
280
|
+
* main session runs, partly runs or skips — and it decides whether an owed
|
|
281
|
+
* pre-approval sweep is needed — each with a stated reason, logged.
|
|
282
|
+
* `"rules"` ⇒ fixed rules: the lean plan only at or under
|
|
283
|
+
* `follow_up_small_delta_lines`, the pre-approval sweep always run when
|
|
284
|
+
* owed and the round would approve. */
|
|
285
|
+
follow_up_extent: "session" | "rules";
|
|
286
|
+
}
|
|
287
|
+
export type NitPolicy = "strict" | "open";
|
|
288
|
+
/**
|
|
289
|
+
* `[review] preset` — three named review configurations, measured on the
|
|
290
|
+
* defect benchmark (bench/aacr/RESULTS.md):
|
|
291
|
+
*
|
|
292
|
+
* - `default` — the measured best value. Every lever on with the lean plan:
|
|
293
|
+
* on ten PRs no change was designed from it found 81% of the real defects
|
|
294
|
+
* (weighted 86%) against 71% before the levers, for $1.02 vs $0.90 a PR and
|
|
295
|
+
* the same ~6 minutes.
|
|
296
|
+
* - `max` — every model at its highest reasoning level and the full lever
|
|
297
|
+
* plan (every intent and placement pass, small sweep groups). Measured on
|
|
298
|
+
* smoke10 with the pre-lever plan: 72% of defects vs 44-51%, at ~$2 and ~18
|
|
299
|
+
* minutes a PR. For the PRs that warrant it.
|
|
300
|
+
* - `low` — every model at low reasoning, the default plan. Half the cost
|
|
301
|
+
* and time of `default` (~$0.52, ~3.5 min a PR on fresh10) for about the
|
|
302
|
+
* recall the review had BEFORE the levers (69% vs 71% of real defects),
|
|
303
|
+
* with fewer high-severity finds and less accurate comments (73%).
|
|
304
|
+
*/
|
|
305
|
+
export type ReviewPreset = "low" | "default" | "max";
|
|
306
|
+
type PresetLevers = Pick<ReviewConfig, "sublenses" | "sweep" | "sweep_max_groups" | "sweep_group_files" | "sweep_group_lines" | "sweep_wide_files" | "behaviour_delta" | "behaviour_delta_max_groups" | "loosened_test_hint" | "intent_min_words" | "placement_min_code_files" | "placement_min_new_file_lines" | "dependency_sources" | "tests_lens" | "quality_lenses" | "quality_min_added_lines" | "style_lens" | "lint_conformance">;
|
|
307
|
+
export declare const REVIEW_PRESETS: Readonly<Record<ReviewPreset, {
|
|
308
|
+
effort: ReviewEffort;
|
|
309
|
+
levers: PresetLevers;
|
|
310
|
+
}>>;
|
|
311
|
+
export declare function parsePreset(raw: unknown): ReviewPreset;
|
|
312
|
+
export declare const REVIEW_DEFAULTS: ReviewConfig;
|
|
313
|
+
/**
|
|
314
|
+
* [escalation] — the optional, OFF-BY-DEFAULT escalation feature (the never-hand-to-a-human
|
|
315
|
+
* rule).
|
|
316
|
+
*
|
|
317
|
+
* Two invariants bound everything this table can express, and neither is a
|
|
318
|
+
* knob:
|
|
319
|
+
*
|
|
320
|
+
* 1. The reviewer STILL DECIDES. An escalation is additive notification
|
|
321
|
+
* posted BESIDE a finished verdict. Nothing here can withhold, defer or
|
|
322
|
+
* replace one — `src/escalation.ts` has no verdict in its return type and
|
|
323
|
+
* is called only after the verdict has been applied.
|
|
324
|
+
* 2. It escalates a QUESTION, never a review. Every escalation names one
|
|
325
|
+
* thing to look at (a file and line range, a migration, a named
|
|
326
|
+
* decision) and why that person. There is no way to configure "ask
|
|
327
|
+
* someone to review this PR" — the comment body is rendered from the
|
|
328
|
+
* scope, not written free-hand.
|
|
329
|
+
*
|
|
330
|
+
* With `enabled = false` (the default, and what every shipped config carries)
|
|
331
|
+
* nothing in this table is read and BEHAVIOUR is identical to a build without
|
|
332
|
+
* the feature. (Not byte-identical prompt text: the `{{escalation_note}}`
|
|
333
|
+
* placeholder renders empty and leaves a blank line, exactly as the sibling
|
|
334
|
+
* `{{directive_note}}` already does. `tests/escalation.test.ts` pins that
|
|
335
|
+
* whitespace is the ONLY difference.)
|
|
336
|
+
*/
|
|
337
|
+
export type EscalationShape = "comment" | "review_request";
|
|
338
|
+
/** A severity threshold a rule may key on. Matches `packages/pi-plugin/src/severity.ts Severity`
|
|
339
|
+
* minus "nit", which is never worth a person's attention by definition. */
|
|
340
|
+
export type EscalationSeverityFloor = "P0" | "P1" | "P2" | "P3";
|
|
341
|
+
/**
|
|
342
|
+
* One operator-defined DETERMINISTIC trigger. No LLM judgement takes part in
|
|
343
|
+
* evaluating one: given the round's facts, `evaluateEscalationRules` is a pure
|
|
344
|
+
* function and `tests/escalation.test.ts` drives it directly.
|
|
345
|
+
*
|
|
346
|
+
* A rule fires when EVERY condition it declares is met (conditions AND
|
|
347
|
+
* together) — a rule that declares none never fires, and configuration
|
|
348
|
+
* validation refuses it rather than shipping a rule that silently does
|
|
349
|
+
* nothing.
|
|
350
|
+
*/
|
|
351
|
+
export interface EscalationRule {
|
|
352
|
+
/** Stable name — it appears in the event log and in the posted note. */
|
|
353
|
+
name: string;
|
|
354
|
+
/** The GitHub login to escalate to. MUST be one of `targets`. */
|
|
355
|
+
to: string;
|
|
356
|
+
/** Why this person, in the operator's own words — rendered verbatim. */
|
|
357
|
+
why: string;
|
|
358
|
+
/** Glob-ish path patterns; fires when the PR touches a matching file. */
|
|
359
|
+
paths: string[];
|
|
360
|
+
/** PR labels; fires when the PR carries one of them. */
|
|
361
|
+
labels: string[];
|
|
362
|
+
/** Fires when the round posted a finding at or above this severity. */
|
|
363
|
+
min_severity: EscalationSeverityFloor | "";
|
|
364
|
+
/** Check-run names; fires when the LATEST run of one is not green. */
|
|
365
|
+
failing_checks: string[];
|
|
366
|
+
}
|
|
367
|
+
export declare const ESCALATION_RULE_DEFAULTS: EscalationRule;
|
|
368
|
+
export interface EscalationConfig {
|
|
369
|
+
/** OFF by default. False ⇒ no rule is evaluated, no note is rendered into
|
|
370
|
+
* any prompt, and no escalation mutation is ever built. */
|
|
371
|
+
enabled: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* How an escalation is delivered. `comment` (the default) posts a gated
|
|
374
|
+
* COMMENT review @-mentioning the person with the narrow ask.
|
|
375
|
+
* `review_request` ALSO puts the PR in that person's review-requested queue
|
|
376
|
+
* (the `request_reviewer` gate kind) — GitHub's own UI frames that as
|
|
377
|
+
* "review this pull request", which is exactly the framing this feature
|
|
378
|
+
* rules out, so the accompanying comment is still posted and still carries
|
|
379
|
+
* the narrow ask. `comment` is the shape that matches the intent.
|
|
380
|
+
*/
|
|
381
|
+
shape: EscalationShape;
|
|
382
|
+
/** The CLOSED set of logins any escalation may reach. A session-judgement
|
|
383
|
+
* escalation naming anyone else is dropped and logged; it is not an error
|
|
384
|
+
* the session can talk its way past. */
|
|
385
|
+
targets: string[];
|
|
386
|
+
/** May the PR's session ALSO escalate on its own judgement, bounded to
|
|
387
|
+
* `targets`? Off by default — the deterministic rules stand alone. */
|
|
388
|
+
session_judgement: boolean;
|
|
389
|
+
/** Hard cap on escalations delivered per PR, across all rounds. */
|
|
390
|
+
max_per_pr: number;
|
|
391
|
+
/** The deterministic triggers. */
|
|
392
|
+
rules: EscalationRule[];
|
|
393
|
+
}
|
|
394
|
+
export declare const ESCALATION_DEFAULTS: EscalationConfig;
|
|
395
|
+
export declare const ESCALATION_SEVERITY_FLOORS: readonly string[];
|
|
396
|
+
/** A GitHub login: letters, digits and single inner dashes, at most 39. */
|
|
397
|
+
export declare const ESCALATION_LOGIN_RE: RegExp;
|
|
398
|
+
/**
|
|
399
|
+
* Parse and VALIDATE `[escalation]`.
|
|
400
|
+
*
|
|
401
|
+
* A half-configured live state is made unrepresentable here
|
|
402
|
+
* rather than only in the wizard: a config with the feature on and no target,
|
|
403
|
+
* or with a rule pointing at a login that is not a target, or with a rule that
|
|
404
|
+
* declares no condition, fails to LOAD. A hand-edited config gets the same
|
|
405
|
+
* refusal the interview does.
|
|
406
|
+
*
|
|
407
|
+
* With `enabled = false` NOTHING below the early return is checked, so a
|
|
408
|
+
* half-filled table that is switched off really is a draft — it cannot wedge
|
|
409
|
+
* daemon startup. The whole validation set fires the moment the operator
|
|
410
|
+
* flips the switch.
|
|
411
|
+
*/
|
|
412
|
+
export declare function parseEscalation(raw: Record<string, any>): EscalationConfig;
|
|
413
|
+
/**
|
|
414
|
+
* [owner] — the system's ONE accountable human, as a configured role. Every
|
|
415
|
+
* identity surface renders from here: Slack fallback prose,
|
|
416
|
+
* the companion day-open role label, the pinned-memory head framing, and the
|
|
417
|
+
* escalation-mention fallback. Empty values degrade to neutral wording
|
|
418
|
+
* ("the owner" / "the operator"), never to a hardcoded personal name.
|
|
419
|
+
*/
|
|
420
|
+
export interface OwnerConfig {
|
|
421
|
+
/** Display name for rendered prose. "" ⇒ neutral wording. */
|
|
422
|
+
name: string;
|
|
423
|
+
/**
|
|
424
|
+
* Slack member id (U…). When [slack] is enabled it must be non-empty and a
|
|
425
|
+
* key of [slack.users]. Legacy alias on INPUT only: a set
|
|
426
|
+
* `[slack] legacy_owner_slack_id` feeds this when it is empty; nothing reads the
|
|
427
|
+
* legacy key after load.
|
|
428
|
+
*/
|
|
429
|
+
slack_id: string;
|
|
430
|
+
/** GitHub login; the fallback for [review] escalation_mention_default when
|
|
431
|
+
* that knob is unset. */
|
|
432
|
+
github_login: string;
|
|
433
|
+
}
|
|
434
|
+
export declare const OWNER_DEFAULTS: OwnerConfig;
|
|
435
|
+
/** Per-model spend rates, keyed by bare model id (e.g. "gpt-6-sol"). */
|
|
436
|
+
export interface ModelPricing {
|
|
437
|
+
input_per_mtok: number;
|
|
438
|
+
output_per_mtok: number;
|
|
439
|
+
}
|
|
440
|
+
/** [models] — role models plus the tiered pass-model scheme. */
|
|
441
|
+
export interface ModelsConfig {
|
|
442
|
+
default: string;
|
|
443
|
+
conversation: string;
|
|
444
|
+
/** PassTier → full model spec ("provider/model:thinking"). */
|
|
445
|
+
tiers: Record<PassTier, string>;
|
|
446
|
+
/** Passes always run at sol-high, single variant, not raisable. */
|
|
447
|
+
risk_passes: string[];
|
|
448
|
+
/** The tier pass-validate runs at — never raised to the round's highest
|
|
449
|
+
* lens tier, because a validity veto is a `doubted` mark, not a deletion.
|
|
450
|
+
* Only the profile's `min_tier` for the validator moves it, and only
|
|
451
|
+
* upward. */
|
|
452
|
+
validate_tier: PassTier;
|
|
453
|
+
/** Diffs under this many changed lines start at terra-med (heuristics). */
|
|
454
|
+
small_diff_lines: number;
|
|
455
|
+
/** Spend rates keyed by bare model id; consumed by spend accounting. */
|
|
456
|
+
pricing: Record<string, ModelPricing>;
|
|
457
|
+
/** ONE reasoning-effort setting for the whole review (`""` = off: every
|
|
458
|
+
* role and tier keeps the level its own spec names). When set, the thinking
|
|
459
|
+
* suffix of EVERY model spec above — default, conversation and all
|
|
460
|
+
* three tiers — is replaced: `low` → `:low`, `medium` → `:medium`, `high` →
|
|
461
|
+
* the model's highest level (`effort_max`). Applied once, at parse time, so
|
|
462
|
+
* every consumer (sessions, the agents build, the bench) sees the same
|
|
463
|
+
* specs. */
|
|
464
|
+
effort: ReviewEffort;
|
|
465
|
+
/** The level `effort = "high"` means — the highest a model accepts. pi
|
|
466
|
+
* 0.87.1 (and 0.99.1, also for gpt-6.1-sol) lists `minimal…high, xhigh, max` for gpt-6-sol (model catalog,
|
|
467
|
+
* VERIFY-ON-PIN); a model that tops out lower needs this set to its own
|
|
468
|
+
* ceiling. */
|
|
469
|
+
effort_max: ThinkingLevel;
|
|
470
|
+
/** Per-lens tier pins (`[models.pass_tiers]`): pass name → tier.
|
|
471
|
+
* A pinned lens runs at that tier on every PR whatever the diff size — the
|
|
472
|
+
* plan names that tier, the lens is not raisable, and every built variant
|
|
473
|
+
* of it carries that tier's spec. The default is `DEFAULT_PASS_TIERS`
|
|
474
|
+
* (baseline, sweep, behaviour-delta at sol-high); a config entry replaces
|
|
475
|
+
* a lens's default pin. Not
|
|
476
|
+
* for pass-validate (its knob is `validate_tier`) nor for a risk pass
|
|
477
|
+
* (always sol-high). A profile `min_tier` still floors a pin, and the
|
|
478
|
+
* validator never follows a pinned lens's tier. */
|
|
479
|
+
pass_tiers: Record<string, PassTier>;
|
|
480
|
+
/** Per-lens MODEL overrides (`[models.pass_models]`): pass name →
|
|
481
|
+
* model spec. Every built variant of that lens runs on that model, at the
|
|
482
|
+
* thinking level it would otherwise have had (its tier, a pin, the
|
|
483
|
+
* profile's `effort`) unless the spec names its own. Empty by default — a
|
|
484
|
+
* benchmark lever (a smaller model for the quality lenses) until measured.
|
|
485
|
+
* Never for pass-validate nor a risk pass. */
|
|
486
|
+
pass_models: Record<string, string>;
|
|
487
|
+
}
|
|
488
|
+
/** pi's thinking levels, ascending (pi 0.87.1, unchanged at 0.99.1 and 1.0.0 — VERIFY-ON-PIN). */
|
|
489
|
+
export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
490
|
+
export type ThinkingLevel = (typeof THINKING_LEVELS)[number];
|
|
491
|
+
/** `[models] effort` — `""` leaves every spec as written. */
|
|
492
|
+
export type ReviewEffort = "" | "low" | "medium" | "high";
|
|
493
|
+
/** "provider/model:thinking" → its model and its pi thinking level, or a
|
|
494
|
+
* null level when the spec carries no suffix. */
|
|
495
|
+
export declare function splitModelSpec(spec: string): {
|
|
496
|
+
model: string;
|
|
497
|
+
thinking: string | null;
|
|
498
|
+
};
|
|
499
|
+
/** Replace (or add) the `:thinking` suffix of one model spec. */
|
|
500
|
+
export declare function withThinking(spec: string, level: ThinkingLevel): string;
|
|
501
|
+
/** The thinking level an effort setting names: `high` is the model's
|
|
502
|
+
* ceiling (`[models] effort_max`) — the one reading of `[models] effort`, a
|
|
503
|
+
* lens's profile `effort` and `[scan] effort` alike. */
|
|
504
|
+
export declare function effortLevel(effort: Exclude<ReviewEffort, "">, effortMax: ThinkingLevel): ThinkingLevel;
|
|
505
|
+
/** Apply `[models] effort` to every spec the review runs on. Pure. */
|
|
506
|
+
export declare function applyReviewEffort(models: ModelsConfig): ModelsConfig;
|
|
507
|
+
export declare function parseEffort(raw: unknown): ReviewEffort;
|
|
508
|
+
/** The nonempty effort vocabulary every effort knob shares — `low`,
|
|
509
|
+
* `medium` (alias `med`) and `high`, case- and space-insensitive — or null for
|
|
510
|
+
* anything else. What an empty value means is each knob's own call. */
|
|
511
|
+
export declare function normalizeEffort(raw: unknown): "low" | "medium" | "high" | null;
|
|
512
|
+
/**
|
|
513
|
+
* The shipped per-lens tier pins (measured: high effort on these lenses found
|
|
514
|
+
* more defects with no high-severity loss, for ~18% more cost per PR). The
|
|
515
|
+
* three lenses that read the whole diff line by line run at
|
|
516
|
+
* the `sol-high` tier — gpt-6.1-sol at high effort — on every PR; every other
|
|
517
|
+
* lens keeps its planned tier. A config's own `[models.pass_tiers]` entry for
|
|
518
|
+
* one of them replaces its pin (e.g. `"pass-baseline" = "sol-med"`), and a
|
|
519
|
+
* profile lowers its thinking with `[lenses.<pass>] effort = "medium"`.
|
|
520
|
+
*/
|
|
521
|
+
export declare const DEFAULT_PASS_TIERS: Readonly<Record<string, PassTier>>;
|
|
522
|
+
/** `[engine] lens_pass_deadline_min` when the file does not set it: a
|
|
523
|
+
* healthy pass takes 20-100 s and the slowest about 4 min, so 8 min only
|
|
524
|
+
* ever cuts a stalled one. */
|
|
525
|
+
export declare const DEFAULT_LENS_PASS_DEADLINE_MIN = 8;
|
|
526
|
+
/** `[engine] lens_cache_stagger_ms`'s default — every reader's fallback too
|
|
527
|
+
* (`packages/pi-plugin/src/engine/lens/env.ts` keeps the env reader's copy, pinned equal by a
|
|
528
|
+
* test). */
|
|
529
|
+
export declare const DEFAULT_LENS_CACHE_STAGGER_MS = 2500;
|
|
530
|
+
/** `[engine] lens_max_concurrency` when the file does not set it: the
|
|
531
|
+
* companion's desktop number. */
|
|
532
|
+
export declare const DEFAULT_LENS_MAX_CONCURRENCY = 4;
|
|
533
|
+
/** `[engine] lens_cache_group` when the file does not set it. */
|
|
534
|
+
export declare const DEFAULT_LENS_CACHE_GROUP = 5;
|
|
535
|
+
/** What hosts a pi session (`[engine] runtime`): the pi SDK, in-process
|
|
536
|
+
* (packages/pi-plugin/src/engine/sdkruntime.ts), the one adapter. The `proc` runtime, pi as a
|
|
537
|
+
* child process, is retired and refused (`parseEngine`). A route that has no
|
|
538
|
+
* SDK host yet refuses `sdk` (packages/pi-plugin/src/engine/select.ts). */
|
|
539
|
+
export type EngineRuntimeKind = "sdk";
|
|
540
|
+
export declare const ENGINE_RUNTIME_KINDS: readonly EngineRuntimeKind[];
|
|
541
|
+
/** Who launches the lenses (`[pi] lens_runtime`): `engine`, our lens tool and
|
|
542
|
+
* discovery wave, the only kind. pi's own subagent glue (`native`) is retired
|
|
543
|
+
* and refused (`parsePiLensRuntime`). */
|
|
544
|
+
export type LensRuntimeKind = "engine";
|
|
545
|
+
export declare const LENS_RUNTIME_KINDS: readonly LensRuntimeKind[];
|
|
546
|
+
/** `[engine]`: which runtime hosts pi sessions, and how its lens tool runs the
|
|
547
|
+
* passes (the width, the shared prompt cache and the per-pass deadline that
|
|
548
|
+
* `[pi] subagent_*` used to carry). */
|
|
549
|
+
export interface EngineConfig {
|
|
550
|
+
runtime: EngineRuntimeKind;
|
|
551
|
+
/** Process-wide cap on a round's concurrently running lens sessions
|
|
552
|
+
* (rides the lens tool's env as QCR_SUBAGENT_MAX_CONCURRENCY). */
|
|
553
|
+
lens_max_concurrency: number;
|
|
554
|
+
/** Lens sessions share a provider PROMPT CACHE in groups of this many (one
|
|
555
|
+
* pi session id, the provider's cache key, per group); 0 ⇒ a random id per
|
|
556
|
+
* session, which gets no cache hits. */
|
|
557
|
+
lens_cache_group: number;
|
|
558
|
+
/** How long a group's later sessions wait after its first one started, so
|
|
559
|
+
* the cache is written before they ask. */
|
|
560
|
+
lens_cache_stagger_ms: number;
|
|
561
|
+
/** Per-pass deadline in minutes: a pass still running at the deadline is
|
|
562
|
+
* aborted and retried ONCE with a fresh deadline, and a second timeout fails
|
|
563
|
+
* that pass alone. 0 ⇒ no deadline. */
|
|
564
|
+
lens_pass_deadline_min: number;
|
|
565
|
+
}
|
|
566
|
+
export declare const ENGINE_DEFAULTS: EngineConfig;
|
|
567
|
+
export declare function parseEngine(raw: Record<string, unknown>): EngineConfig;
|
|
568
|
+
/** Defaults for the tiered [models] knobs — older configs keep parsing. */
|
|
569
|
+
export declare const MODELS_TIER_DEFAULTS: Pick<ModelsConfig, "tiers" | "risk_passes" | "validate_tier" | "small_diff_lines" | "pricing" | "effort" | "effort_max" | "pass_tiers" | "pass_models">;
|
|
570
|
+
/** The values `[memory] delivery` takes. */
|
|
571
|
+
export declare const MEMORY_DELIVERY_MODES: readonly ["off", "shadow", "on"];
|
|
572
|
+
export type MemoryDelivery = (typeof MEMORY_DELIVERY_MODES)[number];
|
|
573
|
+
/**
|
|
574
|
+
* `[scan]`: the companion's whole-repo scan. Read only by the scan
|
|
575
|
+
* engine inside the companion (src/setup/) — nothing on the VM reads it.
|
|
576
|
+
*/
|
|
577
|
+
export interface ScanConfig {
|
|
578
|
+
/** Stage 1's reasoning level for `pass-scan` (`high` = the model's
|
|
579
|
+
* ceiling, `[models] effort_max`). */
|
|
580
|
+
effort: Exclude<ReviewEffort, "">;
|
|
581
|
+
/** Stage 1's tier — whose model `pass-scan` runs on, at `effort`. */
|
|
582
|
+
tier: PassTier;
|
|
583
|
+
/** Run the scan's SKEPTIC — `pass-validate` in scan mode — over each
|
|
584
|
+
* case's candidates, at the tier of the lens that raised them. ON by
|
|
585
|
+
* default; a profile may switch it off. It sorts every finding into a
|
|
586
|
+
* validity tier — confirmed / likely / doubtful — and kills none: a
|
|
587
|
+
* refuted finding is kept, marked doubtful. Its cost is part of every
|
|
588
|
+
* case's measured price. */
|
|
589
|
+
validator: boolean;
|
|
590
|
+
/** Repo-relative globs never scanned (packages/pi-plugin/src/glob.ts), on top of tests,
|
|
591
|
+
* migrations and what no pass reads (lockfiles, binaries, prose). */
|
|
592
|
+
exclude: string[];
|
|
593
|
+
/** Units the first-scan calibration run reads (spread across the size
|
|
594
|
+
* range), before any stage-1 estimate is offered. */
|
|
595
|
+
calibration_units: number;
|
|
596
|
+
/** The calibration run's hard stop — it has no estimate to stop at. */
|
|
597
|
+
calibration_max_usd: number;
|
|
598
|
+
/** Stage-1 cases in flight at once (background subagents). */
|
|
599
|
+
concurrency: number;
|
|
600
|
+
/** One case reads at most this much; a bigger unit splits, name kept. */
|
|
601
|
+
case_max_files: number;
|
|
602
|
+
case_max_lines: number;
|
|
603
|
+
/** Stage 2: a deep lens never measured at a row's tier, effort
|
|
604
|
+
* and validator setting — no other lens measured there either, and no
|
|
605
|
+
* factor learnable from a stage-2 measurement with the validator the other
|
|
606
|
+
* way (stage2.ts `priceStage2Row`) — is priced at stage 1's measured rate
|
|
607
|
+
* times this. A conservative stand-in
|
|
608
|
+
* until the first stage-2 run measures the real one; the hard stop holds
|
|
609
|
+
* whatever it says. */
|
|
610
|
+
unmeasured_rate_factor: number;
|
|
611
|
+
/** How hard the scan looks. `standard`: stage 1 is a cheap first look and
|
|
612
|
+
* stage 2 runs only the rows the companion proposes. `deep`: stage 1 names a
|
|
613
|
+
* deep lens for every focus file, every deep lens is told to dig past its
|
|
614
|
+
* row's files, and a stage-2 proposal adds the deterministic FLOOR — every
|
|
615
|
+
* `deep_lenses` lens over every file stage 1 reads. A deep reading is its own
|
|
616
|
+
* coverage: a file read only at `standard` is read again. */
|
|
617
|
+
depth: ScanDepth;
|
|
618
|
+
/** The deep floor's lenses, each a lens a scan may run
|
|
619
|
+
* (`SCAN_DEEP_LENSES`); one the profile switched off is skipped. */
|
|
620
|
+
deep_lenses: string[];
|
|
621
|
+
}
|
|
622
|
+
/** How hard a scan looks — `[scan] depth`. */
|
|
623
|
+
export declare const SCAN_DEPTHS: readonly ["standard", "deep"];
|
|
624
|
+
export type ScanDepth = (typeof SCAN_DEPTHS)[number];
|
|
625
|
+
export declare const SCAN_DEFAULTS: ScanConfig;
|
|
626
|
+
/** The `[scan]` keys a repo profile may override — what is about THIS repo
|
|
627
|
+
* (how hard to look, whether to validate, what is not worth reading), never
|
|
628
|
+
* the install's operating limits. */
|
|
629
|
+
export declare const SCAN_PROFILE_KEYS: readonly ["effort", "tier", "validator", "exclude", "depth", "deep_lenses"];
|
|
630
|
+
/**
|
|
631
|
+
* Validate one `[scan]` table — config.toml's (every key) or a profile's
|
|
632
|
+
* (`SCAN_PROFILE_KEYS` only). Returns just the keys it set; an unknown key or
|
|
633
|
+
* a bad value throws naming `where`.
|
|
634
|
+
*/
|
|
635
|
+
export declare function parseScanTable(where: string, raw: unknown, allowed?: readonly string[]): Partial<ScanConfig>;
|
|
636
|
+
/** The `[scan]` keys that say where a run is driven, not how it scans. */
|
|
637
|
+
export declare const SCAN_SANDBOX_KEYS: readonly ["sandbox", "pihome_volume", "image"];
|
|
638
|
+
/** `[scan]` from config.toml: the defaults, overlaid by what it sets. The
|
|
639
|
+
* sandbox keys are parsed apart (`parseScanSandbox`). */
|
|
640
|
+
export declare function parseScan(raw: unknown): ScanConfig;
|
|
641
|
+
/** A key the table must have: its value, or a throw naming it. */
|
|
642
|
+
export declare function req(obj: Record<string, unknown>, key: string): unknown;
|
|
643
|
+
/** The overseer session is gone: its two knobs are still ACCEPTED so a
|
|
644
|
+
* live config does not break, read by nothing, and named here once at parse. */
|
|
645
|
+
export declare function configDeprecations(raw: Record<string, any>): string[];
|
|
646
|
+
export declare function parseModels(raw: Record<string, any>, presetEffort?: ReviewEffort): ModelsConfig;
|
|
647
|
+
/**
|
|
648
|
+
* Validate the per-lens knobs — `[review] skip_lenses`,
|
|
649
|
+
* `[review] validate_consequence_rule`, `[models.pass_tiers]` and
|
|
650
|
+
* `[models.pass_models]`. Called by
|
|
651
|
+
* `parseConfig` and again by the bench's `--config` overrides (which write
|
|
652
|
+
* past the parser), so both routes refuse the same things.
|
|
653
|
+
*/
|
|
654
|
+
export declare function validateLensKnobs(cfg: Pick<CoreConfig, "review" | "models">): void;
|
|
655
|
+
/** Full model spec ("provider/model:thinking") for a pass tier. */
|
|
656
|
+
export declare function tierModel(cfg: Pick<CoreConfig, "models">, tier: PassTier): string;
|
|
657
|
+
/** `[pi]`: the pinned pi and where its sessions live, and who launches a
|
|
658
|
+
* round's lenses. */
|
|
659
|
+
export interface PiConfig {
|
|
660
|
+
package: string;
|
|
661
|
+
version: string;
|
|
662
|
+
session_dir: string;
|
|
663
|
+
/** Who launches a round's lenses: `engine`, our lens tool and discovery
|
|
664
|
+
* wave on an SDK session, the only kind. */
|
|
665
|
+
lens_runtime: LensRuntimeKind;
|
|
666
|
+
/** `lens_runtime = engine` only: the round's engine starts the planned
|
|
667
|
+
* discovery wave itself at round start (rule 9) and the main session joins
|
|
668
|
+
* it through `lens_wave`. On by default with `lens_runtime = engine`; off:
|
|
669
|
+
* the main session launches the wave, with the same tools. */
|
|
670
|
+
engine_wave: boolean;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* The review config: the sections of config.toml the review core reads. The
|
|
674
|
+
* app's `Config` (src/config.ts) extends it with every other surface's, so
|
|
675
|
+
* whatever takes a `CoreConfig` takes the daemon's config as it is.
|
|
676
|
+
*/
|
|
677
|
+
export interface CoreConfig {
|
|
678
|
+
dry_run: boolean;
|
|
679
|
+
/** The selected profile's resolved per-lens tuning
|
|
680
|
+
* (`[lenses.<pass>]` in profile.toml, packages/pi-plugin/src/lenstuning.ts). config.toml never
|
|
681
|
+
* sets it: `applyProfileTuning` overlays it after parsing, which is what
|
|
682
|
+
* makes the profile win over config.toml, the preset and the defaults.
|
|
683
|
+
* Absent or empty ⇒ untuned. */
|
|
684
|
+
lenses?: LensTuningMap;
|
|
685
|
+
/** The selected profile's posting policy (`[posting]` in profile.toml,
|
|
686
|
+
* packages/pi-plugin/src/postingpolicy.ts), overlaid by `applyProfilePosting`. Absent ⇒ the
|
|
687
|
+
* default posting behaviour; an all-default policy is never attached. */
|
|
688
|
+
posting?: PostingPolicy;
|
|
689
|
+
github: GithubConfig;
|
|
690
|
+
models: ModelsConfig;
|
|
691
|
+
engine: EngineConfig;
|
|
692
|
+
pi: PiConfig;
|
|
693
|
+
guards: GuardsConfig;
|
|
694
|
+
review: ReviewConfig;
|
|
695
|
+
escalation: EscalationConfig;
|
|
696
|
+
owner: OwnerConfig;
|
|
697
|
+
/** The whole-repo scan's defaults. The repo profile's `[scan]`
|
|
698
|
+
* table overrides the keys in `SCAN_PROFILE_KEYS` (`applyProfileScan`,
|
|
699
|
+
* packages/pi-plugin/src/profiles.ts) — the profile wins, as for per-lens tuning. */
|
|
700
|
+
scan: ScanConfig;
|
|
701
|
+
}
|
|
702
|
+
/** `[github]`: base_branch/clone_dir default so older configs keep parsing.
|
|
703
|
+
* `secrets_dir` is as written; the reader that needs the secrets locates
|
|
704
|
+
* them (src/homes.ts `locateSecrets`). */
|
|
705
|
+
export declare function parseGithubSection(raw: Record<string, any>): GithubConfig;
|
|
706
|
+
/** Refuse a `[github]` table that leaves out a key every config names. */
|
|
707
|
+
export declare function requireGithubKeys(github: GithubConfig): void;
|
|
708
|
+
/** `[review] preset`. It shapes both [models] (reasoning level) and [review]
|
|
709
|
+
* (the levers), so it is read before either is parsed. */
|
|
710
|
+
export declare function presetOf(raw: Record<string, any>): ReviewPreset;
|
|
711
|
+
/** `[pi]`, with the lens runtime defaulted and checked and the retired keys refused. */
|
|
712
|
+
export declare function parsePiSection(raw: Record<string, any>): PiConfig;
|
|
713
|
+
/** `[guards]` over its defaults. */
|
|
714
|
+
export declare function parseGuardsSection(raw: Record<string, any>): GuardsConfig;
|
|
715
|
+
/** `[owner]` over its defaults (the legacy Slack alias folds in later,
|
|
716
|
+
* `foldLegacyOwnerSlackId`). */
|
|
717
|
+
export declare function parseOwnerSection(raw: Record<string, any>): OwnerConfig;
|
|
718
|
+
/** `[review]`. [review.directives] merges under its own spread so a partial
|
|
719
|
+
* table extends the defaults instead of clobbering the sibling keys. The
|
|
720
|
+
* preset fills every lever the file does not set itself; an explicit key
|
|
721
|
+
* always wins, so `preset = "max"` + `sweep = false` means exactly that. */
|
|
722
|
+
export declare function parseReviewSection(raw: Record<string, any>, preset: ReviewPreset): ReviewConfig;
|
|
723
|
+
/** The checks on a parsed `[review]` (and the per-lens knobs), run once the
|
|
724
|
+
* whole config is built. */
|
|
725
|
+
export declare function validateReviewSection(cfg: Pick<CoreConfig, "review" | "models">): void;
|
|
726
|
+
/** Legacy alias: a set `[slack] legacy_owner_slack_id` feeds [owner] slack_id when
|
|
727
|
+
* that is empty; a conflicting pair is an error that names the NEW key. After
|
|
728
|
+
* this fold nothing reads the legacy key. */
|
|
729
|
+
export declare function foldLegacyOwnerSlackId(raw: Record<string, any>, owner: OwnerConfig): void;
|
|
730
|
+
/**
|
|
731
|
+
* The review sections of a config.toml, parsed and checked exactly as the
|
|
732
|
+
* whole-file parser (`parseConfig`, src/config.ts) parses them. The other
|
|
733
|
+
* sections are not read, so a file that only names the review's sections is
|
|
734
|
+
* a whole review config. `[github] secrets_dir` stays as written. `warn`
|
|
735
|
+
* hears each deprecated key once.
|
|
736
|
+
*/
|
|
737
|
+
export declare function parseCoreConfig(toml: string, opts?: {
|
|
738
|
+
warn?: (line: string) => void;
|
|
739
|
+
}): CoreConfig;
|
|
740
|
+
export {};
|
|
741
|
+
//# sourceMappingURL=reviewconfig.d.ts.map
|