@prestyj/cli 5.28.1 → 5.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/motion/bin/contact-sheet.mjs +9 -3
- package/assets/motion/bin/cues.mjs +337 -0
- package/assets/motion/bin/library.mjs +53 -10
- package/assets/motion/bin/motion-blur.mjs +943 -0
- package/assets/motion/bin/motion-check.mjs +354 -3
- package/assets/motion/bin/music-fit.mjs +436 -0
- package/assets/motion/bin/pdf-extract.mjs +22 -10
- package/assets/motion/bin/reference-study.mjs +346 -0
- package/assets/motion/bin/score-synth.mjs +1052 -93
- package/assets/motion/library/README.md +50 -14
- package/assets/motion/library/kit/moves.js +1981 -0
- package/assets/motion/library/library.json +232 -0
- package/assets/motion/library/pieces/camera-rig/meta.json +13 -0
- package/assets/motion/library/pieces/camera-rig/piece.html +153 -0
- package/assets/motion/library/pieces/camera-rig/preview.jpg +0 -0
- package/assets/motion/library/pieces/chain-knock/meta.json +13 -0
- package/assets/motion/library/pieces/chain-knock/piece.html +195 -0
- package/assets/motion/library/pieces/chain-knock/preview.jpg +0 -0
- package/assets/motion/library/pieces/gather-to-logo/meta.json +13 -0
- package/assets/motion/library/pieces/gather-to-logo/piece.html +159 -0
- package/assets/motion/library/pieces/gather-to-logo/preview.jpg +0 -0
- package/assets/motion/library/pieces/morph-carry/meta.json +13 -0
- package/assets/motion/library/pieces/morph-carry/piece.html +173 -0
- package/assets/motion/library/pieces/morph-carry/preview.jpg +0 -0
- package/assets/motion/library/pieces/one-shape-journey/meta.json +13 -0
- package/assets/motion/library/pieces/one-shape-journey/piece.html +195 -0
- package/assets/motion/library/pieces/one-shape-journey/preview.jpg +0 -0
- package/assets/motion/library/pieces/open-from-subject/meta.json +13 -0
- package/assets/motion/library/pieces/open-from-subject/piece.html +168 -0
- package/assets/motion/library/pieces/open-from-subject/preview.jpg +0 -0
- package/assets/motion/library/pieces/request-to-result/meta.json +13 -0
- package/assets/motion/library/pieces/request-to-result/piece.html +212 -0
- package/assets/motion/library/pieces/request-to-result/preview.jpg +0 -0
- package/assets/motion/library/pieces/scale-dive/meta.json +13 -0
- package/assets/motion/library/pieces/scale-dive/piece.html +321 -0
- package/assets/motion/library/pieces/scale-dive/preview.jpg +0 -0
- package/assets/motion/library/pieces/screen-replica-steps/meta.json +13 -0
- package/assets/motion/library/pieces/screen-replica-steps/piece.html +366 -0
- package/assets/motion/library/pieces/screen-replica-steps/preview.jpg +0 -0
- package/assets/motion/library/pieces/zoom-into-card/meta.json +13 -0
- package/assets/motion/library/pieces/zoom-into-card/piece.html +179 -0
- package/assets/motion/library/pieces/zoom-into-card/preview.jpg +0 -0
- package/assets/motion/library/sheets/diagram.jpg +0 -0
- package/assets/motion/library/sheets/frame.jpg +0 -0
- package/assets/motion/library/sheets/transition.jpg +0 -0
- package/assets/motion/library/sheets/ui.jpg +0 -0
- package/assets/motion/references/build-sheet.md +206 -0
- package/assets/motion/references/runtime/determinism-rules.md +1 -1
- package/assets/motion/references/runtime/gsap-easing-and-stagger.md +29 -29
- package/assets/motion/references/runtime/inputs-and-assets.md +7 -12
- package/assets/motion/references/runtime/lint-validate-inspect.md +3 -3
- package/assets/motion/references/runtime/minimal-composition.md +1 -1
- package/assets/motion/references/runtime/preview-render.md +3 -3
- package/assets/motion/skills/app-walkthrough/SKILL.md +70 -0
- package/assets/motion/skills/before-after/SKILL.md +57 -0
- package/assets/motion/skills/brand-kit/SKILL.md +3 -3
- package/assets/motion/skills/dev-tool-video/SKILL.md +61 -0
- package/assets/motion/skills/launch-video/SKILL.md +66 -0
- package/assets/motion/skills/match-reference/SKILL.md +62 -0
- package/assets/motion/skills/motion/SKILL.md +148 -98
- package/assets/motion/skills/source-ingest/SKILL.md +17 -6
- package/assets/motion/skills/website-video/SKILL.md +76 -0
- package/assets/skills/bulletproof/SKILL.md +36 -11
- package/assets/skills/bulletproof/references/agent-surface.md +19 -9
- package/assets/skills/bulletproof/references/audit-protocol.md +20 -5
- package/assets/skills/bulletproof/references/platform-playbooks.md +5 -4
- package/assets/skills/bulletproof/references/provenance.md +26 -1
- package/assets/skills/bulletproof/references/secure-defaults.md +6 -5
- package/assets/skills/bulletproof/references/supply-chain.md +21 -17
- package/assets/skills/bulletproof/references/threat-landscape.md +28 -26
- package/assets/skills/bulletproof/references/verification.md +2 -0
- package/assets/skills/clarify/SKILL.md +25 -16
- package/assets/skills/code-review/SKILL.md +71 -13
- package/assets/skills/code-review/references/agent-diffs.md +27 -0
- package/assets/skills/code-review/references/tests.md +19 -0
- package/assets/skills/compliance-guard/SKILL.md +20 -5
- package/assets/skills/compliance-guard/references/artifacts.md +1 -1
- package/assets/skills/compliance-guard/references/eu-uk.md +16 -16
- package/assets/skills/compliance-guard/references/lawsuit-vectors.md +5 -5
- package/assets/skills/compliance-guard/references/provenance.md +41 -2
- package/assets/skills/compliance-guard/references/sector-gates.md +3 -3
- package/assets/skills/compliance-guard/references/security-baseline.md +2 -2
- package/assets/skills/compliance-guard/references/trigger-map.md +5 -5
- package/assets/skills/compliance-guard/references/us.md +27 -21
- package/assets/skills/durable/SKILL.md +87 -79
- package/assets/skills/durable/references/agent-db-safety.md +69 -0
- package/assets/skills/durable/references/backups-and-runtime.md +19 -12
- package/assets/skills/durable/references/migrations-and-schema.md +13 -6
- package/assets/skills/evidence-led-ui/SKILL.md +69 -127
- package/assets/skills/evidence-led-ui/references/anti-defaults.md +107 -208
- package/assets/skills/evidence-led-ui/references/direction.md +124 -0
- package/assets/skills/evidence-led-ui/references/production-contract.md +8 -0
- package/assets/skills/evidence-led-ui/references/provenance.md +24 -1
- package/assets/skills/lean/SKILL.md +90 -71
- package/assets/skills/lean/references/memory-and-processes.md +3 -2
- package/assets/skills/lean/references/playbooks.md +37 -12
- package/assets/skills/refactoring/SKILL.md +24 -3
- package/assets/skills/refactoring/references/agent-pitfalls.md +4 -1
- package/assets/skills/refactoring/references/legacy.md +21 -0
- package/assets/skills/root-cause/SKILL.md +20 -10
- package/assets/skills/shared-language/SKILL.md +16 -14
- package/assets/skills/tdd/SKILL.md +27 -15
- package/dist/app-sidecar.js +206 -47
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli/thinking-arg.d.ts +6 -0
- package/dist/cli/thinking-arg.js +13 -0
- package/dist/cli/thinking-arg.js.map +1 -0
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +18 -34
- package/dist/cli.js.map +1 -1
- package/dist/core/acceptance-checks.d.ts +48 -0
- package/dist/core/acceptance-checks.js +144 -0
- package/dist/core/acceptance-checks.js.map +1 -0
- package/dist/core/agent-session.d.ts +107 -72
- package/dist/core/agent-session.js +562 -407
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +6 -5
- package/dist/core/agents.js.map +1 -1
- package/dist/core/ask-user.d.ts +90 -8
- package/dist/core/ask-user.js +124 -13
- package/dist/core/ask-user.js.map +1 -1
- package/dist/core/bundled-agents.js +1 -3
- package/dist/core/bundled-agents.js.map +1 -1
- package/dist/core/cache-diagnostics.d.ts +68 -0
- package/dist/core/cache-diagnostics.js +196 -0
- package/dist/core/cache-diagnostics.js.map +1 -0
- package/dist/core/cache-expiry.d.ts +87 -0
- package/dist/core/cache-expiry.js +111 -0
- package/dist/core/cache-expiry.js.map +1 -0
- package/dist/core/codex-request-shape.d.ts +12 -0
- package/dist/core/codex-request-shape.js +31 -0
- package/dist/core/codex-request-shape.js.map +1 -0
- package/dist/core/compaction/compactor.js +84 -48
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/plan-step-policy.d.ts +46 -0
- package/dist/core/compaction/plan-step-policy.js +57 -0
- package/dist/core/compaction/plan-step-policy.js.map +1 -0
- package/dist/core/destructive-git-guard.d.ts +90 -0
- package/dist/core/destructive-git-guard.js +871 -0
- package/dist/core/destructive-git-guard.js.map +1 -0
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.js +5 -0
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/injection-detect.d.ts +38 -0
- package/dist/core/injection-detect.js +232 -0
- package/dist/core/injection-detect.js.map +1 -0
- package/dist/core/keep-awake.d.ts +88 -0
- package/dist/core/keep-awake.js +251 -0
- package/dist/core/keep-awake.js.map +1 -0
- package/dist/core/mcp/client.d.ts +72 -0
- package/dist/core/mcp/client.js +264 -41
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/content.js +6 -2
- package/dist/core/mcp/content.js.map +1 -1
- package/dist/core/mcp/store.d.ts +6 -1
- package/dist/core/mcp/store.js +12 -1
- package/dist/core/mcp/store.js.map +1 -1
- package/dist/core/mcp/types.d.ts +18 -0
- package/dist/core/model-unavailable.d.ts +14 -0
- package/dist/core/model-unavailable.js +23 -0
- package/dist/core/model-unavailable.js.map +1 -0
- package/dist/core/node-debugger.d.ts +148 -0
- package/dist/core/node-debugger.js +642 -0
- package/dist/core/node-debugger.js.map +1 -0
- package/dist/core/nolan-context.js +7 -3
- package/dist/core/nolan-context.js.map +1 -1
- package/dist/core/package-threats.d.ts +18 -0
- package/dist/core/package-threats.js +168 -0
- package/dist/core/package-threats.js.map +1 -0
- package/dist/core/persistent-shell.d.ts +58 -6
- package/dist/core/persistent-shell.js +331 -49
- package/dist/core/persistent-shell.js.map +1 -1
- package/dist/core/process-manager.d.ts +14 -0
- package/dist/core/process-manager.js +61 -0
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/progress/git-xp.js +8 -14
- package/dist/core/progress/git-xp.js.map +1 -1
- package/dist/core/session-history.d.ts +12 -0
- package/dist/core/session-history.js +27 -0
- package/dist/core/session-history.js.map +1 -1
- package/dist/core/session-manager.d.ts +13 -1
- package/dist/core/session-manager.js +38 -18
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-summary-index.d.ts +37 -0
- package/dist/core/session-summary-index.js +172 -0
- package/dist/core/session-summary-index.js.map +1 -0
- package/dist/core/settings-manager.d.ts +12 -0
- package/dist/core/settings-manager.js +20 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/shell-threats-popular-packages.d.ts +11 -0
- package/dist/core/shell-threats-popular-packages.js +675 -0
- package/dist/core/shell-threats-popular-packages.js.map +1 -0
- package/dist/core/shell-threats.d.ts +8 -0
- package/dist/core/shell-threats.js +186 -0
- package/dist/core/shell-threats.js.map +1 -0
- package/dist/core/skills.js +3 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/stream-rules.d.ts +30 -0
- package/dist/core/stream-rules.js +151 -0
- package/dist/core/stream-rules.js.map +1 -0
- package/dist/core/subagent-manager.d.ts +20 -5
- package/dist/core/subagent-manager.js +22 -8
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-receipt.d.ts +54 -0
- package/dist/core/subagent-receipt.js +278 -0
- package/dist/core/subagent-receipt.js.map +1 -0
- package/dist/core/subagent-turn-record.d.ts +2 -0
- package/dist/core/subagent-turn-record.js.map +1 -1
- package/dist/core/test-impact.d.ts +73 -0
- package/dist/core/test-impact.js +467 -0
- package/dist/core/test-impact.js.map +1 -0
- package/dist/core/thinking-level.d.ts +1 -1
- package/dist/core/thinking-level.js +1 -1
- package/dist/core/thinking-level.js.map +1 -1
- package/dist/core/verification-gate.d.ts +2 -0
- package/dist/core/verification-gate.js +4 -0
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/core/verification-snapshot.js +3 -5
- package/dist/core/verification-snapshot.js.map +1 -1
- package/dist/core/workspace-guard.d.ts +18 -7
- package/dist/core/workspace-guard.js +227 -60
- package/dist/core/workspace-guard.js.map +1 -1
- package/dist/interactive.js +2 -1
- package/dist/interactive.js.map +1 -1
- package/dist/modes/subagent-worker-mode.js +34 -6
- package/dist/modes/subagent-worker-mode.js.map +1 -1
- package/dist/motion-agent/motion-agent.d.ts +6 -2
- package/dist/motion-agent/motion-agent.js +5 -7
- package/dist/motion-agent/motion-agent.js.map +1 -1
- package/dist/motion-agent/motion-prompt.d.ts +1 -1
- package/dist/motion-agent/motion-prompt.js +16 -20
- package/dist/motion-agent/motion-prompt.js.map +1 -1
- package/dist/motion-agent/motion-review-session.js +7 -3
- package/dist/motion-agent/motion-review-session.js.map +1 -1
- package/dist/motion-agent/motion-review.d.ts +10 -3
- package/dist/motion-agent/motion-review.js +15 -7
- package/dist/motion-agent/motion-review.js.map +1 -1
- package/dist/motion-agent/motion-studio-context.js +1 -1
- package/dist/motion-agent/motion-studio-context.js.map +1 -1
- package/dist/system-prompt.js +15 -11
- package/dist/system-prompt.js.map +1 -1
- package/dist/test-support/keep-alive.d.ts +14 -0
- package/dist/test-support/keep-alive.js +17 -0
- package/dist/test-support/keep-alive.js.map +1 -0
- package/dist/tools/ask-user.js +3 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/bash-read-evidence.d.ts +10 -0
- package/dist/tools/bash-read-evidence.js +133 -0
- package/dist/tools/bash-read-evidence.js.map +1 -0
- package/dist/tools/bash.d.ts +10 -1
- package/dist/tools/bash.js +115 -7
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/debug.d.ts +54 -0
- package/dist/tools/debug.js +233 -0
- package/dist/tools/debug.js.map +1 -0
- package/dist/tools/edit-targets.d.ts +10 -0
- package/dist/tools/edit-targets.js +31 -0
- package/dist/tools/edit-targets.js.map +1 -0
- package/dist/tools/edit.d.ts +11 -3
- package/dist/tools/edit.js +387 -305
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/goals.d.ts +1 -1
- package/dist/tools/index.d.ts +19 -2
- package/dist/tools/index.js +47 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.js +6 -1
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-tracker.d.ts +5 -0
- package/dist/tools/read-tracker.js +19 -9
- package/dist/tools/read-tracker.js.map +1 -1
- package/dist/tools/read.js +3 -2
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/skill.js +11 -3
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/subagent-control.js +44 -8
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/subagent-shared.d.ts +29 -8
- package/dist/tools/subagent-shared.js +45 -14
- package/dist/tools/subagent-shared.js.map +1 -1
- package/dist/tools/subagent.d.ts +14 -2
- package/dist/tools/subagent.js +43 -13
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/task-output.js +3 -2
- package/dist/tools/task-output.js.map +1 -1
- package/dist/tools/task-send.d.ts +1 -1
- package/dist/tools/task-send.js +15 -1
- package/dist/tools/task-send.js.map +1 -1
- package/dist/tools/tool-tiers.d.ts +8 -2
- package/dist/tools/tool-tiers.js +10 -3
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/truncate.d.ts +21 -0
- package/dist/tools/truncate.js +187 -0
- package/dist/tools/truncate.js.map +1 -1
- package/dist/tools/ui-adopt.js +2 -0
- package/dist/tools/ui-adopt.js.map +1 -1
- package/dist/ui/App.d.ts +0 -4
- package/dist/ui/App.js +12 -31
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +1 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/ToolExecution.js +3 -2
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +1 -8
- package/dist/ui/hooks/useAgentLoop.js +1 -119
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/render.d.ts +0 -4
- package/dist/ui/render.js +0 -2
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/terminal-history.js +3 -1
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/tool-line-summary.js +3 -1
- package/dist/ui/tool-line-summary.js.map +1 -1
- package/dist/utils/format.js +5 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/git.d.ts +77 -0
- package/dist/utils/git.js +285 -21
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/github-ci.js +2 -1
- package/dist/utils/github-ci.js.map +1 -1
- package/dist/utils/github.js +11 -9
- package/dist/utils/github.js.map +1 -1
- package/dist/utils/image.d.ts +14 -0
- package/dist/utils/image.js +16 -0
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/process.d.ts +20 -0
- package/dist/utils/process.js +98 -0
- package/dist/utils/process.js.map +1 -1
- package/package.json +4 -4
- package/assets/motion/references/motion-language.md +0 -128
- package/assets/motion/skills/video-qa/SKILL.md +0 -89
- package/dist/core/ideal-review-subagent.d.ts +0 -56
- package/dist/core/ideal-review-subagent.js +0 -112
- package/dist/core/ideal-review-subagent.js.map +0 -1
- package/dist/core/ideal-review.d.ts +0 -82
- package/dist/core/ideal-review.js +0 -242
- package/dist/core/ideal-review.js.map +0 -1
- package/dist/motion-agent/motion-check-tool.d.ts +0 -35
- package/dist/motion-agent/motion-check-tool.js +0 -514
- package/dist/motion-agent/motion-check-tool.js.map +0 -1
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { SUB_AGENT_TIMEOUT_RECOVERY_MS } from "../tools/subagent-shared.js";
|
|
2
|
-
/**
|
|
3
|
-
* Independent pre-final review — the Codex Guardian pattern. The in-thread
|
|
4
|
-
* Ideal review asks the acting model to audit its own work, armed with its own
|
|
5
|
-
* justifications for why it is done; a fresh-context reviewer sees only the
|
|
6
|
-
* request, the changed files and the outcome evidence, so it catches what
|
|
7
|
-
* self-review rationalizes away.
|
|
8
|
-
*
|
|
9
|
-
* The reviewer is spawned as a read-only child agent on the session's ACTIVE
|
|
10
|
-
* model (`model` is forced at spawn time, never a "fast" or review model).
|
|
11
|
-
* Findings are injected as a follow-up the acting agent must address; a CLEAN
|
|
12
|
-
* verdict injects nothing, so a passing review costs one bounded wait and no
|
|
13
|
-
* extra turn. On spawn failure or timeout the in-thread review remains the
|
|
14
|
-
* fallback — the feature degrades, never blocks.
|
|
15
|
-
*
|
|
16
|
-
* The reviewer's time is capped by its OWN worker, not by the harness killing
|
|
17
|
-
* it: on reaching REVIEWER_TURN_TIMEOUT_MS it gets one tool-free turn to give
|
|
18
|
-
* its verdict on what it has examined. Killing it from outside discarded all
|
|
19
|
-
* of that — large reviews ended "Interrupted" with no verdict at all.
|
|
20
|
-
*/
|
|
21
|
-
/** Read-only toolset — the reviewer examines, it never repairs. */
|
|
22
|
-
export const REVIEWER_TOOLS = ["read", "grep", "find", "ls", "code_search", "source_path"];
|
|
23
|
-
/**
|
|
24
|
-
* How long the reviewer may examine the work before it must give its verdict.
|
|
25
|
-
* Reviews of large changes (a dozen or more files, ~1,000 changed lines) need
|
|
26
|
-
* longer to read everything; a verdict on the most central files beats none.
|
|
27
|
-
*/
|
|
28
|
-
export const REVIEWER_TURN_TIMEOUT_MS = 120_000;
|
|
29
|
-
/**
|
|
30
|
-
* Harness backstop: the reviewer's working time, its recovery turn, and
|
|
31
|
-
* headroom for the result to arrive. Reached only if the child hangs.
|
|
32
|
-
*/
|
|
33
|
-
export const REVIEWER_WAIT_MS = REVIEWER_TURN_TIMEOUT_MS + SUB_AGENT_TIMEOUT_RECOVERY_MS + 20_000;
|
|
34
|
-
/**
|
|
35
|
-
* Ideal review score at which the independent reviewer is worth its latency.
|
|
36
|
-
* Below this the in-thread review alone is proportionate.
|
|
37
|
-
*/
|
|
38
|
-
export const INDEPENDENT_REVIEW_SCORE_THRESHOLD = 6;
|
|
39
|
-
export function buildReviewerTask(input) {
|
|
40
|
-
const files = input.changedFiles
|
|
41
|
-
.slice(0, 20)
|
|
42
|
-
.map((f) => `- ${f}`)
|
|
43
|
-
.join("\n");
|
|
44
|
-
const reasons = input.triggerReasons.join(", ");
|
|
45
|
-
return [
|
|
46
|
-
"You are an independent code reviewer with fresh context. Another coding agent claims to have " +
|
|
47
|
-
"completed the task below. Examine its work and report whether the claim holds.",
|
|
48
|
-
"",
|
|
49
|
-
`Task given to that agent: ${input.originalRequest.slice(0, 2000)}`,
|
|
50
|
-
"",
|
|
51
|
-
"Files it changed:",
|
|
52
|
-
files,
|
|
53
|
-
"",
|
|
54
|
-
`Harness-observed activity: ${input.stats.changedLines} changed lines, ` +
|
|
55
|
-
`${input.stats.toolCalls} tool calls (${input.stats.toolFailures} failed), ` +
|
|
56
|
-
`${input.stats.turns} turns. Review triggered because: ${reasons}.`,
|
|
57
|
-
"",
|
|
58
|
-
"Read the changed files (and any sibling files needed to judge them). Check the work against " +
|
|
59
|
-
"the task: correctness, completeness, obvious edge cases, over-editing beyond what the task " +
|
|
60
|
-
"asked for, leftover TODOs or dead code, and changes that contradict each other.",
|
|
61
|
-
"Judge the CONTENT of the changed files against the request. Do NOT report the surrounding " +
|
|
62
|
-
"environment (missing package.json, tooling not installed, unrelated files) unless the request " +
|
|
63
|
-
"itself demanded those.",
|
|
64
|
-
"You are READ-ONLY: do not edit, write, or run commands. Judge only what is on disk.",
|
|
65
|
-
"Your time is limited: examine the files most central to the task first. If time runs out " +
|
|
66
|
-
"you will be asked for your verdict on what you have examined so far.",
|
|
67
|
-
"",
|
|
68
|
-
"BEGIN your reply with EXACTLY this format (elaborate only after it):",
|
|
69
|
-
"VERDICT: CLEAN",
|
|
70
|
-
"or",
|
|
71
|
-
"VERDICT: ISSUES",
|
|
72
|
-
"FINDINGS:",
|
|
73
|
-
"- <one line per concrete finding, each naming the file>",
|
|
74
|
-
].join("\n");
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Parse the reviewer's terminal output. Returns null when the reply carries no
|
|
78
|
-
* usable verdict marker — treated as a failed review, never as a pass.
|
|
79
|
-
*/
|
|
80
|
-
export function parseReviewerFindings(output) {
|
|
81
|
-
const verdict = /VERDICT:\s*(CLEAN|ISSUES)\b/im.exec(output)?.[1]?.toUpperCase();
|
|
82
|
-
if (!verdict)
|
|
83
|
-
return null;
|
|
84
|
-
const findingsBlock = /FINDINGS:\s*\n([\s\S]*)$/i.exec(output)?.[1] ?? "";
|
|
85
|
-
const findings = findingsBlock
|
|
86
|
-
.split("\n")
|
|
87
|
-
.map((line) => line.replace(/^\s*[-*]\s*/, "").trim())
|
|
88
|
-
.filter((line) => line.length > 0 && line.toUpperCase() !== "NONE")
|
|
89
|
-
.slice(0, 10);
|
|
90
|
-
if (verdict === "CLEAN")
|
|
91
|
-
return { clean: true, findings: [] };
|
|
92
|
-
if (findings.length === 0)
|
|
93
|
-
return {
|
|
94
|
-
clean: false,
|
|
95
|
-
findings: [
|
|
96
|
-
"The reviewer flagged issues but did not list them — re-examine the changed files yourself.",
|
|
97
|
-
],
|
|
98
|
-
};
|
|
99
|
-
return { clean: false, findings };
|
|
100
|
-
}
|
|
101
|
-
export function buildIndependentReviewMessage(findings) {
|
|
102
|
-
return {
|
|
103
|
-
role: "user",
|
|
104
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
105
|
-
content: "An independent reviewer (fresh context, no knowledge of your reasoning) examined the changed " +
|
|
106
|
-
"files against the original request and disagrees that the work is complete:\n" +
|
|
107
|
-
findings.map((finding) => `- ${finding}`).join("\n") +
|
|
108
|
-
"\nAddress each finding now — fix what is real, and if a finding is wrong, verify why before " +
|
|
109
|
-
"dismissing it. Then give your final response.",
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=ideal-review-subagent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ideal-review-subagent.js","sourceRoot":"","sources":["../../src/core/ideal-review-subagent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAG5E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,CAAU,CAAC;AAEpG;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,GAAG,6BAA6B,GAAG,MAAM,CAAC;AAElG;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC;AASpD,MAAM,UAAU,iBAAiB,CAAC,K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toolFailures: number;
|
|
6
|
-
turns: number;
|
|
7
|
-
writeCalls: number;
|
|
8
|
-
editCalls: number;
|
|
9
|
-
bashCalls: number;
|
|
10
|
-
}
|
|
11
|
-
export interface IdealReviewDecision {
|
|
12
|
-
shouldReview: boolean;
|
|
13
|
-
score: number;
|
|
14
|
-
reasons: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface ReviewCoverageEvidence {
|
|
17
|
-
expected: string[];
|
|
18
|
-
covered: string[];
|
|
19
|
-
missing: string[];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Harness-owned proof that every successfully changed file was opened with the
|
|
23
|
-
* read tool after Ideal review began. Model-authored claims never enter it.
|
|
24
|
-
*/
|
|
25
|
-
export declare class ReviewCoverageTracker {
|
|
26
|
-
private readonly cwd;
|
|
27
|
-
private readonly fileExists;
|
|
28
|
-
private readonly expected;
|
|
29
|
-
private readonly covered;
|
|
30
|
-
private active;
|
|
31
|
-
/**
|
|
32
|
-
* `fileExists` is injectable for tests and defaults to the real filesystem.
|
|
33
|
-
* A file the run created and then deleted can never be re-read, so without
|
|
34
|
-
* this check it stayed in `missing` forever and the coverage gate re-injected
|
|
35
|
-
* the same follow-up on every turn.
|
|
36
|
-
*/
|
|
37
|
-
constructor(cwd: string, fileExists?: (p: string) => boolean);
|
|
38
|
-
reset(): void;
|
|
39
|
-
/** Successful mutations are retained before and during review. */
|
|
40
|
-
recordChanged(filePath: string): void;
|
|
41
|
-
/** Start the evidence window; reads observed before this call never count. */
|
|
42
|
-
start(changedFiles?: Iterable<string>): void;
|
|
43
|
-
/** Called only by the successful read-tool callback. */
|
|
44
|
-
recordRead(filePath: string): void;
|
|
45
|
-
evidence(): ReviewCoverageEvidence;
|
|
46
|
-
private normalize;
|
|
47
|
-
private display;
|
|
48
|
-
}
|
|
49
|
-
export declare function buildReviewCoverageMessage(missingFiles: readonly string[]): Message;
|
|
50
|
-
/**
|
|
51
|
-
* Coverage follow-ups spent before the gate gives up. The gate is fail-closed,
|
|
52
|
-
* but a file the agent genuinely cannot read (permissions, a path outside the
|
|
53
|
-
* workspace, a race with an external delete) must not cost an unbounded number
|
|
54
|
-
* of identical turns — it escalates once and lets the run finish.
|
|
55
|
-
*/
|
|
56
|
-
export declare const MAX_REVIEW_COVERAGE_INJECTIONS = 2;
|
|
57
|
-
/**
|
|
58
|
-
* Terminal coverage message: stop demanding reads, require an honest statement
|
|
59
|
-
* of what went unverified in the final answer.
|
|
60
|
-
*/
|
|
61
|
-
export declare function buildReviewCoverageEscalationMessage(missingFiles: readonly string[]): Message;
|
|
62
|
-
/**
|
|
63
|
-
* Put the harness-owned read checklist on the first Ideal review turn. The
|
|
64
|
-
* fail-closed follow-up remains as a fallback, but compliant reviews can now
|
|
65
|
-
* gather all evidence before emitting their single user-facing final answer.
|
|
66
|
-
*/
|
|
67
|
-
export declare function withReviewCoverageRequirements(message: Message, missingFiles: readonly string[]): Message;
|
|
68
|
-
export declare const IDEAL_REVIEW_PROMPT: string;
|
|
69
|
-
export declare function evaluateIdealReview(stats: IdealReviewStats): IdealReviewDecision;
|
|
70
|
-
export declare function buildIdealReviewMessage(reasons: readonly string[], driftedFiles?: readonly string[]): Message;
|
|
71
|
-
/**
|
|
72
|
-
* Test-drift detector \u2014 the one stranding signal a typechecker is blind to.
|
|
73
|
-
* Given the set of files the run mutated, return the source files whose sibling
|
|
74
|
-
* test exists on disk but was NOT touched this run (a green-but-stale test).
|
|
75
|
-
*
|
|
76
|
-
* Pure structural check: no sibling test on disk \u2192 no signal, so it stays
|
|
77
|
-
* silent on projects (or files) without co-located tests. `fileExists` is
|
|
78
|
-
* injectable for tests; paths are resolved against `cwd` so relative tool paths
|
|
79
|
-
* and absolute ones compare consistently.
|
|
80
|
-
*/
|
|
81
|
-
export declare function detectTestDrift(touchedFiles: Iterable<string>, cwd: string, fileExists?: (p: string) => boolean): string[];
|
|
82
|
-
export declare function shouldCountAsRiskyTool(toolName: string): boolean;
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { toPosixPath } from "../tools/path-utils.js";
|
|
4
|
-
/**
|
|
5
|
-
* Harness-owned proof that every successfully changed file was opened with the
|
|
6
|
-
* read tool after Ideal review began. Model-authored claims never enter it.
|
|
7
|
-
*/
|
|
8
|
-
export class ReviewCoverageTracker {
|
|
9
|
-
cwd;
|
|
10
|
-
fileExists;
|
|
11
|
-
expected = new Set();
|
|
12
|
-
covered = new Set();
|
|
13
|
-
active = false;
|
|
14
|
-
/**
|
|
15
|
-
* `fileExists` is injectable for tests and defaults to the real filesystem.
|
|
16
|
-
* A file the run created and then deleted can never be re-read, so without
|
|
17
|
-
* this check it stayed in `missing` forever and the coverage gate re-injected
|
|
18
|
-
* the same follow-up on every turn.
|
|
19
|
-
*/
|
|
20
|
-
constructor(cwd, fileExists = existsSync) {
|
|
21
|
-
this.cwd = cwd;
|
|
22
|
-
this.fileExists = fileExists;
|
|
23
|
-
}
|
|
24
|
-
reset() {
|
|
25
|
-
this.expected.clear();
|
|
26
|
-
this.covered.clear();
|
|
27
|
-
this.active = false;
|
|
28
|
-
}
|
|
29
|
-
/** Successful mutations are retained before and during review. */
|
|
30
|
-
recordChanged(filePath) {
|
|
31
|
-
const normalized = this.normalize(filePath);
|
|
32
|
-
this.expected.add(normalized);
|
|
33
|
-
this.covered.delete(normalized);
|
|
34
|
-
}
|
|
35
|
-
/** Start the evidence window; reads observed before this call never count. */
|
|
36
|
-
start(changedFiles = []) {
|
|
37
|
-
for (const filePath of changedFiles)
|
|
38
|
-
this.recordChanged(filePath);
|
|
39
|
-
this.covered.clear();
|
|
40
|
-
this.active = true;
|
|
41
|
-
}
|
|
42
|
-
/** Called only by the successful read-tool callback. */
|
|
43
|
-
recordRead(filePath) {
|
|
44
|
-
if (!this.active)
|
|
45
|
-
return;
|
|
46
|
-
const normalized = this.normalize(filePath);
|
|
47
|
-
if (this.expected.has(normalized))
|
|
48
|
-
this.covered.add(normalized);
|
|
49
|
-
}
|
|
50
|
-
evidence() {
|
|
51
|
-
// Deleted files are dropped, not reported unread: review evidence can only
|
|
52
|
-
// come from reading a file that is still on disk.
|
|
53
|
-
const expected = [...this.expected].filter((filePath) => this.fileExists(filePath)).sort();
|
|
54
|
-
const covered = expected.filter((filePath) => this.covered.has(filePath));
|
|
55
|
-
const missing = expected.filter((filePath) => !this.covered.has(filePath));
|
|
56
|
-
return {
|
|
57
|
-
expected: expected.map((filePath) => this.display(filePath)),
|
|
58
|
-
covered: covered.map((filePath) => this.display(filePath)),
|
|
59
|
-
missing: missing.map((filePath) => this.display(filePath)),
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
normalize(filePath) {
|
|
63
|
-
return path.normalize(path.resolve(this.cwd, filePath));
|
|
64
|
-
}
|
|
65
|
-
display(filePath) {
|
|
66
|
-
const relative = path.relative(this.cwd, filePath);
|
|
67
|
-
// Forward-slashed: this string is shown to the model and matched against
|
|
68
|
-
// the paths it echoes back, which are always forward-slashed. A native
|
|
69
|
-
// `src\a.ts` on Windows never matched the model's `src/a.ts`, so review
|
|
70
|
-
// coverage counted every changed file as unread.
|
|
71
|
-
return relative && !relative.startsWith(`..${path.sep}`) && relative !== ".."
|
|
72
|
-
? toPosixPath(relative)
|
|
73
|
-
: filePath;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export function buildReviewCoverageMessage(missingFiles) {
|
|
77
|
-
return {
|
|
78
|
-
role: "user",
|
|
79
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
80
|
-
content: "Ideal review coverage is incomplete. Open every changed file below with the read tool " +
|
|
81
|
-
"before finalizing; model-authored claims do not count as evidence:\n" +
|
|
82
|
-
missingFiles.map((filePath) => `- ${filePath}`).join("\n"),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Coverage follow-ups spent before the gate gives up. The gate is fail-closed,
|
|
87
|
-
* but a file the agent genuinely cannot read (permissions, a path outside the
|
|
88
|
-
* workspace, a race with an external delete) must not cost an unbounded number
|
|
89
|
-
* of identical turns — it escalates once and lets the run finish.
|
|
90
|
-
*/
|
|
91
|
-
export const MAX_REVIEW_COVERAGE_INJECTIONS = 2;
|
|
92
|
-
/**
|
|
93
|
-
* Terminal coverage message: stop demanding reads, require an honest statement
|
|
94
|
-
* of what went unverified in the final answer.
|
|
95
|
-
*/
|
|
96
|
-
export function buildReviewCoverageEscalationMessage(missingFiles) {
|
|
97
|
-
return {
|
|
98
|
-
role: "user",
|
|
99
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
100
|
-
content: `Ideal review coverage is still incomplete after ${MAX_REVIEW_COVERAGE_INJECTIONS} attempts. ` +
|
|
101
|
-
"Stop trying to read these files and do not repeat your previous answer:\n" +
|
|
102
|
-
missingFiles.map((filePath) => `- ${filePath}`).join("\n") +
|
|
103
|
-
"\n\nGive your final response now, and state plainly in it that you could not verify the " +
|
|
104
|
-
"files above (say why if you know) so the user can check them.",
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Put the harness-owned read checklist on the first Ideal review turn. The
|
|
109
|
-
* fail-closed follow-up remains as a fallback, but compliant reviews can now
|
|
110
|
-
* gather all evidence before emitting their single user-facing final answer.
|
|
111
|
-
*/
|
|
112
|
-
export function withReviewCoverageRequirements(message, missingFiles) {
|
|
113
|
-
if (missingFiles.length === 0)
|
|
114
|
-
return message;
|
|
115
|
-
const requirement = buildReviewCoverageMessage(missingFiles);
|
|
116
|
-
return {
|
|
117
|
-
role: "user",
|
|
118
|
-
provenance: message.provenance,
|
|
119
|
-
content: `${String(message.content)}\n\n${String(requirement.content)}`,
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
export const IDEAL_REVIEW_PROMPT = "Ideal? Review the actual work against the user's request before the final response. " +
|
|
123
|
-
"Is it simple, focused, correct, and aligned? Did you over-edit, leave TODOs, miss an obvious " +
|
|
124
|
-
"case the request called for, or introduce risk? For substantial implementations, use Steroids " +
|
|
125
|
-
"when available to compare the finished work against comparable real-world code for architecture, " +
|
|
126
|
-
"simplicity, completeness, edge cases, error handling, security, and performance. Reuse samples " +
|
|
127
|
-
"already examined; search and read further where evidence is missing. Fix concrete gaps relevant " +
|
|
128
|
-
"to the user's request and project constraints, not differences in taste. Examples inform judgment; " +
|
|
129
|
-
"they do not replace tests or prove correctness. Empty corpus or no hits: discover suitable repos, " +
|
|
130
|
-
"propose them via ask_user, add only on approval, then search and read again. If Steroids is " +
|
|
131
|
-
"unavailable, discovery finds nothing suitable, or the user declines, use installed source and " +
|
|
132
|
-
"official docs and state that the work was not cross-checked against real-world implementations. " +
|
|
133
|
-
"Judge this by reading the code you changed \u2014 " +
|
|
134
|
-
"reuse completed checks while code is unchanged. If anything is wrong, fix it now; rerun the affected " +
|
|
135
|
-
"checks and reread those changes before finishing; earlier results do not verify later edits. " +
|
|
136
|
-
"Do not claim coverage without corresponding assertions. Before calling the task complete, reconcile " +
|
|
137
|
-
"each requirement in the original request with the delivered behavior, including applicable failure, " +
|
|
138
|
-
"cancellation, retry, and handoff paths. Passing tests alone do not establish that the request is complete. " +
|
|
139
|
-
"Fix known in-scope gaps now rather than leaving the user to discover them by asking whether it is done. " +
|
|
140
|
-
"Do not expand this into unrelated improvements. If blocked, lead with the incomplete outcome and list " +
|
|
141
|
-
"what remains unverified; otherwise clearly separate what was implemented, verified, and committed or released. " +
|
|
142
|
-
"If everything is good, respond with the final " +
|
|
143
|
-
"answer only; do not mention this ideal review unless it changed the work or a required " +
|
|
144
|
-
"cross-check could not be completed.";
|
|
145
|
-
const RISKY_TOOL_NAMES = new Set(["bash", "write", "edit"]);
|
|
146
|
-
export function evaluateIdealReview(stats) {
|
|
147
|
-
const reasons = [];
|
|
148
|
-
let score = 0;
|
|
149
|
-
if (stats.changedLines >= 120) {
|
|
150
|
-
score += 2;
|
|
151
|
-
reasons.push(`${stats.changedLines} changed lines`);
|
|
152
|
-
}
|
|
153
|
-
else if (stats.changedLines >= 60) {
|
|
154
|
-
score += 1;
|
|
155
|
-
reasons.push(`${stats.changedLines} changed lines`);
|
|
156
|
-
}
|
|
157
|
-
if (stats.toolCalls >= 8) {
|
|
158
|
-
score += 1;
|
|
159
|
-
reasons.push(`${stats.toolCalls} tool calls`);
|
|
160
|
-
}
|
|
161
|
-
if (stats.writeCalls + stats.editCalls >= 4) {
|
|
162
|
-
score += 2;
|
|
163
|
-
reasons.push(`${stats.writeCalls + stats.editCalls} file mutation calls`);
|
|
164
|
-
}
|
|
165
|
-
else if (stats.writeCalls + stats.editCalls >= 2) {
|
|
166
|
-
score += 1;
|
|
167
|
-
reasons.push(`${stats.writeCalls + stats.editCalls} file mutation calls`);
|
|
168
|
-
}
|
|
169
|
-
if (stats.bashCalls > 0 && stats.writeCalls + stats.editCalls > 0) {
|
|
170
|
-
score += 1;
|
|
171
|
-
reasons.push("shell command plus file mutation");
|
|
172
|
-
}
|
|
173
|
-
if (stats.toolFailures > 0) {
|
|
174
|
-
score += 2;
|
|
175
|
-
reasons.push(`${stats.toolFailures} failed tool calls`);
|
|
176
|
-
}
|
|
177
|
-
if (stats.turns >= 6) {
|
|
178
|
-
score += 1;
|
|
179
|
-
reasons.push(`${stats.turns} agent turns`);
|
|
180
|
-
}
|
|
181
|
-
return { shouldReview: score >= 4, score, reasons };
|
|
182
|
-
}
|
|
183
|
-
export function buildIdealReviewMessage(reasons, driftedFiles = []) {
|
|
184
|
-
const reasonText = reasons.length > 0 ? ` Triggered because: ${reasons.join(", ")}.` : "";
|
|
185
|
-
const driftText = driftedFiles.length > 0
|
|
186
|
-
? ` Also: you changed ${driftedFiles.join(", ")} but the matching test file was not updated. ` +
|
|
187
|
-
`Update the test to match the new behavior, or state plainly why the existing test is still valid. ` +
|
|
188
|
-
`Edit the test only \u2014 do not run the suite now.`
|
|
189
|
-
: "";
|
|
190
|
-
return {
|
|
191
|
-
role: "user",
|
|
192
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
193
|
-
content: `${IDEAL_REVIEW_PROMPT}${reasonText}${driftText}`,
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
// A test file: foo.test.ts, foo.spec.tsx, foo.test.mjs, etc.
|
|
197
|
-
const TEST_FILE_RE = /\.(test|spec)\.[cm]?[jt]sx?$/;
|
|
198
|
-
// A source code file we can pair with a sibling test.
|
|
199
|
-
const CODE_EXT_RE = /\.([cm]?[jt]sx?)$/;
|
|
200
|
-
/**
|
|
201
|
-
* Test-drift detector \u2014 the one stranding signal a typechecker is blind to.
|
|
202
|
-
* Given the set of files the run mutated, return the source files whose sibling
|
|
203
|
-
* test exists on disk but was NOT touched this run (a green-but-stale test).
|
|
204
|
-
*
|
|
205
|
-
* Pure structural check: no sibling test on disk \u2192 no signal, so it stays
|
|
206
|
-
* silent on projects (or files) without co-located tests. `fileExists` is
|
|
207
|
-
* injectable for tests; paths are resolved against `cwd` so relative tool paths
|
|
208
|
-
* and absolute ones compare consistently.
|
|
209
|
-
*/
|
|
210
|
-
export function detectTestDrift(touchedFiles, cwd, fileExists = existsSync) {
|
|
211
|
-
const resolved = new Map(); // absolute -> original (as the model wrote it)
|
|
212
|
-
for (const f of touchedFiles)
|
|
213
|
-
resolved.set(path.resolve(cwd, f), f);
|
|
214
|
-
const touchedSet = new Set(resolved.keys());
|
|
215
|
-
const drifted = [];
|
|
216
|
-
for (const [abs, original] of resolved) {
|
|
217
|
-
const base = path.basename(abs);
|
|
218
|
-
if (TEST_FILE_RE.test(base))
|
|
219
|
-
continue; // the file itself is a test
|
|
220
|
-
const match = base.match(CODE_EXT_RE);
|
|
221
|
-
if (!match)
|
|
222
|
-
continue; // not a code file
|
|
223
|
-
const ext = match[1];
|
|
224
|
-
const dir = path.dirname(abs);
|
|
225
|
-
const stem = base.slice(0, base.length - ext.length - 1);
|
|
226
|
-
// Tests commonly drop the JSX `x` (Button.tsx -> Button.test.ts), so try the
|
|
227
|
-
// source ext and its non-JSX variant against both .test and .spec.
|
|
228
|
-
const testExts = ext.endsWith("x") ? [ext, ext.slice(0, -1)] : [ext];
|
|
229
|
-
const candidates = testExts
|
|
230
|
-
.flatMap((e) => [`${stem}.test.${e}`, `${stem}.spec.${e}`])
|
|
231
|
-
.map((c) => path.join(dir, c));
|
|
232
|
-
if (candidates.some((c) => touchedSet.has(c)))
|
|
233
|
-
continue; // sibling test was updated
|
|
234
|
-
if (candidates.some((c) => fileExists(c)))
|
|
235
|
-
drifted.push(original);
|
|
236
|
-
}
|
|
237
|
-
return drifted;
|
|
238
|
-
}
|
|
239
|
-
export function shouldCountAsRiskyTool(toolName) {
|
|
240
|
-
return RISKY_TOOL_NAMES.has(toolName);
|
|
241
|
-
}
|
|
242
|
-
//# sourceMappingURL=ideal-review.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ideal-review.js","sourceRoot":"","sources":["../../src/core/ideal-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAwBrD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAYb;IACA;IAZF,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAC7B,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,MAAM,GAAG,KAAK,CAAC;IAEvB;;;;;OAKG;IACH,YACmB,GAAW,EACX,aAAqC,UAAU;QAD/C,QAAG,GAAH,GAAG,CAAQ;QACX,eAAU,GAAV,UAAU,CAAqC;IAC/D,CAAC;IAEJ,KAAK;QACH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,kEAAkE;IAClE,aAAa,CAAC,QAAgB;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C,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrE,MAAM,UAAU,GAAG,QAAQ;aACxB,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,SAAS,CAAC,EAAE,EAAE,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;aAC1D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAAE,SAAS,CAAC,2BAA2B;QACpF,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACrD,OAAO,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from "@prestyj/agent";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import type { MotionBundle } from "../core/skills.js";
|
|
4
|
-
declare const parameters: z.ZodObject<{
|
|
5
|
-
project: z.ZodString;
|
|
6
|
-
output: z.ZodString;
|
|
7
|
-
range: z.ZodOptional<z.ZodObject<{
|
|
8
|
-
start: z.ZodNumber;
|
|
9
|
-
end: z.ZodNumber;
|
|
10
|
-
}, z.core.$strict>>;
|
|
11
|
-
windows: z.ZodArray<z.ZodObject<{
|
|
12
|
-
label: z.ZodString;
|
|
13
|
-
start: z.ZodNumber;
|
|
14
|
-
end: z.ZodNumber;
|
|
15
|
-
}, z.core.$strict>>;
|
|
16
|
-
holds: z.ZodOptional<z.ZodString>;
|
|
17
|
-
slideshowRequested: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
spot: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
}, z.core.$strict>;
|
|
20
|
-
/**
|
|
21
|
-
* Times of every frame the export contains inside `windows`, so a spot check audits what
|
|
22
|
-
* viewers see. Never a thinned set: across several samples the layout audit reports a
|
|
23
|
-
* collision seen only once as info, so skipped frames would hide the brief collisions a
|
|
24
|
-
* spot check exists to catch.
|
|
25
|
-
*/
|
|
26
|
-
export declare function spotSampleTimes(windows: readonly {
|
|
27
|
-
start: number;
|
|
28
|
-
end: number;
|
|
29
|
-
}[], fps: number, duration: number): number[];
|
|
30
|
-
/** One explicit check; the working agent sees the frames, with no separate model or approval loop. */
|
|
31
|
-
export declare function createMotionCheckTool(cwd: string, bundle: MotionBundle, limits?: {
|
|
32
|
-
sourceCheckMs?: number;
|
|
33
|
-
spotMaxFrames?: number;
|
|
34
|
-
}): AgentTool<typeof parameters>;
|
|
35
|
-
export {};
|