@a5c-ai/babysitter-sdk 5.0.0 → 5.0.1-staging.04a3db697

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 (943) hide show
  1. package/dist/breakpoints/evaluator.d.ts +33 -0
  2. package/dist/breakpoints/evaluator.d.ts.map +1 -0
  3. package/dist/breakpoints/evaluator.js +156 -0
  4. package/dist/breakpoints/index.d.ts +9 -0
  5. package/dist/breakpoints/index.d.ts.map +1 -0
  6. package/dist/breakpoints/index.js +19 -0
  7. package/dist/breakpoints/patterns.d.ts +24 -0
  8. package/dist/breakpoints/patterns.d.ts.map +1 -0
  9. package/dist/breakpoints/patterns.js +88 -0
  10. package/dist/breakpoints/proven-verification.d.ts +51 -0
  11. package/dist/breakpoints/proven-verification.d.ts.map +1 -0
  12. package/dist/breakpoints/proven-verification.js +120 -0
  13. package/dist/breakpoints/rules.d.ts +26 -0
  14. package/dist/breakpoints/rules.d.ts.map +1 -0
  15. package/dist/breakpoints/rules.js +110 -0
  16. package/dist/breakpoints/types.d.ts +78 -0
  17. package/dist/breakpoints/types.d.ts.map +1 -0
  18. package/dist/breakpoints/types.js +7 -0
  19. package/dist/cli/commands/breakpointRules.d.ts +26 -0
  20. package/dist/cli/commands/breakpointRules.d.ts.map +1 -0
  21. package/dist/cli/commands/breakpointRules.js +222 -0
  22. package/dist/cli/commands/compressOutput.d.ts +24 -0
  23. package/dist/cli/commands/compressOutput.d.ts.map +1 -0
  24. package/dist/cli/commands/compressOutput.js +85 -0
  25. package/dist/cli/commands/compressOutputHelpers.d.ts +15 -0
  26. package/dist/cli/commands/compressOutputHelpers.d.ts.map +1 -0
  27. package/dist/cli/commands/compressOutputHelpers.js +367 -0
  28. package/dist/cli/commands/compression/reset.d.ts +15 -0
  29. package/dist/cli/commands/compression/reset.d.ts.map +1 -0
  30. package/dist/cli/commands/compression/reset.js +87 -0
  31. package/dist/cli/commands/compression/set.d.ts +26 -0
  32. package/dist/cli/commands/compression/set.d.ts.map +1 -0
  33. package/dist/cli/commands/compression/set.js +179 -0
  34. package/dist/cli/commands/compression/status.d.ts +12 -0
  35. package/dist/cli/commands/compression/status.d.ts.map +1 -0
  36. package/dist/cli/commands/compression/status.js +133 -0
  37. package/dist/cli/commands/compression/toggle.d.ts +17 -0
  38. package/dist/cli/commands/compression/toggle.d.ts.map +1 -0
  39. package/dist/cli/commands/compression/toggle.js +115 -0
  40. package/dist/cli/commands/configure/output.d.ts +6 -0
  41. package/dist/cli/commands/configure/output.d.ts.map +1 -0
  42. package/dist/cli/commands/configure/output.js +164 -0
  43. package/dist/cli/commands/configure.d.ts +124 -0
  44. package/dist/cli/commands/configure.d.ts.map +1 -0
  45. package/dist/cli/commands/configure.js +300 -0
  46. package/dist/cli/commands/costStats.d.ts +13 -0
  47. package/dist/cli/commands/costStats.d.ts.map +1 -0
  48. package/dist/cli/commands/costStats.js +327 -0
  49. package/dist/cli/commands/detectExistingRun.d.ts +14 -0
  50. package/dist/cli/commands/detectExistingRun.d.ts.map +1 -0
  51. package/dist/cli/commands/detectExistingRun.js +89 -0
  52. package/dist/cli/commands/harness/install.d.ts +17 -0
  53. package/dist/cli/commands/harness/install.d.ts.map +1 -0
  54. package/dist/cli/commands/harness/install.js +83 -0
  55. package/dist/cli/commands/health/checks.d.ts +10 -0
  56. package/dist/cli/commands/health/checks.d.ts.map +1 -0
  57. package/dist/cli/commands/health/checks.js +268 -0
  58. package/dist/cli/commands/health/environment.d.ts +3 -0
  59. package/dist/cli/commands/health/environment.d.ts.map +1 -0
  60. package/dist/cli/commands/health/environment.js +89 -0
  61. package/dist/cli/commands/health/output.d.ts +5 -0
  62. package/dist/cli/commands/health/output.d.ts.map +1 -0
  63. package/dist/cli/commands/health/output.js +92 -0
  64. package/dist/cli/commands/health.d.ts +74 -0
  65. package/dist/cli/commands/health.d.ts.map +1 -0
  66. package/dist/cli/commands/health.js +92 -0
  67. package/dist/cli/commands/hooks/log.d.ts +15 -0
  68. package/dist/cli/commands/hooks/log.d.ts.map +1 -0
  69. package/dist/cli/commands/hooks/log.js +298 -0
  70. package/dist/cli/commands/hooks/run.d.ts +25 -0
  71. package/dist/cli/commands/hooks/run.d.ts.map +1 -0
  72. package/dist/cli/commands/hooks/run.js +234 -0
  73. package/dist/cli/commands/instructions.d.ts +20 -0
  74. package/dist/cli/commands/instructions.d.ts.map +1 -0
  75. package/dist/cli/commands/instructions.js +292 -0
  76. package/dist/cli/commands/log.d.ts +22 -0
  77. package/dist/cli/commands/log.d.ts.map +1 -0
  78. package/dist/cli/commands/log.js +99 -0
  79. package/dist/cli/commands/mcpServe.d.ts +11 -0
  80. package/dist/cli/commands/mcpServe.d.ts.map +1 -0
  81. package/dist/cli/commands/mcpServe.js +35 -0
  82. package/dist/cli/commands/plugin/marketplaceCommands.d.ts +5 -0
  83. package/dist/cli/commands/plugin/marketplaceCommands.d.ts.map +1 -0
  84. package/dist/cli/commands/plugin/marketplaceCommands.js +114 -0
  85. package/dist/cli/commands/plugin/packageCommands.d.ts +6 -0
  86. package/dist/cli/commands/plugin/packageCommands.d.ts.map +1 -0
  87. package/dist/cli/commands/plugin/packageCommands.js +270 -0
  88. package/dist/cli/commands/plugin/registryCommands.d.ts +5 -0
  89. package/dist/cli/commands/plugin/registryCommands.d.ts.map +1 -0
  90. package/dist/cli/commands/plugin/registryCommands.js +128 -0
  91. package/dist/cli/commands/plugin/shared.d.ts +20 -0
  92. package/dist/cli/commands/plugin/shared.d.ts.map +1 -0
  93. package/dist/cli/commands/plugin/shared.js +44 -0
  94. package/dist/cli/commands/plugin.d.ts +9 -0
  95. package/dist/cli/commands/plugin.d.ts.map +1 -0
  96. package/dist/cli/commands/plugin.js +22 -0
  97. package/dist/cli/commands/processLibrary.d.ts +16 -0
  98. package/dist/cli/commands/processLibrary.d.ts.map +1 -0
  99. package/dist/cli/commands/processLibrary.js +156 -0
  100. package/dist/cli/commands/profile.d.ts +26 -0
  101. package/dist/cli/commands/profile.d.ts.map +1 -0
  102. package/dist/cli/commands/profile.js +213 -0
  103. package/dist/cli/commands/runIterate.d.ts +49 -0
  104. package/dist/cli/commands/runIterate.d.ts.map +1 -0
  105. package/dist/cli/commands/runIterate.js +156 -0
  106. package/dist/cli/commands/runIterateHelpers.d.ts +29 -0
  107. package/dist/cli/commands/runIterateHelpers.d.ts.map +1 -0
  108. package/dist/cli/commands/runIterateHelpers.js +134 -0
  109. package/dist/cli/commands/session/associate.d.ts +10 -0
  110. package/dist/cli/commands/session/associate.d.ts.map +1 -0
  111. package/dist/cli/commands/session/associate.js +77 -0
  112. package/dist/cli/commands/session/checkIteration.d.ts +7 -0
  113. package/dist/cli/commands/session/checkIteration.d.ts.map +1 -0
  114. package/dist/cli/commands/session/checkIteration.js +76 -0
  115. package/dist/cli/commands/session/cleanup.d.ts +5 -0
  116. package/dist/cli/commands/session/cleanup.d.ts.map +1 -0
  117. package/dist/cli/commands/session/cleanup.js +20 -0
  118. package/dist/cli/commands/session/common.d.ts +16 -0
  119. package/dist/cli/commands/session/common.d.ts.map +1 -0
  120. package/dist/cli/commands/session/common.js +33 -0
  121. package/dist/cli/commands/session/init.d.ts +10 -0
  122. package/dist/cli/commands/session/init.d.ts.map +1 -0
  123. package/dist/cli/commands/session/init.js +76 -0
  124. package/dist/cli/commands/session/iterationMessage.d.ts +17 -0
  125. package/dist/cli/commands/session/iterationMessage.d.ts.map +1 -0
  126. package/dist/cli/commands/session/iterationMessage.js +106 -0
  127. package/dist/cli/commands/session/lastMessage.d.ts +13 -0
  128. package/dist/cli/commands/session/lastMessage.d.ts.map +1 -0
  129. package/dist/cli/commands/session/lastMessage.js +45 -0
  130. package/dist/cli/commands/session/resume.d.ts +10 -0
  131. package/dist/cli/commands/session/resume.d.ts.map +1 -0
  132. package/dist/cli/commands/session/resume.js +129 -0
  133. package/dist/cli/commands/session/state.d.ts +7 -0
  134. package/dist/cli/commands/session/state.d.ts.map +1 -0
  135. package/dist/cli/commands/session/state.js +49 -0
  136. package/dist/cli/commands/session/update.d.ts +10 -0
  137. package/dist/cli/commands/session/update.d.ts.map +1 -0
  138. package/dist/cli/commands/session/update.js +54 -0
  139. package/dist/cli/commands/session/whoami.d.ts +5 -0
  140. package/dist/cli/commands/session/whoami.d.ts.map +1 -0
  141. package/dist/cli/commands/session/whoami.js +22 -0
  142. package/dist/cli/commands/skill/discoveryLocal.d.ts +32 -0
  143. package/dist/cli/commands/skill/discoveryLocal.d.ts.map +1 -0
  144. package/dist/cli/commands/skill/discoveryLocal.js +383 -0
  145. package/dist/cli/commands/skill/processMarkers.d.ts +9 -0
  146. package/dist/cli/commands/skill/processMarkers.d.ts.map +1 -0
  147. package/dist/cli/commands/skill/processMarkers.js +104 -0
  148. package/dist/cli/commands/skill/remoteDiscovery.d.ts +4 -0
  149. package/dist/cli/commands/skill/remoteDiscovery.d.ts.map +1 -0
  150. package/dist/cli/commands/skill/remoteDiscovery.js +164 -0
  151. package/dist/cli/commands/skill/types.d.ts +69 -0
  152. package/dist/cli/commands/skill/types.d.ts.map +1 -0
  153. package/dist/cli/commands/skill/types.js +2 -0
  154. package/dist/cli/commands/skill.d.ts +20 -0
  155. package/dist/cli/commands/skill.d.ts.map +1 -0
  156. package/dist/cli/commands/skill.js +292 -0
  157. package/dist/cli/commands/tokensStats.d.ts +70 -0
  158. package/dist/cli/commands/tokensStats.d.ts.map +1 -0
  159. package/dist/cli/commands/tokensStats.js +238 -0
  160. package/dist/cli/commands/tokensStatsFormatting.d.ts +9 -0
  161. package/dist/cli/commands/tokensStatsFormatting.d.ts.map +1 -0
  162. package/dist/cli/commands/tokensStatsFormatting.js +137 -0
  163. package/dist/cli/completionProof.d.ts +4 -0
  164. package/dist/cli/completionProof.d.ts.map +1 -0
  165. package/dist/cli/completionProof.js +45 -0
  166. package/dist/cli/main/argFlagParsers.d.ts +9 -0
  167. package/dist/cli/main/argFlagParsers.d.ts.map +1 -0
  168. package/dist/cli/main/argFlagParsers.js +346 -0
  169. package/dist/cli/main/argFlags.d.ts +4 -0
  170. package/dist/cli/main/argFlags.d.ts.map +1 -0
  171. package/dist/cli/main/argFlags.js +77 -0
  172. package/dist/cli/main/argPositionals.d.ts +3 -0
  173. package/dist/cli/main/argPositionals.d.ts.map +1 -0
  174. package/dist/cli/main/argPositionals.js +87 -0
  175. package/dist/cli/main/args.d.ts +7 -0
  176. package/dist/cli/main/args.d.ts.map +1 -0
  177. package/dist/cli/main/args.js +120 -0
  178. package/dist/cli/main/dispatch.d.ts +5 -0
  179. package/dist/cli/main/dispatch.d.ts.map +1 -0
  180. package/dist/cli/main/dispatch.js +44 -0
  181. package/dist/cli/main/dispatchHarness.d.ts +3 -0
  182. package/dist/cli/main/dispatchHarness.d.ts.map +1 -0
  183. package/dist/cli/main/dispatchHarness.js +73 -0
  184. package/dist/cli/main/dispatchRunSession.d.ts +3 -0
  185. package/dist/cli/main/dispatchRunSession.d.ts.map +1 -0
  186. package/dist/cli/main/dispatchRunSession.js +316 -0
  187. package/dist/cli/main/program.d.ts +17 -0
  188. package/dist/cli/main/program.d.ts.map +1 -0
  189. package/dist/cli/main/program.js +94 -0
  190. package/dist/cli/main/runAssignProcess.d.ts +3 -0
  191. package/dist/cli/main/runAssignProcess.d.ts.map +1 -0
  192. package/dist/cli/main/runAssignProcess.js +169 -0
  193. package/dist/cli/main/runCommands.d.ts +4 -0
  194. package/dist/cli/main/runCommands.d.ts.map +1 -0
  195. package/dist/cli/main/runCommands.js +13 -0
  196. package/dist/cli/main/runCreate.d.ts +5 -0
  197. package/dist/cli/main/runCreate.d.ts.map +1 -0
  198. package/dist/cli/main/runCreate.js +382 -0
  199. package/dist/cli/main/runInspection.d.ts +5 -0
  200. package/dist/cli/main/runInspection.d.ts.map +1 -0
  201. package/dist/cli/main/runInspection.js +139 -0
  202. package/dist/cli/main/runState.d.ts +55 -0
  203. package/dist/cli/main/runState.d.ts.map +1 -0
  204. package/dist/cli/main/runState.js +226 -0
  205. package/dist/cli/main/runSupport.d.ts +49 -0
  206. package/dist/cli/main/runSupport.d.ts.map +1 -0
  207. package/dist/cli/main/runSupport.js +364 -0
  208. package/dist/cli/main/taskCommands.d.ts +6 -0
  209. package/dist/cli/main/taskCommands.d.ts.map +1 -0
  210. package/dist/cli/main/taskCommands.js +356 -0
  211. package/dist/cli/main/types.d.ts +120 -0
  212. package/dist/cli/main/types.d.ts.map +1 -0
  213. package/dist/cli/main/types.js +2 -0
  214. package/dist/cli/main/ui.d.ts +12 -0
  215. package/dist/cli/main/ui.d.ts.map +1 -0
  216. package/dist/cli/main/ui.js +177 -0
  217. package/dist/cli/main/usage.d.ts +7 -0
  218. package/dist/cli/main/usage.d.ts.map +1 -0
  219. package/dist/cli/main/usage.js +154 -0
  220. package/dist/cli/main.d.ts +13 -0
  221. package/dist/cli/main.d.ts.map +1 -0
  222. package/dist/cli/main.js +50 -0
  223. package/dist/cli/mcpServeEntry.d.ts +3 -0
  224. package/dist/cli/mcpServeEntry.d.ts.map +1 -0
  225. package/dist/cli/mcpServeEntry.js +8 -0
  226. package/dist/cli/render/ansi.d.ts +12 -0
  227. package/dist/cli/render/ansi.d.ts.map +1 -0
  228. package/dist/cli/render/ansi.js +24 -0
  229. package/dist/cli/render/effectTree.d.ts +17 -0
  230. package/dist/cli/render/effectTree.d.ts.map +1 -0
  231. package/dist/cli/render/effectTree.js +46 -0
  232. package/dist/cli/render/events/effectRequested.d.ts +3 -0
  233. package/dist/cli/render/events/effectRequested.d.ts.map +1 -0
  234. package/dist/cli/render/events/effectRequested.js +22 -0
  235. package/dist/cli/render/events/effectResolved.d.ts +3 -0
  236. package/dist/cli/render/events/effectResolved.d.ts.map +1 -0
  237. package/dist/cli/render/events/effectResolved.js +20 -0
  238. package/dist/cli/render/events/index.d.ts +4 -0
  239. package/dist/cli/render/events/index.d.ts.map +1 -0
  240. package/dist/cli/render/events/index.js +25 -0
  241. package/dist/cli/render/events/processAssigned.d.ts +3 -0
  242. package/dist/cli/render/events/processAssigned.d.ts.map +1 -0
  243. package/dist/cli/render/events/processAssigned.js +22 -0
  244. package/dist/cli/render/events/runCompleted.d.ts +3 -0
  245. package/dist/cli/render/events/runCompleted.d.ts.map +1 -0
  246. package/dist/cli/render/events/runCompleted.js +18 -0
  247. package/dist/cli/render/events/runCreated.d.ts +3 -0
  248. package/dist/cli/render/events/runCreated.d.ts.map +1 -0
  249. package/dist/cli/render/events/runCreated.js +19 -0
  250. package/dist/cli/render/events/runFailed.d.ts +3 -0
  251. package/dist/cli/render/events/runFailed.d.ts.map +1 -0
  252. package/dist/cli/render/events/runFailed.js +23 -0
  253. package/dist/cli/render/events/types.d.ts +6 -0
  254. package/dist/cli/render/events/types.d.ts.map +1 -0
  255. package/dist/cli/render/events/types.js +2 -0
  256. package/dist/cli/render/index.d.ts +5 -0
  257. package/dist/cli/render/index.d.ts.map +1 -0
  258. package/dist/cli/render/index.js +14 -0
  259. package/dist/cli/render/statusBadge.d.ts +4 -0
  260. package/dist/cli/render/statusBadge.d.ts.map +1 -0
  261. package/dist/cli/render/statusBadge.js +25 -0
  262. package/dist/cli/resolveInputPath.d.ts +61 -0
  263. package/dist/cli/resolveInputPath.d.ts.map +1 -0
  264. package/dist/cli/resolveInputPath.js +193 -0
  265. package/dist/compression/config-loader.d.ts +24 -0
  266. package/dist/compression/config-loader.d.ts.map +1 -0
  267. package/dist/compression/config-loader.js +179 -0
  268. package/dist/compression/config.d.ts +49 -0
  269. package/dist/compression/config.d.ts.map +1 -0
  270. package/dist/compression/config.js +41 -0
  271. package/dist/compression/density-filter.d.ts +20 -0
  272. package/dist/compression/density-filter.d.ts.map +1 -0
  273. package/dist/compression/density-filter.js +91 -0
  274. package/dist/compression/library-cache.d.ts +19 -0
  275. package/dist/compression/library-cache.d.ts.map +1 -0
  276. package/dist/compression/library-cache.js +149 -0
  277. package/dist/config/configValidation.d.ts +22 -0
  278. package/dist/config/configValidation.d.ts.map +1 -0
  279. package/dist/config/configValidation.js +140 -0
  280. package/dist/config/defaults.d.ts +67 -0
  281. package/dist/config/defaults.d.ts.map +1 -0
  282. package/dist/config/defaults.js +132 -0
  283. package/dist/config/index.d.ts +26 -0
  284. package/dist/config/index.d.ts.map +1 -0
  285. package/dist/config/index.js +51 -0
  286. package/dist/config/runs.d.ts +22 -0
  287. package/dist/config/runs.d.ts.map +1 -0
  288. package/dist/config/runs.js +192 -0
  289. package/dist/cost/claudeCodeParser.d.ts +81 -0
  290. package/dist/cost/claudeCodeParser.d.ts.map +1 -0
  291. package/dist/cost/claudeCodeParser.js +232 -0
  292. package/dist/cost/collector.d.ts +42 -0
  293. package/dist/cost/collector.d.ts.map +1 -0
  294. package/dist/cost/collector.js +105 -0
  295. package/dist/cost/index.d.ts +18 -0
  296. package/dist/cost/index.d.ts.map +1 -0
  297. package/dist/cost/index.js +38 -0
  298. package/dist/cost/journal.d.ts +40 -0
  299. package/dist/cost/journal.d.ts.map +1 -0
  300. package/dist/cost/journal.js +137 -0
  301. package/dist/cost/pricing.d.ts +19 -0
  302. package/dist/cost/pricing.d.ts.map +1 -0
  303. package/dist/cost/pricing.js +135 -0
  304. package/dist/cost/types.d.ts +87 -0
  305. package/dist/cost/types.d.ts.map +1 -0
  306. package/dist/cost/types.js +19 -0
  307. package/dist/harness/BaseAdapter.d.ts +93 -0
  308. package/dist/harness/BaseAdapter.d.ts.map +1 -0
  309. package/dist/harness/BaseAdapter.js +236 -0
  310. package/dist/harness/adapters/claude-code.d.ts +24 -0
  311. package/dist/harness/adapters/claude-code.d.ts.map +1 -0
  312. package/dist/harness/adapters/claude-code.js +64 -0
  313. package/dist/harness/adapters/codex.d.ts +12 -0
  314. package/dist/harness/adapters/codex.d.ts.map +1 -0
  315. package/dist/harness/adapters/codex.js +37 -0
  316. package/dist/harness/adapters/cursor.d.ts +13 -0
  317. package/dist/harness/adapters/cursor.d.ts.map +1 -0
  318. package/dist/harness/adapters/cursor.js +85 -0
  319. package/dist/harness/adapters/gemini-cli.d.ts +12 -0
  320. package/dist/harness/adapters/gemini-cli.d.ts.map +1 -0
  321. package/dist/harness/adapters/gemini-cli.js +34 -0
  322. package/dist/harness/adapters/github-copilot.d.ts +13 -0
  323. package/dist/harness/adapters/github-copilot.d.ts.map +1 -0
  324. package/dist/harness/adapters/github-copilot.js +59 -0
  325. package/dist/harness/adapters/index.d.ts +12 -0
  326. package/dist/harness/adapters/index.d.ts.map +1 -0
  327. package/dist/harness/adapters/index.js +26 -0
  328. package/dist/harness/adapters/oh-my-pi.d.ts +12 -0
  329. package/dist/harness/adapters/oh-my-pi.d.ts.map +1 -0
  330. package/dist/harness/adapters/oh-my-pi.js +41 -0
  331. package/dist/harness/adapters/openclaw.d.ts +12 -0
  332. package/dist/harness/adapters/openclaw.d.ts.map +1 -0
  333. package/dist/harness/adapters/openclaw.js +49 -0
  334. package/dist/harness/adapters/opencode.d.ts +12 -0
  335. package/dist/harness/adapters/opencode.d.ts.map +1 -0
  336. package/dist/harness/adapters/opencode.js +51 -0
  337. package/dist/harness/adapters/pi.d.ts +12 -0
  338. package/dist/harness/adapters/pi.d.ts.map +1 -0
  339. package/dist/harness/adapters/pi.js +41 -0
  340. package/dist/harness/amuxFallbackMetadata.d.ts +3 -0
  341. package/dist/harness/amuxFallbackMetadata.d.ts.map +1 -0
  342. package/dist/harness/amuxFallbackMetadata.js +201 -0
  343. package/dist/harness/amuxMetadata.d.ts +51 -0
  344. package/dist/harness/amuxMetadata.d.ts.map +1 -0
  345. package/dist/harness/amuxMetadata.js +176 -0
  346. package/dist/harness/customAdapter.d.ts +14 -0
  347. package/dist/harness/customAdapter.d.ts.map +1 -0
  348. package/dist/harness/customAdapter.js +124 -0
  349. package/dist/harness/derivePromptContext.d.ts +75 -0
  350. package/dist/harness/derivePromptContext.d.ts.map +1 -0
  351. package/dist/harness/derivePromptContext.js +120 -0
  352. package/dist/harness/discovery.d.ts +80 -0
  353. package/dist/harness/discovery.d.ts.map +1 -0
  354. package/dist/harness/discovery.js +313 -0
  355. package/dist/harness/hooks/babysitterHooks.d.ts +23 -0
  356. package/dist/harness/hooks/babysitterHooks.d.ts.map +1 -0
  357. package/dist/harness/hooks/babysitterHooks.js +162 -0
  358. package/dist/harness/hooks/promptContexts.d.ts +24 -0
  359. package/dist/harness/hooks/promptContexts.d.ts.map +1 -0
  360. package/dist/harness/hooks/promptContexts.js +106 -0
  361. package/dist/harness/hooks/runState.d.ts +14 -0
  362. package/dist/harness/hooks/runState.d.ts.map +1 -0
  363. package/dist/harness/hooks/runState.js +103 -0
  364. package/dist/harness/hooks/sessionBinding.d.ts +28 -0
  365. package/dist/harness/hooks/sessionBinding.d.ts.map +1 -0
  366. package/dist/harness/hooks/sessionBinding.js +153 -0
  367. package/dist/harness/hooks/stopHookContinuation.d.ts +44 -0
  368. package/dist/harness/hooks/stopHookContinuation.d.ts.map +1 -0
  369. package/dist/harness/hooks/stopHookContinuation.js +280 -0
  370. package/dist/harness/hooks/stopHookHandler.d.ts +35 -0
  371. package/dist/harness/hooks/stopHookHandler.d.ts.map +1 -0
  372. package/dist/harness/hooks/stopHookHandler.js +354 -0
  373. package/dist/harness/hooks/utils.d.ts +43 -0
  374. package/dist/harness/hooks/utils.d.ts.map +1 -0
  375. package/dist/harness/hooks/utils.js +215 -0
  376. package/dist/harness/index.d.ts +20 -0
  377. package/dist/harness/index.d.ts.map +1 -0
  378. package/dist/harness/index.js +51 -0
  379. package/dist/harness/install.d.ts +71 -0
  380. package/dist/harness/install.d.ts.map +1 -0
  381. package/dist/harness/install.js +267 -0
  382. package/dist/harness/installSupport.d.ts +37 -0
  383. package/dist/harness/installSupport.d.ts.map +1 -0
  384. package/dist/harness/installSupport.js +203 -0
  385. package/dist/harness/internal/promptContext.d.ts +3 -0
  386. package/dist/harness/internal/promptContext.d.ts.map +1 -0
  387. package/dist/harness/internal/promptContext.js +29 -0
  388. package/dist/harness/nullAdapter.d.ts +9 -0
  389. package/dist/harness/nullAdapter.d.ts.map +1 -0
  390. package/dist/harness/nullAdapter.js +46 -0
  391. package/dist/harness/registry.d.ts +51 -0
  392. package/dist/harness/registry.d.ts.map +1 -0
  393. package/dist/harness/registry.js +235 -0
  394. package/dist/harness/types.d.ts +200 -0
  395. package/dist/harness/types.d.ts.map +1 -0
  396. package/dist/harness/types.js +34 -0
  397. package/dist/harness/unified/adapter.d.ts +21 -0
  398. package/dist/harness/unified/adapter.d.ts.map +1 -0
  399. package/dist/harness/unified/adapter.js +239 -0
  400. package/dist/harness/unified/capabilities.d.ts +37 -0
  401. package/dist/harness/unified/capabilities.d.ts.map +1 -0
  402. package/dist/harness/unified/capabilities.js +79 -0
  403. package/dist/harness/unified/discovery.d.ts +11 -0
  404. package/dist/harness/unified/discovery.d.ts.map +1 -0
  405. package/dist/harness/unified/discovery.js +23 -0
  406. package/dist/harness/unified/index.d.ts +6 -0
  407. package/dist/harness/unified/index.d.ts.map +1 -0
  408. package/dist/harness/unified/index.js +16 -0
  409. package/dist/harness/unified/promptContext.d.ts +16 -0
  410. package/dist/harness/unified/promptContext.d.ts.map +1 -0
  411. package/dist/harness/unified/promptContext.js +56 -0
  412. package/dist/harness/unified/subprocess.d.ts +57 -0
  413. package/dist/harness/unified/subprocess.d.ts.map +1 -0
  414. package/dist/harness/unified/subprocess.js +121 -0
  415. package/dist/hooks/dispatcher.d.ts +29 -0
  416. package/dist/hooks/dispatcher.d.ts.map +1 -0
  417. package/dist/hooks/dispatcher.js +337 -0
  418. package/dist/hooks/index.d.ts +16 -0
  419. package/dist/hooks/index.d.ts.map +1 -0
  420. package/dist/hooks/index.js +20 -0
  421. package/dist/hooks/types.d.ts +170 -0
  422. package/dist/hooks/types.d.ts.map +1 -0
  423. package/dist/hooks/types.js +6 -0
  424. package/dist/index.d.ts +29 -0
  425. package/dist/index.d.ts.map +1 -0
  426. package/dist/index.js +76 -0
  427. package/dist/logging/index.d.ts +3 -0
  428. package/dist/logging/index.d.ts.map +1 -0
  429. package/dist/logging/index.js +11 -0
  430. package/dist/logging/runLogger.d.ts +85 -0
  431. package/dist/logging/runLogger.d.ts.map +1 -0
  432. package/dist/logging/runLogger.js +182 -0
  433. package/dist/mcp/index.d.ts +7 -0
  434. package/dist/mcp/index.d.ts.map +1 -0
  435. package/dist/mcp/index.js +53 -0
  436. package/dist/mcp/server.d.ts +3 -0
  437. package/dist/mcp/server.d.ts.map +1 -0
  438. package/dist/mcp/server.js +21 -0
  439. package/dist/mcp/tools/discovery.d.ts +3 -0
  440. package/dist/mcp/tools/discovery.d.ts.map +1 -0
  441. package/dist/mcp/tools/discovery.js +117 -0
  442. package/dist/mcp/tools/runs.d.ts +3 -0
  443. package/dist/mcp/tools/runs.d.ts.map +1 -0
  444. package/dist/mcp/tools/runs.js +289 -0
  445. package/dist/mcp/tools/sessions.d.ts +3 -0
  446. package/dist/mcp/tools/sessions.d.ts.map +1 -0
  447. package/dist/mcp/tools/sessions.js +216 -0
  448. package/dist/mcp/tools/tasks.d.ts +3 -0
  449. package/dist/mcp/tools/tasks.d.ts.map +1 -0
  450. package/dist/mcp/tools/tasks.js +230 -0
  451. package/dist/mcp/transport/index.d.ts +1 -0
  452. package/dist/mcp/transport/index.d.ts.map +1 -0
  453. package/dist/mcp/transport/index.js +2 -0
  454. package/dist/mcp/util/errors.d.ts +14 -0
  455. package/dist/mcp/util/errors.d.ts.map +1 -0
  456. package/dist/mcp/util/errors.js +10 -0
  457. package/dist/mcp/util/resolve-run-dir.d.ts +6 -0
  458. package/dist/mcp/util/resolve-run-dir.d.ts.map +1 -0
  459. package/dist/mcp/util/resolve-run-dir.js +11 -0
  460. package/dist/plugins/index.d.ts +14 -0
  461. package/dist/plugins/index.d.ts.map +1 -0
  462. package/dist/plugins/index.js +51 -0
  463. package/dist/plugins/marketplace.d.ts +36 -0
  464. package/dist/plugins/marketplace.d.ts.map +1 -0
  465. package/dist/plugins/marketplace.js +162 -0
  466. package/dist/plugins/marketplaceHelpers.d.ts +15 -0
  467. package/dist/plugins/marketplaceHelpers.d.ts.map +1 -0
  468. package/dist/plugins/marketplaceHelpers.js +114 -0
  469. package/dist/plugins/migrations.d.ts +52 -0
  470. package/dist/plugins/migrations.d.ts.map +1 -0
  471. package/dist/plugins/migrations.js +151 -0
  472. package/dist/plugins/packageReader.d.ts +47 -0
  473. package/dist/plugins/packageReader.d.ts.map +1 -0
  474. package/dist/plugins/packageReader.js +153 -0
  475. package/dist/plugins/paths.d.ts +30 -0
  476. package/dist/plugins/paths.d.ts.map +1 -0
  477. package/dist/plugins/paths.js +69 -0
  478. package/dist/plugins/registry.d.ts +54 -0
  479. package/dist/plugins/registry.d.ts.map +1 -0
  480. package/dist/plugins/registry.js +116 -0
  481. package/dist/plugins/types.d.ts +133 -0
  482. package/dist/plugins/types.d.ts.map +1 -0
  483. package/dist/plugins/types.js +35 -0
  484. package/dist/processLibrary/active.d.ts +17 -0
  485. package/dist/processLibrary/active.d.ts.map +1 -0
  486. package/dist/processLibrary/active.js +216 -0
  487. package/dist/processLibrary/activeTypes.d.ts +82 -0
  488. package/dist/processLibrary/activeTypes.d.ts.map +1 -0
  489. package/dist/processLibrary/activeTypes.js +6 -0
  490. package/dist/profiles/index.d.ts +25 -0
  491. package/dist/profiles/index.d.ts.map +1 -0
  492. package/dist/profiles/index.js +40 -0
  493. package/dist/profiles/projectProfile.d.ts +67 -0
  494. package/dist/profiles/projectProfile.d.ts.map +1 -0
  495. package/dist/profiles/projectProfile.js +169 -0
  496. package/dist/profiles/projectProfileMerge.d.ts +3 -0
  497. package/dist/profiles/projectProfileMerge.d.ts.map +1 -0
  498. package/dist/profiles/projectProfileMerge.js +175 -0
  499. package/dist/profiles/projectProfileRender.d.ts +3 -0
  500. package/dist/profiles/projectProfileRender.d.ts.map +1 -0
  501. package/dist/profiles/projectProfileRender.js +275 -0
  502. package/dist/profiles/projectTypes.d.ts +149 -0
  503. package/dist/profiles/projectTypes.d.ts.map +1 -0
  504. package/dist/profiles/projectTypes.js +6 -0
  505. package/dist/profiles/types.d.ts +5 -0
  506. package/dist/profiles/types.d.ts.map +1 -0
  507. package/dist/profiles/types.js +11 -0
  508. package/dist/profiles/userProfile.d.ts +67 -0
  509. package/dist/profiles/userProfile.d.ts.map +1 -0
  510. package/dist/profiles/userProfile.js +351 -0
  511. package/dist/profiles/userProfileRender.d.ts +3 -0
  512. package/dist/profiles/userProfileRender.d.ts.map +1 -0
  513. package/dist/profiles/userProfileRender.js +188 -0
  514. package/dist/profiles/userTypes.d.ts +119 -0
  515. package/dist/profiles/userTypes.d.ts.map +1 -0
  516. package/dist/profiles/userTypes.js +6 -0
  517. package/dist/prompts/babysitterMdDiscovery.d.ts +38 -0
  518. package/dist/prompts/babysitterMdDiscovery.d.ts.map +1 -0
  519. package/dist/prompts/babysitterMdDiscovery.js +150 -0
  520. package/dist/prompts/capabilityCollector.d.ts +48 -0
  521. package/dist/prompts/capabilityCollector.d.ts.map +1 -0
  522. package/dist/prompts/capabilityCollector.js +126 -0
  523. package/dist/prompts/capabilityProcessMap.d.ts +33 -0
  524. package/dist/prompts/capabilityProcessMap.d.ts.map +1 -0
  525. package/dist/prompts/capabilityProcessMap.js +105 -0
  526. package/dist/prompts/commandTemplates.d.ts +4 -0
  527. package/dist/prompts/commandTemplates.d.ts.map +1 -0
  528. package/dist/prompts/commandTemplates.js +32 -0
  529. package/dist/prompts/compose.d.ts +28 -0
  530. package/dist/prompts/compose.d.ts.map +1 -0
  531. package/dist/prompts/compose.js +197 -0
  532. package/dist/prompts/context.d.ts +8 -0
  533. package/dist/prompts/context.d.ts.map +1 -0
  534. package/dist/prompts/context.js +13 -0
  535. package/dist/prompts/contextDetect.d.ts +64 -0
  536. package/dist/prompts/contextDetect.d.ts.map +1 -0
  537. package/dist/prompts/contextDetect.js +122 -0
  538. package/dist/prompts/contextShared.d.ts +6 -0
  539. package/dist/prompts/contextShared.d.ts.map +1 -0
  540. package/dist/prompts/contextShared.js +63 -0
  541. package/dist/prompts/continuityOverlay.d.ts +35 -0
  542. package/dist/prompts/continuityOverlay.d.ts.map +1 -0
  543. package/dist/prompts/continuityOverlay.js +210 -0
  544. package/dist/prompts/index.d.ts +23 -0
  545. package/dist/prompts/index.d.ts.map +1 -0
  546. package/dist/prompts/index.js +88 -0
  547. package/dist/prompts/parts/breakpointHandling.d.ts +8 -0
  548. package/dist/prompts/parts/breakpointHandling.d.ts.map +1 -0
  549. package/dist/prompts/parts/breakpointHandling.js +12 -0
  550. package/dist/prompts/parts/codingPhilosophy.d.ts +7 -0
  551. package/dist/prompts/parts/codingPhilosophy.d.ts.map +1 -0
  552. package/dist/prompts/parts/codingPhilosophy.js +11 -0
  553. package/dist/prompts/parts/completionProof.d.ts +6 -0
  554. package/dist/prompts/parts/completionProof.d.ts.map +1 -0
  555. package/dist/prompts/parts/completionProof.js +10 -0
  556. package/dist/prompts/parts/continuityOverlay.d.ts +2 -0
  557. package/dist/prompts/parts/continuityOverlay.d.ts.map +1 -0
  558. package/dist/prompts/parts/continuityOverlay.js +5 -0
  559. package/dist/prompts/parts/criticalRules.d.ts +7 -0
  560. package/dist/prompts/parts/criticalRules.d.ts.map +1 -0
  561. package/dist/prompts/parts/criticalRules.js +29 -0
  562. package/dist/prompts/parts/dependencies.d.ts +6 -0
  563. package/dist/prompts/parts/dependencies.d.ts.map +1 -0
  564. package/dist/prompts/parts/dependencies.js +10 -0
  565. package/dist/prompts/parts/effects.d.ts +6 -0
  566. package/dist/prompts/parts/effects.d.ts.map +1 -0
  567. package/dist/prompts/parts/effects.js +10 -0
  568. package/dist/prompts/parts/gitSafety.d.ts +7 -0
  569. package/dist/prompts/parts/gitSafety.d.ts.map +1 -0
  570. package/dist/prompts/parts/gitSafety.js +11 -0
  571. package/dist/prompts/parts/index.d.ts +37 -0
  572. package/dist/prompts/parts/index.d.ts.map +1 -0
  573. package/dist/prompts/parts/index.js +70 -0
  574. package/dist/prompts/parts/intentFidelityChecks.d.ts +7 -0
  575. package/dist/prompts/parts/intentFidelityChecks.d.ts.map +1 -0
  576. package/dist/prompts/parts/intentFidelityChecks.js +14 -0
  577. package/dist/prompts/parts/interview.d.ts +6 -0
  578. package/dist/prompts/parts/interview.d.ts.map +1 -0
  579. package/dist/prompts/parts/interview.js +18 -0
  580. package/dist/prompts/parts/iteration.d.ts +6 -0
  581. package/dist/prompts/parts/iteration.d.ts.map +1 -0
  582. package/dist/prompts/parts/iteration.js +15 -0
  583. package/dist/prompts/parts/loopControl.d.ts +11 -0
  584. package/dist/prompts/parts/loopControl.d.ts.map +1 -0
  585. package/dist/prompts/parts/loopControl.js +22 -0
  586. package/dist/prompts/parts/nonNegotiables.d.ts +7 -0
  587. package/dist/prompts/parts/nonNegotiables.d.ts.map +1 -0
  588. package/dist/prompts/parts/nonNegotiables.js +14 -0
  589. package/dist/prompts/parts/outputEfficiency.d.ts +7 -0
  590. package/dist/prompts/parts/outputEfficiency.d.ts.map +1 -0
  591. package/dist/prompts/parts/outputEfficiency.js +11 -0
  592. package/dist/prompts/parts/parallelDispatch.d.ts +15 -0
  593. package/dist/prompts/parts/parallelDispatch.d.ts.map +1 -0
  594. package/dist/prompts/parts/parallelDispatch.js +46 -0
  595. package/dist/prompts/parts/parallelPhaseDetection.d.ts +6 -0
  596. package/dist/prompts/parts/parallelPhaseDetection.d.ts.map +1 -0
  597. package/dist/prompts/parts/parallelPhaseDetection.js +10 -0
  598. package/dist/prompts/parts/priorityLadder.d.ts +7 -0
  599. package/dist/prompts/parts/priorityLadder.d.ts.map +1 -0
  600. package/dist/prompts/parts/priorityLadder.js +13 -0
  601. package/dist/prompts/parts/processCreation.d.ts +6 -0
  602. package/dist/prompts/parts/processCreation.d.ts.map +1 -0
  603. package/dist/prompts/parts/processCreation.js +10 -0
  604. package/dist/prompts/parts/processGuidelines.d.ts +7 -0
  605. package/dist/prompts/parts/processGuidelines.d.ts.map +1 -0
  606. package/dist/prompts/parts/processGuidelines.js +11 -0
  607. package/dist/prompts/parts/projectInstructions.d.ts +8 -0
  608. package/dist/prompts/parts/projectInstructions.d.ts.map +1 -0
  609. package/dist/prompts/parts/projectInstructions.js +28 -0
  610. package/dist/prompts/parts/quickReference.d.ts +6 -0
  611. package/dist/prompts/parts/quickReference.d.ts.map +1 -0
  612. package/dist/prompts/parts/quickReference.js +17 -0
  613. package/dist/prompts/parts/recovery.d.ts +7 -0
  614. package/dist/prompts/parts/recovery.d.ts.map +1 -0
  615. package/dist/prompts/parts/recovery.js +11 -0
  616. package/dist/prompts/parts/resultsPosting.d.ts +7 -0
  617. package/dist/prompts/parts/resultsPosting.d.ts.map +1 -0
  618. package/dist/prompts/parts/resultsPosting.js +11 -0
  619. package/dist/prompts/parts/rootCauseGuardrail.d.ts +7 -0
  620. package/dist/prompts/parts/rootCauseGuardrail.d.ts.map +1 -0
  621. package/dist/prompts/parts/rootCauseGuardrail.js +13 -0
  622. package/dist/prompts/parts/runCreation.d.ts +7 -0
  623. package/dist/prompts/parts/runCreation.d.ts.map +1 -0
  624. package/dist/prompts/parts/runCreation.js +61 -0
  625. package/dist/prompts/parts/runOverlapDetection.d.ts +6 -0
  626. package/dist/prompts/parts/runOverlapDetection.d.ts.map +1 -0
  627. package/dist/prompts/parts/runOverlapDetection.js +10 -0
  628. package/dist/prompts/parts/seeAlso.d.ts +7 -0
  629. package/dist/prompts/parts/seeAlso.d.ts.map +1 -0
  630. package/dist/prompts/parts/seeAlso.js +11 -0
  631. package/dist/prompts/parts/taskExamples.d.ts +7 -0
  632. package/dist/prompts/parts/taskExamples.d.ts.map +1 -0
  633. package/dist/prompts/parts/taskExamples.js +11 -0
  634. package/dist/prompts/parts/taskKinds.d.ts +6 -0
  635. package/dist/prompts/parts/taskKinds.d.ts.map +1 -0
  636. package/dist/prompts/parts/taskKinds.js +25 -0
  637. package/dist/prompts/parts/toolPreferences.d.ts +7 -0
  638. package/dist/prompts/parts/toolPreferences.d.ts.map +1 -0
  639. package/dist/prompts/parts/toolPreferences.js +11 -0
  640. package/dist/prompts/parts/userProfile.d.ts +7 -0
  641. package/dist/prompts/parts/userProfile.d.ts.map +1 -0
  642. package/dist/prompts/parts/userProfile.js +11 -0
  643. package/dist/prompts/runtimeContext.d.ts +30 -0
  644. package/dist/prompts/runtimeContext.d.ts.map +1 -0
  645. package/dist/prompts/runtimeContext.js +38 -0
  646. package/dist/prompts/strata.d.ts +60 -0
  647. package/dist/prompts/strata.d.ts.map +1 -0
  648. package/dist/prompts/strata.js +243 -0
  649. package/dist/prompts/templateRenderer.d.ts +18 -0
  650. package/dist/prompts/templateRenderer.d.ts.map +1 -0
  651. package/dist/prompts/templateRenderer.js +131 -0
  652. package/dist/prompts/templates/breakpoint-handling.md +137 -0
  653. package/dist/prompts/templates/coding-philosophy.md +12 -0
  654. package/dist/prompts/templates/commands/assimilate.md +47 -0
  655. package/dist/prompts/templates/commands/cleanup.md +54 -0
  656. package/dist/prompts/templates/commands/contrib.md +40 -0
  657. package/dist/prompts/templates/commands/doctor.md +511 -0
  658. package/dist/prompts/templates/commands/forever.md +11 -0
  659. package/dist/prompts/templates/commands/project-install.md +25 -0
  660. package/dist/prompts/templates/commands/retrospect.md +68 -0
  661. package/dist/prompts/templates/commands/user-install.md +24 -0
  662. package/dist/prompts/templates/completion-proof.md +21 -0
  663. package/dist/prompts/templates/critical-rules.md +73 -0
  664. package/dist/prompts/templates/dependencies.md +9 -0
  665. package/dist/prompts/templates/effects.md +46 -0
  666. package/dist/prompts/templates/git-safety.md +9 -0
  667. package/dist/prompts/templates/intent-fidelity-checks.md +31 -0
  668. package/dist/prompts/templates/interview.md +65 -0
  669. package/dist/prompts/templates/iteration.md +41 -0
  670. package/dist/prompts/templates/loop-control.md +64 -0
  671. package/dist/prompts/templates/non-negotiables.md +11 -0
  672. package/dist/prompts/templates/output-efficiency.md +12 -0
  673. package/dist/prompts/templates/parallel-phase-detection.md +59 -0
  674. package/dist/prompts/templates/priority-ladder.md +13 -0
  675. package/dist/prompts/templates/process-creation.md +130 -0
  676. package/dist/prompts/templates/process-guidelines.md +106 -0
  677. package/dist/prompts/templates/quick-reference.md +46 -0
  678. package/dist/prompts/templates/recovery.md +30 -0
  679. package/dist/prompts/templates/results-posting.md +69 -0
  680. package/dist/prompts/templates/root-cause-guardrail.md +14 -0
  681. package/dist/prompts/templates/run-creation.md +80 -0
  682. package/dist/prompts/templates/run-overlap-detection.md +65 -0
  683. package/dist/prompts/templates/see-also.md +4 -0
  684. package/dist/prompts/templates/task-examples.md +229 -0
  685. package/dist/prompts/templates/task-kinds.md +106 -0
  686. package/dist/prompts/templates/tool-preferences.md +8 -0
  687. package/dist/prompts/templates/user-profile.md +48 -0
  688. package/dist/prompts/types.d.ts +191 -0
  689. package/dist/prompts/types.d.ts.map +1 -0
  690. package/dist/prompts/types.js +7 -0
  691. package/dist/runtime/asyncEffects.d.ts +22 -0
  692. package/dist/runtime/asyncEffects.d.ts.map +1 -0
  693. package/dist/runtime/asyncEffects.js +86 -0
  694. package/dist/runtime/commitEffectResult.d.ts +12 -0
  695. package/dist/runtime/commitEffectResult.d.ts.map +1 -0
  696. package/dist/runtime/commitEffectResult.js +240 -0
  697. package/dist/runtime/constants.d.ts +2 -0
  698. package/dist/runtime/constants.d.ts.map +1 -0
  699. package/dist/runtime/constants.js +5 -0
  700. package/dist/runtime/createRun.d.ts +3 -0
  701. package/dist/runtime/createRun.d.ts.map +1 -0
  702. package/dist/runtime/createRun.js +142 -0
  703. package/dist/runtime/effectGroupRegistry.d.ts +57 -0
  704. package/dist/runtime/effectGroupRegistry.d.ts.map +1 -0
  705. package/dist/runtime/effectGroupRegistry.js +107 -0
  706. package/dist/runtime/errorSuggestions.d.ts +4 -0
  707. package/dist/runtime/errorSuggestions.d.ts.map +1 -0
  708. package/dist/runtime/errorSuggestions.js +98 -0
  709. package/dist/runtime/errorTemplates.d.ts +101 -0
  710. package/dist/runtime/errorTemplates.d.ts.map +1 -0
  711. package/dist/runtime/errorTemplates.js +173 -0
  712. package/dist/runtime/errorUtils.d.ts +10 -0
  713. package/dist/runtime/errorUtils.d.ts.map +1 -0
  714. package/dist/runtime/errorUtils.js +42 -0
  715. package/dist/runtime/exceptions.d.ts +73 -0
  716. package/dist/runtime/exceptions.d.ts.map +1 -0
  717. package/dist/runtime/exceptions.js +197 -0
  718. package/dist/runtime/hooks/runtime.d.ts +31 -0
  719. package/dist/runtime/hooks/runtime.d.ts.map +1 -0
  720. package/dist/runtime/hooks/runtime.js +67 -0
  721. package/dist/runtime/index.d.ts +18 -0
  722. package/dist/runtime/index.d.ts.map +1 -0
  723. package/dist/runtime/index.js +61 -0
  724. package/dist/runtime/instrumentation.d.ts +6 -0
  725. package/dist/runtime/instrumentation.d.ts.map +1 -0
  726. package/dist/runtime/instrumentation.js +14 -0
  727. package/dist/runtime/intrinsics/breakpoint.d.ts +9 -0
  728. package/dist/runtime/intrinsics/breakpoint.d.ts.map +1 -0
  729. package/dist/runtime/intrinsics/breakpoint.js +108 -0
  730. package/dist/runtime/intrinsics/hook.d.ts +26 -0
  731. package/dist/runtime/intrinsics/hook.d.ts.map +1 -0
  732. package/dist/runtime/intrinsics/hook.js +45 -0
  733. package/dist/runtime/intrinsics/index.d.ts +7 -0
  734. package/dist/runtime/intrinsics/index.d.ts.map +1 -0
  735. package/dist/runtime/intrinsics/index.js +15 -0
  736. package/dist/runtime/intrinsics/orchestratorTask.d.ts +4 -0
  737. package/dist/runtime/intrinsics/orchestratorTask.d.ts.map +1 -0
  738. package/dist/runtime/intrinsics/orchestratorTask.js +28 -0
  739. package/dist/runtime/intrinsics/parallel.d.ts +9 -0
  740. package/dist/runtime/intrinsics/parallel.d.ts.map +1 -0
  741. package/dist/runtime/intrinsics/parallel.js +160 -0
  742. package/dist/runtime/intrinsics/parallelGroup.d.ts +16 -0
  743. package/dist/runtime/intrinsics/parallelGroup.d.ts.map +1 -0
  744. package/dist/runtime/intrinsics/parallelGroup.js +105 -0
  745. package/dist/runtime/intrinsics/sleep.d.ts +4 -0
  746. package/dist/runtime/intrinsics/sleep.d.ts.map +1 -0
  747. package/dist/runtime/intrinsics/sleep.js +70 -0
  748. package/dist/runtime/intrinsics/subprocess.d.ts +5 -0
  749. package/dist/runtime/intrinsics/subprocess.d.ts.map +1 -0
  750. package/dist/runtime/intrinsics/subprocess.js +56 -0
  751. package/dist/runtime/intrinsics/task.d.ts +26 -0
  752. package/dist/runtime/intrinsics/task.d.ts.map +1 -0
  753. package/dist/runtime/intrinsics/task.js +132 -0
  754. package/dist/runtime/intrinsics/taskHelpers.d.ts +20 -0
  755. package/dist/runtime/intrinsics/taskHelpers.d.ts.map +1 -0
  756. package/dist/runtime/intrinsics/taskHelpers.js +148 -0
  757. package/dist/runtime/invocation/hashInvocationKey.d.ts +12 -0
  758. package/dist/runtime/invocation/hashInvocationKey.d.ts.map +1 -0
  759. package/dist/runtime/invocation/hashInvocationKey.js +12 -0
  760. package/dist/runtime/invocation/index.d.ts +3 -0
  761. package/dist/runtime/invocation/index.d.ts.map +1 -0
  762. package/dist/runtime/invocation/index.js +5 -0
  763. package/dist/runtime/orchestrateHelpers.d.ts +16 -0
  764. package/dist/runtime/orchestrateHelpers.d.ts.map +1 -0
  765. package/dist/runtime/orchestrateHelpers.js +103 -0
  766. package/dist/runtime/orchestrateIteration.d.ts +4 -0
  767. package/dist/runtime/orchestrateIteration.d.ts.map +1 -0
  768. package/dist/runtime/orchestrateIteration.js +213 -0
  769. package/dist/runtime/parallelStrategies.d.ts +23 -0
  770. package/dist/runtime/parallelStrategies.d.ts.map +1 -0
  771. package/dist/runtime/parallelStrategies.js +79 -0
  772. package/dist/runtime/policy/engine.d.ts +4 -0
  773. package/dist/runtime/policy/engine.d.ts.map +1 -0
  774. package/dist/runtime/policy/engine.js +97 -0
  775. package/dist/runtime/policy/index.d.ts +5 -0
  776. package/dist/runtime/policy/index.d.ts.map +1 -0
  777. package/dist/runtime/policy/index.js +13 -0
  778. package/dist/runtime/policy/logging.d.ts +6 -0
  779. package/dist/runtime/policy/logging.d.ts.map +1 -0
  780. package/dist/runtime/policy/logging.js +43 -0
  781. package/dist/runtime/policy/types.d.ts +55 -0
  782. package/dist/runtime/policy/types.d.ts.map +1 -0
  783. package/dist/runtime/policy/types.js +10 -0
  784. package/dist/runtime/processContext.d.ts +36 -0
  785. package/dist/runtime/processContext.d.ts.map +1 -0
  786. package/dist/runtime/processContext.js +161 -0
  787. package/dist/runtime/replay/createReplayEngine.d.ts +32 -0
  788. package/dist/runtime/replay/createReplayEngine.d.ts.map +1 -0
  789. package/dist/runtime/replay/createReplayEngine.js +189 -0
  790. package/dist/runtime/replay/effectIndex.d.ts +39 -0
  791. package/dist/runtime/replay/effectIndex.d.ts.map +1 -0
  792. package/dist/runtime/replay/effectIndex.js +322 -0
  793. package/dist/runtime/replay/index.d.ts +7 -0
  794. package/dist/runtime/replay/index.d.ts.map +1 -0
  795. package/dist/runtime/replay/index.js +19 -0
  796. package/dist/runtime/replay/replayCursor.d.ts +7 -0
  797. package/dist/runtime/replay/replayCursor.d.ts.map +1 -0
  798. package/dist/runtime/replay/replayCursor.js +22 -0
  799. package/dist/runtime/replay/stateCache.d.ts +50 -0
  800. package/dist/runtime/replay/stateCache.d.ts.map +1 -0
  801. package/dist/runtime/replay/stateCache.js +222 -0
  802. package/dist/runtime/runLifecycleState.d.ts +7 -0
  803. package/dist/runtime/runLifecycleState.d.ts.map +1 -0
  804. package/dist/runtime/runLifecycleState.js +54 -0
  805. package/dist/runtime/schemaValidator.d.ts +16 -0
  806. package/dist/runtime/schemaValidator.d.ts.map +1 -0
  807. package/dist/runtime/schemaValidator.js +92 -0
  808. package/dist/runtime/types.d.ts +240 -0
  809. package/dist/runtime/types.d.ts.map +1 -0
  810. package/dist/runtime/types.js +2 -0
  811. package/dist/sdkVersion.d.ts +5 -0
  812. package/dist/sdkVersion.d.ts.map +1 -0
  813. package/dist/sdkVersion.js +49 -0
  814. package/dist/session/cleanup.d.ts +17 -0
  815. package/dist/session/cleanup.d.ts.map +1 -0
  816. package/dist/session/cleanup.js +212 -0
  817. package/dist/session/discovery.d.ts +25 -0
  818. package/dist/session/discovery.d.ts.map +1 -0
  819. package/dist/session/discovery.js +44 -0
  820. package/dist/session/index.d.ts +15 -0
  821. package/dist/session/index.d.ts.map +1 -0
  822. package/dist/session/index.js +42 -0
  823. package/dist/session/parse.d.ts +45 -0
  824. package/dist/session/parse.d.ts.map +1 -0
  825. package/dist/session/parse.js +176 -0
  826. package/dist/session/transcript.d.ts +7 -0
  827. package/dist/session/transcript.d.ts.map +1 -0
  828. package/dist/session/transcript.js +51 -0
  829. package/dist/session/types.d.ts +196 -0
  830. package/dist/session/types.d.ts.map +1 -0
  831. package/dist/session/types.js +45 -0
  832. package/dist/session/whoami.d.ts +16 -0
  833. package/dist/session/whoami.d.ts.map +1 -0
  834. package/dist/session/whoami.js +108 -0
  835. package/dist/session/write.d.ts +61 -0
  836. package/dist/session/write.d.ts.map +1 -0
  837. package/dist/session/write.js +217 -0
  838. package/dist/storage/atomic.d.ts +2 -0
  839. package/dist/storage/atomic.d.ts.map +1 -0
  840. package/dist/storage/atomic.js +54 -0
  841. package/dist/storage/cleanup.d.ts +4 -0
  842. package/dist/storage/cleanup.d.ts.map +1 -0
  843. package/dist/storage/cleanup.js +96 -0
  844. package/dist/storage/clock.d.ts +6 -0
  845. package/dist/storage/clock.d.ts.map +1 -0
  846. package/dist/storage/clock.js +29 -0
  847. package/dist/storage/createRunDir.d.ts +6 -0
  848. package/dist/storage/createRunDir.d.ts.map +1 -0
  849. package/dist/storage/createRunDir.js +87 -0
  850. package/dist/storage/icloudWarning.d.ts +6 -0
  851. package/dist/storage/icloudWarning.d.ts.map +1 -0
  852. package/dist/storage/icloudWarning.js +84 -0
  853. package/dist/storage/index.d.ts +9 -0
  854. package/dist/storage/index.d.ts.map +1 -0
  855. package/dist/storage/index.js +36 -0
  856. package/dist/storage/journal.d.ts +4 -0
  857. package/dist/storage/journal.d.ts.map +1 -0
  858. package/dist/storage/journal.js +133 -0
  859. package/dist/storage/lock.d.ts +10 -0
  860. package/dist/storage/lock.d.ts.map +1 -0
  861. package/dist/storage/lock.js +82 -0
  862. package/dist/storage/paths.d.ts +23 -0
  863. package/dist/storage/paths.d.ts.map +1 -0
  864. package/dist/storage/paths.js +51 -0
  865. package/dist/storage/runFiles.d.ts +6 -0
  866. package/dist/storage/runFiles.d.ts.map +1 -0
  867. package/dist/storage/runFiles.js +44 -0
  868. package/dist/storage/tasks.d.ts +17 -0
  869. package/dist/storage/tasks.d.ts.map +1 -0
  870. package/dist/storage/tasks.js +83 -0
  871. package/dist/storage/types.d.ts +121 -0
  872. package/dist/storage/types.d.ts.map +1 -0
  873. package/dist/storage/types.js +2 -0
  874. package/dist/storage/ulids.d.ts +11 -0
  875. package/dist/storage/ulids.d.ts.map +1 -0
  876. package/dist/storage/ulids.js +25 -0
  877. package/dist/tasks/batching.d.ts +34 -0
  878. package/dist/tasks/batching.d.ts.map +1 -0
  879. package/dist/tasks/batching.js +91 -0
  880. package/dist/tasks/context.d.ts +11 -0
  881. package/dist/tasks/context.d.ts.map +1 -0
  882. package/dist/tasks/context.js +181 -0
  883. package/dist/tasks/defineTask.d.ts +37 -0
  884. package/dist/tasks/defineTask.d.ts.map +1 -0
  885. package/dist/tasks/defineTask.js +99 -0
  886. package/dist/tasks/effectGroup.d.ts +19 -0
  887. package/dist/tasks/effectGroup.d.ts.map +1 -0
  888. package/dist/tasks/effectGroup.js +58 -0
  889. package/dist/tasks/grouping.d.ts +19 -0
  890. package/dist/tasks/grouping.d.ts.map +1 -0
  891. package/dist/tasks/grouping.js +54 -0
  892. package/dist/tasks/index.d.ts +9 -0
  893. package/dist/tasks/index.d.ts.map +1 -0
  894. package/dist/tasks/index.js +24 -0
  895. package/dist/tasks/kinds/index.d.ts +7 -0
  896. package/dist/tasks/kinds/index.d.ts.map +1 -0
  897. package/dist/tasks/kinds/index.js +162 -0
  898. package/dist/tasks/kinds/resolvers.d.ts +21 -0
  899. package/dist/tasks/kinds/resolvers.d.ts.map +1 -0
  900. package/dist/tasks/kinds/resolvers.js +124 -0
  901. package/dist/tasks/partitioning.d.ts +11 -0
  902. package/dist/tasks/partitioning.d.ts.map +1 -0
  903. package/dist/tasks/partitioning.js +20 -0
  904. package/dist/tasks/registry.d.ts +53 -0
  905. package/dist/tasks/registry.d.ts.map +1 -0
  906. package/dist/tasks/registry.js +147 -0
  907. package/dist/tasks/serializer.d.ts +62 -0
  908. package/dist/tasks/serializer.d.ts.map +1 -0
  909. package/dist/tasks/serializer.js +197 -0
  910. package/dist/tasks/types.d.ts +180 -0
  911. package/dist/tasks/types.d.ts.map +1 -0
  912. package/dist/tasks/types.js +2 -0
  913. package/dist/test-fixtures/kinds/index.d.ts +56 -0
  914. package/dist/test-fixtures/kinds/index.d.ts.map +1 -0
  915. package/dist/test-fixtures/kinds/index.js +44 -0
  916. package/dist/testing/deterministic.d.ts +62 -0
  917. package/dist/testing/deterministic.d.ts.map +1 -0
  918. package/dist/testing/deterministic.js +193 -0
  919. package/dist/testing/deterministicProviders.d.ts +32 -0
  920. package/dist/testing/deterministicProviders.d.ts.map +1 -0
  921. package/dist/testing/deterministicProviders.js +263 -0
  922. package/dist/testing/index.d.ts +4 -0
  923. package/dist/testing/index.d.ts.map +1 -0
  924. package/dist/testing/index.js +23 -0
  925. package/dist/testing/runHarness.d.ts +64 -0
  926. package/dist/testing/runHarness.d.ts.map +1 -0
  927. package/dist/testing/runHarness.js +165 -0
  928. package/dist/testing/snapshots.d.ts +17 -0
  929. package/dist/testing/snapshots.d.ts.map +1 -0
  930. package/dist/testing/snapshots.js +24 -0
  931. package/dist/utils/ancestorWalk.d.ts +14 -0
  932. package/dist/utils/ancestorWalk.d.ts.map +1 -0
  933. package/dist/utils/ancestorWalk.js +203 -0
  934. package/dist/utils/compressContext.d.ts +50 -0
  935. package/dist/utils/compressContext.d.ts.map +1 -0
  936. package/dist/utils/compressContext.js +180 -0
  937. package/dist/utils/processLiveness.d.ts +9 -0
  938. package/dist/utils/processLiveness.d.ts.map +1 -0
  939. package/dist/utils/processLiveness.js +36 -0
  940. package/dist/utils/sessionMarker.d.ts +17 -0
  941. package/dist/utils/sessionMarker.d.ts.map +1 -0
  942. package/dist/utils/sessionMarker.js +218 -0
  943. package/package.json +4 -4
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderRunCreation = renderRunCreation;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
6
+ /**
7
+ * Check whether the harness uses codex-style ambient env var session binding.
8
+ */
9
+ function hasCodexAmbientSessionBinding(ctx) {
10
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
11
+ if (target?.callerEnvVars) {
12
+ return target.callerEnvVars.includes('CODEX_THREAD_ID') || target.callerEnvVars.includes('CODEX_SESSION_ID');
13
+ }
14
+ return false;
15
+ }
16
+ /**
17
+ * Check whether the harness uses programmatic adapter family (pi-style).
18
+ */
19
+ function isProgrammaticAdapter(ctx) {
20
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
21
+ return target?.adapterFamily === 'programmatic';
22
+ }
23
+ /**
24
+ * Renders the run:create and session binding section.
25
+ * Complex conditional logic is pre-computed and passed as extras to the template.
26
+ */
27
+ function renderRunCreation(ctx) {
28
+ const bindingFlagsLine = ctx.sessionBindingFlags
29
+ ? `\n ${ctx.sessionBindingFlags} \\`
30
+ : '';
31
+ const requiredFlagsLines = [
32
+ '**Required flags:**',
33
+ '- `--process-id <id>` -- unique identifier for the process definition',
34
+ '- `--entry <absolute-path>#<export>` -- path to the process JS file and its',
35
+ ' named export (e.g., `./my-process.js#process`). Omit to create a bare run',
36
+ ' (assign the process later via `run:assign-process`)',
37
+ '- `--prompt "$PROMPT"` -- the user\'s initial prompt/request text',
38
+ `- \`--harness ${ctx.harness}\` -- activates ${ctx.harnessLabel} session binding. The session ID is`,
39
+ ` auto-resolved from ${ctx.sessionEnvVars}.`,
40
+ ];
41
+ const isCodexStyle = hasCodexAmbientSessionBinding(ctx);
42
+ const sessionIdNote = isCodexStyle
43
+ ? `Do **not** pass \`--session-id\` explicitly inside a real ${ctx.harnessLabel} session. The\nsession ID auto-resolves from the **PID-scoped session marker** written by the\nsession-start hook (authoritative), with the harness env file and\n\`AGENT_SESSION_ID\` env var used only as last-resort fallbacks. Orchestrators\ncan verify the binding at any time via \`babysitter session:whoami --json\`. Only\npass \`--session-id\` in out-of-band recovery flows.\n`
44
+ : `The session ID auto-resolves from the **PID-scoped session marker** written by\nthe session-start hook (authoritative), with the harness env file and\n\`AGENT_SESSION_ID\` env var used only as last-resort fallbacks. Orchestrators\ncan verify the binding at any time via \`babysitter session:whoami --json\`.\n`;
45
+ const resumeFlagsLine = ctx.resumeFlags
46
+ ? `\n ${ctx.resumeFlags} \\`
47
+ : '';
48
+ const isProgrammatic = isProgrammaticAdapter(ctx);
49
+ const mistakeHarnessNote = isCodexStyle
50
+ ? `- wrong: Trying to bind the session in a separate step after run creation\n- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND\n auto-bind the session, relying on environment variables for honest session\n binding`
51
+ : isProgrammatic
52
+ ? `- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND\n auto-bind the session, relying on the environment variables set by the\n extension for honest session binding.`
53
+ : `- wrong: Trying to bind the session in a separate step after run creation instead of using \`--harness ${ctx.harness}\` to do both in one step.\n- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND auto-bind the session without manual intervention and relying on the environment variables set by the hooks for honest session binding.`;
54
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('run-creation.md'), ctx, {
55
+ bindingFlagsLine,
56
+ requiredFlagsList: requiredFlagsLines.join('\n'),
57
+ sessionIdNote,
58
+ resumeFlagsLine,
59
+ mistakeHarnessNote,
60
+ });
61
+ }
@@ -0,0 +1,6 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the Run Overlap Detection section.
4
+ */
5
+ export declare function renderRunOverlapDetection(ctx: PromptContext): string;
6
+ //# sourceMappingURL=runOverlapDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runOverlapDetection.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/runOverlapDetection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAEpE"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderRunOverlapDetection = renderRunOverlapDetection;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ /**
6
+ * Renders the Run Overlap Detection section.
7
+ */
8
+ function renderRunOverlapDetection(ctx) {
9
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('run-overlap-detection.md'), ctx);
10
+ }
@@ -0,0 +1,7 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the See Also links section.
4
+ * This section is identical across all harnesses.
5
+ */
6
+ export declare function renderSeeAlso(ctx: PromptContext): string;
7
+ //# sourceMappingURL=seeAlso.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seeAlso.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/seeAlso.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAExD"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderSeeAlso = renderSeeAlso;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ /**
6
+ * Renders the See Also links section.
7
+ * This section is identical across all harnesses.
8
+ */
9
+ function renderSeeAlso(ctx) {
10
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('see-also.md'), ctx);
11
+ }
@@ -0,0 +1,7 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the Agent Task Example and Skill Task Example sections.
4
+ * These are identical across all harnesses.
5
+ */
6
+ export declare function renderTaskExamples(ctx: PromptContext): string;
7
+ //# sourceMappingURL=taskExamples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskExamples.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/taskExamples.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAE7D"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderTaskExamples = renderTaskExamples;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ /**
6
+ * Renders the Agent Task Example and Skill Task Example sections.
7
+ * These are identical across all harnesses.
8
+ */
9
+ function renderTaskExamples(ctx) {
10
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('task-examples.md'), ctx);
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the Task Kinds table and Effect Execution Hints section.
4
+ */
5
+ export declare function renderTaskKinds(ctx: PromptContext): string;
6
+ //# sourceMappingURL=taskKinds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskKinds.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/taskKinds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAS1D"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderTaskKinds = renderTaskKinds;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
6
+ /**
7
+ * Resolve the skill system label from catalog metadata.
8
+ */
9
+ function resolveSkillSystemLabel(ctx) {
10
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
11
+ if (target?.skillSystemLabel)
12
+ return target.skillSystemLabel;
13
+ return 'Installed skill';
14
+ }
15
+ /**
16
+ * Renders the Task Kinds table and Effect Execution Hints section.
17
+ */
18
+ function renderTaskKinds(ctx) {
19
+ const skillSystemLabel = resolveSkillSystemLabel(ctx);
20
+ const augmentedCtx = {
21
+ ...ctx,
22
+ skillSystemLabel,
23
+ };
24
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('task-kinds.md'), augmentedCtx);
25
+ }
@@ -0,0 +1,7 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the Tool Usage Rules section.
4
+ * Static guidelines for preferring dedicated tools over shell commands.
5
+ */
6
+ export declare function renderToolPreferences(_ctx: PromptContext): string;
7
+ //# sourceMappingURL=toolPreferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolPreferences.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/toolPreferences.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderToolPreferences = renderToolPreferences;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ /**
6
+ * Renders the Tool Usage Rules section.
7
+ * Static guidelines for preferring dedicated tools over shell commands.
8
+ */
9
+ function renderToolPreferences(_ctx) {
10
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('tool-preferences.md'), _ctx);
11
+ }
@@ -0,0 +1,7 @@
1
+ import type { PromptContext } from '../types';
2
+ /**
3
+ * Renders the User Profile Integration section.
4
+ * This section is identical across all harnesses.
5
+ */
6
+ export declare function renderUserProfile(ctx: PromptContext): string;
7
+ //# sourceMappingURL=userProfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userProfile.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/userProfile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderUserProfile = renderUserProfile;
4
+ const templateRenderer_1 = require("../templateRenderer");
5
+ /**
6
+ * Renders the User Profile Integration section.
7
+ * This section is identical across all harnesses.
8
+ */
9
+ function renderUserProfile(ctx) {
10
+ return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('user-profile.md'), ctx);
11
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * GAP-PROMPT-002: Runtime Prompt Context Factory
3
+ *
4
+ * Wraps static context factories with runtime capability collection,
5
+ * producing enriched PromptContext instances with deterministic capabilities.
6
+ *
7
+ * @module prompts/runtimeContext
8
+ */
9
+ import type { PromptContext } from './types';
10
+ import type { CapabilityCollectionOptions } from './capabilityCollector';
11
+ /**
12
+ * Options for creating a runtime-enriched PromptContext.
13
+ */
14
+ export interface RuntimeContextOptions {
15
+ /** Harness identifier */
16
+ harness: string;
17
+ /** Partial overrides for the base context */
18
+ baseContext?: Partial<PromptContext>;
19
+ /** Options for runtime capability collection */
20
+ collectionOptions?: CapabilityCollectionOptions;
21
+ }
22
+ /**
23
+ * Create a PromptContext enriched with runtime-collected capabilities.
24
+ *
25
+ * Picks the correct static context factory based on harness name,
26
+ * collects runtime capabilities, and returns a context with merged,
27
+ * sorted capabilities. Falls back to claude-code context for unknown harnesses.
28
+ */
29
+ export declare function createRuntimePromptContext(options: RuntimeContextOptions): Promise<PromptContext>;
30
+ //# sourceMappingURL=runtimeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeContext.d.ts","sourceRoot":"","sources":["../../src/prompts/runtimeContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACrC,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,aAAa,CAAC,CAoBxB"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * GAP-PROMPT-002: Runtime Prompt Context Factory
4
+ *
5
+ * Wraps static context factories with runtime capability collection,
6
+ * producing enriched PromptContext instances with deterministic capabilities.
7
+ *
8
+ * @module prompts/runtimeContext
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.createRuntimePromptContext = createRuntimePromptContext;
12
+ const registry_1 = require("../harness/registry");
13
+ const capabilityCollector_1 = require("./capabilityCollector");
14
+ /**
15
+ * Create a PromptContext enriched with runtime-collected capabilities.
16
+ *
17
+ * Picks the correct static context factory based on harness name,
18
+ * collects runtime capabilities, and returns a context with merged,
19
+ * sorted capabilities. Falls back to claude-code context for unknown harnesses.
20
+ */
21
+ async function createRuntimePromptContext(options) {
22
+ const baseCtx = (0, registry_1.createPromptContextForHarness)(options.harness, options.baseContext) ??
23
+ (0, registry_1.createPromptContextForHarness)('claude-code', {
24
+ ...options.baseContext,
25
+ harness: options.harness,
26
+ });
27
+ if (!baseCtx) {
28
+ throw new Error('Claude Code prompt context is not available.');
29
+ }
30
+ const collected = await (0, capabilityCollector_1.collectCapabilities)({
31
+ harness: options.harness,
32
+ ...options.collectionOptions,
33
+ });
34
+ return {
35
+ ...baseCtx,
36
+ capabilities: (0, capabilityCollector_1.mergeCapabilities)(baseCtx.capabilities, collected),
37
+ };
38
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * GAP-PROMPT-001: Prompt Strata Model
3
+ * GAP-PERF-005: Cache-Aware Prompt Assembly
4
+ *
5
+ * Classifies prompt parts into three strata (stable, runtime, turnLocal)
6
+ * and provides strata-aware composition for cache optimization and
7
+ * deterministic prompt assembly.
8
+ *
9
+ * @module prompts/strata
10
+ */
11
+ import type { PromptContext, PromptPart, PromptStratum, StratumTaggedPart, ComposeByStrataOptions, StratumChecksums, ComposeByStrataWithMetaResult } from './types';
12
+ /**
13
+ * Canonical stratum ordering: stable first (most cacheable), turnLocal last (most volatile).
14
+ */
15
+ export declare const STRATUM_ORDER: readonly PromptStratum[];
16
+ /**
17
+ * Factory for creating a StratumTaggedPart.
18
+ */
19
+ export declare function tagPart(name: string, stratum: PromptStratum, render: PromptPart, volatilityScore?: number): StratumTaggedPart;
20
+ /**
21
+ * Map of all known prompt parts to their stratum classification.
22
+ *
23
+ * STABLE (11): System identity, core rules, tool definitions — rarely change.
24
+ * RUNTIME (12): Capabilities, flags, workspace context — change per session.
25
+ * TURN_LOCAL (6): Interview, user profile, task-specific — change every turn.
26
+ *
27
+ * Volatility scores (0=most stable, 100=most volatile) control intra-stratum
28
+ * ordering for cache-prefix optimization (GAP-PERF-005).
29
+ */
30
+ export declare const PART_STRATA_MAP: Record<string, StratumTaggedPart>;
31
+ /**
32
+ * Filter PART_STRATA_MAP by stratum.
33
+ */
34
+ export declare function getPartsForStratum(stratum: PromptStratum): StratumTaggedPart[];
35
+ /**
36
+ * Compose prompt parts grouped by stratum in canonical order.
37
+ *
38
+ * Parts are grouped into stable -> runtime -> turnLocal sections.
39
+ * Empty parts are skipped. Empty strata groups are omitted entirely.
40
+ * When `showStrata` is true, stratum header labels are prepended to each group.
41
+ *
42
+ * GAP-PERF-005: Parts within each stratum are sorted by volatilityScore
43
+ * ascending (most stable first) unless sortByVolatility is explicitly false.
44
+ */
45
+ export declare function composeByStrata(taggedParts: StratumTaggedPart[], ctx: PromptContext, options?: ComposeByStrataOptions): string;
46
+ /**
47
+ * GAP-PERF-005: Compose prompt parts with strata metadata for cache optimization.
48
+ *
49
+ * Returns both the composed output and per-stratum SHA256 checksums.
50
+ * Checksums enable cache-break detection between iterations.
51
+ */
52
+ export declare function composeByStrataWithMeta(taggedParts: StratumTaggedPart[], ctx: PromptContext, options?: ComposeByStrataOptions): ComposeByStrataWithMetaResult;
53
+ /**
54
+ * GAP-PERF-005: Detect which strata changed between two compositions.
55
+ *
56
+ * Returns an array of strata whose checksums differ (including strata
57
+ * that are newly added or removed between prev and next).
58
+ */
59
+ export declare function detectStratumChanges(prev: StratumChecksums, next: StratumChecksums): PromptStratum[];
60
+ //# sourceMappingURL=strata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strata.d.ts","sourceRoot":"","sources":["../../src/prompts/strata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAAgD,CAAC;AAOnG;;GAEG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,UAAU,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,iBAAiB,CAEnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAqC7D,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,iBAAiB,EAAE,CAE9E;AA4FD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,iBAAiB,EAAE,EAChC,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAKR;AAaD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,iBAAiB,EAAE,EAChC,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,6BAA6B,CAc/B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,gBAAgB,GACrB,aAAa,EAAE,CAQjB"}
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ /**
3
+ * GAP-PROMPT-001: Prompt Strata Model
4
+ * GAP-PERF-005: Cache-Aware Prompt Assembly
5
+ *
6
+ * Classifies prompt parts into three strata (stable, runtime, turnLocal)
7
+ * and provides strata-aware composition for cache optimization and
8
+ * deterministic prompt assembly.
9
+ *
10
+ * @module prompts/strata
11
+ */
12
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ var desc = Object.getOwnPropertyDescriptor(m, k);
15
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
+ desc = { enumerable: true, get: function() { return m[k]; } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
19
+ }) : (function(o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ o[k2] = m[k];
22
+ }));
23
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
24
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25
+ }) : function(o, v) {
26
+ o["default"] = v;
27
+ });
28
+ var __importStar = (this && this.__importStar) || (function () {
29
+ var ownKeys = function(o) {
30
+ ownKeys = Object.getOwnPropertyNames || function (o) {
31
+ var ar = [];
32
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
+ return ar;
34
+ };
35
+ return ownKeys(o);
36
+ };
37
+ return function (mod) {
38
+ if (mod && mod.__esModule) return mod;
39
+ var result = {};
40
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
+ __setModuleDefault(result, mod);
42
+ return result;
43
+ };
44
+ })();
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.PART_STRATA_MAP = exports.STRATUM_ORDER = void 0;
47
+ exports.tagPart = tagPart;
48
+ exports.getPartsForStratum = getPartsForStratum;
49
+ exports.composeByStrata = composeByStrata;
50
+ exports.composeByStrataWithMeta = composeByStrataWithMeta;
51
+ exports.detectStratumChanges = detectStratumChanges;
52
+ const node_crypto_1 = require("node:crypto");
53
+ const parts = __importStar(require("./parts"));
54
+ /**
55
+ * Canonical stratum ordering: stable first (most cacheable), turnLocal last (most volatile).
56
+ */
57
+ exports.STRATUM_ORDER = ['stable', 'runtime', 'turnLocal'];
58
+ /**
59
+ * Default volatility score for parts that don't specify one.
60
+ */
61
+ const DEFAULT_VOLATILITY_SCORE = 50;
62
+ /**
63
+ * Factory for creating a StratumTaggedPart.
64
+ */
65
+ function tagPart(name, stratum, render, volatilityScore) {
66
+ return { name, stratum, render, volatilityScore };
67
+ }
68
+ /**
69
+ * Map of all known prompt parts to their stratum classification.
70
+ *
71
+ * STABLE (11): System identity, core rules, tool definitions — rarely change.
72
+ * RUNTIME (12): Capabilities, flags, workspace context — change per session.
73
+ * TURN_LOCAL (6): Interview, user profile, task-specific — change every turn.
74
+ *
75
+ * Volatility scores (0=most stable, 100=most volatile) control intra-stratum
76
+ * ordering for cache-prefix optimization (GAP-PERF-005).
77
+ */
78
+ exports.PART_STRATA_MAP = {
79
+ // ── Stable stratum ───────────────────────────────────────────────────
80
+ renderNonNegotiables: tagPart('renderNonNegotiables', 'stable', parts.renderNonNegotiables, 5),
81
+ renderCriticalRules: tagPart('renderCriticalRules', 'stable', parts.renderCriticalRules, 5),
82
+ renderTaskKinds: tagPart('renderTaskKinds', 'stable', parts.renderTaskKinds, 10),
83
+ renderCompletionProof: tagPart('renderCompletionProof', 'stable', parts.renderCompletionProof, 10),
84
+ renderTaskExamples: tagPart('renderTaskExamples', 'stable', parts.renderTaskExamples, 15),
85
+ renderProcessGuidelines: tagPart('renderProcessGuidelines', 'stable', parts.renderProcessGuidelines, 15),
86
+ renderCodingPhilosophy: tagPart('renderCodingPhilosophy', 'stable', parts.renderCodingPhilosophy, 20),
87
+ renderToolPreferences: tagPart('renderToolPreferences', 'stable', parts.renderToolPreferences, 20),
88
+ renderOutputEfficiency: tagPart('renderOutputEfficiency', 'stable', parts.renderOutputEfficiency, 20),
89
+ renderGitSafety: tagPart('renderGitSafety', 'stable', parts.renderGitSafety, 20),
90
+ renderPriorityLadder: tagPart('renderPriorityLadder', 'stable', parts.renderPriorityLadder, 22),
91
+ renderRootCauseGuardrail: tagPart('renderRootCauseGuardrail', 'stable', parts.renderRootCauseGuardrail, 22),
92
+ renderSeeAlso: tagPart('renderSeeAlso', 'stable', parts.renderSeeAlso, 25),
93
+ // ── Runtime stratum ──────────────────────────────────────────────────
94
+ renderLoopControl: tagPart('renderLoopControl', 'runtime', parts.renderLoopControl, 30),
95
+ renderIteration: tagPart('renderIteration', 'runtime', parts.renderIteration, 30),
96
+ renderEffects: tagPart('renderEffects', 'runtime', parts.renderEffects, 30),
97
+ renderBreakpointHandling: tagPart('renderBreakpointHandling', 'runtime', parts.renderBreakpointHandling, 30),
98
+ renderResultsPosting: tagPart('renderResultsPosting', 'runtime', parts.renderResultsPosting, 30),
99
+ renderRunCreation: tagPart('renderRunCreation', 'runtime', parts.renderRunCreation, 35),
100
+ renderParallelDispatch: tagPart('renderParallelDispatch', 'runtime', parts.renderParallelDispatch, 35),
101
+ renderRunOverlapDetection: tagPart('renderRunOverlapDetection', 'runtime', parts.renderRunOverlapDetection, 40),
102
+ renderParallelPhaseDetection: tagPart('renderParallelPhaseDetection', 'runtime', parts.renderParallelPhaseDetection, 40),
103
+ renderDependencies: tagPart('renderDependencies', 'runtime', parts.renderDependencies, 45),
104
+ renderRecovery: tagPart('renderRecovery', 'runtime', parts.renderRecovery, 45),
105
+ renderQuickReference: tagPart('renderQuickReference', 'runtime', parts.renderQuickReference, 50),
106
+ // ── Turn-local stratum ───────────────────────────────────────────────
107
+ renderIntentFidelityChecks: tagPart('renderIntentFidelityChecks', 'turnLocal', parts.renderIntentFidelityChecks, 55),
108
+ renderProcessCreation: tagPart('renderProcessCreation', 'turnLocal', parts.renderProcessCreation, 60),
109
+ renderInterview: tagPart('renderInterview', 'turnLocal', parts.renderInterview, 70),
110
+ renderUserProfile: tagPart('renderUserProfile', 'turnLocal', parts.renderUserProfile, 75),
111
+ renderProjectInstructions: tagPart('renderProjectInstructions', 'turnLocal', parts.renderProjectInstructions, 80),
112
+ renderContinuityOverlay: tagPart('renderContinuityOverlay', 'turnLocal', parts.renderContinuityOverlay, 90),
113
+ };
114
+ /**
115
+ * Filter PART_STRATA_MAP by stratum.
116
+ */
117
+ function getPartsForStratum(stratum) {
118
+ return Object.values(exports.PART_STRATA_MAP).filter(p => p.stratum === stratum);
119
+ }
120
+ const DEFAULT_SEPARATOR = '\n\n---\n\n';
121
+ /**
122
+ * Get effective volatility score for a part (defaults to 50).
123
+ */
124
+ function getVolatility(part) {
125
+ return part.volatilityScore ?? DEFAULT_VOLATILITY_SCORE;
126
+ }
127
+ /**
128
+ * Sort parts within a stratum by volatility score (ascending = most stable first).
129
+ * Uses a stable sort to preserve insertion order for equal scores.
130
+ */
131
+ function sortPartsByVolatility(partsInStratum) {
132
+ return [...partsInStratum].sort((a, b) => getVolatility(a) - getVolatility(b));
133
+ }
134
+ /**
135
+ * Shared composition logic: renders all strata and returns per-stratum results.
136
+ */
137
+ function renderAllStrata(taggedParts, ctx, options) {
138
+ const showStrata = options?.showStrata ?? false;
139
+ const shouldSortByVolatility = options?.sortByVolatility !== false;
140
+ const results = [];
141
+ for (const stratum of exports.STRATUM_ORDER) {
142
+ let partsInStratum = taggedParts.filter(p => p.stratum === stratum);
143
+ if (partsInStratum.length === 0)
144
+ continue;
145
+ if (shouldSortByVolatility) {
146
+ partsInStratum = sortPartsByVolatility(partsInStratum);
147
+ }
148
+ const formatted = [];
149
+ const raw = [];
150
+ for (const part of partsInStratum) {
151
+ const rendered = part.render(ctx);
152
+ if (rendered.length === 0)
153
+ continue;
154
+ raw.push(rendered);
155
+ if (showStrata) {
156
+ const volLabel = part.volatilityScore != null ? ` vol:${part.volatilityScore}` : '';
157
+ formatted.push(`<!-- [part: ${part.name}${volLabel}] -->\n${rendered}`);
158
+ }
159
+ else {
160
+ formatted.push(rendered);
161
+ }
162
+ }
163
+ if (formatted.length > 0) {
164
+ results.push({ stratum, formatted, raw });
165
+ }
166
+ }
167
+ return results;
168
+ }
169
+ /**
170
+ * Assemble stratum render results into a final output string.
171
+ */
172
+ function assembleOutput(results, separator, showStrata) {
173
+ const groups = [];
174
+ for (const { stratum, formatted } of results) {
175
+ if (showStrata) {
176
+ groups.push(`<!-- [stratum: ${stratum}] -->\n${formatted.join(separator)}`);
177
+ }
178
+ else {
179
+ groups.push(formatted.join(separator));
180
+ }
181
+ }
182
+ return groups.join(separator);
183
+ }
184
+ /**
185
+ * Compose prompt parts grouped by stratum in canonical order.
186
+ *
187
+ * Parts are grouped into stable -> runtime -> turnLocal sections.
188
+ * Empty parts are skipped. Empty strata groups are omitted entirely.
189
+ * When `showStrata` is true, stratum header labels are prepended to each group.
190
+ *
191
+ * GAP-PERF-005: Parts within each stratum are sorted by volatilityScore
192
+ * ascending (most stable first) unless sortByVolatility is explicitly false.
193
+ */
194
+ function composeByStrata(taggedParts, ctx, options) {
195
+ const separator = options?.separator ?? DEFAULT_SEPARATOR;
196
+ const showStrata = options?.showStrata ?? false;
197
+ const results = renderAllStrata(taggedParts, ctx, options);
198
+ return assembleOutput(results, separator, showStrata);
199
+ }
200
+ /**
201
+ * GAP-PERF-005: Compute SHA256 checksum of concatenated rendered parts.
202
+ */
203
+ function computeStratumChecksum(renderedParts) {
204
+ const hash = (0, node_crypto_1.createHash)('sha256');
205
+ for (const part of renderedParts) {
206
+ hash.update(part);
207
+ }
208
+ return hash.digest('hex');
209
+ }
210
+ /**
211
+ * GAP-PERF-005: Compose prompt parts with strata metadata for cache optimization.
212
+ *
213
+ * Returns both the composed output and per-stratum SHA256 checksums.
214
+ * Checksums enable cache-break detection between iterations.
215
+ */
216
+ function composeByStrataWithMeta(taggedParts, ctx, options) {
217
+ const separator = options?.separator ?? DEFAULT_SEPARATOR;
218
+ const showStrata = options?.showStrata ?? false;
219
+ const results = renderAllStrata(taggedParts, ctx, options);
220
+ const stratumChecksums = {};
221
+ for (const { stratum, raw } of results) {
222
+ stratumChecksums[stratum] = computeStratumChecksum(raw);
223
+ }
224
+ return {
225
+ output: assembleOutput(results, separator, showStrata),
226
+ stratumChecksums,
227
+ };
228
+ }
229
+ /**
230
+ * GAP-PERF-005: Detect which strata changed between two compositions.
231
+ *
232
+ * Returns an array of strata whose checksums differ (including strata
233
+ * that are newly added or removed between prev and next).
234
+ */
235
+ function detectStratumChanges(prev, next) {
236
+ const changed = [];
237
+ for (const stratum of exports.STRATUM_ORDER) {
238
+ if (prev[stratum] !== next[stratum]) {
239
+ changed.push(stratum);
240
+ }
241
+ }
242
+ return changed;
243
+ }
@@ -0,0 +1,18 @@
1
+ import type { PromptContext } from "./types";
2
+ /**
3
+ * Simple Mustache-like template renderer for .md prompt templates.
4
+ * Supports:
5
+ * {{key}} — replaced with ctx[key] or extras[key] value (toString)
6
+ * {{#key}}...{{/key}} — included if ctx[key] is truthy
7
+ * {{^key}}...{{/key}} — included if ctx[key] is falsy
8
+ * {{#cap.NAME}}...{{/cap.NAME}} — included if ctx.capabilities includes 'NAME'
9
+ * {{^cap.NAME}}...{{/cap.NAME}} — included if ctx.capabilities does NOT include 'NAME'
10
+ * {{#interactive}}...{{/interactive}} — included if ctx.interactive !== false
11
+ * {{^interactive}}...{{/interactive}} — included if ctx.interactive !== true
12
+ * {{#interactive.unknown}}...{{/interactive.unknown}} — included if ctx.interactive === undefined
13
+ */
14
+ export declare function renderTemplate(templatePath: string, ctx: PromptContext, extras?: Record<string, string>): string;
15
+ export declare function renderTemplateString(raw: string, ctx: PromptContext, extras?: Record<string, string>): string;
16
+ /** Resolves a template path relative to the templates/ directory */
17
+ export declare function resolveTemplatePath(templateName: string): string;
18
+ //# sourceMappingURL=templateRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateRenderer.d.ts","sourceRoot":"","sources":["../../src/prompts/templateRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,aAAa,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAGR;AA6BD,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,aAAa,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAyER;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEhE"}