@prestyj/cli 4.3.201 → 4.3.207

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 (240) hide show
  1. package/dist/cli.js +68 -51
  2. package/dist/cli.js.map +1 -1
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +3 -2
  5. package/dist/config.js.map +1 -1
  6. package/dist/core/agent-session.d.ts +1 -0
  7. package/dist/core/agent-session.d.ts.map +1 -1
  8. package/dist/core/agent-session.js +6 -3
  9. package/dist/core/agent-session.js.map +1 -1
  10. package/dist/core/auth-storage.d.ts.map +1 -1
  11. package/dist/core/auth-storage.js +9 -1
  12. package/dist/core/auth-storage.js.map +1 -1
  13. package/dist/core/compaction/compactor.d.ts +1 -0
  14. package/dist/core/compaction/compactor.d.ts.map +1 -1
  15. package/dist/core/compaction/compactor.js +7 -0
  16. package/dist/core/compaction/compactor.js.map +1 -1
  17. package/dist/core/compaction/compactor.test.js +16 -0
  18. package/dist/core/compaction/compactor.test.js.map +1 -1
  19. package/dist/core/goal-controller.d.ts +57 -0
  20. package/dist/core/goal-controller.d.ts.map +1 -0
  21. package/dist/core/goal-controller.js +285 -0
  22. package/dist/core/goal-controller.js.map +1 -0
  23. package/dist/core/goal-controller.test.d.ts +2 -0
  24. package/dist/core/goal-controller.test.d.ts.map +1 -0
  25. package/dist/core/goal-controller.test.js +419 -0
  26. package/dist/core/goal-controller.test.js.map +1 -0
  27. package/dist/core/goal-lifecycle-smoke.test.d.ts +2 -0
  28. package/dist/core/goal-lifecycle-smoke.test.d.ts.map +1 -0
  29. package/dist/core/goal-lifecycle-smoke.test.js +207 -0
  30. package/dist/core/goal-lifecycle-smoke.test.js.map +1 -0
  31. package/dist/core/goal-store.d.ts +164 -0
  32. package/dist/core/goal-store.d.ts.map +1 -0
  33. package/dist/core/goal-store.js +721 -0
  34. package/dist/core/goal-store.js.map +1 -0
  35. package/dist/core/goal-store.test.d.ts +2 -0
  36. package/dist/core/goal-store.test.d.ts.map +1 -0
  37. package/dist/core/goal-store.test.js +341 -0
  38. package/dist/core/goal-store.test.js.map +1 -0
  39. package/dist/core/goal-verifier.d.ts +17 -0
  40. package/dist/core/goal-verifier.d.ts.map +1 -0
  41. package/dist/core/goal-verifier.js +84 -0
  42. package/dist/core/goal-verifier.js.map +1 -0
  43. package/dist/core/goal-verifier.test.d.ts +2 -0
  44. package/dist/core/goal-verifier.test.d.ts.map +1 -0
  45. package/dist/core/goal-verifier.test.js +88 -0
  46. package/dist/core/goal-verifier.test.js.map +1 -0
  47. package/dist/core/goal-worker-dev-server-lifecycle.test.d.ts +2 -0
  48. package/dist/core/goal-worker-dev-server-lifecycle.test.d.ts.map +1 -0
  49. package/dist/core/goal-worker-dev-server-lifecycle.test.js +68 -0
  50. package/dist/core/goal-worker-dev-server-lifecycle.test.js.map +1 -0
  51. package/dist/core/goal-worker.d.ts +51 -0
  52. package/dist/core/goal-worker.d.ts.map +1 -0
  53. package/dist/core/goal-worker.js +339 -0
  54. package/dist/core/goal-worker.js.map +1 -0
  55. package/dist/core/goal-worker.test.d.ts +2 -0
  56. package/dist/core/goal-worker.test.d.ts.map +1 -0
  57. package/dist/core/goal-worker.test.js +224 -0
  58. package/dist/core/goal-worker.test.js.map +1 -0
  59. package/dist/core/model-registry.d.ts +1 -0
  60. package/dist/core/model-registry.d.ts.map +1 -1
  61. package/dist/core/model-registry.js +26 -0
  62. package/dist/core/model-registry.js.map +1 -1
  63. package/dist/core/model-registry.test.js +64 -1
  64. package/dist/core/model-registry.test.js.map +1 -1
  65. package/dist/core/oauth/gemini.d.ts +4 -0
  66. package/dist/core/oauth/gemini.d.ts.map +1 -0
  67. package/dist/core/oauth/gemini.js +377 -0
  68. package/dist/core/oauth/gemini.js.map +1 -0
  69. package/dist/core/oauth/gemini.test.d.ts +2 -0
  70. package/dist/core/oauth/gemini.test.d.ts.map +1 -0
  71. package/dist/core/oauth/gemini.test.js +154 -0
  72. package/dist/core/oauth/gemini.test.js.map +1 -0
  73. package/dist/core/oauth/openai.d.ts.map +1 -1
  74. package/dist/core/oauth/openai.js +7 -5
  75. package/dist/core/oauth/openai.js.map +1 -1
  76. package/dist/core/oauth/types.d.ts +1 -0
  77. package/dist/core/oauth/types.d.ts.map +1 -1
  78. package/dist/core/process-manager-dev-server-repro.test.d.ts +2 -0
  79. package/dist/core/process-manager-dev-server-repro.test.d.ts.map +1 -0
  80. package/dist/core/process-manager-dev-server-repro.test.js +100 -0
  81. package/dist/core/process-manager-dev-server-repro.test.js.map +1 -0
  82. package/dist/core/process-manager.js +2 -2
  83. package/dist/core/process-manager.js.map +1 -1
  84. package/dist/core/prompt-commands.d.ts.map +1 -1
  85. package/dist/core/prompt-commands.js +125 -0
  86. package/dist/core/prompt-commands.js.map +1 -1
  87. package/dist/core/prompt-commands.test.js +38 -0
  88. package/dist/core/prompt-commands.test.js.map +1 -1
  89. package/dist/core/repomap.js +3 -1
  90. package/dist/core/repomap.js.map +1 -1
  91. package/dist/core/repomap.test.js +18 -0
  92. package/dist/core/repomap.test.js.map +1 -1
  93. package/dist/core/settings-manager.d.ts +1 -0
  94. package/dist/core/settings-manager.d.ts.map +1 -1
  95. package/dist/core/settings-manager.js +11 -1
  96. package/dist/core/settings-manager.js.map +1 -1
  97. package/dist/core/slash-commands.js +1 -1
  98. package/dist/core/slash-commands.js.map +1 -1
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +1 -1
  102. package/dist/index.js.map +1 -1
  103. package/dist/interactive.d.ts.map +1 -1
  104. package/dist/interactive.js +21 -10
  105. package/dist/interactive.js.map +1 -1
  106. package/dist/system-prompt.d.ts.map +1 -1
  107. package/dist/system-prompt.js +19 -39
  108. package/dist/system-prompt.js.map +1 -1
  109. package/dist/system-prompt.test.js +131 -6
  110. package/dist/system-prompt.test.js.map +1 -1
  111. package/dist/tools/edit-diff.d.ts.map +1 -1
  112. package/dist/tools/edit-diff.js +71 -32
  113. package/dist/tools/edit-diff.js.map +1 -1
  114. package/dist/tools/edit-diff.test.js +14 -0
  115. package/dist/tools/edit-diff.test.js.map +1 -1
  116. package/dist/tools/edit.d.ts.map +1 -1
  117. package/dist/tools/edit.js +38 -18
  118. package/dist/tools/edit.js.map +1 -1
  119. package/dist/tools/edit.test.js +56 -6
  120. package/dist/tools/edit.test.js.map +1 -1
  121. package/dist/tools/enter-plan.d.ts.map +1 -1
  122. package/dist/tools/enter-plan.js +1 -0
  123. package/dist/tools/enter-plan.js.map +1 -1
  124. package/dist/tools/find.d.ts.map +1 -1
  125. package/dist/tools/find.js +2 -0
  126. package/dist/tools/find.js.map +1 -1
  127. package/dist/tools/goals.d.ts +110 -0
  128. package/dist/tools/goals.d.ts.map +1 -0
  129. package/dist/tools/goals.js +500 -0
  130. package/dist/tools/goals.js.map +1 -0
  131. package/dist/tools/goals.test.d.ts +2 -0
  132. package/dist/tools/goals.test.d.ts.map +1 -0
  133. package/dist/tools/goals.test.js +431 -0
  134. package/dist/tools/goals.test.js.map +1 -0
  135. package/dist/tools/grep.d.ts.map +1 -1
  136. package/dist/tools/grep.js +2 -0
  137. package/dist/tools/grep.js.map +1 -1
  138. package/dist/tools/index.d.ts +2 -0
  139. package/dist/tools/index.d.ts.map +1 -1
  140. package/dist/tools/index.js +6 -0
  141. package/dist/tools/index.js.map +1 -1
  142. package/dist/tools/prompt-hints.d.ts.map +1 -1
  143. package/dist/tools/prompt-hints.js +6 -2
  144. package/dist/tools/prompt-hints.js.map +1 -1
  145. package/dist/tools/source-path.d.ts +9 -0
  146. package/dist/tools/source-path.d.ts.map +1 -0
  147. package/dist/tools/source-path.js +120 -0
  148. package/dist/tools/source-path.js.map +1 -0
  149. package/dist/tools/source-path.test.d.ts +2 -0
  150. package/dist/tools/source-path.test.d.ts.map +1 -0
  151. package/dist/tools/source-path.test.js +80 -0
  152. package/dist/tools/source-path.test.js.map +1 -0
  153. package/dist/tools/subagent.js +16 -0
  154. package/dist/tools/subagent.js.map +1 -1
  155. package/dist/ui/App.d.ts +75 -4
  156. package/dist/ui/App.d.ts.map +1 -1
  157. package/dist/ui/App.js +1085 -152
  158. package/dist/ui/App.js.map +1 -1
  159. package/dist/ui/activity-phrases.d.ts.map +1 -1
  160. package/dist/ui/activity-phrases.js +7 -3
  161. package/dist/ui/activity-phrases.js.map +1 -1
  162. package/dist/ui/app-state-persistence.test.d.ts +2 -0
  163. package/dist/ui/app-state-persistence.test.d.ts.map +1 -0
  164. package/dist/ui/app-state-persistence.test.js +130 -0
  165. package/dist/ui/app-state-persistence.test.js.map +1 -0
  166. package/dist/ui/components/BackgroundTasksBar.d.ts +16 -1
  167. package/dist/ui/components/BackgroundTasksBar.d.ts.map +1 -1
  168. package/dist/ui/components/BackgroundTasksBar.js +15 -2
  169. package/dist/ui/components/BackgroundTasksBar.js.map +1 -1
  170. package/dist/ui/components/Banner.d.ts +2 -1
  171. package/dist/ui/components/Banner.d.ts.map +1 -1
  172. package/dist/ui/components/Banner.js +3 -3
  173. package/dist/ui/components/Banner.js.map +1 -1
  174. package/dist/ui/components/GoalOverlay.d.ts +74 -0
  175. package/dist/ui/components/GoalOverlay.d.ts.map +1 -0
  176. package/dist/ui/components/GoalOverlay.js +675 -0
  177. package/dist/ui/components/GoalOverlay.js.map +1 -0
  178. package/dist/ui/components/GoalStatusBar.d.ts +24 -0
  179. package/dist/ui/components/GoalStatusBar.d.ts.map +1 -0
  180. package/dist/ui/components/GoalStatusBar.js +113 -0
  181. package/dist/ui/components/GoalStatusBar.js.map +1 -0
  182. package/dist/ui/components/InputArea.d.ts +2 -1
  183. package/dist/ui/components/InputArea.d.ts.map +1 -1
  184. package/dist/ui/components/InputArea.js +44 -2
  185. package/dist/ui/components/InputArea.js.map +1 -1
  186. package/dist/ui/components/InputArea.test.d.ts +2 -0
  187. package/dist/ui/components/InputArea.test.d.ts.map +1 -0
  188. package/dist/ui/components/InputArea.test.js +79 -0
  189. package/dist/ui/components/InputArea.test.js.map +1 -0
  190. package/dist/ui/components/ModelSelector.d.ts.map +1 -1
  191. package/dist/ui/components/ModelSelector.js +1 -0
  192. package/dist/ui/components/ModelSelector.js.map +1 -1
  193. package/dist/ui/components/ToolExecution.d.ts.map +1 -1
  194. package/dist/ui/components/ToolExecution.js +96 -3
  195. package/dist/ui/components/ToolExecution.js.map +1 -1
  196. package/dist/ui/footer-status-layout.test.d.ts +2 -0
  197. package/dist/ui/footer-status-layout.test.d.ts.map +1 -0
  198. package/dist/ui/footer-status-layout.test.js +56 -0
  199. package/dist/ui/footer-status-layout.test.js.map +1 -0
  200. package/dist/ui/goal-events.d.ts +107 -0
  201. package/dist/ui/goal-events.d.ts.map +1 -0
  202. package/dist/ui/goal-events.js +323 -0
  203. package/dist/ui/goal-events.js.map +1 -0
  204. package/dist/ui/goal-events.test.d.ts +2 -0
  205. package/dist/ui/goal-events.test.d.ts.map +1 -0
  206. package/dist/ui/goal-events.test.js +293 -0
  207. package/dist/ui/goal-events.test.js.map +1 -0
  208. package/dist/ui/goal-overlay.test.d.ts +2 -0
  209. package/dist/ui/goal-overlay.test.d.ts.map +1 -0
  210. package/dist/ui/goal-overlay.test.js +276 -0
  211. package/dist/ui/goal-overlay.test.js.map +1 -0
  212. package/dist/ui/goal-status-bar.test.d.ts +2 -0
  213. package/dist/ui/goal-status-bar.test.d.ts.map +1 -0
  214. package/dist/ui/goal-status-bar.test.js +143 -0
  215. package/dist/ui/goal-status-bar.test.js.map +1 -0
  216. package/dist/ui/hooks/useAgentLoop.d.ts +2 -0
  217. package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
  218. package/dist/ui/hooks/useAgentLoop.js +3 -0
  219. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  220. package/dist/ui/live-item-flush.test.js +48 -0
  221. package/dist/ui/live-item-flush.test.js.map +1 -1
  222. package/dist/ui/login.d.ts.map +1 -1
  223. package/dist/ui/login.js +1 -0
  224. package/dist/ui/login.js.map +1 -1
  225. package/dist/ui/pixel.js +1 -1
  226. package/dist/ui/render.d.ts +13 -4
  227. package/dist/ui/render.d.ts.map +1 -1
  228. package/dist/ui/render.js +13 -3
  229. package/dist/ui/render.js.map +1 -1
  230. package/dist/ui/scroll-stabilization.test.d.ts +2 -0
  231. package/dist/ui/scroll-stabilization.test.d.ts.map +1 -0
  232. package/dist/ui/scroll-stabilization.test.js +70 -0
  233. package/dist/ui/scroll-stabilization.test.js.map +1 -0
  234. package/dist/ui/slash-command-images.test.d.ts +2 -0
  235. package/dist/ui/slash-command-images.test.d.ts.map +1 -0
  236. package/dist/ui/slash-command-images.test.js +47 -0
  237. package/dist/ui/slash-command-images.test.js.map +1 -0
  238. package/dist/utils/format.js +44 -0
  239. package/dist/utils/format.js.map +1 -1
  240. package/package.json +6 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-controller.d.ts","sourceRoot":"","sources":["../../src/core/goal-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,+BAA+B,IAAI,CAAC;AACjD,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAC9B;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACpD,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC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AoIxB"}
@@ -0,0 +1,285 @@
1
+ import { formatGoalBlockingPrerequisites, goalHasBlockingPrerequisites, } from "./goal-store.js";
2
+ export const DEFAULT_GOAL_TASK_ATTEMPT_LIMIT = 5;
3
+ export const DEFAULT_GOAL_VERIFIER_FIX_LIMIT = 5;
4
+ function needsHarnessInstrumentation(run) {
5
+ return run.harness.some((item) => !item.command && !item.path);
6
+ }
7
+ function buildHarnessTaskPrompt(run) {
8
+ const harnessItems = run.harness
9
+ .filter((item) => !item.command && !item.path)
10
+ .map((item) => `- ${item.label}: ${item.description ?? "Create local instrumentation."}`)
11
+ .join("\n");
12
+ return (`Goal: ${run.goal}\n\n` +
13
+ `Build the missing local/free harness instrumentation needed before verification. Translate the user's requested outcome into observable proof: ask what artifact would prove this actually worked end-to-end, then build the simplest reliable local/free path to observe it.\n` +
14
+ `${harnessItems}\n\n` +
15
+ `Inventory domain-appropriate local capabilities before blocking: existing tests and CLIs, fixtures or seeded data, dev servers, browser automation, simulator/device screenshots, video/frame inspection, logs, generated assets, protocol traces, database assertions, API probes, contract tests, performance measurements, source/docs/code-search comparison, or other artifacts that directly measure the outcome. For mobile/UI goals, prefer local simulator/browser screenshots (for example iOS Simulator tooling when available) before requiring a physical phone. Create any scripts, fixtures, or test helpers in the repository, update the Goal harness/verifier metadata with the goals tool, and record command/file/screenshot/log evidence. Do not require paid services or signups; block only with exact user instructions if a true external prerequisite is missing.`);
16
+ }
17
+ function blockedEvidencePlanReason(run) {
18
+ const blocked = run.evidencePlan.find((item) => item.status === "blocked");
19
+ if (!blocked)
20
+ return undefined;
21
+ return `${blocked.label}: ${blocked.instructions?.trim() || "User must provide this evidence prerequisite."}`;
22
+ }
23
+ function needsEvidenceInstrumentation(run) {
24
+ return run.evidencePlan.some((item) => item.status === "planned");
25
+ }
26
+ function evidencePlanItemSatisfiedByDurableEvidence(run, item) {
27
+ if (item.status === "ready")
28
+ return true;
29
+ if (item.evidence?.trim())
30
+ return true;
31
+ const verifier = run.verifier?.lastResult;
32
+ if (verifier?.status === "pass") {
33
+ if (item.command && verifier.command === item.command)
34
+ return true;
35
+ if (item.path && verifier.outputPath === item.path)
36
+ return true;
37
+ const haystack = `${verifier.command ?? ""}\n${verifier.outputPath ?? ""}\n${verifier.summary}`.toLowerCase();
38
+ const needles = [item.label, item.description, item.command, item.path]
39
+ .filter((value) => !!value?.trim())
40
+ .map((value) => value.toLowerCase());
41
+ if (needles.some((needle) => haystack.includes(needle)))
42
+ return true;
43
+ }
44
+ return run.evidence.some((evidence) => {
45
+ if (item.path && evidence.path === item.path)
46
+ return true;
47
+ const haystack = `${evidence.label}\n${evidence.path ?? ""}\n${evidence.content ?? ""}`.toLowerCase();
48
+ return [item.label, item.description, item.command, item.path]
49
+ .filter((value) => !!value?.trim())
50
+ .map((value) => value.toLowerCase())
51
+ .some((needle) => haystack.includes(needle));
52
+ });
53
+ }
54
+ export function hasRequiredGoalEvidence(run) {
55
+ const missing = run.evidencePlan.filter((item) => !evidencePlanItemSatisfiedByDurableEvidence(run, item));
56
+ if (missing.length > 0) {
57
+ return {
58
+ ok: false,
59
+ reason: `Goal evidence plan is not satisfied: ${missing.map((item) => item.label).join(", ")}.`,
60
+ };
61
+ }
62
+ return {
63
+ ok: true,
64
+ reason: "All required evidence-plan items are ready or proven by durable evidence.",
65
+ };
66
+ }
67
+ function buildEvidencePlanTaskPrompt(run) {
68
+ const plannedItems = run.evidencePlan
69
+ .filter((item) => item.status === "planned")
70
+ .map((item) => `- ${item.label} (${item.mechanism}): ${item.description}${item.command ? `; candidate command: ${item.command}` : ""}${item.path ? `; artifact: ${item.path}` : ""}`)
71
+ .join("\n");
72
+ return (`Goal: ${run.goal}\n\n` +
73
+ `Turn the planned proof paths below into real local/free verification capability before the Goal verifier runs. Translate success criteria and outcome requirements into observable proof paths: ask what would prove this goal actually worked end-to-end, then build the simplest reliable local/free way to capture that proof.\n` +
74
+ `${plannedItems}\n\n` +
75
+ `Inventory domain-appropriate capabilities deeply enough for this task before blocking: existing tests/CLIs, generated fixtures, seeded data, scripts, dev servers, browser automation, simulator/browser/device screenshots, video/frame inspection, logs, generated assets, protocol traces, database assertions, API probes, contract tests, performance measurements, source/docs/code-search comparison, or other artifacts that directly measure the requested outcome. For mobile/UI goals, screenshots are examples rather than the whole solution: prefer local simulator/browser tooling (for example iOS Simulator screenshots when available) before requiring a physical phone, and add image/frame checks when visual correctness matters. Build what is missing, update the Goal evidence_plan/harness/verifier metadata with the goals tool, and persist command/file/screenshot/log evidence, not narrative-only verification or human visual inspection. Only block with exact user instructions for inputs that cannot be generated or checked locally, such as credentials, paid services, physical devices, or unavailable source assets.`);
76
+ }
77
+ function buildVerifierTaskPrompt(run) {
78
+ return (`Goal: ${run.goal}\n\n` +
79
+ `Define and build a real end-to-end verifier for this Goal. Translate the objective into observable proof: what command, artifact, trace, screenshot, log, fixture, database assertion, API probe, contract test, performance measurement, source/docs comparison, or other domain-appropriate signal would prove the requested outcome with near-100% confidence? Create the simplest reliable local/free scripts, fixtures, harnesses, or test commands needed, then update the Goal with a verifier_command and verifier_description using the goals tool. For mobile/UI goals, prefer local simulator/browser evidence such as iOS Simulator screenshots when available before requiring a physical phone. The verifier must be runnable locally/free and produce command or file evidence, not narrative or human visual inspection. If an external prerequisite is missing, mark it missing with exact user instructions.`);
80
+ }
81
+ function incompleteTasks(run) {
82
+ return run.tasks.filter((task) => task.status !== "done");
83
+ }
84
+ function activeTask(run) {
85
+ return run.tasks.find((task) => task.status === "running" || task.status === "verifying");
86
+ }
87
+ function nextRunnableTask(run) {
88
+ return run.tasks.find((task) => task.status === "pending" || task.status === "failed");
89
+ }
90
+ export function canCompleteGoalRun(run) {
91
+ if (goalHasBlockingPrerequisites(run)) {
92
+ return { ok: false, reason: formatGoalBlockingPrerequisites(run) };
93
+ }
94
+ const remainingTasks = incompleteTasks(run);
95
+ if (remainingTasks.length > 0) {
96
+ return {
97
+ ok: false,
98
+ reason: `${remainingTasks.length} Goal task${remainingTasks.length === 1 ? " is" : "s are"} not done.`,
99
+ };
100
+ }
101
+ const requiredEvidence = hasRequiredGoalEvidence(run);
102
+ if (!requiredEvidence.ok)
103
+ return requiredEvidence;
104
+ const verifierResult = run.verifier?.lastResult;
105
+ if (!verifierResult) {
106
+ return { ok: false, reason: "Goal has no verifier evidence." };
107
+ }
108
+ if (verifierResult.status !== "pass") {
109
+ return { ok: false, reason: `Verifier status is ${verifierResult.status}.` };
110
+ }
111
+ return { ok: true, reason: "All tasks are done and verifier evidence passed." };
112
+ }
113
+ export function shouldClearGoalContinuation(decision) {
114
+ return decision.kind !== "wait";
115
+ }
116
+ export function shouldCreateVerifierFixTask(run, limit = DEFAULT_GOAL_VERIFIER_FIX_LIMIT) {
117
+ return run.tasks.filter((task) => task.title === "Fix verifier failure").length < limit;
118
+ }
119
+ export function verifierFixTaskCount(run) {
120
+ return run.tasks.filter((task) => task.title === "Fix verifier failure").length;
121
+ }
122
+ export function hasRepeatedVerifierFailure(run, repeatLimit = 2) {
123
+ const failures = run.evidence
124
+ .filter((item) => item.label === "Verifier fail" || item.label === "Verifier result")
125
+ .map((item) => (item.content ?? "").trim())
126
+ .filter(Boolean);
127
+ if (failures.length < repeatLimit)
128
+ return false;
129
+ const last = failures[failures.length - 1];
130
+ return failures.slice(-repeatLimit).every((item) => item === last);
131
+ }
132
+ function buildVerifierFailureTaskPrompt(run) {
133
+ const result = run.verifier?.lastResult;
134
+ const priorSummaries = run.evidence
135
+ .filter((item) => item.label.startsWith("Verifier"))
136
+ .slice(-3)
137
+ .map((item) => `- ${item.label}${item.path ? ` (${item.path})` : ""}: ${(item.content ?? "").slice(0, 500)}`)
138
+ .join("\n") || "- none";
139
+ const attempt = verifierFixTaskCount(run) + 1;
140
+ return (`Original objective: ${run.goal}\n\n` +
141
+ `Success criteria:\n${run.successCriteria.map((item) => `- ${item}`).join("\n") || "- none recorded"}\n\n` +
142
+ `Verifier command: ${run.verifier?.command ?? "(missing)"}\n` +
143
+ `Exit code: ${result?.exitCode ?? "unknown"}\n` +
144
+ `Output path: ${result?.outputPath ?? "not recorded"}\n` +
145
+ `Fix attempt ${attempt}/${DEFAULT_GOAL_VERIFIER_FIX_LIMIT}.\n\n` +
146
+ `Prior verifier summaries:\n${priorSummaries}\n\n` +
147
+ `Run targeted diagnostics, fix the root cause, update durable Goal evidence with the goals tool, and rerun the exact verifier command. Do not mark the Goal complete.`);
148
+ }
149
+ export function formatGoalControllerDecision(decision) {
150
+ const parts = [`kind=${decision.kind}`];
151
+ if ("reason" in decision)
152
+ parts.push(`reason=${decision.reason}`);
153
+ if (decision.kind === "start_worker" || decision.kind === "pause") {
154
+ parts.push(`task=${decision.task.id}`, `title=${decision.task.title}`, `attempts=${decision.attempts}`);
155
+ if (decision.task.workerId)
156
+ parts.push(`worker=${decision.task.workerId}`);
157
+ }
158
+ if (decision.kind === "wait" && decision.workerId)
159
+ parts.push(`worker=${decision.workerId}`);
160
+ if (decision.kind === "run_verifier")
161
+ parts.push(`verifier=${decision.command}`);
162
+ if (decision.kind === "terminal")
163
+ parts.push(`status=${decision.status}`);
164
+ if (decision.kind === "create_task")
165
+ parts.push(`title=${decision.title}`);
166
+ return { label: `Goal decision: ${decision.kind}`, content: parts.join("; ") };
167
+ }
168
+ export function decideGoalNextAction(run, options = {}) {
169
+ if (run.status === "blocked" ||
170
+ run.status === "failed" ||
171
+ run.status === "passed" ||
172
+ (run.status === "paused" && !run.continueRequestedAt)) {
173
+ return { kind: "terminal", status: run.status, reason: `Goal is ${run.status}.` };
174
+ }
175
+ if (goalHasBlockingPrerequisites(run)) {
176
+ return { kind: "blocked", reason: formatGoalBlockingPrerequisites(run) };
177
+ }
178
+ if (run.activeWorkerId) {
179
+ return {
180
+ kind: "wait",
181
+ reason: "Goal already has an active worker.",
182
+ workerId: run.activeWorkerId,
183
+ };
184
+ }
185
+ const runningTask = activeTask(run);
186
+ if (runningTask) {
187
+ return {
188
+ kind: "wait",
189
+ reason: `Goal task "${runningTask.title}" is already ${runningTask.status}.`,
190
+ ...(runningTask.workerId ? { workerId: runningTask.workerId } : {}),
191
+ };
192
+ }
193
+ const task = nextRunnableTask(run);
194
+ if (task) {
195
+ const attempts = task.attempts + 1;
196
+ const limit = options.taskAttemptLimit ?? DEFAULT_GOAL_TASK_ATTEMPT_LIMIT;
197
+ if (attempts > limit) {
198
+ return {
199
+ kind: "pause",
200
+ task,
201
+ attempts,
202
+ reason: `Attempt limit reached for task ${task.title}.`,
203
+ };
204
+ }
205
+ return {
206
+ kind: "start_worker",
207
+ task,
208
+ attempts,
209
+ reason: `Goal task "${task.title}" is ready for worker attempt ${attempts}.`,
210
+ };
211
+ }
212
+ const completion = canCompleteGoalRun(run);
213
+ if (completion.ok) {
214
+ return { kind: "complete", reason: completion.reason };
215
+ }
216
+ const blockedEvidence = blockedEvidencePlanReason(run);
217
+ if (blockedEvidence) {
218
+ return { kind: "blocked", reason: blockedEvidence };
219
+ }
220
+ if (needsEvidenceInstrumentation(run)) {
221
+ if (run.verifier?.lastResult?.status === "pass") {
222
+ return {
223
+ kind: "blocked",
224
+ reason: "Verifier passed, but the Goal evidence plan is still not satisfied; blocking instead of creating repeated evidence-path workers.",
225
+ };
226
+ }
227
+ return {
228
+ kind: "create_task",
229
+ title: "Build Goal evidence path",
230
+ prompt: buildEvidencePlanTaskPrompt(run),
231
+ reason: "Goal evidence plan requires local instrumentation or exact prerequisite handling before verification.",
232
+ };
233
+ }
234
+ if (needsHarnessInstrumentation(run)) {
235
+ return {
236
+ kind: "create_task",
237
+ title: "Build Goal verification harness",
238
+ prompt: buildHarnessTaskPrompt(run),
239
+ reason: "Goal harness requires local instrumentation before verification.",
240
+ };
241
+ }
242
+ if (run.verifier?.lastResult?.status === "fail") {
243
+ if (hasRepeatedVerifierFailure(run)) {
244
+ return {
245
+ kind: "blocked",
246
+ reason: "Verifier produced the same failure repeatedly; pause for diagnosis before creating more fix tasks.",
247
+ };
248
+ }
249
+ const limit = options.verifierFixLimit ?? DEFAULT_GOAL_VERIFIER_FIX_LIMIT;
250
+ if (shouldCreateVerifierFixTask(run, limit)) {
251
+ return {
252
+ kind: "create_task",
253
+ title: "Fix verifier failure",
254
+ prompt: buildVerifierFailureTaskPrompt(run),
255
+ reason: `Verifier failed; creating bounded fix task ${verifierFixTaskCount(run) + 1}/${limit}.`,
256
+ };
257
+ }
258
+ return {
259
+ kind: "pause",
260
+ task: {
261
+ id: "verifier-fix-limit",
262
+ title: "Fix verifier failure",
263
+ prompt: "Verifier fix attempt limit reached.",
264
+ status: "blocked",
265
+ attempts: limit,
266
+ },
267
+ attempts: limit,
268
+ reason: `Verifier fix task limit reached (${limit}).`,
269
+ };
270
+ }
271
+ if (run.verifier?.command) {
272
+ return {
273
+ kind: "run_verifier",
274
+ command: run.verifier.command,
275
+ reason: "All Goal tasks are done; running configured verifier for real completion evidence.",
276
+ };
277
+ }
278
+ return {
279
+ kind: "create_task",
280
+ title: "Define Goal verifier",
281
+ prompt: buildVerifierTaskPrompt(run),
282
+ reason: "No pending Goal task or verifier command is configured.",
283
+ };
284
+ }
285
+ //# sourceMappingURL=goal-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-controller.js","sourceRoot":"","sources":["../../src/core/goal-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,GAG7B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAuDjD,SAAS,2BAA2B,CAAC,GAAY;IAC/C,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,sBAAsB,CAAC,GAAY;IAC1C,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO;SAC7B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAA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AC;QACD,OAAO;YACL,IAAI,EAAE,OAAO;YACb,IAAI,EAAE;gBACJ,EAAE,EAAE,oBAAoB;gBACxB,KAAK,EAAE,sBAAsB;gBAC7B,MAAM,EAAE,qCAAqC;gBAC7C,MAAM,EAAE,SAAS;gBACjB,QAAQ,EAAE,KAAK;aAChB;YACD,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,oCAAoC,KAAK,IAAI;SACtD,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QAC1B,OAAO;YACL,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO;YAC7B,MAAM,EAAE,oFAAoF;SAC7F,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,uBAAuB,CAAC,GAAG,CAAC;QACpC,MAAM,EAAE,yDAAyD;KAClE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=goal-controller.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-controller.test.d.ts","sourceRoot":"","sources":["../../src/core/goal-controller.test.ts"],"names":[],"mappings":""}