@alexkroman1/aai-cli 16.0.1 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/README.md +3 -2
  2. package/dist/{_build-target-55dJisQ-.mjs → _build-target-C08aM-Es.mjs} +511 -41
  3. package/dist/_build-target.d.ts +109 -2
  4. package/dist/_deno-target.d.ts +15 -14
  5. package/dist/_dev-env.d.ts +19 -13
  6. package/dist/{_dev-server-BzWB6-4y.mjs → _dev-server-CLU9xjH5.mjs} +27 -19
  7. package/dist/_dev-server.d.ts +4 -3
  8. package/dist/_dev-vite-config.d.ts +1 -1
  9. package/dist/_init.d.ts +39 -0
  10. package/dist/_modal-target.d.ts +11 -6
  11. package/dist/_preflight-CnW9QiE7.mjs +116 -0
  12. package/dist/_preflight.d.ts +110 -5
  13. package/dist/{_server-common-De0haHr9.mjs → _server-common-DAcv1nC5.mjs} +46 -2
  14. package/dist/_server-common.d.ts +39 -0
  15. package/dist/_target-bundle.d.ts +112 -0
  16. package/dist/_target-entry.d.ts +81 -0
  17. package/dist/{_templates-CuP74F8D.mjs → _templates-IMeKMVIj.mjs} +1 -1
  18. package/dist/{_vitest-runner-AVR9VtXh.mjs → _vitest-runner-CZNGj0ZC.mjs} +22 -17
  19. package/dist/_vitest-runner.d.ts +36 -24
  20. package/dist/{_workflow-determinism-CvpqMpdh.mjs → _workflow-determinism-CLxFQ5ox.mjs} +1 -1
  21. package/dist/_workflow-determinism.d.ts +1 -1
  22. package/dist/{build-ButI2IKc.mjs → build-DrQTSc2R.mjs} +187 -289
  23. package/dist/build.d.ts +88 -2
  24. package/dist/cli.mjs +20 -16
  25. package/dist/{deploy-CGqPU5U-.mjs → deploy-B68-x7xM.mjs} +14 -6
  26. package/dist/deploy.d.ts +9 -0
  27. package/dist/{dev-kodAY23K.mjs → dev-ChsrNHpK.mjs} +1 -1
  28. package/dist/dev.d.ts +1 -1
  29. package/dist/{eval-DvoSz7SZ.mjs → eval-DB07kTxO.mjs} +2 -2
  30. package/dist/init-W-4k-lCF.mjs +559 -0
  31. package/dist/init.d.ts +43 -3
  32. package/dist/scaffold/CLAUDE.md +87 -100
  33. package/dist/scaffold/package.json +6 -6
  34. package/dist/scaffold/vite.config.ts +29 -1
  35. package/dist/start.mjs +1 -1
  36. package/dist/{studio-CtRBVVFR.mjs → studio-DEAJGBXa.mjs} +20 -10
  37. package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.eval.test.ts +20 -6
  38. package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.ts +28 -0
  39. package/dist/templates/{hiring-desk → applicant-screening-agent}/crews.ts +1 -1
  40. package/dist/templates/{hiring-desk → applicant-screening-agent}/shared.ts +11 -11
  41. package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/screening_status.ts +1 -1
  42. package/dist/templates/{call-audit → call-audit-workflow}/agent.ts +4 -2
  43. package/dist/templates/{call-audit → call-audit-workflow}/client.tsx +3 -3
  44. package/dist/templates/{call-audit → call-audit-workflow}/guards.test.ts +2 -2
  45. package/dist/templates/{call-audit → call-audit-workflow}/workflows/summarize.ts +1 -1
  46. package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.eval.test.ts +3 -2
  47. package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.test.ts +1 -1
  48. package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.ts +1 -0
  49. package/dist/templates/coding-agent/agent.eval.test.ts +136 -0
  50. package/dist/templates/coding-agent/agent.test.ts +109 -0
  51. package/dist/templates/coding-agent/agent.ts +45 -0
  52. package/dist/templates/coding-agent/chat.ts +63 -0
  53. package/dist/templates/coding-agent/shared.ts +46 -0
  54. package/dist/templates/coding-agent/system-prompt.md +32 -0
  55. package/dist/templates/coding-agent/tools/bash.ts +6 -0
  56. package/dist/templates/coding-agent/tools/delete_file.ts +6 -0
  57. package/dist/templates/coding-agent/tools/edit_file.ts +6 -0
  58. package/dist/templates/coding-agent/tools/glob.ts +6 -0
  59. package/dist/templates/coding-agent/tools/grep.ts +6 -0
  60. package/dist/templates/coding-agent/tools/list_files.ts +6 -0
  61. package/dist/templates/coding-agent/tools/read_file.ts +6 -0
  62. package/dist/templates/coding-agent/tools/todo_write.ts +6 -0
  63. package/dist/templates/coding-agent/tools/write_file.ts +6 -0
  64. package/dist/templates/{pipeline-simple → custom-pipeline-agent}/agent.test.ts +2 -2
  65. package/dist/templates/{pipeline-simple → custom-pipeline-agent}/agent.ts +2 -1
  66. package/dist/templates/{pipeline-simple → custom-pipeline-agent}/modes.test.ts +1 -1
  67. package/dist/templates/{redline → document-redline-workflow}/agent.ts +4 -2
  68. package/dist/templates/{redline → document-redline-workflow}/client.tsx +1 -1
  69. package/dist/templates/{redline → document-redline-workflow}/workflows/redline.ts +1 -1
  70. package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.test.ts +104 -1
  71. package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.ts +15 -0
  72. package/dist/templates/{dispatch-center → emergency-dispatch-agent}/events.ts +1 -1
  73. package/dist/templates/emergency-dispatch-agent/guardrails.ts +105 -0
  74. package/dist/templates/{dispatch-center → emergency-dispatch-agent}/system-prompt.md +1 -0
  75. package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_create.ts +1 -1
  76. package/dist/templates/{night-owl → entertainment-picks-agent}/agent.eval.test.ts +8 -1
  77. package/dist/templates/{night-owl → entertainment-picks-agent}/agent.test.ts +1 -1
  78. package/dist/templates/{night-owl → entertainment-picks-agent}/agent.ts +1 -0
  79. package/dist/templates/{night-owl → entertainment-picks-agent}/client.tsx +1 -1
  80. package/dist/templates/{night-owl → entertainment-picks-agent}/system-prompt.md +6 -0
  81. package/dist/templates/{night-owl → entertainment-picks-agent}/tools/revisit.ts +7 -0
  82. package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.eval.test.ts +84 -23
  83. package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.ts +1 -0
  84. package/dist/templates/{executive-assistant → executive-inbox-agent}/meeting.ts +2 -2
  85. package/dist/templates/{executive-assistant → executive-inbox-agent}/prompts.ts +3 -1
  86. package/dist/templates/{executive-assistant → executive-inbox-agent}/shared.ts +2 -2
  87. package/dist/templates/{executive-assistant → executive-inbox-agent}/system-prompt.md +3 -3
  88. package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/meeting_assistant.ts +3 -3
  89. package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/open_email.ts +8 -16
  90. package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/send_calendar_invite.ts +1 -1
  91. package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.eval.test.ts +85 -21
  92. package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.test.ts +2 -1
  93. package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.ts +6 -3
  94. package/dist/templates/{hotel-desk → hotel-reception-agent}/client.tsx +14 -2
  95. package/dist/templates/{hotel-desk → hotel-reception-agent}/concierge.ts +3 -2
  96. package/dist/templates/{hotel-desk → hotel-reception-agent}/desk-seams.test.ts +2 -1
  97. package/dist/templates/{hotel-desk → hotel-reception-agent}/disputes.ts +9 -11
  98. package/dist/templates/{hotel-desk → hotel-reception-agent}/events.ts +2 -1
  99. package/dist/templates/hotel-reception-agent/session.ts +56 -0
  100. package/dist/templates/{hotel-desk → hotel-reception-agent}/shared.ts +21 -22
  101. package/dist/templates/{hotel-desk → hotel-reception-agent}/system-prompt.md +1 -1
  102. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/abandon_booking.ts +2 -1
  103. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/add_to_waitlist.ts +2 -1
  104. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_airport_car.ts +2 -1
  105. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/cancel_restaurant_reservation.ts +2 -1
  106. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/cancel_room_booking.ts +2 -1
  107. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/check_restaurant_availability.ts +1 -1
  108. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/check_room_availability.ts +1 -1
  109. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/choose_room.ts +1 -1
  110. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/confirm_booking.ts +2 -1
  111. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/dispatch_emergency.ts +2 -1
  112. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/dispute_charge.ts +2 -1
  113. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/flag_late_arrival.ts +2 -1
  114. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_booking.ts +2 -1
  115. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_guest_history.ts +1 -1
  116. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_invoice.ts +2 -1
  117. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_restaurant_reservation.ts +1 -1
  118. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/modify_restaurant_reservation.ts +1 -1
  119. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_card.ts +1 -1
  120. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_followup.ts +2 -1
  121. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_group_inquiry.ts +2 -1
  122. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_guest_details.ts +1 -1
  123. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/reinstate_booking.ts +1 -1
  124. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/request_flight_reconfirmation.ts +2 -1
  125. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/resend_confirmation.ts +2 -1
  126. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/reserve_table.ts +1 -1
  127. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/resolve_room_conflict.ts +2 -1
  128. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/schedule_wakeup_call.ts +2 -1
  129. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_do_not_disturb.ts +2 -1
  130. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_extras.ts +1 -1
  131. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_stay.ts +2 -1
  132. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/start_booking_modification.ts +2 -1
  133. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/start_room_booking.ts +2 -1
  134. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/take_guest_message.ts +2 -1
  135. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/transfer_call.ts +2 -1
  136. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/update_card.ts +2 -1
  137. package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/verify_booking.ts +2 -1
  138. package/dist/templates/{link-digest → link-digest-workflow}/agent.eval.test.ts +16 -1
  139. package/dist/templates/{link-digest → link-digest-workflow}/agent.test.ts +2 -2
  140. package/dist/templates/{link-digest → link-digest-workflow}/agent.ts +8 -3
  141. package/dist/templates/{link-digest → link-digest-workflow}/client.tsx +2 -2
  142. package/dist/templates/{link-digest → link-digest-workflow}/workflows/digest.ts +1 -1
  143. package/dist/templates/{health-assistant → medication-safety-agent}/agent.test.ts +55 -1
  144. package/dist/templates/medication-safety-agent/agent.ts +62 -0
  145. package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.test.ts +4 -4
  146. package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.ts +5 -1
  147. package/dist/templates/{recap-workflow → meeting-recap-agent}/workflows/recap.ts +3 -3
  148. package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.ts +3 -0
  149. package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.eval.test.ts +1 -1
  150. package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.test.ts +1 -1
  151. package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.ts +6 -2
  152. package/dist/templates/{podcast-digest → podcast-digest-workflow}/client.tsx +3 -3
  153. package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/digest.ts +1 -1
  154. package/dist/templates/{simple → quickstart-agent}/agent.eval.test.ts +39 -3
  155. package/dist/templates/{simple → quickstart-agent}/agent.test.ts +25 -3
  156. package/dist/templates/quickstart-agent/agent.ts +24 -0
  157. package/dist/templates/quickstart-agent/system-prompt.md +8 -0
  158. package/dist/templates/quickstart-agent/tools/get_weather.ts +59 -0
  159. package/dist/templates/{research-workflow → research-handoff-agent}/agent.test.ts +1 -1
  160. package/dist/templates/{research-workflow → research-handoff-agent}/agent.ts +5 -1
  161. package/dist/templates/{research-workflow → research-handoff-agent}/workflows/filing.ts +1 -1
  162. package/dist/templates/{research-workflow → research-handoff-agent}/workflows/research.ts +1 -1
  163. package/dist/templates/{research-workflow → research-handoff-agent}/workflows/review.ts +1 -1
  164. package/dist/templates/{plan-and-execute → research-planner-agent}/agent.eval.test.ts +24 -2
  165. package/dist/templates/{plan-and-execute → research-planner-agent}/agent.ts +3 -0
  166. package/dist/templates/{plan-and-execute → research-planner-agent}/shared.ts +1 -1
  167. package/dist/templates/{plan-and-execute → research-planner-agent}/system-prompt.md +1 -1
  168. package/dist/templates/{retail → retail-orders-agent}/agent.ts +32 -3
  169. package/dist/templates/retail-orders-agent/keyterms.ts +154 -0
  170. package/dist/templates/{retail → retail-orders-agent}/pending.ts +2 -2
  171. package/dist/templates/{retail → retail-orders-agent}/resolve.ts +18 -3
  172. package/dist/templates/{retail → retail-orders-agent}/shared.ts +1 -1
  173. package/dist/templates/{retail → retail-orders-agent}/store.ts +3 -3
  174. package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.eval.test.ts +37 -5
  175. package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.test.ts +38 -6
  176. package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.ts +5 -1
  177. package/dist/templates/{roadside-assist → roadside-assistance-agent}/call.ts +1 -1
  178. package/dist/templates/{roadside-assist → roadside-assistance-agent}/shared.ts +15 -3
  179. package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/acknowledge_disclosure.ts +14 -0
  180. package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/dispatch_truck.ts +1 -1
  181. package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/lookup_coverage.ts +11 -0
  182. package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/service_disclosure.ts +17 -11
  183. package/dist/templates/{roadside-assist → roadside-assistance-agent}/yard.test.ts +4 -0
  184. package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.test.ts +1 -1
  185. package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.ts +5 -1
  186. package/dist/templates/{spoken-summary → spoken-summary-workflow}/client.tsx +1 -1
  187. package/dist/templates/{spoken-summary → spoken-summary-workflow}/workflows/summarize.ts +1 -1
  188. package/dist/templates/{solo-rpg → tabletop-rpg-agent}/agent.eval.test.ts +6 -0
  189. package/dist/templates/{solo-rpg → tabletop-rpg-agent}/agent.test.ts +125 -1
  190. package/dist/templates/tabletop-rpg-agent/agent.ts +58 -0
  191. package/dist/templates/{solo-rpg → tabletop-rpg-agent}/shared.ts +84 -3
  192. package/dist/templates/{solo-rpg → tabletop-rpg-agent}/system-prompt.md +1 -1
  193. package/dist/templates/tabletop-rpg-agent/tools/check_state.ts +37 -0
  194. package/dist/templates/{support-line → technical-support-agent}/agent.test.ts +3 -3
  195. package/dist/templates/{support-line → technical-support-agent}/agent.ts +5 -1
  196. package/dist/templates/technical-support-agent/knowledge.ts +165 -0
  197. package/dist/templates/{support-line → technical-support-agent}/nodes.ts +3 -2
  198. package/dist/templates/{support-line → technical-support-agent}/procedure.ts +4 -3
  199. package/dist/templates/technical-support-agent/shared.ts +145 -0
  200. package/dist/templates/{support-line → technical-support-agent}/tools/list_topics.ts +2 -1
  201. package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.eval.test.ts +39 -6
  202. package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.test.ts +79 -1
  203. package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.ts +30 -1
  204. package/dist/templates/{infocom-adventure → text-adventure-agent}/client.tsx +2 -2
  205. package/dist/templates/{infocom-adventure → text-adventure-agent}/shared.ts +37 -0
  206. package/dist/templates/{infocom-adventure → text-adventure-agent}/system-prompt.md +9 -2
  207. package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.eval.test.ts +21 -7
  208. package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.test.ts +23 -11
  209. package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.ts +5 -2
  210. package/dist/templates/{briefing-desk → topic-briefing-agent}/shared.ts +11 -11
  211. package/dist/templates/{briefing-desk → topic-briefing-agent}/slack.ts +1 -1
  212. package/dist/templates/{briefing-desk → topic-briefing-agent}/system-prompt.md +13 -8
  213. package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/send_briefing.ts +43 -5
  214. package/dist/templates/transcription-workflow/agent.test.ts +1 -1
  215. package/dist/templates/transcription-workflow/agent.ts +4 -1
  216. package/dist/templates/transcription-workflow/client.tsx +1 -1
  217. package/dist/templates/transcription-workflow/workflows/batch.ts +2 -2
  218. package/dist/templates/transcription-workflow/workflows/transcribe.ts +1 -1
  219. package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.ts +4 -0
  220. package/dist/templates/{travel-concierge → travel-concierge-agent}/shared.ts +1 -1
  221. package/dist/templates/{web-researcher → web-research-agent}/agent.eval.test.ts +32 -6
  222. package/dist/templates/{web-researcher → web-research-agent}/agent.test.ts +17 -1
  223. package/dist/templates/{web-researcher → web-research-agent}/agent.ts +31 -1
  224. package/dist/templates/{web-researcher → web-research-agent}/system-prompt.md +8 -2
  225. package/dist/templates/{word-wrangler → word-game-agent}/agent.eval.test.ts +79 -18
  226. package/dist/templates/{word-wrangler → word-game-agent}/agent.ts +20 -0
  227. package/dist/templates/{word-wrangler → word-game-agent}/game.ts +1 -1
  228. package/dist/templates/{word-wrangler → word-game-agent}/shared.ts +1 -1
  229. package/dist/test-CjKPQ9_B.mjs +102 -0
  230. package/dist/test.d.ts +37 -12
  231. package/package.json +5 -5
  232. package/dist/_init-BzQbV8Zh.mjs +0 -199
  233. package/dist/_preflight-CcAR577V.mjs +0 -46
  234. package/dist/init-D363Ls5u.mjs +0 -183
  235. package/dist/templates/health-assistant/agent.ts +0 -15
  236. package/dist/templates/simple/agent.ts +0 -8
  237. package/dist/templates/solo-rpg/agent.ts +0 -29
  238. package/dist/templates/solo-rpg/tools/check_state.ts +0 -28
  239. package/dist/templates/support-line/shared.ts +0 -281
  240. package/dist/test-Cllnx81G.mjs +0 -83
  241. /package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.test.ts +0 -0
  242. /package/dist/templates/{hiring-desk → applicant-screening-agent}/client.tsx +0 -0
  243. /package/dist/templates/{hiring-desk → applicant-screening-agent}/leads.json +0 -0
  244. /package/dist/templates/{hiring-desk → applicant-screening-agent}/screening-lock.test.ts +0 -0
  245. /package/dist/templates/{hiring-desk → applicant-screening-agent}/screening-lock.ts +0 -0
  246. /package/dist/templates/{hiring-desk → applicant-screening-agent}/system-prompt.md +0 -0
  247. /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/candidate_details.ts +0 -0
  248. /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/proceed_to_emails.ts +0 -0
  249. /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/read_email.ts +0 -0
  250. /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/rescore_with_feedback.ts +0 -0
  251. /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/screen_candidates.ts +0 -0
  252. /package/dist/templates/{call-audit → call-audit-workflow}/agent.eval.test.ts +0 -0
  253. /package/dist/templates/{call-audit → call-audit-workflow}/agent.test.ts +0 -0
  254. /package/dist/templates/{call-audit → call-audit-workflow}/workflows/audit.ts +0 -0
  255. /package/dist/templates/{call-audit → call-audit-workflow}/workflows/ingest.ts +0 -0
  256. /package/dist/templates/{call-audit → call-audit-workflow}/workflows/media.ts +0 -0
  257. /package/dist/templates/{call-audit → call-audit-workflow}/workflows/sync-api.ts +0 -0
  258. /package/dist/templates/{code-interpreter → code-interpreter-agent}/system-prompt.md +0 -0
  259. /package/dist/templates/{pipeline-simple → custom-pipeline-agent}/agent.eval.test.ts +0 -0
  260. /package/dist/templates/{pipeline-simple → custom-pipeline-agent}/stages.test.ts +0 -0
  261. /package/dist/templates/{redline → document-redline-workflow}/agent.eval.test.ts +0 -0
  262. /package/dist/templates/{redline → document-redline-workflow}/agent.test.ts +0 -0
  263. /package/dist/templates/{redline → document-redline-workflow}/form.ts +0 -0
  264. /package/dist/templates/{redline → document-redline-workflow}/workflows/prompts.ts +0 -0
  265. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.eval.test.ts +0 -0
  266. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/client.tsx +0 -0
  267. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/shared.ts +0 -0
  268. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_add_note.ts +0 -0
  269. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_escalate.ts +0 -0
  270. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_get.ts +0 -0
  271. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_triage.ts +0 -0
  272. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_update_status.ts +0 -0
  273. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_dashboard.ts +0 -0
  274. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_protocols.ts +0 -0
  275. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_run_scenario.ts +0 -0
  276. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_dispatch.ts +0 -0
  277. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_get_available.ts +0 -0
  278. /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_update_status.ts +0 -0
  279. /package/dist/templates/{night-owl → entertainment-picks-agent}/shared.ts +0 -0
  280. /package/dist/templates/{night-owl → entertainment-picks-agent}/tools/recommend.ts +0 -0
  281. /package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.test.ts +0 -0
  282. /package/dist/templates/{executive-assistant → executive-inbox-agent}/calendar.test.ts +0 -0
  283. /package/dist/templates/{executive-assistant → executive-inbox-agent}/client.tsx +0 -0
  284. /package/dist/templates/{executive-assistant → executive-inbox-agent}/inbox.ts +0 -0
  285. /package/dist/templates/{executive-assistant → executive-inbox-agent}/nodes.ts +0 -0
  286. /package/dist/templates/{executive-assistant → executive-inbox-agent}/review.ts +0 -0
  287. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/accept.ts +0 -0
  288. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/ask_question.ts +0 -0
  289. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/draft_reply.ts +0 -0
  290. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/edit.ts +0 -0
  291. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/ignore.ts +0 -0
  292. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/inbox_status.ts +0 -0
  293. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/new_email.ts +0 -0
  294. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/respond.ts +0 -0
  295. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/review_memory.ts +0 -0
  296. /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/triage_inbox.ts +0 -0
  297. /package/dist/templates/{hotel-desk → hotel-reception-agent}/booking.ts +0 -0
  298. /package/dist/templates/{hotel-desk → hotel-reception-agent}/card.ts +0 -0
  299. /package/dist/templates/{hotel-desk → hotel-reception-agent}/catalogs.ts +0 -0
  300. /package/dist/templates/{hotel-desk → hotel-reception-agent}/desk.ts +0 -0
  301. /package/dist/templates/{hotel-desk → hotel-reception-agent}/hotel.ts +0 -0
  302. /package/dist/templates/{hotel-desk → hotel-reception-agent}/policies.ts +0 -0
  303. /package/dist/templates/{hotel-desk → hotel-reception-agent}/records.ts +0 -0
  304. /package/dist/templates/{hotel-desk → hotel-reception-agent}/restaurant.ts +0 -0
  305. /package/dist/templates/{hotel-desk → hotel-reception-agent}/seed.ts +0 -0
  306. /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_business_center.ts +0 -0
  307. /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_spa_appointment.ts +0 -0
  308. /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_tour.ts +0 -0
  309. /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_policy.ts +0 -0
  310. /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/order_flowers.ts +0 -0
  311. /package/dist/templates/{link-digest → link-digest-workflow}/api-client.ts +0 -0
  312. /package/dist/templates/{health-assistant → medication-safety-agent}/agent.eval.test.ts +0 -0
  313. /package/dist/templates/{health-assistant → medication-safety-agent}/fda.test.ts +0 -0
  314. /package/dist/templates/{health-assistant → medication-safety-agent}/fda.ts +0 -0
  315. /package/dist/templates/{health-assistant → medication-safety-agent}/system-prompt.md +0 -0
  316. /package/dist/templates/{health-assistant → medication-safety-agent}/tools/check_drug_interaction.ts +0 -0
  317. /package/dist/templates/{health-assistant → medication-safety-agent}/tools/medication_lookup.ts +0 -0
  318. /package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.eval.test.ts +0 -0
  319. /package/dist/templates/{recap-workflow → meeting-recap-agent}/shared.ts +0 -0
  320. /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/cancel_recap.ts +0 -0
  321. /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/keep_transcript.ts +0 -0
  322. /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/recap_progress.ts +0 -0
  323. /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/recap_status.ts +0 -0
  324. /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/request_recap.ts +0 -0
  325. /package/dist/templates/{recap-workflow → meeting-recap-agent}/workflows/tokens.ts +0 -0
  326. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.eval.test.ts +0 -0
  327. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.test.ts +0 -0
  328. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/client.tsx +0 -0
  329. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/shared.ts +0 -0
  330. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/system-prompt.md +0 -0
  331. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/add_pizza.ts +0 -0
  332. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/place_order.ts +0 -0
  333. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/remove_pizza.ts +0 -0
  334. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/set_customer_name.ts +0 -0
  335. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/update_pizza.ts +0 -0
  336. /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/view_order.ts +0 -0
  337. /package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/feeds.ts +0 -0
  338. /package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/slack.ts +0 -0
  339. /package/dist/templates/{research-workflow → research-handoff-agent}/agent.eval.test.ts +0 -0
  340. /package/dist/templates/{research-workflow → research-handoff-agent}/shared.ts +0 -0
  341. /package/dist/templates/{research-workflow → research-handoff-agent}/tools/file_it_now.ts +0 -0
  342. /package/dist/templates/{research-workflow → research-handoff-agent}/tools/request_research.ts +0 -0
  343. /package/dist/templates/{research-workflow → research-handoff-agent}/tools/research_progress.ts +0 -0
  344. /package/dist/templates/{research-workflow → research-handoff-agent}/tools/research_status.ts +0 -0
  345. /package/dist/templates/{research-workflow → research-handoff-agent}/workflows/notes.ts +0 -0
  346. /package/dist/templates/{research-workflow → research-handoff-agent}/workflows/prompts.ts +0 -0
  347. /package/dist/templates/{plan-and-execute → research-planner-agent}/agent.test.ts +0 -0
  348. /package/dist/templates/{plan-and-execute → research-planner-agent}/client.tsx +0 -0
  349. /package/dist/templates/{plan-and-execute → research-planner-agent}/procedure.ts +0 -0
  350. /package/dist/templates/{plan-and-execute → research-planner-agent}/prompts.ts +0 -0
  351. /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/plan_status.ts +0 -0
  352. /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/revise_plan.ts +0 -0
  353. /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/start_plan.ts +0 -0
  354. /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/work_next_step.ts +0 -0
  355. /package/dist/templates/{retail → retail-orders-agent}/address.ts +0 -0
  356. /package/dist/templates/{retail → retail-orders-agent}/agent.eval.test.ts +0 -0
  357. /package/dist/templates/{retail → retail-orders-agent}/agent.test.ts +0 -0
  358. /package/dist/templates/{retail → retail-orders-agent}/authenticate.ts +0 -0
  359. /package/dist/templates/{retail → retail-orders-agent}/cancel.ts +0 -0
  360. /package/dist/templates/{retail → retail-orders-agent}/client.tsx +0 -0
  361. /package/dist/templates/{retail → retail-orders-agent}/payment.ts +0 -0
  362. /package/dist/templates/{retail → retail-orders-agent}/pending.test.ts +0 -0
  363. /package/dist/templates/{retail → retail-orders-agent}/refund.ts +0 -0
  364. /package/dist/templates/{retail → retail-orders-agent}/registry.test.ts +0 -0
  365. /package/dist/templates/{retail → retail-orders-agent}/resolve.test.ts +0 -0
  366. /package/dist/templates/{retail → retail-orders-agent}/returns.ts +0 -0
  367. /package/dist/templates/{retail → retail-orders-agent}/seed.json +0 -0
  368. /package/dist/templates/{retail → retail-orders-agent}/seed.test.ts +0 -0
  369. /package/dist/templates/{retail → retail-orders-agent}/shared.test.ts +0 -0
  370. /package/dist/templates/{retail → retail-orders-agent}/store.test.ts +0 -0
  371. /package/dist/templates/{retail → retail-orders-agent}/swap.test.ts +0 -0
  372. /package/dist/templates/{retail → retail-orders-agent}/swap.ts +0 -0
  373. /package/dist/templates/{retail → retail-orders-agent}/system-prompt.md +0 -0
  374. /package/dist/templates/{retail → retail-orders-agent}/tools/cancel_change.ts +0 -0
  375. /package/dist/templates/{retail → retail-orders-agent}/tools/cancel_pending_order.ts +0 -0
  376. /package/dist/templates/{retail → retail-orders-agent}/tools/confirm_change.ts +0 -0
  377. /package/dist/templates/{retail → retail-orders-agent}/tools/exchange_delivered_order_items.ts +0 -0
  378. /package/dist/templates/{retail → retail-orders-agent}/tools/find_user_id_by_email.ts +0 -0
  379. /package/dist/templates/{retail → retail-orders-agent}/tools/find_user_id_by_name_zip.ts +0 -0
  380. /package/dist/templates/{retail → retail-orders-agent}/tools/get_item_details.ts +0 -0
  381. /package/dist/templates/{retail → retail-orders-agent}/tools/get_order_details.ts +0 -0
  382. /package/dist/templates/{retail → retail-orders-agent}/tools/get_product_details.ts +0 -0
  383. /package/dist/templates/{retail → retail-orders-agent}/tools/get_user_details.ts +0 -0
  384. /package/dist/templates/{retail → retail-orders-agent}/tools/list_all_product_types.ts +0 -0
  385. /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_address.ts +0 -0
  386. /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_items.ts +0 -0
  387. /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_payment.ts +0 -0
  388. /package/dist/templates/{retail → retail-orders-agent}/tools/modify_user_address.ts +0 -0
  389. /package/dist/templates/{retail → retail-orders-agent}/tools/return_delivered_order_items.ts +0 -0
  390. /package/dist/templates/{retail → retail-orders-agent}/tools/transfer_to_human_agents.ts +0 -0
  391. /package/dist/templates/{roadside-assist → roadside-assistance-agent}/events.ts +0 -0
  392. /package/dist/templates/{roadside-assist → roadside-assistance-agent}/system-prompt.md +0 -0
  393. /package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/job_status.ts +0 -0
  394. /package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/report_location.ts +0 -0
  395. /package/dist/templates/{roadside-assist → roadside-assistance-agent}/yard.ts +0 -0
  396. /package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.eval.test.ts +0 -0
  397. /package/dist/templates/{spoken-summary → spoken-summary-workflow}/workflows/transcribe.ts +0 -0
  398. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/client.tsx +0 -0
  399. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/action_roll.ts +0 -0
  400. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/burn_momentum.ts +0 -0
  401. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/oracle.ts +0 -0
  402. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/setup_character.ts +0 -0
  403. /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/update_state.ts +0 -0
  404. /package/dist/templates/{support-line → technical-support-agent}/agent.eval.test.ts +0 -0
  405. /package/dist/templates/{support-line → technical-support-agent}/client.tsx +0 -0
  406. /package/dist/templates/{support-line → technical-support-agent}/knowledge.json +0 -0
  407. /package/dist/templates/{support-line → technical-support-agent}/prompts.ts +0 -0
  408. /package/dist/templates/{support-line → technical-support-agent}/system-prompt.md +0 -0
  409. /package/dist/templates/{support-line → technical-support-agent}/tools/answer_question.ts +0 -0
  410. /package/dist/templates/{support-line → technical-support-agent}/tools/log_ticket.ts +0 -0
  411. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_drop.ts +0 -0
  412. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_flag.ts +0 -0
  413. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_get.ts +0 -0
  414. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_move.ts +0 -0
  415. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_restart.ts +0 -0
  416. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_score.ts +0 -0
  417. /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_take.ts +0 -0
  418. /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/briefing_so_far.ts +0 -0
  419. /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/research_topic.ts +0 -0
  420. /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/verify_claim.ts +0 -0
  421. /package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.eval.test.ts +0 -0
  422. /package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.test.ts +0 -0
  423. /package/dist/templates/{travel-concierge → travel-concierge-agent}/call-events.ts +0 -0
  424. /package/dist/templates/{travel-concierge → travel-concierge-agent}/client.tsx +0 -0
  425. /package/dist/templates/{travel-concierge → travel-concierge-agent}/routing.ts +0 -0
  426. /package/dist/templates/{travel-concierge → travel-concierge-agent}/system-prompt.md +0 -0
  427. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_car_rental.ts +0 -0
  428. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_excursion.ts +0 -0
  429. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_hotel.ts +0 -0
  430. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/cancel_action.ts +0 -0
  431. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/cancel_ticket.ts +0 -0
  432. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/complete_or_escalate.ts +0 -0
  433. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/confirm_action.ts +0 -0
  434. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/lookup_booking.ts +0 -0
  435. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_car_rentals.ts +0 -0
  436. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_excursions.ts +0 -0
  437. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_flights.ts +0 -0
  438. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_hotels.ts +0 -0
  439. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_car_rental_assistant.ts +0 -0
  440. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_excursion_assistant.ts +0 -0
  441. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_flight_assistant.ts +0 -0
  442. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_hotel_assistant.ts +0 -0
  443. /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/update_ticket.ts +0 -0
  444. /package/dist/templates/{word-wrangler → word-game-agent}/agent.test.ts +0 -0
  445. /package/dist/templates/{word-wrangler → word-game-agent}/client.tsx +0 -0
  446. /package/dist/templates/{word-wrangler → word-game-agent}/guess.ts +0 -0
  447. /package/dist/templates/{word-wrangler → word-game-agent}/player.ts +0 -0
  448. /package/dist/templates/{word-wrangler → word-game-agent}/system-prompt.md +0 -0
  449. /package/dist/templates/{word-wrangler → word-game-agent}/tools/final_score.ts +0 -0
  450. /package/dist/templates/{word-wrangler → word-game-agent}/tools/relay_description.ts +0 -0
  451. /package/dist/templates/{word-wrangler → word-game-agent}/tools/repeat_word.ts +0 -0
  452. /package/dist/templates/{word-wrangler → word-game-agent}/tools/skip_word.ts +0 -0
  453. /package/dist/templates/{word-wrangler → word-game-agent}/tools/start_game.ts +0 -0
  454. /package/dist/templates/{word-wrangler → word-game-agent}/words.ts +0 -0
@@ -21,7 +21,16 @@
21
21
  * so could reject — moving the config to where it is authored costs that
22
22
  * accuracy, and a false rejection is worse than a false warning: it blocks a
23
23
  * deploy that would have worked.
24
+ *
25
+ * **The telephony half is here for the same reason and warns for a different
26
+ * failure.** A declared carrier's signing secret being absent does not stop the
27
+ * agent — it serves that carrier's webhook with verification OFF — so it is a
28
+ * silent outcome rather than a loud one, which is exactly why nothing else was
29
+ * going to report it. `telephonyWebhooks` sits beside it because both readers
30
+ * need the same declaration and this module is already where the normalized
31
+ * config is unpacked.
24
32
  */
33
+ import type { TelephonyCarrier } from "@alexkroman1/aai";
25
34
  import { requiredProviderEnvVars } from "@alexkroman1/aai-runtime";
26
35
  /**
27
36
  * The config shape read out of a bundle's `__aaiConfig` export: the provider
@@ -42,16 +51,112 @@ import { requiredProviderEnvVars } from "@alexkroman1/aai-runtime";
42
51
  */
43
52
  export type PreflightConfig = Parameters<typeof requiredProviderEnvVars>[0] & {
44
53
  requiredEnv?: readonly string[] | undefined;
54
+ /**
55
+ * `AgentDef.telephony`, for {@link missingTelephonySecrets} and
56
+ * {@link telephonyWebhooks}. Serializable like `page` is, so it survives the
57
+ * trip through `__aaiConfig` — see `packages/aai/src/sdk/telephony-config.ts`.
58
+ *
59
+ * `readonly string[]` rather than `TelephonyAccess`'s carrier union, and
60
+ * deliberately: this value was JSON on the way here, written by whichever
61
+ * SDK built the bundle, so a name this build has never heard of is a case
62
+ * that HAPPENS rather than one a cast has to manufacture.
63
+ * {@link declaredCarriers} filters against `TELEPHONY_CARRIERS` for exactly
64
+ * that reason, and typing the field narrower than the data made its own
65
+ * test unwritable without erasing the type.
66
+ */
67
+ telephony?: boolean | readonly string[] | undefined;
45
68
  };
69
+ /**
70
+ * Every env var name the agent needs to start: provider credentials derived
71
+ * from the stt/llm/tts/s2s descriptors (the same registry-backed derivation the
72
+ * runtime resolves keys with), plus the agent's own declared `requiredEnv` — an
73
+ * `agent()` field for custom keys tools read from `ctx.env`, which no static
74
+ * derivation can see.
75
+ *
76
+ * **Named on its own because the CLI has TWO deploy paths and only one of them
77
+ * used to ask.** `missingDeployEnv` (`build.ts`, the `--target` hosts) derived
78
+ * its list from `.env.example` alone, so an agent declaring
79
+ * `requiredEnv: ["ORDERS_API_KEY"]` and no example entry got neither a warning
80
+ * nor an `env add` step for it — while the managed path below saw both sources.
81
+ * One derivation, two callers; each applies its own "what counts as supplied".
82
+ */
83
+ export declare function requiredEnvNames(config: PreflightConfig): string[];
46
84
  /**
47
85
  * Env var names the agent needs that the env being uploaded doesn't supply.
48
86
  * Empty values count as missing — an empty credential authenticates nothing.
49
- *
50
- * Two sources: provider credentials derived from the stt/llm/tts/s2s
51
- * descriptors (the same registry-backed derivation the runtime resolves keys
52
- * with), and the agent's own declared `requiredEnv` — an `agent()` field for
53
- * custom keys tools read from `ctx.env`, which no static derivation can see.
54
87
  */
55
88
  export declare function missingCredentials(config: PreflightConfig, env: Record<string, string>): string[];
56
89
  /** One line naming the missing keys and what to do about them. */
57
90
  export declare function missingCredentialMessage(missing: string[]): string;
91
+ /**
92
+ * The webhook-signing secret each carrier's requests are verified with —
93
+ * `phone-signature.ts`'s `TWILIO_AUTH_TOKEN_SECRET` / `TELNYX_PUBLIC_KEY_SECRET`
94
+ * from the reading end.
95
+ *
96
+ * Copied rather than imported: those constants live in `aai-server`, which the
97
+ * CLI may never import (see "Dependency flow" in `AGENTS.md`). `satisfies` is
98
+ * what keeps the copy total — a carrier added to `TELEPHONY_CARRIERS` with no
99
+ * secret named here fails this package's build rather than deploying a phone
100
+ * number nothing warns about.
101
+ */
102
+ export declare const CARRIER_SIGNING_SECRETS: {
103
+ readonly twilio: "TWILIO_AUTH_TOKEN";
104
+ readonly telnyx: "TELNYX_PUBLIC_KEY";
105
+ };
106
+ /**
107
+ * The carriers a declaration admits, in `TELEPHONY_CARRIERS` order.
108
+ *
109
+ * The same resolution the runtime's `enabledCarriers` performs — `false`, `[]`
110
+ * and an absent field all mean the route is not served, `true` means every
111
+ * carrier this build ships a codec for, and a name this build does not know is
112
+ * DROPPED. It is re-derived here only because that function is `@internal` to
113
+ * `aai-runtime` and reaches no published subpath; keep the two in step.
114
+ */
115
+ export declare function declaredCarriers(config: PreflightConfig): TelephonyCarrier[];
116
+ /**
117
+ * Declared carriers whose signing secret the env being uploaded doesn't
118
+ * supply — the phone half of {@link missingCredentials}, and a separate
119
+ * function because the failure is a separate one.
120
+ *
121
+ * A missing provider key stops the agent starting; a missing signing secret
122
+ * lets it start and serve a phone number with **verification off**. Signature
123
+ * checking is enabled BY PRESENCE (`phone-signature.ts`), so the absence is
124
+ * silent at every layer: the deploy succeeds, the call connects, and nothing
125
+ * anywhere says the webhook is unauthenticated. That is the one thing about a
126
+ * declared carrier the CLI knows and the platform cannot — the platform stores
127
+ * no agent config — so it is said here or nowhere.
128
+ *
129
+ * Empty values count as missing for the reason they do above, and for one more:
130
+ * `verifyPhoneWebhook` reads the stored value, and a blank secret is a check
131
+ * that cannot pass rather than one that is off.
132
+ */
133
+ export declare function missingTelephonySecrets(config: PreflightConfig, env: Record<string, string>): {
134
+ carrier: TelephonyCarrier;
135
+ secret: string;
136
+ }[];
137
+ /** One line per carrier whose signing secret is absent. */
138
+ export declare function missingTelephonySecretWarnings(missing: readonly {
139
+ carrier: TelephonyCarrier;
140
+ secret: string;
141
+ }[]): string[];
142
+ /**
143
+ * The webhook URL to paste into each declared carrier's phone-number
144
+ * configuration, `?carrier=` already filled in.
145
+ *
146
+ * Printed because both halves are things a user is otherwise asked to
147
+ * reconstruct by hand, and getting either wrong produces a failure that names
148
+ * neither: the platform's phone route defaults `carrier` to `"twilio"` against
149
+ * a hardcoded set and never consults the agent's declaration, so a Telnyx
150
+ * number reached without the query parameter is verified against Twilio's
151
+ * scheme and answers `403 Invalid webhook signature`. The parameter cannot be
152
+ * inferred server-side — `BundleStore` deliberately holds no agent config — and
153
+ * it does not have to be, because the declaration is in hand right here.
154
+ *
155
+ * The path and the parameter name come from `aai-runtime`'s own constants
156
+ * rather than from string literals, so a route rename cannot leave this
157
+ * printing a URL that 404s.
158
+ */
159
+ export declare function telephonyWebhooks(config: PreflightConfig, agentUrl: string): {
160
+ carrier: TelephonyCarrier;
161
+ url: string;
162
+ }[];
@@ -34,7 +34,20 @@ async function readDotenv(file) {
34
34
  * and treating the example as a declaration would surface a key they have not
35
35
  * filled in yet as one they have.
36
36
  */
37
- const DEPLOY_ENV_FILES = [".env.example", ".env"];
37
+ /**
38
+ * The one dotenv file that SHIPS — copied into a target's deployment artifact
39
+ * (`RUNTIME_FILES` in `_vercel-output.ts`) because it declares which variables
40
+ * become `ctx.env`.
41
+ *
42
+ * Named on its own because "what does the deployment declare" and "what can
43
+ * this machine resolve" are different questions with different answers, and a
44
+ * build that asks the second when it means the first cannot see the failure
45
+ * `missingDeployEnv` exists to report: `.env` is present in a host's BUILD
46
+ * workspace and absent from its RUNTIME, so a value read from there suppresses
47
+ * a warning about a variable the deployed function will never see.
48
+ */
49
+ const DEPLOY_ENV_DECLARATION_FILE = ".env.example";
50
+ const DEPLOY_ENV_FILES = [DEPLOY_ENV_DECLARATION_FILE, ".env"];
38
51
  /**
39
52
  * Build the `ctx.env` record that agent tools will see at runtime.
40
53
  *
@@ -66,5 +79,36 @@ async function resolveServerEnv(cwd, baseEnv, files = [".env"]) {
66
79
  }
67
80
  return env;
68
81
  }
82
+ /**
83
+ * Every variable name the dotenv `files` DECLARE, whether or not they carry a
84
+ * value.
85
+ *
86
+ * The complement of {@link resolveServerEnv}, which returns the subset that
87
+ * resolved to something non-empty. Subtracting one from the other is how a
88
+ * build reports the variables a deployment declares and the host has no value
89
+ * for — see `missingDeployEnv` in `build.ts`. A declared-but-blank key is the
90
+ * `.env.example` idiom for "you need to set this" (`BRAVE_API_KEY=`), so the
91
+ * names are exactly what a caller asking that question needs and `resolveServerEnv`
92
+ * is exactly where they are dropped.
93
+ *
94
+ * SORTED, and that is a choice rather than the parser's output. Node's
95
+ * `parseEnv` preserves declaration order for keys that carry a VALUE but
96
+ * groups the blank ones and returns them alphabetically (`Z=\nY=\nX=` comes
97
+ * back `X, Y, Z`) — and a declaration file is mostly blank keys by
98
+ * construction, so its own order barely survives the parse. Sorting makes the
99
+ * result one predictable thing instead of two, which matters because a warning
100
+ * built from this is read by a human and diffed by a test.
101
+ *
102
+ * @param cwd - Project directory. `undefined` declares nothing, matching
103
+ * {@link resolveServerEnv}'s handling of the same argument.
104
+ * @param files - Which dotenv files to read. {@link DEPLOY_ENV_FILES} is what a
105
+ * DEPLOYMENT declares.
106
+ */
107
+ async function declaredEnvNames(cwd, files = [".env"]) {
108
+ if (cwd === void 0) return [];
109
+ const names = /* @__PURE__ */ new Set();
110
+ for (const file of files) for (const key of Object.keys(await readDotenv(path.join(cwd, file)))) names.add(key);
111
+ return [...names].sort();
112
+ }
69
113
  //#endregion
70
- export { resolveServerEnv as n, DEPLOY_ENV_FILES as t };
114
+ export { resolveServerEnv as i, DEPLOY_ENV_FILES as n, declaredEnvNames as r, DEPLOY_ENV_DECLARATION_FILE as t };
@@ -13,6 +13,19 @@
13
13
  * and treating the example as a declaration would surface a key they have not
14
14
  * filled in yet as one they have.
15
15
  */
16
+ /**
17
+ * The one dotenv file that SHIPS — copied into a target's deployment artifact
18
+ * (`RUNTIME_FILES` in `_vercel-output.ts`) because it declares which variables
19
+ * become `ctx.env`.
20
+ *
21
+ * Named on its own because "what does the deployment declare" and "what can
22
+ * this machine resolve" are different questions with different answers, and a
23
+ * build that asks the second when it means the first cannot see the failure
24
+ * `missingDeployEnv` exists to report: `.env` is present in a host's BUILD
25
+ * workspace and absent from its RUNTIME, so a value read from there suppresses
26
+ * a warning about a variable the deployed function will never see.
27
+ */
28
+ export declare const DEPLOY_ENV_DECLARATION_FILE = ".env.example";
16
29
  export declare const DEPLOY_ENV_FILES: readonly [".env.example", ".env"];
17
30
  /**
18
31
  * Build the `ctx.env` record that agent tools will see at runtime.
@@ -34,3 +47,29 @@ export declare const DEPLOY_ENV_FILES: readonly [".env.example", ".env"];
34
47
  * DEPLOYMENT reads, and its own doc says why the two differ.
35
48
  */
36
49
  export declare function resolveServerEnv(cwd?: string, baseEnv?: Record<string, string | undefined>, files?: readonly string[]): Promise<Record<string, string>>;
50
+ /**
51
+ * Every variable name the dotenv `files` DECLARE, whether or not they carry a
52
+ * value.
53
+ *
54
+ * The complement of {@link resolveServerEnv}, which returns the subset that
55
+ * resolved to something non-empty. Subtracting one from the other is how a
56
+ * build reports the variables a deployment declares and the host has no value
57
+ * for — see `missingDeployEnv` in `build.ts`. A declared-but-blank key is the
58
+ * `.env.example` idiom for "you need to set this" (`BRAVE_API_KEY=`), so the
59
+ * names are exactly what a caller asking that question needs and `resolveServerEnv`
60
+ * is exactly where they are dropped.
61
+ *
62
+ * SORTED, and that is a choice rather than the parser's output. Node's
63
+ * `parseEnv` preserves declaration order for keys that carry a VALUE but
64
+ * groups the blank ones and returns them alphabetically (`Z=\nY=\nX=` comes
65
+ * back `X, Y, Z`) — and a declaration file is mostly blank keys by
66
+ * construction, so its own order barely survives the parse. Sorting makes the
67
+ * result one predictable thing instead of two, which matters because a warning
68
+ * built from this is read by a human and diffed by a test.
69
+ *
70
+ * @param cwd - Project directory. `undefined` declares nothing, matching
71
+ * {@link resolveServerEnv}'s handling of the same argument.
72
+ * @param files - Which dotenv files to read. {@link DEPLOY_ENV_FILES} is what a
73
+ * DEPLOYMENT declares.
74
+ */
75
+ export declare function declaredEnvNames(cwd: string | undefined, files?: readonly string[]): Promise<string[]>;
@@ -16,11 +16,123 @@
16
16
  * A bundle removes the question. The host resolves nothing, installs nothing,
17
17
  * and what runs is what the project's own lockfile pinned.
18
18
  *
19
+ * ...as long as the bundle really has nothing left to resolve, which is what
20
+ * {@link JSDOC_FREE_COMMENTS} is about — a bundle can carry a dependency it
21
+ * never imports.
22
+ *
19
23
  * The entry is written INTO the project rather than a temp directory, because
20
24
  * that is what makes `@alexkroman1/aai-cli/start` resolve against the user's
21
25
  * install. Removed in a `finally`: a build that throws must not leave a file
22
26
  * that looks authored.
23
27
  */
28
+ /**
29
+ * Drop JSDoc from the bundle, and KEEP the other two comment classes.
30
+ *
31
+ * ## A commented `import()` is a real dependency
32
+ *
33
+ * A JSDoc `@type {import(<specifier>).Webidl}` is a comment to every runtime
34
+ * that executes this file and an EDGE in the module graph to every tool that
35
+ * walks it. Deno resolves the specifier out of a JSDoc type position, so a
36
+ * bundle full of third-party JSDoc arrives at Deno Deploy carrying dependencies
37
+ * that were never bundled because nothing imports them.
38
+ *
39
+ * **Every specifier below is written with a `<placeholder>` rather than
40
+ * quoted**, and that is this bug rather than pedantry: spelling them the real
41
+ * way made `pnpm check:knip` fail on THIS file, reporting `selderee` as an
42
+ * unlisted dependency and undici's relative path as an unresolved import — a
43
+ * comment describing the defect reproducing it, in a second graph-walking tool.
44
+ * Keep the placeholders.
45
+ *
46
+ * **Deno Deploy TOLERATES them today, and that is not a reason to ship them.**
47
+ * Measured, because the first version of this comment guessed otherwise and was
48
+ * wrong: a `quickstart-agent` emit carrying all the JSDoc below deployed and
49
+ * served a full voice session, so nothing here is load-bearing for that host.
50
+ * What the phantom edges cost is the property `app.py` states in its own header
51
+ * — "a bundle with no imports left to resolve" — which was false: `deno info`
52
+ * on the emitted entry reported NINE unresolvable specifiers, and after this
53
+ * setting reports zero. Any tool that walks the graph rather than executing it
54
+ * sees them (`deno info`, `deno check`, `@vercel/nft`), and a host that starts
55
+ * enforcing what Deploy currently ignores would present as a build failure with
56
+ * no line of ours in it.
57
+ *
58
+ * Nine phantom specifiers in that bundle, from THREE sources, which is why
59
+ * this is a bundler setting rather than nine fixes:
60
+ * - undici's JSDoc — `../api/api-request`, `../dispatcher/client`,
61
+ * `../core/request`, `types/dispatcher`, `types/client`, `types/webidl`
62
+ * - html-to-text's — a `@param` naming the `selderee` package, which IS in the
63
+ * bundle, so the bare specifier resolves nowhere from inside it
64
+ * - **our own SDK's** — an `{@link import(<step-generate-json>)}` in the
65
+ * workflow docs' prose, the half no dependency bump would ever fix
66
+ *
67
+ * ## Why not `comments: false`
68
+ *
69
+ * `annotation` carries `@__PURE__` and `@__NO_SIDE_EFFECTS__`: those are
70
+ * instructions to the tree-shaker, and dropping them changes what the bundle
71
+ * DOES, not just how it reads. `legal` carries `@license` and `@preserve` from
72
+ * every third-party package in here — stripping those wholesale is a licensing
73
+ * decision and not one a deploy target gets to make quietly. `jsdoc` is the
74
+ * only class that can name a module, so it is the only one that goes.
75
+ *
76
+ * Applied to EVERY target rather than to Deno alone, on this module's own
77
+ * thesis: what a host does with the graph "differs in ways that are all bad",
78
+ * and a phantom edge is a hazard to any host that walks one — `@vercel/nft`
79
+ * traces imports too. One bundler, one behaviour.
80
+ *
81
+ * @see https://docs.deno.com/runtime/reference/cli/info — `deno info` resolves
82
+ * the graph instead of executing it, which is why it is the gate and why
83
+ * booting the emitted directory is not.
84
+ */
85
+ export declare const JSDOC_FREE_COMMENTS: {
86
+ readonly legal: true;
87
+ readonly annotation: true;
88
+ readonly jsdoc: false;
89
+ };
90
+ /**
91
+ * The `node:` builtins an emitted deployment may import.
92
+ *
93
+ * ## Why an ALLOWLIST rather than a note in a guide
94
+ *
95
+ * `ssr.noExternal` bundles everything except these, so whatever survives the
96
+ * pass is a hard dependency on the runtime the host chose — and the emitted
97
+ * directory is a container payload whose runtime is the operator's choice, not
98
+ * ours (`_target-entry.ts` carries that argument). Every name here is
99
+ * implemented by `node`, `deno` and `bun` alike, so the deployment behaves the
100
+ * same under all three.
101
+ *
102
+ * What it is written for is the class the boot arms in
103
+ * `_target-runtimes.scenario.test.ts` cannot see. A dependency bump that drags
104
+ * `node:vm`, `node:cluster` or `node:v8` into the graph reaches a runtime that
105
+ * half-implements it not at boot but at the first CALL — which is a live
106
+ * session, days after the deploy, with nothing in CI to have caught it. This
107
+ * suite reads the bundle instead, so it fails on the build that introduced it.
108
+ * (`node:vm` is a real risk rather than a hypothetical: `aai-runtime`'s
109
+ * `eval/vm-run-code.ts` uses it, and it stays out of the deployment only
110
+ * because nothing in the boot graph reaches that subpath.)
111
+ *
112
+ * ADDING a name is a claim about three runtimes, so check all three rather
113
+ * than the one you are on — `node:worker_threads` is here because Bun and Deno
114
+ * both ship it, `node:cluster` is not because Bun does not.
115
+ */
116
+ export declare const PORTABLE_NODE_BUILTINS: readonly string[];
117
+ /**
118
+ * Builtins the bundle NAMES but never requires — each behind a runtime feature
119
+ * test, and each therefore free to be absent.
120
+ *
121
+ * A second list rather than more entries in the first, because the two carry
122
+ * different claims and collapsing them would state the wrong one. A name above
123
+ * is portable: all three runtimes implement it, so the code that imports it
124
+ * runs everywhere. A name here is not — `node:sqlite` is Node-only, Deno does
125
+ * not ship it — and what makes it harmless is the GUARD, not the support.
126
+ *
127
+ * `sqlite` is undici's, twice over: `detectRuntimeFeatureByNodeModule` loads it
128
+ * inside a `try` that tolerates `ERR_UNKNOWN_BUILTIN_MODULE`, and
129
+ * `SqliteCacheStore` requires it lazily in a constructor nothing here calls.
130
+ *
131
+ * The spec pins the guard rather than trusting this comment: a name here must
132
+ * never appear as a STATIC import in the bundle, which is what would make it a
133
+ * load-time dependency again.
134
+ */
135
+ export declare const FEATURE_DETECTED_NODE_BUILTINS: readonly string[];
24
136
  /** Bundle `source` as if it were a module in `cwd`, and answer the code. */
25
137
  export declare function bundleTargetEntry(cwd: string, source: string, name: string): Promise<string>;
26
138
  /** Whether a path exists — the check every emit makes of an optional file. */
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The LONG-LIVED entry — one source, and every runtime that can run it.
3
+ *
4
+ * A leaf beside `_target-drain.ts` (the signal handler both long-lived entries
5
+ * carry), `_target-output.ts` (the directory they share) and
6
+ * `_target-bundle.ts` (the bundle every target's entry goes through): each is a
7
+ * thing more than one host needs and no host owns.
8
+ *
9
+ * ## Why the entry is shared, when it deliberately was not
10
+ *
11
+ * Both long-lived entries do the same four things — build the server, bind a
12
+ * port, bind it on `0.0.0.0`, drain on a signal — and the argument for keeping
13
+ * two copies was the port: `MODAL_ENTRY_SOURCE`'s own doc records it as "the
14
+ * two read the port from different runtimes, and a shared entry would be a
15
+ * template with a hole where that goes".
16
+ *
17
+ * That is true only if a runtime's env is read one runtime's way. It was: the
18
+ * Deno entry read `globalThis.Deno?.env.get("PORT")` and nothing else, and the
19
+ * Modal entry read `process.env.PORT` and nothing else — so each emitted
20
+ * artifact was pinned to its host by ONE expression, and running the Deno
21
+ * directory under `node` or `bun` bound the default port no matter what the
22
+ * host had set. Nobody decided that; it fell out of which global was in reach
23
+ * when each file was written.
24
+ *
25
+ * {@link RUNTIME_PORT_SOURCE} reads BOTH, so the artifact is portable and the
26
+ * hole in the template closes. What is left per host is a comment and a
27
+ * default, which is what {@link longLivedEntrySource} takes.
28
+ *
29
+ * ## Why portability is a property worth spending a module on
30
+ *
31
+ * A self-contained emit is a directory with no `node_modules`, no toolchain and
32
+ * one file to run — which is exactly what a container image carries, and the
33
+ * runtime in that image is the operator's choice, not ours. `deno`, `node` and
34
+ * `bun` all run this file; `_target-runtimes.scenario.test.ts` boots the emit
35
+ * under each of the three and dials a real session on it, because nothing else
36
+ * here can tell you that the same bundle serves on all three rather than only
37
+ * on the one host whose target emitted it.
38
+ */
39
+ /**
40
+ * The port expression every long-lived entry uses, reading whichever runtime
41
+ * it finds itself in.
42
+ *
43
+ * `globalThis.Deno?.env` rather than `Deno.env`, and the optional chain is
44
+ * load-bearing twice over: this file is bundled by a Node-side build and read
45
+ * by Node tooling (its own specs included), where a bare `Deno` is a
46
+ * `ReferenceError` — and under Node and Bun the chain is what falls through to
47
+ * `process.env` instead of throwing.
48
+ *
49
+ * `process.env` second rather than first, because Deno's `process` shim reads
50
+ * the same variables and asking Deno for them Deno's way is what keeps the
51
+ * Deno arm honest — a host that grants no env permission fails on the first
52
+ * read either way.
53
+ *
54
+ * `process` itself needs no guard and deliberately gets none: it is a global in
55
+ * all three runtimes, which is what lets {@link TARGET_DRAIN_SOURCE} be the
56
+ * identical text in every entry rather than a template with a hole in it.
57
+ */
58
+ export declare const RUNTIME_PORT_SOURCE = "globalThis.Deno?.env.get(\"PORT\") ?? process.env.PORT";
59
+ /** What one host varies in the entry it emits. */
60
+ export interface LongLivedEntry {
61
+ /** The `--target` name, for the "do not edit" banner a user's project shows. */
62
+ readonly target: string;
63
+ /** Why this host runs a long-lived process, as comment lines above the code. */
64
+ readonly hostNote: readonly string[];
65
+ /** The port to bind when the host set none. */
66
+ readonly defaultPort: number;
67
+ /** A comment above the drain, where the host supplies the signal's other half. */
68
+ readonly drainNote?: string;
69
+ }
70
+ /**
71
+ * The entry a long-lived host runs, bundled into that target's entry file.
72
+ *
73
+ * `0.0.0.0`, not `AgentServer.listen`'s loopback default: every host here
74
+ * reaches the process from outside it, so a loopback bind answers nothing while
75
+ * looking healthy.
76
+ *
77
+ * `import.meta.dirname` rather than `process.cwd()`: the artifacts are copied
78
+ * in BESIDE this file (see `_target-output.ts`) and the working directory
79
+ * belongs to the platform.
80
+ */
81
+ export declare function longLivedEntrySource(entry: LongLivedEntry): string;
@@ -186,7 +186,7 @@ the types are what the compiler enforces.
186
186
 
187
187
  \`\`\`sh
188
188
  npm run dev # Run locally on http://localhost:3000
189
- npm test # This project's suite, minus the evals (vitest)
189
+ npm test # This project's suite, minus the evals
190
190
  npm run test:agent # Just agent.test.ts, via the CLI
191
191
  npm run eval # Drive a real session against a live model (spends money)
192
192
  npm run build # Bundle the agent
@@ -138,16 +138,19 @@ function projectSpecFiles(cwd) {
138
138
  * `runVitest` passes the candidate filename as a vitest FILTER, which is what
139
139
  * keeps `test` and `eval` disjoint without either excluding the other's file —
140
140
  * see its doc. The cost is that every other `*.test.ts` in the project is
141
- * skipped, and the skip was SILENT: the shipped `retail` template carries seven
141
+ * skipped, and the skip was SILENT: the shipped `retail-orders-agent` template carries seven
142
142
  * of them, so `aai test` there ran 1 file / 67 tests, printed "Tests passed",
143
143
  * and left 211 of the project's 278 tests unrun with nothing saying so.
144
144
  *
145
- * The narrow default STANDS — which files `aai test` runs is a documented
146
- * contract (the scaffold guide says "Run agent.test.ts via vitest"), and running
147
- * a project's other specs by default could reach ones that are slow or want
148
- * credentials. What does not stand is a GREEN VERDICT over the difference: this
149
- * set is what `executeTest` refuses to call a pass, what it puts in its result
150
- * for a script to read, and what `--all` opts into running.
145
+ * The narrow default did NOT stand, and this set is why. It was defensible on
146
+ * its own terms — one documented file, so a spec that is slow or wants
147
+ * credentials is not dragged into every save — but neither verdict over the
148
+ * difference was liveable: a green one is the false pass above, and the
149
+ * failure that replaced it made bare `aai test` red on every project with a
150
+ * second spec file. So `all` is the default for both gates now and `--only`
151
+ * is the inner loop, and what this set feeds is the honest report of a
152
+ * narrowing somebody asked for: {@link warnUnrunSpecs}'s notice, plus
153
+ * `unrun`/`complete` on `aai test`'s own result for a script to read.
151
154
  */
152
155
  function unrunSpecFiles(cwd, ran) {
153
156
  const covered = new Set(coveredList(ran));
@@ -176,20 +179,22 @@ function collectSpecs(dir, prefix, out) {
176
179
  /**
177
180
  * The remedy, named the same way wherever the narrowing is reported.
178
181
  *
179
- * The project's own `npm test` comes FIRST because it is the command a
180
- * scaffolded project already ships (`scaffold/package.json`), so it is the one
181
- * answer that needs nothing installed or remembered; `--all` is the same thing
182
- * without leaving the CLI.
182
+ * It is a bare `aai test` now rather than a flag: the whole suite IS the
183
+ * default, so the remedy for a narrowed run is to stop narrowing it. The
184
+ * project's own `npm test` comes second because it is the command a scaffolded
185
+ * project already ships (`scaffold/package.json`) and runs the same set with
186
+ * nothing to remember.
183
187
  */
184
- const WIDEN_HINT = "Run the whole suite with this project's `npm test` (`vitest run --exclude \"**/*.eval.test.*\"`) or `aai test --all`; behaviour evals have their own command (`aai eval`).";
188
+ const WIDEN_HINT = "Run every non-eval spec with a bare `aai test` (the default) or this project's `npm test`; behaviour evals have their own command (`aai eval`).";
185
189
  /**
186
190
  * Warn, once, naming the spec files this run did not cover.
187
191
  *
188
- * This is the notice for a caller whose own result says nothing about the
189
- * narrowing — today that is `aai build`'s pre-build gate, which ran one file
190
- * out of eight and printed "Build complete". `aai test` does not use it: an
191
- * incomplete run is a FAILURE there, and the failure's own message is the
192
- * report.
192
+ * This is the notice for a run that covered a SUBSET, and `aai test --only` is
193
+ * the caller it now serves: an author asking for the fast inner loop gets
194
+ * vitest's own summary and then the files that loop did not reach. It was
195
+ * written for `aai build`'s pre-build gate, which ran one file out of eight
196
+ * and printed "Build complete" — that gate passes `all` now, so the notice is
197
+ * silent there, which is the correct end state rather than a lost check.
193
198
  */
194
199
  function warnUnrunSpecs(cwd, ran) {
195
200
  const skipped = unrunSpecFiles(cwd, ran);
@@ -55,10 +55,11 @@ export type VitestRunOptions = {
55
55
  /**
56
56
  * Run EVERY non-eval spec in the project rather than the first candidate.
57
57
  *
58
- * The opt-in half of the narrowing documented on {@link unrunSpecFiles}: the
59
- * default stays one file, and this is how a caller says "I want the whole
60
- * suite" without the command having to guess. Still a filter list rather than
61
- * an include glob, so the eval tier stays disjoint by construction.
58
+ * What both gates over a project's own suite pass — `aai test` unless
59
+ * `--only` narrows it, and `aai build`'s pre-build gate — because a verdict
60
+ * over a subset of a project's specs is the false green documented on
61
+ * {@link unrunSpecFiles}. Still a filter LIST rather than an include glob, so
62
+ * the eval tier stays disjoint by construction.
62
63
  */
63
64
  readonly all?: boolean;
64
65
  /**
@@ -67,10 +68,16 @@ export type VitestRunOptions = {
67
68
  * Default TRUE, and the default is the point: the caller most in need of the
68
69
  * notice is the one that does not know it is narrowing. `aai build` runs this
69
70
  * as its pre-build gate and reports nothing of its own, so a build gated on
70
- * one file out of eight said so nowhere. `aai test` and `aai eval` pass
71
- * `false` — the first because it reports the same set itself, in its result
72
- * as well as its output, and the second because "did not run" is a claim
73
- * about the TEST tier and every unit spec in the project would be named
71
+ * one file out of eight said so nowhere — it passes `all` now, but the
72
+ * default is what closed that without the gate having to know.
73
+ *
74
+ * `aai test` takes the default too, and used to pass `false`: it reported the
75
+ * skipped set itself, as an `incomplete_run` FAILURE, which is what made its
76
+ * own default invocation unpassable on any project with a second spec file
77
+ * (see `executeTest`). The widened run is the default there now and has
78
+ * nothing to announce; `--only` is a deliberate narrowing, and this notice is
79
+ * its report. `aai eval` still passes `false`, because "did not run" is a
80
+ * claim about the TEST tier and every unit spec in the project would be named
74
81
  * falsely by an eval run.
75
82
  */
76
83
  readonly announceUnrun?: boolean;
@@ -116,16 +123,19 @@ export declare function projectSpecFiles(cwd: string): string[];
116
123
  * `runVitest` passes the candidate filename as a vitest FILTER, which is what
117
124
  * keeps `test` and `eval` disjoint without either excluding the other's file —
118
125
  * see its doc. The cost is that every other `*.test.ts` in the project is
119
- * skipped, and the skip was SILENT: the shipped `retail` template carries seven
126
+ * skipped, and the skip was SILENT: the shipped `retail-orders-agent` template carries seven
120
127
  * of them, so `aai test` there ran 1 file / 67 tests, printed "Tests passed",
121
128
  * and left 211 of the project's 278 tests unrun with nothing saying so.
122
129
  *
123
- * The narrow default STANDS — which files `aai test` runs is a documented
124
- * contract (the scaffold guide says "Run agent.test.ts via vitest"), and running
125
- * a project's other specs by default could reach ones that are slow or want
126
- * credentials. What does not stand is a GREEN VERDICT over the difference: this
127
- * set is what `executeTest` refuses to call a pass, what it puts in its result
128
- * for a script to read, and what `--all` opts into running.
130
+ * The narrow default did NOT stand, and this set is why. It was defensible on
131
+ * its own terms — one documented file, so a spec that is slow or wants
132
+ * credentials is not dragged into every save — but neither verdict over the
133
+ * difference was liveable: a green one is the false pass above, and the
134
+ * failure that replaced it made bare `aai test` red on every project with a
135
+ * second spec file. So `all` is the default for both gates now and `--only`
136
+ * is the inner loop, and what this set feeds is the honest report of a
137
+ * narrowing somebody asked for: {@link warnUnrunSpecs}'s notice, plus
138
+ * `unrun`/`complete` on `aai test`'s own result for a script to read.
129
139
  */
130
140
  export declare function unrunSpecFiles(cwd: string, ran: RanSpecs): string[];
131
141
  /**
@@ -136,19 +146,21 @@ export type RanSpecs = string | readonly string[] | false;
136
146
  /**
137
147
  * The remedy, named the same way wherever the narrowing is reported.
138
148
  *
139
- * The project's own `npm test` comes FIRST because it is the command a
140
- * scaffolded project already ships (`scaffold/package.json`), so it is the one
141
- * answer that needs nothing installed or remembered; `--all` is the same thing
142
- * without leaving the CLI.
149
+ * It is a bare `aai test` now rather than a flag: the whole suite IS the
150
+ * default, so the remedy for a narrowed run is to stop narrowing it. The
151
+ * project's own `npm test` comes second because it is the command a scaffolded
152
+ * project already ships (`scaffold/package.json`) and runs the same set with
153
+ * nothing to remember.
143
154
  */
144
155
  export declare const WIDEN_HINT: string;
145
156
  /**
146
157
  * Warn, once, naming the spec files this run did not cover.
147
158
  *
148
- * This is the notice for a caller whose own result says nothing about the
149
- * narrowing — today that is `aai build`'s pre-build gate, which ran one file
150
- * out of eight and printed "Build complete". `aai test` does not use it: an
151
- * incomplete run is a FAILURE there, and the failure's own message is the
152
- * report.
159
+ * This is the notice for a run that covered a SUBSET, and `aai test --only` is
160
+ * the caller it now serves: an author asking for the fast inner loop gets
161
+ * vitest's own summary and then the files that loop did not reach. It was
162
+ * written for `aai build`'s pre-build gate, which ran one file out of eight
163
+ * and printed "Build complete" — that gate passes `all` now, so the notice is
164
+ * silent there, which is the correct end state rather than a lost check.
153
165
  */
154
166
  export declare function warnUnrunSpecs(cwd: string, ran: RanSpecs): void;
@@ -53,7 +53,7 @@ import { readFile, readdir } from "node:fs/promises";
53
53
  * and it pays for the breadth with seven baselined occurrences in this repo.
54
54
  * Measured before writing this: a faithful port reports **all seven and nothing
55
55
  * else** — and all seven are correct code. Each is a read inside a step-called
56
- * helper (`timed`, `pollTranscript`, `file`), which `link-digest`'s own comment
56
+ * helper (`timed`, `pollTranscript`, `file`), which `link-digest-workflow`'s own comment
57
57
  * explains: "the `ctx.step` callback boundary is not decidable from a line …
58
58
  * Anything at BODY level is the bug, not an exception."
59
59
  *