@prestyj/cli 5.28.1 → 5.29.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.
Files changed (316) hide show
  1. package/assets/motion/bin/contact-sheet.mjs +9 -3
  2. package/assets/motion/bin/cues.mjs +337 -0
  3. package/assets/motion/bin/library.mjs +53 -10
  4. package/assets/motion/bin/motion-blur.mjs +943 -0
  5. package/assets/motion/bin/motion-check.mjs +354 -3
  6. package/assets/motion/bin/music-fit.mjs +436 -0
  7. package/assets/motion/bin/pdf-extract.mjs +22 -10
  8. package/assets/motion/bin/reference-study.mjs +346 -0
  9. package/assets/motion/bin/score-synth.mjs +1052 -93
  10. package/assets/motion/library/README.md +50 -14
  11. package/assets/motion/library/kit/moves.js +1981 -0
  12. package/assets/motion/library/library.json +232 -0
  13. package/assets/motion/library/pieces/camera-rig/meta.json +13 -0
  14. package/assets/motion/library/pieces/camera-rig/piece.html +153 -0
  15. package/assets/motion/library/pieces/camera-rig/preview.jpg +0 -0
  16. package/assets/motion/library/pieces/chain-knock/meta.json +13 -0
  17. package/assets/motion/library/pieces/chain-knock/piece.html +195 -0
  18. package/assets/motion/library/pieces/chain-knock/preview.jpg +0 -0
  19. package/assets/motion/library/pieces/gather-to-logo/meta.json +13 -0
  20. package/assets/motion/library/pieces/gather-to-logo/piece.html +159 -0
  21. package/assets/motion/library/pieces/gather-to-logo/preview.jpg +0 -0
  22. package/assets/motion/library/pieces/morph-carry/meta.json +13 -0
  23. package/assets/motion/library/pieces/morph-carry/piece.html +173 -0
  24. package/assets/motion/library/pieces/morph-carry/preview.jpg +0 -0
  25. package/assets/motion/library/pieces/one-shape-journey/meta.json +13 -0
  26. package/assets/motion/library/pieces/one-shape-journey/piece.html +195 -0
  27. package/assets/motion/library/pieces/one-shape-journey/preview.jpg +0 -0
  28. package/assets/motion/library/pieces/open-from-subject/meta.json +13 -0
  29. package/assets/motion/library/pieces/open-from-subject/piece.html +168 -0
  30. package/assets/motion/library/pieces/open-from-subject/preview.jpg +0 -0
  31. package/assets/motion/library/pieces/request-to-result/meta.json +13 -0
  32. package/assets/motion/library/pieces/request-to-result/piece.html +212 -0
  33. package/assets/motion/library/pieces/request-to-result/preview.jpg +0 -0
  34. package/assets/motion/library/pieces/scale-dive/meta.json +13 -0
  35. package/assets/motion/library/pieces/scale-dive/piece.html +321 -0
  36. package/assets/motion/library/pieces/scale-dive/preview.jpg +0 -0
  37. package/assets/motion/library/pieces/screen-replica-steps/meta.json +13 -0
  38. package/assets/motion/library/pieces/screen-replica-steps/piece.html +366 -0
  39. package/assets/motion/library/pieces/screen-replica-steps/preview.jpg +0 -0
  40. package/assets/motion/library/pieces/zoom-into-card/meta.json +13 -0
  41. package/assets/motion/library/pieces/zoom-into-card/piece.html +179 -0
  42. package/assets/motion/library/pieces/zoom-into-card/preview.jpg +0 -0
  43. package/assets/motion/library/sheets/diagram.jpg +0 -0
  44. package/assets/motion/library/sheets/frame.jpg +0 -0
  45. package/assets/motion/library/sheets/transition.jpg +0 -0
  46. package/assets/motion/library/sheets/ui.jpg +0 -0
  47. package/assets/motion/references/build-sheet.md +206 -0
  48. package/assets/motion/references/runtime/determinism-rules.md +1 -1
  49. package/assets/motion/references/runtime/gsap-easing-and-stagger.md +29 -29
  50. package/assets/motion/references/runtime/inputs-and-assets.md +7 -12
  51. package/assets/motion/references/runtime/lint-validate-inspect.md +3 -3
  52. package/assets/motion/references/runtime/minimal-composition.md +1 -1
  53. package/assets/motion/references/runtime/preview-render.md +3 -3
  54. package/assets/motion/skills/app-walkthrough/SKILL.md +66 -0
  55. package/assets/motion/skills/before-after/SKILL.md +53 -0
  56. package/assets/motion/skills/brand-kit/SKILL.md +3 -3
  57. package/assets/motion/skills/dev-tool-video/SKILL.md +57 -0
  58. package/assets/motion/skills/launch-video/SKILL.md +62 -0
  59. package/assets/motion/skills/match-reference/SKILL.md +58 -0
  60. package/assets/motion/skills/motion/SKILL.md +78 -85
  61. package/assets/motion/skills/source-ingest/SKILL.md +17 -6
  62. package/assets/motion/skills/website-video/SKILL.md +59 -0
  63. package/assets/skills/bulletproof/SKILL.md +36 -11
  64. package/assets/skills/bulletproof/references/agent-surface.md +19 -9
  65. package/assets/skills/bulletproof/references/audit-protocol.md +20 -5
  66. package/assets/skills/bulletproof/references/platform-playbooks.md +5 -4
  67. package/assets/skills/bulletproof/references/provenance.md +26 -1
  68. package/assets/skills/bulletproof/references/secure-defaults.md +6 -5
  69. package/assets/skills/bulletproof/references/supply-chain.md +21 -17
  70. package/assets/skills/bulletproof/references/threat-landscape.md +28 -26
  71. package/assets/skills/bulletproof/references/verification.md +2 -0
  72. package/assets/skills/clarify/SKILL.md +25 -16
  73. package/assets/skills/code-review/SKILL.md +71 -13
  74. package/assets/skills/code-review/references/agent-diffs.md +27 -0
  75. package/assets/skills/code-review/references/tests.md +19 -0
  76. package/assets/skills/compliance-guard/SKILL.md +20 -5
  77. package/assets/skills/compliance-guard/references/artifacts.md +1 -1
  78. package/assets/skills/compliance-guard/references/eu-uk.md +16 -16
  79. package/assets/skills/compliance-guard/references/lawsuit-vectors.md +5 -5
  80. package/assets/skills/compliance-guard/references/provenance.md +41 -2
  81. package/assets/skills/compliance-guard/references/sector-gates.md +3 -3
  82. package/assets/skills/compliance-guard/references/security-baseline.md +2 -2
  83. package/assets/skills/compliance-guard/references/trigger-map.md +5 -5
  84. package/assets/skills/compliance-guard/references/us.md +27 -21
  85. package/assets/skills/durable/SKILL.md +87 -79
  86. package/assets/skills/durable/references/agent-db-safety.md +69 -0
  87. package/assets/skills/durable/references/backups-and-runtime.md +19 -12
  88. package/assets/skills/durable/references/migrations-and-schema.md +13 -6
  89. package/assets/skills/evidence-led-ui/SKILL.md +69 -127
  90. package/assets/skills/evidence-led-ui/references/anti-defaults.md +107 -208
  91. package/assets/skills/evidence-led-ui/references/direction.md +124 -0
  92. package/assets/skills/evidence-led-ui/references/production-contract.md +8 -0
  93. package/assets/skills/evidence-led-ui/references/provenance.md +24 -1
  94. package/assets/skills/lean/SKILL.md +90 -71
  95. package/assets/skills/lean/references/memory-and-processes.md +3 -2
  96. package/assets/skills/lean/references/playbooks.md +37 -12
  97. package/assets/skills/refactoring/SKILL.md +24 -3
  98. package/assets/skills/refactoring/references/agent-pitfalls.md +4 -1
  99. package/assets/skills/refactoring/references/legacy.md +21 -0
  100. package/assets/skills/root-cause/SKILL.md +20 -10
  101. package/assets/skills/shared-language/SKILL.md +16 -14
  102. package/assets/skills/tdd/SKILL.md +27 -15
  103. package/dist/app-sidecar.js +203 -47
  104. package/dist/app-sidecar.js.map +1 -1
  105. package/dist/cli.js +17 -26
  106. package/dist/cli.js.map +1 -1
  107. package/dist/core/acceptance-checks.d.ts +48 -0
  108. package/dist/core/acceptance-checks.js +144 -0
  109. package/dist/core/acceptance-checks.js.map +1 -0
  110. package/dist/core/agent-session.d.ts +106 -72
  111. package/dist/core/agent-session.js +539 -399
  112. package/dist/core/agent-session.js.map +1 -1
  113. package/dist/core/agents.d.ts +6 -5
  114. package/dist/core/agents.js.map +1 -1
  115. package/dist/core/ask-user.d.ts +90 -8
  116. package/dist/core/ask-user.js +124 -13
  117. package/dist/core/ask-user.js.map +1 -1
  118. package/dist/core/bundled-agents.js +1 -3
  119. package/dist/core/bundled-agents.js.map +1 -1
  120. package/dist/core/cache-diagnostics.d.ts +68 -0
  121. package/dist/core/cache-diagnostics.js +196 -0
  122. package/dist/core/cache-diagnostics.js.map +1 -0
  123. package/dist/core/cache-expiry.d.ts +87 -0
  124. package/dist/core/cache-expiry.js +111 -0
  125. package/dist/core/cache-expiry.js.map +1 -0
  126. package/dist/core/compaction/compactor.js +78 -48
  127. package/dist/core/compaction/compactor.js.map +1 -1
  128. package/dist/core/compaction/plan-step-policy.d.ts +46 -0
  129. package/dist/core/compaction/plan-step-policy.js +57 -0
  130. package/dist/core/compaction/plan-step-policy.js.map +1 -0
  131. package/dist/core/destructive-git-guard.d.ts +90 -0
  132. package/dist/core/destructive-git-guard.js +871 -0
  133. package/dist/core/destructive-git-guard.js.map +1 -0
  134. package/dist/core/event-bus.d.ts +3 -0
  135. package/dist/core/event-bus.js +5 -0
  136. package/dist/core/event-bus.js.map +1 -1
  137. package/dist/core/injection-detect.d.ts +38 -0
  138. package/dist/core/injection-detect.js +232 -0
  139. package/dist/core/injection-detect.js.map +1 -0
  140. package/dist/core/keep-awake.d.ts +88 -0
  141. package/dist/core/keep-awake.js +251 -0
  142. package/dist/core/keep-awake.js.map +1 -0
  143. package/dist/core/mcp/client.d.ts +72 -0
  144. package/dist/core/mcp/client.js +264 -41
  145. package/dist/core/mcp/client.js.map +1 -1
  146. package/dist/core/mcp/content.js +6 -2
  147. package/dist/core/mcp/content.js.map +1 -1
  148. package/dist/core/mcp/store.d.ts +6 -1
  149. package/dist/core/mcp/store.js +12 -1
  150. package/dist/core/mcp/store.js.map +1 -1
  151. package/dist/core/mcp/types.d.ts +18 -0
  152. package/dist/core/model-unavailable.d.ts +14 -0
  153. package/dist/core/model-unavailable.js +23 -0
  154. package/dist/core/model-unavailable.js.map +1 -0
  155. package/dist/core/node-debugger.d.ts +148 -0
  156. package/dist/core/node-debugger.js +642 -0
  157. package/dist/core/node-debugger.js.map +1 -0
  158. package/dist/core/package-threats.d.ts +18 -0
  159. package/dist/core/package-threats.js +168 -0
  160. package/dist/core/package-threats.js.map +1 -0
  161. package/dist/core/persistent-shell.d.ts +58 -6
  162. package/dist/core/persistent-shell.js +331 -49
  163. package/dist/core/persistent-shell.js.map +1 -1
  164. package/dist/core/process-manager.d.ts +14 -0
  165. package/dist/core/process-manager.js +61 -0
  166. package/dist/core/process-manager.js.map +1 -1
  167. package/dist/core/progress/git-xp.js +8 -14
  168. package/dist/core/progress/git-xp.js.map +1 -1
  169. package/dist/core/session-history.d.ts +12 -0
  170. package/dist/core/session-history.js +27 -0
  171. package/dist/core/session-history.js.map +1 -1
  172. package/dist/core/session-manager.d.ts +13 -1
  173. package/dist/core/session-manager.js +38 -18
  174. package/dist/core/session-manager.js.map +1 -1
  175. package/dist/core/session-summary-index.d.ts +37 -0
  176. package/dist/core/session-summary-index.js +172 -0
  177. package/dist/core/session-summary-index.js.map +1 -0
  178. package/dist/core/settings-manager.d.ts +2 -0
  179. package/dist/core/settings-manager.js +10 -0
  180. package/dist/core/settings-manager.js.map +1 -1
  181. package/dist/core/shell-threats-popular-packages.d.ts +11 -0
  182. package/dist/core/shell-threats-popular-packages.js +675 -0
  183. package/dist/core/shell-threats-popular-packages.js.map +1 -0
  184. package/dist/core/shell-threats.d.ts +8 -0
  185. package/dist/core/shell-threats.js +186 -0
  186. package/dist/core/shell-threats.js.map +1 -0
  187. package/dist/core/skills.js +3 -1
  188. package/dist/core/skills.js.map +1 -1
  189. package/dist/core/stream-rules.d.ts +30 -0
  190. package/dist/core/stream-rules.js +151 -0
  191. package/dist/core/stream-rules.js.map +1 -0
  192. package/dist/core/subagent-manager.d.ts +20 -5
  193. package/dist/core/subagent-manager.js +22 -8
  194. package/dist/core/subagent-manager.js.map +1 -1
  195. package/dist/core/subagent-receipt.d.ts +54 -0
  196. package/dist/core/subagent-receipt.js +276 -0
  197. package/dist/core/subagent-receipt.js.map +1 -0
  198. package/dist/core/subagent-turn-record.d.ts +2 -0
  199. package/dist/core/subagent-turn-record.js.map +1 -1
  200. package/dist/core/test-impact.d.ts +73 -0
  201. package/dist/core/test-impact.js +467 -0
  202. package/dist/core/test-impact.js.map +1 -0
  203. package/dist/core/thinking-level.d.ts +1 -1
  204. package/dist/core/thinking-level.js +1 -1
  205. package/dist/core/thinking-level.js.map +1 -1
  206. package/dist/core/verification-gate.d.ts +2 -0
  207. package/dist/core/verification-gate.js +4 -0
  208. package/dist/core/verification-gate.js.map +1 -1
  209. package/dist/core/verification-snapshot.js +3 -5
  210. package/dist/core/verification-snapshot.js.map +1 -1
  211. package/dist/core/workspace-guard.d.ts +18 -7
  212. package/dist/core/workspace-guard.js +227 -60
  213. package/dist/core/workspace-guard.js.map +1 -1
  214. package/dist/interactive.js +2 -1
  215. package/dist/interactive.js.map +1 -1
  216. package/dist/modes/subagent-worker-mode.js +34 -6
  217. package/dist/modes/subagent-worker-mode.js.map +1 -1
  218. package/dist/motion-agent/motion-agent.d.ts +6 -2
  219. package/dist/motion-agent/motion-agent.js +5 -7
  220. package/dist/motion-agent/motion-agent.js.map +1 -1
  221. package/dist/motion-agent/motion-prompt.d.ts +1 -1
  222. package/dist/motion-agent/motion-prompt.js +14 -19
  223. package/dist/motion-agent/motion-prompt.js.map +1 -1
  224. package/dist/motion-agent/motion-review.d.ts +10 -3
  225. package/dist/motion-agent/motion-review.js +15 -7
  226. package/dist/motion-agent/motion-review.js.map +1 -1
  227. package/dist/motion-agent/motion-studio-context.js +1 -1
  228. package/dist/motion-agent/motion-studio-context.js.map +1 -1
  229. package/dist/system-prompt.js +3 -1
  230. package/dist/system-prompt.js.map +1 -1
  231. package/dist/test-support/keep-alive.d.ts +14 -0
  232. package/dist/test-support/keep-alive.js +17 -0
  233. package/dist/test-support/keep-alive.js.map +1 -0
  234. package/dist/tools/ask-user.js +3 -3
  235. package/dist/tools/ask-user.js.map +1 -1
  236. package/dist/tools/bash-read-evidence.d.ts +10 -0
  237. package/dist/tools/bash-read-evidence.js +133 -0
  238. package/dist/tools/bash-read-evidence.js.map +1 -0
  239. package/dist/tools/bash.d.ts +10 -1
  240. package/dist/tools/bash.js +115 -7
  241. package/dist/tools/bash.js.map +1 -1
  242. package/dist/tools/debug.d.ts +54 -0
  243. package/dist/tools/debug.js +233 -0
  244. package/dist/tools/debug.js.map +1 -0
  245. package/dist/tools/edit.js +12 -4
  246. package/dist/tools/edit.js.map +1 -1
  247. package/dist/tools/goals.d.ts +1 -1
  248. package/dist/tools/index.d.ts +19 -2
  249. package/dist/tools/index.js +47 -7
  250. package/dist/tools/index.js.map +1 -1
  251. package/dist/tools/prompt-hints.js +2 -0
  252. package/dist/tools/prompt-hints.js.map +1 -1
  253. package/dist/tools/read-tracker.d.ts +5 -0
  254. package/dist/tools/read-tracker.js +19 -9
  255. package/dist/tools/read-tracker.js.map +1 -1
  256. package/dist/tools/read.js +3 -2
  257. package/dist/tools/read.js.map +1 -1
  258. package/dist/tools/skill.js +5 -0
  259. package/dist/tools/skill.js.map +1 -1
  260. package/dist/tools/subagent-control.js +44 -8
  261. package/dist/tools/subagent-control.js.map +1 -1
  262. package/dist/tools/subagent-shared.d.ts +29 -8
  263. package/dist/tools/subagent-shared.js +45 -14
  264. package/dist/tools/subagent-shared.js.map +1 -1
  265. package/dist/tools/subagent.d.ts +8 -2
  266. package/dist/tools/subagent.js +28 -10
  267. package/dist/tools/subagent.js.map +1 -1
  268. package/dist/tools/task-output.js +3 -2
  269. package/dist/tools/task-output.js.map +1 -1
  270. package/dist/tools/task-send.d.ts +1 -1
  271. package/dist/tools/task-send.js +15 -1
  272. package/dist/tools/task-send.js.map +1 -1
  273. package/dist/tools/tool-tiers.d.ts +2 -2
  274. package/dist/tools/tool-tiers.js +3 -2
  275. package/dist/tools/tool-tiers.js.map +1 -1
  276. package/dist/tools/truncate.d.ts +21 -0
  277. package/dist/tools/truncate.js +187 -0
  278. package/dist/tools/truncate.js.map +1 -1
  279. package/dist/tools/ui-adopt.js +2 -0
  280. package/dist/tools/ui-adopt.js.map +1 -1
  281. package/dist/ui/App.d.ts +0 -4
  282. package/dist/ui/App.js +5 -28
  283. package/dist/ui/App.js.map +1 -1
  284. package/dist/ui/components/ActivityIndicator.js +1 -0
  285. package/dist/ui/components/ActivityIndicator.js.map +1 -1
  286. package/dist/ui/hooks/useAgentLoop.d.ts +1 -8
  287. package/dist/ui/hooks/useAgentLoop.js +1 -119
  288. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  289. package/dist/ui/render.d.ts +0 -4
  290. package/dist/ui/render.js +0 -2
  291. package/dist/ui/render.js.map +1 -1
  292. package/dist/utils/git.d.ts +77 -0
  293. package/dist/utils/git.js +285 -21
  294. package/dist/utils/git.js.map +1 -1
  295. package/dist/utils/github-ci.js +2 -1
  296. package/dist/utils/github-ci.js.map +1 -1
  297. package/dist/utils/github.js +11 -9
  298. package/dist/utils/github.js.map +1 -1
  299. package/dist/utils/image.d.ts +14 -0
  300. package/dist/utils/image.js +16 -0
  301. package/dist/utils/image.js.map +1 -1
  302. package/dist/utils/process.d.ts +20 -0
  303. package/dist/utils/process.js +98 -0
  304. package/dist/utils/process.js.map +1 -1
  305. package/package.json +5 -5
  306. package/assets/motion/references/motion-language.md +0 -128
  307. package/assets/motion/skills/video-qa/SKILL.md +0 -89
  308. package/dist/core/ideal-review-subagent.d.ts +0 -56
  309. package/dist/core/ideal-review-subagent.js +0 -112
  310. package/dist/core/ideal-review-subagent.js.map +0 -1
  311. package/dist/core/ideal-review.d.ts +0 -82
  312. package/dist/core/ideal-review.js +0 -242
  313. package/dist/core/ideal-review.js.map +0 -1
  314. package/dist/motion-agent/motion-check-tool.d.ts +0 -35
  315. package/dist/motion-agent/motion-check-tool.js +0 -514
  316. package/dist/motion-agent/motion-check-tool.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { spawnSync } from "node:child_process";
2
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
2
3
  import path from "node:path";
3
4
  const DEFAULT_TASKKILL_TIMEOUT_MS = 5_000;
4
5
  function getEnvCaseInsensitive(env, name) {
@@ -74,4 +75,101 @@ function killSingleProcess(pid, kill) {
74
75
  // Process already exited.
75
76
  }
76
77
  }
78
+ /** `[pid, ppid]` for every live process, from `/proc` (Linux) or `ps`. */
79
+ function readProcessTable(platform) {
80
+ if (platform === "linux") {
81
+ try {
82
+ const rows = [];
83
+ for (const name of readdirSync("/proc")) {
84
+ if (!/^\d+$/.test(name))
85
+ continue;
86
+ try {
87
+ // `pid (comm) state ppid …` — comm may contain spaces/parens, so
88
+ // parse from the LAST `)`.
89
+ const stat = readFileSync(`/proc/${name}/stat`, "utf-8");
90
+ const ppid = parseInt(stat.slice(stat.lastIndexOf(")") + 2).split(" ")[1] ?? "", 10);
91
+ if (!Number.isNaN(ppid))
92
+ rows.push([Number(name), ppid]);
93
+ }
94
+ catch {
95
+ // Exited mid-scan.
96
+ }
97
+ }
98
+ if (rows.length > 0)
99
+ return rows;
100
+ }
101
+ catch {
102
+ // No readable /proc — fall through to ps.
103
+ }
104
+ }
105
+ // Absolute path when present: a bare `ps` is resolvable through a PATH we
106
+ // do not control.
107
+ const ps = existsSync("/bin/ps") ? "/bin/ps" : "ps";
108
+ const res = spawnSync(ps, ["-A", "-o", "pid=", "-o", "ppid="], {
109
+ encoding: "utf-8",
110
+ stdio: ["ignore", "pipe", "ignore"],
111
+ timeout: 5_000,
112
+ });
113
+ if (res.status !== 0 || typeof res.stdout !== "string")
114
+ return [];
115
+ const rows = [];
116
+ for (const line of res.stdout.split("\n")) {
117
+ const [pid, ppid] = line.trim().split(/\s+/).map(Number);
118
+ if (Number.isInteger(pid) && Number.isInteger(ppid))
119
+ rows.push([pid, ppid]);
120
+ }
121
+ return rows;
122
+ }
123
+ /**
124
+ * Every live descendant of `pid` (breadth-first, excluding `pid` itself),
125
+ * found by parent links — so it also covers children that left the process
126
+ * group, unlike a group kill. POSIX only; returns `[]` on Windows, where
127
+ * shell pids (msys) do not map onto the native process table.
128
+ */
129
+ export function listDescendantPids(pid, options = {}) {
130
+ const platform = options.platform ?? process.platform;
131
+ if (platform === "win32")
132
+ return [];
133
+ const table = options.readTable ? options.readTable() : readProcessTable(platform);
134
+ const children = new Map();
135
+ for (const [child, parent] of table) {
136
+ if (child === parent)
137
+ continue;
138
+ const list = children.get(parent);
139
+ if (list)
140
+ list.push(child);
141
+ else
142
+ children.set(parent, [child]);
143
+ }
144
+ const seen = new Set();
145
+ const queue = [pid];
146
+ while (queue.length > 0) {
147
+ for (const child of children.get(queue.shift()) ?? []) {
148
+ if (child === pid || seen.has(child))
149
+ continue;
150
+ seen.add(child);
151
+ queue.push(child);
152
+ }
153
+ }
154
+ return [...seen];
155
+ }
156
+ /**
157
+ * Signal every descendant of `pid` without touching `pid` itself — stops a
158
+ * persistent shell's running command while the shell survives. Returns how
159
+ * many processes were signalled.
160
+ */
161
+ export function signalDescendants(pid, signal, options = {}) {
162
+ const kill = options.kill ?? process.kill;
163
+ let signalled = 0;
164
+ for (const child of listDescendantPids(pid, options)) {
165
+ try {
166
+ kill(child, signal);
167
+ signalled++;
168
+ }
169
+ catch {
170
+ // Already gone.
171
+ }
172
+ }
173
+ return signalled;
174
+ }
77
175
  //# sourceMappingURL=process.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/utils/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAE1C,SAAS,qBAAqB,CAAC,GAAsB,EAAE,IAAY;IACjE,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7E,MAAM,SAAS,GAAG,CAAC,KAAyB,EAAsB,EAAE;QAClE,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM;YAAE,O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CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,MAAsB,EACtB,UAAgE,EAAE;IAElE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAC1C,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,KAAK,IAAI,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,CAAC;QACrD,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACpB,SAAS,EAAE,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prestyj/cli",
3
- "version": "5.28.1",
3
+ "version": "5.29.0",
4
4
  "type": "module",
5
5
  "description": "CLI coding agent with OAuth authentication for Anthropic, OpenAI, and Gemini",
6
6
  "license": "MIT",
@@ -115,10 +115,10 @@
115
115
  "typescript-language-server": "^5.3.0",
116
116
  "wrap-ansi": "^10.0.0",
117
117
  "zod": "^4.5.4",
118
- "@prestyj/agent": "5.28.1",
119
- "@prestyj/pixel": "4.3.101",
120
- "@prestyj/core": "5.28.1",
121
- "@prestyj/ai": "5.28.1"
118
+ "@prestyj/ai": "5.29.0",
119
+ "@prestyj/agent": "5.29.0",
120
+ "@prestyj/core": "5.29.0",
121
+ "@prestyj/pixel": "4.3.101"
122
122
  },
123
123
  "optionalDependencies": {
124
124
  "@huggingface/transformers": "4.2.0",
@@ -1,128 +0,0 @@
1
- # Motion language
2
-
3
- Use this for every video you design. The user's brand kit, references or a
4
- chosen library look override any default below. These are principles, not a
5
- house look. Choose the concept, palette and type fresh for every video; never
6
- copy an earlier video's.
7
-
8
- ## The bar
9
-
10
- Make a showcase piece, as if the best motion designers will judge it frame by
11
- frame. Ambition means deliberate craft, not length or effect count. Every
12
- colour, word, cut and ease needs a reason. Cut generic defaults: plain fades,
13
- slowly drifting gradients, text that slides up and sits there. Judge it as the
14
- kind of video it is: an explainer by how clearly it teaches, a tribute by how
15
- it honours its subject, a launch by how it makes people want the product.
16
-
17
- ## Plan first
18
-
19
- Before writing code, decide these and record them in the `Concept` and
20
- `Language` lines of `frame.md`. A few lines is enough; nobody approves them.
21
-
22
- - **Concept**: the idea the video demonstrates, in one sentence. Show it; don't
23
- just state it.
24
- - **Motif**: one shape or element that recurs and links every scene.
25
- - **Register**: the tone (calm, playful, urgent, tender, precise…) and what it
26
- means for size, speed, easing and colour. Take it from the brief, the brand
27
- and the viewing context.
28
- - **Palette**: each colour's role.
29
- - **Type**: each family's role.
30
- - **Beat**: tempo, arc and frame rate.
31
-
32
- ## Principles
33
-
34
- **Register.** Map the tone to motion before choosing anything else. Quiet,
35
- steady motion carries information and reading; expressive motion is saved for
36
- the moments that matter, because it only reads as special against calm. These
37
- pairings are illustrative, not presets: calm is long, soft moves and few of
38
- them; playful is springy overshoot, squash and stretch; luxurious is slow and
39
- precise with generous space; urgent is fast moves and hard cuts; tender is
40
- warm, slow and held; technical is precise and snapping.
41
-
42
- **Continuity.** Each scene hands something to the next: a shape, a word, a
43
- colour field or a camera move. Prefer match cuts and shape handoffs to
44
- cross-fades. The `type-as-spatial-handoff` study in [README.md](README.md) shows
45
- type becoming the next scene.
46
-
47
- **Palette.** A few colours, each with a role, derived from the brand, subject or
48
- references. How many, how saturated and how often the frame changes colour
49
- follow the register: full-frame colour blocks that change on most cuts suit a
50
- loud, kinetic piece; a calm, tender or documentary piece holds a steadier field
51
- and lets one accent carry attention. Gradients and glows are seasoning, not the
52
- base. Keep text readable.
53
-
54
- **No harmful flashing.** Anything flashing over more than about 3% of the frame
55
- counts. Keep light/dark swaps, and swaps to and from saturated red, to at most
56
- six in any one second (three flashes): faster flashing can trigger seizures,
57
- and `motion_check` fails it. A swap on every beat at 120 BPM is fine; a white
58
- flash frame on every half-beat is not.
59
-
60
- **Type.** Choose faces for the register and the reading job. Size follows the
61
- viewing context and how much there is to read: a kinetic poster can set one to
62
- three huge words per shot; an explainer, documentary or lyric video sets whole
63
- lines at a comfortable reading size. Size type against the frame's shorter side
64
- (in vertical video, the width inside the safe margins) and check that the
65
- longest word fits. Animate weight and width axes as motion, not only position
66
- and opacity. Use one display family, at most one contrasting voice, such as an
67
- italic serif, and small uppercase tracked mono for labels and UI where the
68
- subject calls for it. Bundled axes (see `fonts.mjs list` and its specimen):
69
- weight and width in Mona Sans, Hubot Sans, Anybody, Archivo, Bricolage
70
- Grotesque and Martian Mono; italics in Fraunces and Newsreader. Brand fonts win.
71
-
72
- **Motion.** Smooth by default, bounce by choice. Entrances settle on the
73
- critically damped spring or `power3.out` / `expo.out`; exits `power3.in`; moves
74
- `power3.inOut` or `expo.inOut`. Overshoot (`back.out`, `elastic.out` or an
75
- underdamped spring) is a register chosen for playful or physical work, never
76
- the default; see [easing](runtime/gsap-easing-and-stagger.md). Durations follow
77
- the register: roughly 0.15–0.5 s for snappy, energetic or technical motion, and
78
- 0.6–1.5 s or longer for calm, luxurious or tender work. Staggers run 0.012–0.06 s
79
- for type and longer for larger elements. Use real animation principles where
80
- they help: anticipation before big moves, squash and stretch on impact, arcs
81
- instead of straight paths, overlapping action, follow-through and smears on fast
82
- moves. Lead with one movement at a time, with smaller overlapping motion under
83
- it. Every move starts, travels and lands on purpose; nothing drifts without a
84
- reason.
85
-
86
- **Pace.** Keep time on a grid: the track's beats (`hf beats`) when there is
87
- music, otherwise a tempo chosen for the register. Cut by how much there is to
88
- take in, not by the grid alone: a simple image can last one beat; a line to
89
- read or an idea to grasp holds for several. Meaningful text stays still and
90
- readable for at least the longer of 0.8 s and one second per 15 characters,
91
- longer for the key line; repeated or decorative words can go faster. Vary the
92
- density (build, release, rest) so the video is neither always fast nor always
93
- slow. Shape the whole to its form, with a beginning, development, peak and
94
- resolution even in five seconds. Illustratively: a launch builds to its
95
- product, an explainer steps through its idea, a lyric video follows the song's
96
- sections, a tribute lets each moment breathe. End on a composed frame held long
97
- enough to read, and declare that hold in the hold plan before checking.
98
-
99
- **3D, when the subject earns it.** One hero object whose material, light and
100
- camera come from the concept and register, not a stock tech look; add
101
- supporting elements only when they mean something. Resolve 3D back to flat 2D to
102
- hand off to the next scene. Use the bundled Three.js (`three.mjs`); no 3D by
103
- default.
104
-
105
- **Chrome, when it suits.** A small persistent mono layer (labels, timecode,
106
- chapter name, a progress bar with markers) makes a tech subject feel like a pro
107
- tool. Leave it out elsewhere.
108
-
109
- **Frame rate.** 30 fps suits most work. Use 60 fps when fast, dense motion or
110
- scrolling UI must read smoothly; it doubles render time. Renders carry no
111
- motion blur, so fast moves stutter at 24 fps: keep 24 fps for slow, filmic or
112
- handmade work.
113
-
114
- **Truth.** Show only real product UI, numbers and claims from the user's
115
- sources.
116
-
117
- ## Building blocks
118
-
119
- Library looks (`library.mjs list looks`) are complete palette, type and rhythm
120
- systems; when one fits the concept, it replaces the palette and type choices
121
- above. Library pieces are optional building blocks.
122
-
123
- ## Check against the plan
124
-
125
- When `motion_check` returns frames, compare them with the plan in `frame.md` as
126
- well as the technical results. A lost motif, an off-palette colour, a generic
127
- transition or unreadable type is a concrete defect: fix it and check the new
128
- render.
@@ -1,89 +0,0 @@
1
- ---
2
- name: video-qa
3
- description: One output-checking pass for a rendered Motion video. Use motion_check for technical checks and rendered images, inspect them in this session, fix concrete defects and deliver. No independent AI reviewer or creative approval ceremony.
4
- ---
5
-
6
- # Check the actual output once
7
-
8
- Judge the render against the plan in `frame.md` (its `Concept` and `Language`) and the approved inputs, not an alternative creative direction. The check finds defects; it is not an invitation to add effects, retime the motion or redesign the layout.
9
-
10
- ## 1. Check the current export
11
-
12
- Call `motion_check` with:
13
-
14
- - `project`: the current HyperFrames project folder.
15
- - `output`: the actual rendered MP4, inside the workspace.
16
- - `windows`: representative motion/transition windows, each with `label`, `start` and `end` in seconds. Use the video's own timings; each window spans at least two frames and at most ten seconds, up to twelve windows.
17
- - `holds`: only when the video has a deliberate static section (an end card, reading hold or pause you designed), the path to its render-bound hold plan (format below). Write it before this first call; an undeclared deliberate hold is flagged as frozen and costs a second full check.
18
- - `slideshowRequested`: true only when the user actually requested a slideshow; never use it to hide broken motion.
19
- - `range`: only for an export longer than 180 seconds or a targeted diagnostic, a start/end range of at most 180 seconds. Report the inspected range honestly; do not claim full-video visual coverage.
20
- - `spot`: true for a quick check of a targeted fix or small edit. Put short `windows` around the moments you changed, at most 240 rendered frames in total (4 s at 60 fps). The layout check then covers every rendered frame inside them, far faster than the full check, while the pixel, hold and audio checks still cover the whole export. A spot result is never delivery verification: once it is clean, run the full check (without `spot`) once on the export you deliver.
21
-
22
- The tool runs HyperFrames `check` (which already includes lint), decoded-pixel analysis with `motion-check.mjs` including canvas/WebGL, a flash check of the whole export against the WCAG 2.3.1 limits, and audio analysis only when audio exists. It returns technical results and actual rendered overview, phone-size and consecutive-frame images **to you**, the working agent.
23
-
24
- Do not precede or follow it with another lint/check/audio/frame-extraction checklist. Diagnosing a specific failure it reported, or looking at a few frames while building, is part of the work, not a second check. Do not call the legacy `motion_review` prepare/submit workflow. No subagent, separate model critique, approval score or chapter registration is needed.
25
-
26
- ## 2. Inspect what was returned
27
-
28
- Check the attached images for:
29
-
30
- - Correct user text, images, branding and permitted substitutions.
31
- - Missing media, overflow, clipping and unreadable text.
32
- - The planned motion and timing, including intended holds.
33
- - Representative entrance, active and exit frames for each scene.
34
- - The plan: the motif carries through, colours stay on palette, transitions are deliberate and type stays readable.
35
-
36
- Still images do not prove pacing at normal speed or that audio was heard. Use actual playback/listening only when needed and available; state the limit otherwise. Technical success is not proof of visual quality. Missing evidence is unverified, not PASS.
37
-
38
- If the tool fails, its check details list each problem with where and when it occurs, plus renderer notes such as undeclared fonts. Use them to diagnose the concrete problem; do not rerun the check by hand to see them. Runtime command details live in [technical diagnostics](../../references/runtime/lint-validate-inspect.md); they are troubleshooting references, not an extra mandatory pass. Never introduce generic drift, extra effects or layout changes just to satisfy a heuristic. If a real accessibility requirement conflicts with the plan, fix the accessibility problem.
39
-
40
- ## 3. Fix only a concrete defect
41
-
42
- A failed check or visibly wrong output warrants a targeted fix, a new versioned render and a spot check of the fixed moments, then one full check once they are clean. An unchanged export does not need checking again unless you corrected its hold plan; that re-check reuses the passing source audit, so it is quick. Do not iterate toward subjective perfection or route the result to another reviewer. Report an unresolved blocker as draft/unverified rather than looping indefinitely or declaring success.
43
-
44
- The tool measures audio, reports its integrated loudness and true peak, and rejects non-finite levels or clipping; it does not normalize the file. Follow the user's delivery loudness target when they give one. Do not add audio to silent work or force every supplied animation through a generic -14 LUFS mix.
45
-
46
- A flash failure names when it happens and how fast. Retime or soften that moment: at most three light/dark or red swaps in any second, a smaller flashing area, or a smaller brightness difference. Never ship it, and never mark it as a hold to get past it.
47
-
48
- ### Intentional holds
49
-
50
- Declare only deliberate static intervals: an end card, a reading hold or another still section you designed on purpose. The hold plan binds to the current video, so an old plan cannot excuse freezes in a changed export:
51
-
52
- ```json
53
- {
54
- "version": 1,
55
- "videoSha256": "<SHA-256 of this exact export>",
56
- "holds": [{ "start": 13, "end": 15, "reason": "End card hold" }]
57
- }
58
- ```
59
-
60
- When a hold is stale, the check lists where the pixels actually freeze; correct the plan from those times instead of guessing. Do not mark the whole video as a hold to suppress broken animation. Retain any existing meaningful motion assertions; do not invent a new assertion sidecar for every video.
61
-
62
- ## 4. Deliver
63
-
64
- Deliver the actual versioned MP4 in this order. The written message is what the user reads to understand what they got, so it is your final message: no `ask_user` card at delivery, which would come before the message and hide it.
65
-
66
- 1. Reveal the file:
67
-
68
- ```bash
69
- <node> "<motion bin>/reveal.mjs" renders/<file>.mp4
70
- ```
71
-
72
- 2. Write the delivery message as your final message, in plain words:
73
- - One bold line on what they got, in their words: length, shape, where it fits, how it ends.
74
- - One line on anything you assumed, so a wrong guess is easy to spot.
75
- - What the checks mean for their viewers, never the standard or tool names; those stay in `frame.md`. Mention only checks that actually ran and passed.
76
- - What couldn't be checked, plainly. Do not claim full playback or audio listening from sampled images.
77
- - After a new video, one closing sentence naming the two or three changes they're most likely to want. Don't make them unasked.
78
-
79
- Illustrative delivery message, to adapt rather than copy:
80
-
81
- > **A 15-second tall video for Instagram, with upbeat music, ending on your logo.** I assumed it's for people who don't know the shop yet, so it leads with the bread rather than the name.
82
- >
83
- > It's safe for people sensitive to flashing lights, all the text fits on screen with enough contrast to read, and the sound stays clean at its loudest moments. I checked it frame by frame, but I can't watch it the way you will, so play it once on your phone before you share it.
84
- >
85
- > If you'd like, I can add your address and opening hours, use your real logo, or make a wide version for your website.
86
-
87
- If they gave a loudness target, say whether it was met. Report what you designed for but no check measures, such as keeping text clear of Instagram's or TikTok's buttons, as your choice ("I kept the text clear of Instagram's buttons"), never as a check result. If something couldn't be checked: "I couldn't listen to the sound, so play it once on your phone first."
88
-
89
- No automatic posters, share copy, extra formats or launch packages.
@@ -1,56 +0,0 @@
1
- import type { Message } from "@prestyj/ai";
2
- import type { IdealReviewStats } from "./ideal-review.js";
3
- /**
4
- * Independent pre-final review — the Codex Guardian pattern. The in-thread
5
- * Ideal review asks the acting model to audit its own work, armed with its own
6
- * justifications for why it is done; a fresh-context reviewer sees only the
7
- * request, the changed files and the outcome evidence, so it catches what
8
- * self-review rationalizes away.
9
- *
10
- * The reviewer is spawned as a read-only child agent on the session's ACTIVE
11
- * model (`model` is forced at spawn time, never a "fast" or review model).
12
- * Findings are injected as a follow-up the acting agent must address; a CLEAN
13
- * verdict injects nothing, so a passing review costs one bounded wait and no
14
- * extra turn. On spawn failure or timeout the in-thread review remains the
15
- * fallback — the feature degrades, never blocks.
16
- *
17
- * The reviewer's time is capped by its OWN worker, not by the harness killing
18
- * it: on reaching REVIEWER_TURN_TIMEOUT_MS it gets one tool-free turn to give
19
- * its verdict on what it has examined. Killing it from outside discarded all
20
- * of that — large reviews ended "Interrupted" with no verdict at all.
21
- */
22
- /** Read-only toolset — the reviewer examines, it never repairs. */
23
- export declare const REVIEWER_TOOLS: readonly ["read", "grep", "find", "ls", "code_search", "source_path"];
24
- /**
25
- * How long the reviewer may examine the work before it must give its verdict.
26
- * Reviews of large changes (a dozen or more files, ~1,000 changed lines) need
27
- * longer to read everything; a verdict on the most central files beats none.
28
- */
29
- export declare const REVIEWER_TURN_TIMEOUT_MS = 120000;
30
- /**
31
- * Harness backstop: the reviewer's working time, its recovery turn, and
32
- * headroom for the result to arrive. Reached only if the child hangs.
33
- */
34
- export declare const REVIEWER_WAIT_MS: number;
35
- /**
36
- * Ideal review score at which the independent reviewer is worth its latency.
37
- * Below this the in-thread review alone is proportionate.
38
- */
39
- export declare const INDEPENDENT_REVIEW_SCORE_THRESHOLD = 6;
40
- export interface ReviewerTaskInput {
41
- originalRequest: string;
42
- changedFiles: readonly string[];
43
- stats: IdealReviewStats;
44
- triggerReasons: readonly string[];
45
- }
46
- export declare function buildReviewerTask(input: ReviewerTaskInput): string;
47
- export interface ReviewerFindings {
48
- clean: boolean;
49
- findings: string[];
50
- }
51
- /**
52
- * Parse the reviewer's terminal output. Returns null when the reply carries no
53
- * usable verdict marker — treated as a failed review, never as a pass.
54
- */
55
- export declare function parseReviewerFindings(output: string): ReviewerFindings | null;
56
- export declare function buildIndependentReviewMessage(findings: readonly string[]): Message;
@@ -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
- {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,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,QAA2B;IACvE,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,QAAQ,EAAE;QACjF,OAAO,EACL,+FAA+F;YAC/F,+EAA+E;YAC/E,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACpD,8FAA8F;YAC9F,+CAA+C;KAClD,CAAC;AACJ,CAAC"}
@@ -1,82 +0,0 @@
1
- import type { Message } from "@prestyj/ai";
2
- export interface IdealReviewStats {
3
- changedLines: number;
4
- toolCalls: number;
5
- 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;