rhachet 1.11.0 → 1.12.2

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 (298) hide show
  1. package/dist/contract/cli/invoke.js +10 -1
  2. package/dist/contract/cli/invoke.js.map +1 -1
  3. package/dist/contract/cli/invokeAsk.d.ts +3 -3
  4. package/dist/contract/cli/invokeBriefs.d.ts +2 -2
  5. package/dist/contract/cli/invokeBriefsBoot.d.ts +1 -1
  6. package/dist/contract/cli/invokeBriefsBoot.js +2 -2
  7. package/dist/contract/cli/invokeBriefsBoot.js.map +1 -1
  8. package/dist/contract/cli/invokeBriefsLink.d.ts +2 -2
  9. package/dist/contract/cli/invokeBriefsLink.js +9 -47
  10. package/dist/contract/cli/invokeBriefsLink.js.map +1 -1
  11. package/dist/contract/cli/invokeChoose.d.ts +1 -1
  12. package/dist/contract/cli/invokeInit.d.ts +9 -0
  13. package/dist/contract/cli/invokeInit.js +57 -0
  14. package/dist/contract/cli/invokeInit.js.map +1 -0
  15. package/dist/contract/cli/invokeList.d.ts +2 -2
  16. package/dist/contract/cli/invokeReadme.d.ts +2 -2
  17. package/dist/contract/cli/invokeRoles.d.ts +2 -2
  18. package/dist/contract/cli/invokeRolesBoot.d.ts +1 -1
  19. package/dist/contract/cli/invokeRolesBoot.js +2 -2
  20. package/dist/contract/cli/invokeRolesBoot.js.map +1 -1
  21. package/dist/contract/cli/invokeRolesLink.d.ts +2 -2
  22. package/dist/contract/cli/invokeRolesLink.js +17 -96
  23. package/dist/contract/cli/invokeRolesLink.js.map +1 -1
  24. package/dist/contract/sdk.d.ts +13 -13
  25. package/dist/contract/sdk.js +25 -25
  26. package/dist/contract/sdk.js.map +1 -1
  27. package/dist/domain/constants.d.ts +3 -0
  28. package/dist/domain/constants.js +5 -0
  29. package/dist/domain/constants.js.map +1 -0
  30. package/dist/domain/objects/InvokeHooks.d.ts +1 -1
  31. package/dist/domain/objects/InvokeOpts.d.ts +1 -1
  32. package/dist/domain/objects/Role.d.ts +2 -2
  33. package/dist/domain/objects/RoleContext.d.ts +1 -1
  34. package/dist/domain/objects/RoleSkill.d.ts +2 -2
  35. package/dist/domain/objects/RoleSkillArgGetter.d.ts +3 -3
  36. package/dist/domain/objects/RoleTrait.d.ts +2 -2
  37. package/dist/domain/objects/Stitch.d.ts +4 -4
  38. package/dist/domain/objects/Stitch.js.map +1 -1
  39. package/dist/domain/objects/StitchChoice.d.ts +2 -2
  40. package/dist/domain/objects/StitchChoice.js.map +1 -1
  41. package/dist/domain/objects/StitchCycle.d.ts +4 -4
  42. package/dist/domain/objects/StitchCycle.js.map +1 -1
  43. package/dist/domain/objects/StitchFanout.d.ts +4 -4
  44. package/dist/domain/objects/StitchFanout.js.map +1 -1
  45. package/dist/domain/objects/StitchRoute.d.ts +1 -1
  46. package/dist/domain/objects/StitchRoute.js.map +1 -1
  47. package/dist/domain/objects/StitchSetEvent.d.ts +3 -3
  48. package/dist/domain/objects/StitchStep.d.ts +3 -3
  49. package/dist/domain/objects/Stitcher.d.ts +9 -9
  50. package/dist/domain/objects/Stitcher.js.map +1 -1
  51. package/dist/domain/objects/Template.d.ts +2 -2
  52. package/dist/domain/objects/Template.js.map +1 -1
  53. package/dist/domain/objects/Thread.d.ts +2 -2
  54. package/dist/domain/objects/Threads.d.ts +2 -2
  55. package/dist/domain/objects/Threads.js.map +1 -1
  56. package/dist/domain/objects/index.d.ts +2 -2
  57. package/dist/domain/objects/index.js +2 -2
  58. package/dist/domain/objects/index.js.map +1 -1
  59. package/dist/logic/context/genContextStitchTrail.d.ts +1 -1
  60. package/dist/logic/context/genContextStitchTrail.js.map +1 -1
  61. package/dist/logic/init/discoverRolePackages.d.ts +8 -0
  62. package/dist/logic/init/discoverRolePackages.js +20 -0
  63. package/dist/logic/init/discoverRolePackages.js.map +1 -0
  64. package/dist/logic/init/generateRhachetConfig.d.ts +8 -0
  65. package/dist/logic/init/generateRhachetConfig.js +40 -0
  66. package/dist/logic/init/generateRhachetConfig.js.map +1 -0
  67. package/dist/logic/invoke/assureFindRole.d.ts +2 -2
  68. package/dist/logic/invoke/assureUniqueRoles.d.ts +1 -1
  69. package/dist/logic/invoke/getAgentReadmeTemplates.js +1 -1
  70. package/dist/logic/invoke/getInvokeHooksByOpts.d.ts +4 -3
  71. package/dist/logic/invoke/getInvokeHooksByOpts.js +11 -3
  72. package/dist/logic/invoke/getInvokeHooksByOpts.js.map +1 -1
  73. package/dist/logic/invoke/getRegistriesByOpts.d.ts +2 -2
  74. package/dist/logic/invoke/getSkillContext.d.ts +3 -3
  75. package/dist/logic/invoke/getSkillThreads.d.ts +4 -4
  76. package/dist/logic/invoke/hooks/onInvokeAskInput.d.ts +2 -2
  77. package/dist/logic/invoke/link/findsertFile.d.ts +9 -0
  78. package/dist/logic/invoke/link/findsertFile.js +29 -0
  79. package/dist/logic/invoke/link/findsertFile.js.map +1 -0
  80. package/dist/logic/invoke/link/symlinkResourceDirectories.d.ts +12 -0
  81. package/dist/logic/invoke/link/symlinkResourceDirectories.js +81 -0
  82. package/dist/logic/invoke/link/symlinkResourceDirectories.js.map +1 -0
  83. package/dist/logic/invoke/performInCurrentThread.d.ts +2 -2
  84. package/dist/logic/invoke/performInIsolatedThread.execute.d.ts +1 -1
  85. package/dist/logic/invoke/performInIsolatedThread.invoke.d.ts +2 -2
  86. package/dist/logic/invoke/performInIsolatedThread.invoke.js +3 -3
  87. package/dist/logic/invoke/performInIsolatedThread.invoke.js.map +1 -1
  88. package/dist/logic/invoke/performInIsolatedThreads.d.ts +1 -1
  89. package/dist/logic/role/addRoleTraits.d.ts +5 -5
  90. package/dist/logic/role/enrollThread.d.ts +4 -4
  91. package/dist/logic/role/genRoleSkill.d.ts +1 -1
  92. package/dist/logic/stitch/adapters/imagineViaOpenAI.d.ts +1 -1
  93. package/dist/logic/stitch/enstitch.d.ts +3 -3
  94. package/dist/logic/stitch/enstitch.js +1 -1
  95. package/dist/logic/stitch/enstitch.js.map +1 -1
  96. package/dist/logic/stitch/invokeImagineStitcher.d.ts +3 -3
  97. package/dist/logic/stitch/withStitchTrail.d.ts +4 -4
  98. package/dist/logic/stitch/withStitchTrail.js +1 -1
  99. package/dist/logic/stitch/withStitchTrail.js.map +1 -1
  100. package/dist/logic/template/genStepImagineViaTemplate.d.ts +2 -2
  101. package/dist/logic/template/genStepImagineViaTemplate.js.map +1 -1
  102. package/dist/logic/template/genTemplate.d.ts +3 -3
  103. package/dist/logic/template/getTemplatePathByCallerPath.d.ts +1 -1
  104. package/dist/logic/template/getTemplatePathByCallerPath.js +2 -2
  105. package/dist/logic/template/getTemplatePathByCallerPath.js.map +1 -1
  106. package/dist/logic/template/getTemplateValFromArtifacts.d.ts +2 -2
  107. package/dist/logic/template/getTemplateValFromArtifacts.js.map +1 -1
  108. package/dist/logic/template/getTemplateVarsFromInheritance.d.ts +1 -1
  109. package/dist/logic/template/useTemplate.d.ts +2 -2
  110. package/dist/logic/thread/getStitch.d.ts +1 -1
  111. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.d.ts +3 -3
  112. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.d.ts +4 -4
  113. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.d.ts +6 -6
  114. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.d.ts +4 -4
  115. package/dist/logic/weave/compose/ProcedureContextMerged.generic.d.ts +1 -1
  116. package/dist/logic/weave/compose/ThreadsMerged.generic.d.ts +4 -4
  117. package/dist/logic/weave/compose/asStitcher.d.ts +3 -3
  118. package/dist/logic/weave/compose/asStitcherFlat.d.ts +2 -2
  119. package/dist/logic/weave/compose/genStitchChoice.d.ts +3 -3
  120. package/dist/logic/weave/compose/genStitchCycle.d.ts +5 -5
  121. package/dist/logic/weave/compose/genStitchFanout.d.ts +5 -5
  122. package/dist/logic/weave/compose/genStitchFanout.js.map +1 -1
  123. package/dist/logic/weave/compose/genStitchRoute.d.ts +3 -3
  124. package/dist/logic/weave/compose/genStitchRoute.js.map +1 -1
  125. package/dist/logic/weave/enweaveOneChoice.d.ts +2 -2
  126. package/dist/logic/weave/enweaveOneChoice.js.map +1 -1
  127. package/dist/logic/weave/enweaveOneCycle.d.ts +2 -2
  128. package/dist/logic/weave/enweaveOneCycle.js.map +1 -1
  129. package/dist/logic/weave/enweaveOneFanout.d.ts +2 -2
  130. package/dist/logic/weave/enweaveOneFanout.js.map +1 -1
  131. package/dist/logic/weave/enweaveOneRoute.d.ts +2 -2
  132. package/dist/logic/weave/enweaveOneRoute.js.map +1 -1
  133. package/dist/logic/weave/enweaveOneStitcher.d.ts +2 -2
  134. package/dist/logic/weave/enweaveOneStitcher.js.map +1 -1
  135. package/license.md +21 -0
  136. package/package.json +36 -36
  137. package/dist/.test/directory.d.ts +0 -2
  138. package/dist/.test/directory.js +0 -6
  139. package/dist/.test/directory.js.map +0 -1
  140. package/dist/.test/example.use.repo/example.echoRegistry.d.ts +0 -2
  141. package/dist/.test/example.use.repo/example.echoRegistry.js +0 -108
  142. package/dist/.test/example.use.repo/example.echoRegistry.js.map +0 -1
  143. package/dist/.test/genContextLogTrail.d.ts +0 -2
  144. package/dist/.test/genContextLogTrail.js +0 -12
  145. package/dist/.test/genContextLogTrail.js.map +0 -1
  146. package/dist/.test/getContextOpenAI.d.ts +0 -2
  147. package/dist/.test/getContextOpenAI.js +0 -18
  148. package/dist/.test/getContextOpenAI.js.map +0 -1
  149. package/dist/.test/stitchers/genStitcherCodeFileRead.d.ts +0 -14
  150. package/dist/.test/stitchers/genStitcherCodeFileRead.js +0 -23
  151. package/dist/.test/stitchers/genStitcherCodeFileRead.js.map +0 -1
  152. package/dist/.test/stitchers/genStitcherCodeFileWrite.d.ts +0 -16
  153. package/dist/.test/stitchers/genStitcherCodeFileWrite.js +0 -29
  154. package/dist/.test/stitchers/genStitcherCodeFileWrite.js.map +0 -1
  155. package/dist/.test/stitchers/genStitcherCodeReviewImagine.d.ts +0 -15
  156. package/dist/.test/stitchers/genStitcherCodeReviewImagine.js +0 -97
  157. package/dist/.test/stitchers/genStitcherCodeReviewImagine.js.map +0 -1
  158. package/dist/.test/stitchers/stitcherCodeDiffImagine.d.ts +0 -13
  159. package/dist/.test/stitchers/stitcherCodeDiffImagine.js +0 -33
  160. package/dist/.test/stitchers/stitcherCodeDiffImagine.js.map +0 -1
  161. package/dist/.test/stitchers/stitcherFanoutRandomSum.d.ts +0 -13
  162. package/dist/.test/stitchers/stitcherFanoutRandomSum.js +0 -45
  163. package/dist/.test/stitchers/stitcherFanoutRandomSum.js.map +0 -1
  164. package/dist/.test/stitchers/stitcherFanoutSubroutes.d.ts +0 -35
  165. package/dist/.test/stitchers/stitcherFanoutSubroutes.js +0 -76
  166. package/dist/.test/stitchers/stitcherFanoutSubroutes.js.map +0 -1
  167. package/dist/.test/threads/codeArtist.d.ts +0 -6
  168. package/dist/.test/threads/codeArtist.js +0 -26
  169. package/dist/.test/threads/codeArtist.js.map +0 -1
  170. package/dist/.test/threads/codeCritic.d.ts +0 -6
  171. package/dist/.test/threads/codeCritic.js +0 -21
  172. package/dist/.test/threads/codeCritic.js.map +0 -1
  173. package/dist/.test/threads/director.d.ts +0 -6
  174. package/dist/.test/threads/director.js +0 -14
  175. package/dist/.test/threads/director.js.map +0 -1
  176. package/dist/contract/cli/invoke.integration.test.d.ts +0 -1
  177. package/dist/contract/cli/invoke.integration.test.js +0 -39
  178. package/dist/contract/cli/invoke.integration.test.js.map +0 -1
  179. package/dist/contract/cli/invokeAsk.integration.test.d.ts +0 -1
  180. package/dist/contract/cli/invokeAsk.integration.test.js +0 -69
  181. package/dist/contract/cli/invokeAsk.integration.test.js.map +0 -1
  182. package/dist/contract/cli/invokeBriefsBoot.integration.test.d.ts +0 -1
  183. package/dist/contract/cli/invokeBriefsBoot.integration.test.js +0 -159
  184. package/dist/contract/cli/invokeBriefsBoot.integration.test.js.map +0 -1
  185. package/dist/contract/cli/invokeBriefsLink.integration.test.d.ts +0 -1
  186. package/dist/contract/cli/invokeBriefsLink.integration.test.js +0 -97
  187. package/dist/contract/cli/invokeBriefsLink.integration.test.js.map +0 -1
  188. package/dist/contract/cli/invokeChoose.integration.test.d.ts +0 -1
  189. package/dist/contract/cli/invokeChoose.integration.test.js +0 -111
  190. package/dist/contract/cli/invokeChoose.integration.test.js.map +0 -1
  191. package/dist/contract/cli/invokeReadme.integration.test.d.ts +0 -1
  192. package/dist/contract/cli/invokeReadme.integration.test.js +0 -62
  193. package/dist/contract/cli/invokeReadme.integration.test.js.map +0 -1
  194. package/dist/domain/objects/InvokeOpts.test.d.ts +0 -1
  195. package/dist/domain/objects/InvokeOpts.test.js +0 -41
  196. package/dist/domain/objects/InvokeOpts.test.js.map +0 -1
  197. package/dist/domain/objects/Stitcher.test.d.ts +0 -1
  198. package/dist/domain/objects/Stitcher.test.js +0 -78
  199. package/dist/domain/objects/Stitcher.test.js.map +0 -1
  200. package/dist/domain/objects/Template.test.d.ts +0 -1
  201. package/dist/domain/objects/Template.test.js +0 -48
  202. package/dist/domain/objects/Template.test.js.map +0 -1
  203. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.d.ts +0 -1
  204. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js +0 -130
  205. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js.map +0 -1
  206. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.d.ts +0 -1
  207. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js +0 -77
  208. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js.map +0 -1
  209. package/dist/logic/invoke/getSkillContext.test.d.ts +0 -1
  210. package/dist/logic/invoke/getSkillContext.test.js +0 -85
  211. package/dist/logic/invoke/getSkillContext.test.js.map +0 -1
  212. package/dist/logic/invoke/getSkillThread.test.d.ts +0 -1
  213. package/dist/logic/invoke/getSkillThread.test.js +0 -115
  214. package/dist/logic/invoke/getSkillThread.test.js.map +0 -1
  215. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.d.ts +0 -1
  216. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js +0 -74
  217. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js.map +0 -1
  218. package/dist/logic/invoke/performInIsolatedThreads.integration.test.d.ts +0 -1
  219. package/dist/logic/invoke/performInIsolatedThreads.integration.test.js +0 -75
  220. package/dist/logic/invoke/performInIsolatedThreads.integration.test.js.map +0 -1
  221. package/dist/logic/role/addRoleTraits.test.d.ts +0 -1
  222. package/dist/logic/role/addRoleTraits.test.js +0 -93
  223. package/dist/logic/role/addRoleTraits.test.js.map +0 -1
  224. package/dist/logic/role/enrollThread.integration.test.d.ts +0 -1
  225. package/dist/logic/role/enrollThread.integration.test.js +0 -79
  226. package/dist/logic/role/enrollThread.integration.test.js.map +0 -1
  227. package/dist/logic/role/genRoleSkill.test.d.ts +0 -1
  228. package/dist/logic/role/genRoleSkill.test.js +0 -79
  229. package/dist/logic/role/genRoleSkill.test.js.map +0 -1
  230. package/dist/logic/stitch/enstitch.test.d.ts +0 -1
  231. package/dist/logic/stitch/enstitch.test.js +0 -112
  232. package/dist/logic/stitch/enstitch.test.js.map +0 -1
  233. package/dist/logic/stitch/invokeImagineStitcher.integration.test.d.ts +0 -1
  234. package/dist/logic/stitch/invokeImagineStitcher.integration.test.js +0 -195
  235. package/dist/logic/stitch/invokeImagineStitcher.integration.test.js.map +0 -1
  236. package/dist/logic/template/genStepImagineViaTemplate.test.d.ts +0 -1
  237. package/dist/logic/template/genStepImagineViaTemplate.test.js +0 -126
  238. package/dist/logic/template/genStepImagineViaTemplate.test.js.map +0 -1
  239. package/dist/logic/template/genTemplate.test.d.ts +0 -1
  240. package/dist/logic/template/genTemplate.test.js +0 -118
  241. package/dist/logic/template/genTemplate.test.js.map +0 -1
  242. package/dist/logic/template/useTemplate.integration.test.d.ts +0 -1
  243. package/dist/logic/template/useTemplate.integration.test.js +0 -28
  244. package/dist/logic/template/useTemplate.integration.test.js.map +0 -1
  245. package/dist/logic/thread/getStitch.test.d.ts +0 -1
  246. package/dist/logic/thread/getStitch.test.js +0 -73
  247. package/dist/logic/thread/getStitch.test.js.map +0 -1
  248. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.d.ts +0 -1
  249. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js +0 -67
  250. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js.map +0 -1
  251. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.d.ts +0 -1
  252. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js +0 -132
  253. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js.map +0 -1
  254. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.d.ts +0 -1
  255. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js +0 -74
  256. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js.map +0 -1
  257. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.d.ts +0 -1
  258. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js +0 -190
  259. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js.map +0 -1
  260. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.d.ts +0 -1
  261. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js +0 -29
  262. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js.map +0 -1
  263. package/dist/logic/weave/compose/ThreadsMerged.generic.test.d.ts +0 -1
  264. package/dist/logic/weave/compose/ThreadsMerged.generic.test.js +0 -420
  265. package/dist/logic/weave/compose/ThreadsMerged.generic.test.js.map +0 -1
  266. package/dist/logic/weave/compose/asStitcher.test.d.ts +0 -1
  267. package/dist/logic/weave/compose/asStitcher.test.js +0 -95
  268. package/dist/logic/weave/compose/asStitcher.test.js.map +0 -1
  269. package/dist/logic/weave/compose/asStitcherFlat.test.d.ts +0 -1
  270. package/dist/logic/weave/compose/asStitcherFlat.test.js +0 -96
  271. package/dist/logic/weave/compose/asStitcherFlat.test.js.map +0 -1
  272. package/dist/logic/weave/compose/genStitchChoice.test.d.ts +0 -1
  273. package/dist/logic/weave/compose/genStitchChoice.test.js +0 -200
  274. package/dist/logic/weave/compose/genStitchChoice.test.js.map +0 -1
  275. package/dist/logic/weave/compose/genStitchCycle.test.d.ts +0 -1
  276. package/dist/logic/weave/compose/genStitchCycle.test.js +0 -267
  277. package/dist/logic/weave/compose/genStitchCycle.test.js.map +0 -1
  278. package/dist/logic/weave/compose/genStitchFanout.test.d.ts +0 -1
  279. package/dist/logic/weave/compose/genStitchFanout.test.js +0 -79
  280. package/dist/logic/weave/compose/genStitchFanout.test.js.map +0 -1
  281. package/dist/logic/weave/compose/genStitchRoute.test.d.ts +0 -1
  282. package/dist/logic/weave/compose/genStitchRoute.test.js +0 -120
  283. package/dist/logic/weave/compose/genStitchRoute.test.js.map +0 -1
  284. package/dist/logic/weave/enweaveOneChoice.test.d.ts +0 -1
  285. package/dist/logic/weave/enweaveOneChoice.test.js +0 -181
  286. package/dist/logic/weave/enweaveOneChoice.test.js.map +0 -1
  287. package/dist/logic/weave/enweaveOneCycle.test.d.ts +0 -1
  288. package/dist/logic/weave/enweaveOneCycle.test.js +0 -180
  289. package/dist/logic/weave/enweaveOneCycle.test.js.map +0 -1
  290. package/dist/logic/weave/enweaveOneFanout.integration.test.d.ts +0 -1
  291. package/dist/logic/weave/enweaveOneFanout.integration.test.js +0 -166
  292. package/dist/logic/weave/enweaveOneFanout.integration.test.js.map +0 -1
  293. package/dist/logic/weave/enweaveOneRoute.integration.test.d.ts +0 -1
  294. package/dist/logic/weave/enweaveOneRoute.integration.test.js +0 -159
  295. package/dist/logic/weave/enweaveOneRoute.integration.test.js.map +0 -1
  296. package/dist/logic/weave/enweaveOneStitcher.integration.test.d.ts +0 -2
  297. package/dist/logic/weave/enweaveOneStitcher.integration.test.js +0 -258
  298. package/dist/logic/weave/enweaveOneStitcher.integration.test.js.map +0 -1
@@ -1,97 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.genStitcherCodeReview = void 0;
4
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
5
- const helpful_errors_1 = require("helpful-errors");
6
- const StitchStep_1 = require("../../domain/objects/StitchStep");
7
- const imagineViaOpenAI_1 = require("../../logic/stitch/adapters/imagineViaOpenAI");
8
- // an example of the kind of knowledge that can be embedded globally within the stitcher, rather than the thread.role
9
- const getReviewTools = (input) => {
10
- const { scope, focus } = input;
11
- const base = scope === 'technical'
12
- ? [
13
- 'leave a `//` comment above each paragraph of code, which we call a paragraph title; also, a newline above each `//` paragraph title',
14
- 'if comment needs >1 line, extract to procedure with /** .what, .why */',
15
- 'prefer procedural patterns: early returns, avoid deep nesting',
16
- ]
17
- : [
18
- 'check if business edge cases are covered',
19
- 'verify alignment with product requirements',
20
- 'highlight logic that seems out of scope or brittle',
21
- ];
22
- const additions = {
23
- technical: {
24
- blockers: [
25
- 'ensure naming is unambiguous and consistent with conventions',
26
- 'check for consistency in pattern usage across codebase',
27
- "flag any logic that's tightly coupled or hard to extend",
28
- ],
29
- chances: [
30
- 'suggest simple nitpicks (style, brevity, naming)',
31
- 'recommend upgrades (pattern refactors, extraction chances)',
32
- 'identify potential abstractions or DRY violations',
33
- ],
34
- praises: [
35
- 'point out clean abstractions or elegant code structure',
36
- 'highlight patterns that should be reused elsewhere',
37
- ],
38
- },
39
- functional: {
40
- blockers: [
41
- 'spot missing validations or edge case handling',
42
- 'check if any product requirement is unaddressed',
43
- 'identify logic that could break in common scenarios',
44
- ],
45
- chances: [
46
- 'suggest guardrails or fallbacks for risky flows',
47
- 'recommend simplifications aligned with business intent',
48
- 'note any logic that can be reused or centralized',
49
- ],
50
- praises: [
51
- 'acknowledge clear mapping to product goals',
52
- 'celebrate thoughtful handling of tricky logic',
53
- 'highlight robustness in dealing with user scenarios',
54
- ],
55
- },
56
- };
57
- return [...base, ...(additions[scope]?.[focus] ?? [])];
58
- };
59
- const genStitcherCodeReview = (input) => new StitchStep_1.StitchStepImagine({
60
- form: 'IMAGINE',
61
- slug: `[critic]:<code:review:${input.scope}:${input.focus}>`,
62
- stitchee: 'critic',
63
- readme: `intent(imagines constructive feedback over the latest state of code, focused on ${input.scope} ${input.focus})`,
64
- enprompt: ({ threads }) => {
65
- const tacticTools = getReviewTools(input);
66
- const combinedTools = [...tacticTools, ...threads.critic.context.tools];
67
- return [
68
- `imagine constructive ${input.scope} ${input.focus} feedback over the following code`,
69
- '',
70
- 'context.tools = ',
71
- combinedTools.map((tool) => ` - ${tool}`).join('\n'),
72
- '',
73
- 'context.facts = ',
74
- threads.critic.context.facts.map((fact) => ` - ${fact}`).join('\n'),
75
- '',
76
- 'here is the current state of the code',
77
- threads.critic.stitches.slice(-1)[0]?.output?.content ??
78
- helpful_errors_1.UnexpectedCodePathError.throw('no prior stitch detected for code sample', { threads }),
79
- '',
80
- ...(input.scope === 'functional'
81
- ? [
82
- 'here is the functional directive',
83
- threads.director.stitches.slice(-1)[0]?.output,
84
- ]
85
- : []),
86
- '',
87
- `return a json object with shape { feedback: { scope: '${input.scope}', focus: '${input.focus}', importance: HIGH | MEDIUM | LOW, description: string, example: CodeBlockString }[] }`,
88
- ].join('\n');
89
- },
90
- imagine: imagineViaOpenAI_1.imagineViaOpenAI,
91
- deprompt: ({ promptOut, promptIn }) => ({
92
- output: promptOut,
93
- input: promptIn,
94
- }),
95
- });
96
- exports.genStitcherCodeReview = genStitcherCodeReview;
97
- //# sourceMappingURL=genStitcherCodeReviewImagine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"genStitcherCodeReviewImagine.js","sourceRoot":"","sources":["../../../src/.test/stitchers/genStitcherCodeReviewImagine.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACtE,mDAAyD;AAIzD,gEAAoE;AAGpE,mFAGsD;AAEtD,qHAAqH;AACrH,MAAM,cAAc,GAAG,CAAC,KAGvB,EAAY,EAAE;IACb,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,K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,CAAC;AArDQ,QAAA,qBAAqB,yBAqD7B"}
@@ -1,13 +0,0 @@
1
- import { StitchStepImagine } from '../../domain/objects/StitchStep';
2
- import { GStitcher } from '../../domain/objects/Stitcher';
3
- import { Threads } from '../../domain/objects/Threads';
4
- import { ContextOpenAI } from '../../logic/stitch/adapters/imagineViaOpenAI';
5
- export declare const stitcherCodeDiffImagine: StitchStepImagine<GStitcher<Threads<{
6
- artist: {
7
- tools: string[];
8
- facts: string[];
9
- };
10
- director: {
11
- directive?: string;
12
- };
13
- }>, ContextOpenAI & import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, string>>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stitcherCodeDiffImagine = void 0;
4
- const StitchStep_1 = require("../../domain/objects/StitchStep");
5
- const imagineViaOpenAI_1 = require("../../logic/stitch/adapters/imagineViaOpenAI");
6
- exports.stitcherCodeDiffImagine = new StitchStep_1.StitchStepImagine({
7
- form: 'IMAGINE',
8
- slug: '[artist]<code:diff>',
9
- stitchee: 'artist',
10
- readme: 'intent(imagines a codediff)',
11
- enprompt: ({ threads }) => [
12
- 'imagine a codediff to fulfill the directive',
13
- '',
14
- 'context.tools = ',
15
- threads.artist.context.tools.join('\n - '),
16
- '',
17
- 'context.facts = ',
18
- threads.artist.context.facts.join('\n - '),
19
- '',
20
- 'here is the current state of the code',
21
- threads.artist.stitches.slice(-1)[0]?.output.content,
22
- '',
23
- 'here is the directive',
24
- threads.director.context.directive ??
25
- JSON.stringify(threads.director.stitches.slice(-1)[0]?.output),
26
- ].join('\n'),
27
- imagine: imagineViaOpenAI_1.imagineViaOpenAI,
28
- deprompt: ({ promptOut, promptIn }) => ({
29
- output: promptOut,
30
- input: promptIn,
31
- }),
32
- });
33
- //# sourceMappingURL=stitcherCodeDiffImagine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stitcherCodeDiffImagine.js","sourceRoot":"","sources":["../../../src/.test/stitchers/stitcherCodeDiffImagine.ts"],"names":[],"mappings":";;;AAAA,gEAAoE;AAGpE,mFAGsD;AAEzC,QAAA,uBAAuB,GAAG,IAAI,8BAAiB,CAS1D;IACA,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,6BAA6B;IACrC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CACxB;QACE,6CAA6C;QAC7C,EAAE;QACF,kBAAkB;QAClB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QAC1C,EAAE;QACF,kBAAkB;QAClB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QAC1C,EAAE;QACF,uCAAuC;QACvC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO;QACpD,EAAE;QACF,uBAAuB;QACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS;YAChC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;KACjE,CAAC,IAAI,CAAC,IAAI,CAAC;IACd,OAAO,EAAE,mCAAgB;IACzB,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,QAAQ;KAChB,CAAC;CACH,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- import { Empty } from 'type-fns';
2
- import { StitchStepCompute } from '../../domain/objects/StitchStep';
3
- import { GStitcher } from '../../domain/objects/Stitcher';
4
- import { Threads } from '../../domain/objects/Threads';
5
- export declare const stitcherFanoutRandomSum: import("../..").StitchFanout<import("../../logic/weave/compose/GStitcherInferredFromFanout.generic").GStitcherInferredFromFanout<[StitchStepCompute<GStitcher<Threads<{
6
- main: Empty;
7
- }>, import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>, StitchStepCompute<GStitcher<Threads<{
8
- main: Empty;
9
- }>, import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>, StitchStepCompute<GStitcher<Threads<{
10
- main: Empty;
11
- }>, import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>], StitchStepCompute<GStitcher<Threads<{
12
- main: Empty;
13
- }, "multiple">, import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>>>;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stitcherFanoutRandomSum = void 0;
4
- const StitchStep_1 = require("../../domain/objects/StitchStep");
5
- const genStitchFanout_1 = require("../../logic/weave/compose/genStitchFanout");
6
- const stitcherComputeRandom = new StitchStep_1.StitchStepCompute({
7
- slug: `compute-random`,
8
- form: 'COMPUTE',
9
- readme: null,
10
- stitchee: 'main',
11
- invoke: () => ({
12
- input: null,
13
- output: Math.floor(Math.random() * 100),
14
- }),
15
- });
16
- const stitcherAddAll = new StitchStep_1.StitchStepCompute({
17
- slug: 'sum-up',
18
- form: 'COMPUTE',
19
- readme: null,
20
- stitchee: 'main',
21
- invoke: ({ threads }) => {
22
- const numbers = threads.main.peers.map((t) => {
23
- const last = t.stitches.at(-1);
24
- if (!last)
25
- throw new Error('Missing stitch on thread');
26
- return last.output;
27
- });
28
- const sum = numbers.reduce((a, b) => a + b, 0);
29
- return {
30
- input: numbers,
31
- output: sum,
32
- };
33
- },
34
- });
35
- exports.stitcherFanoutRandomSum = (0, genStitchFanout_1.genStitchFanout)({
36
- slug: 'random:x5:sum',
37
- readme: null,
38
- parallels: [
39
- stitcherComputeRandom,
40
- stitcherComputeRandom,
41
- stitcherComputeRandom,
42
- ],
43
- concluder: stitcherAddAll,
44
- });
45
- //# sourceMappingURL=stitcherFanoutRandomSum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stitcherFanoutRandomSum.js","sourceRoot":"","sources":["../../../src/.test/stitchers/stitcherFanoutRandomSum.ts"],"names":[],"mappings":";;;AAEA,gEAAoE;AAGpE,+EAA4E;AAE5E,MAAM,qBAAqB,GAAG,IAAI,8BAAiB,CAEjD;IACA,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;KACxC,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAI,8BAAiB,CAE1C;IACA,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QACtB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3C,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC,MAAgB,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAE/C,OAAO;YACL,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,GAAG;SACZ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,IAAA,iCAAe,EAAC;IACrD,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE;QACT,qBAAqB;QACrB,qBAAqB;QACrB,qBAAqB;KACtB;IACD,SAAS,EAAE,cAAc;CAC1B,CAAC,CAAC"}
@@ -1,35 +0,0 @@
1
- import { Empty } from 'type-fns';
2
- import { StitchStepCompute } from '../../domain/objects/StitchStep';
3
- import { GStitcher } from '../../domain/objects/Stitcher';
4
- import { Threads } from '../../domain/objects/Threads';
5
- export declare const stitcherFanoutWithRoutes: import("../..").StitchFanout<import("../../logic/weave/compose/GStitcherInferredFromFanout.generic").GStitcherInferredFromFanout<readonly [import("../../domain/objects/Stitcher").Stitcher<GStitcher<Threads<{
6
- main: import("../../domain/objects/Threads").ThreadContextRole<"main">;
7
- }, "single">, {
8
- log: import("simple-log-methods").LogMethods & {
9
- _orig?: import("simple-log-methods").LogMethods | undefined;
10
- } & {
11
- trail?: import("simple-log-methods").LogTrail | undefined;
12
- };
13
- stitch: {
14
- trail: import("../..").StitchTrail;
15
- stream?: {
16
- emit: (input: import("../..").StitchSetEvent<any, any>) => Promise<void>;
17
- } | undefined;
18
- };
19
- } & import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>, import("../../domain/objects/Stitcher").Stitcher<GStitcher<Threads<{
20
- main: import("../../domain/objects/Threads").ThreadContextRole<"main">;
21
- }, "single">, {
22
- log: import("simple-log-methods").LogMethods & {
23
- _orig?: import("simple-log-methods").LogMethods | undefined;
24
- } & {
25
- trail?: import("simple-log-methods").LogTrail | undefined;
26
- };
27
- stitch: {
28
- trail: import("../..").StitchTrail;
29
- stream?: {
30
- emit: (input: import("../..").StitchSetEvent<any, any>) => Promise<void>;
31
- } | undefined;
32
- };
33
- } & import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>], StitchStepCompute<GStitcher<Threads<{
34
- main: Empty;
35
- }, "multiple">, import("simple-log-methods").ContextLogTrail & import("../..").ContextStitchTrail, number>>>>;
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stitcherFanoutWithRoutes = void 0;
4
- const StitchStep_1 = require("../../domain/objects/StitchStep");
5
- const asStitcher_1 = require("../../logic/weave/compose/asStitcher");
6
- const genStitchFanout_1 = require("../../logic/weave/compose/genStitchFanout");
7
- const genStitchRoute_1 = require("../../logic/weave/compose/genStitchRoute");
8
- const stepAdd1 = new StitchStep_1.StitchStepCompute({
9
- slug: 'add-1',
10
- form: 'COMPUTE',
11
- readme: null,
12
- stitchee: 'main',
13
- invoke: ({ threads }) => {
14
- const last = threads.main.stitches.at(-1)?.output;
15
- const base = typeof last === 'number' ? last : 0;
16
- return { input: base, output: base + 1 };
17
- },
18
- });
19
- const stepAdd2 = new StitchStep_1.StitchStepCompute({
20
- slug: 'add-2',
21
- form: 'COMPUTE',
22
- readme: null,
23
- stitchee: 'main',
24
- invoke: ({ threads }) => {
25
- const last = threads.main.stitches.at(-1)?.output;
26
- const base = typeof last === 'number' ? last : 0;
27
- return { input: base, output: base + 2 };
28
- },
29
- });
30
- const stepAdd3 = new StitchStep_1.StitchStepCompute({
31
- slug: 'add-3',
32
- form: 'COMPUTE',
33
- readme: null,
34
- stitchee: 'main',
35
- invoke: ({ threads }) => {
36
- const last = threads.main.stitches.at(-1)?.output;
37
- const base = typeof last === 'number' ? last : 0;
38
- return { input: base, output: base + 3 };
39
- },
40
- });
41
- const route1 = (0, genStitchRoute_1.genStitchRoute)({
42
- slug: 'route-1',
43
- readme: null,
44
- sequence: [stepAdd1, stepAdd2], // 1 + 2 = 3
45
- });
46
- const route2 = (0, genStitchRoute_1.genStitchRoute)({
47
- slug: 'route-2',
48
- readme: null,
49
- sequence: [stepAdd1, stepAdd2, stepAdd3], // 1 + 2 + 3 = 6
50
- });
51
- const concluderSumRoutes = new StitchStep_1.StitchStepCompute({
52
- slug: 'sum-routes',
53
- form: 'COMPUTE',
54
- readme: null,
55
- stitchee: 'main',
56
- invoke: ({ threads }) => {
57
- console.log(JSON.stringify(threads, null, 2));
58
- const outputs = threads.main.peers.map((t) => {
59
- const last = t.stitches.at(-1);
60
- if (!last)
61
- throw new Error('Missing stitch');
62
- return last.output;
63
- });
64
- return {
65
- input: outputs,
66
- output: outputs.reduce((a, b) => a + b, 0),
67
- };
68
- },
69
- });
70
- exports.stitcherFanoutWithRoutes = (0, genStitchFanout_1.genStitchFanout)({
71
- slug: 'fanout-with-routes',
72
- readme: 'parallel route of 2 steps and 3 steps',
73
- parallels: [(0, asStitcher_1.asStitcher)(route1), (0, asStitcher_1.asStitcher)(route2)],
74
- concluder: concluderSumRoutes,
75
- });
76
- //# sourceMappingURL=stitcherFanoutSubroutes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stitcherFanoutSubroutes.js","sourceRoot":"","sources":["../../../src/.test/stitchers/stitcherFanoutSubroutes.ts"],"names":[],"mappings":";;;AAEA,gEAAoE;AAGpE,qEAAkE;AAClE,+EAA4E;AAC5E,6EAA0E;AAE1E,MAAM,QAAQ,GAAG,IAAI,8BAAiB,CAEpC;IACA,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAClD,MAAM,IAAI,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;IA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AAS,EAAE,kBAAkB;CAC9B,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- import { Thread } from '../../domain/objects/Thread';
2
- import { ThreadContextRole } from '../../domain/objects/Threads';
3
- export declare const getExampleThreadCodeArtist: () => Promise<Thread<ThreadContextRole<'artist'> & {
4
- tools: string[];
5
- facts: string[];
6
- }>>;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExampleThreadCodeArtist = void 0;
4
- const getFile_1 = require("../../_topublish/file-fns/src/getFile");
5
- const Thread_1 = require("../../domain/objects/Thread");
6
- const directory_1 = require("../directory");
7
- // todo: use enroleThread to add role context & apply role tools
8
- const getExampleThreadCodeArtist = async () => new Thread_1.Thread({
9
- context: {
10
- role: 'artist',
11
- tools: [
12
- await (0, getFile_1.getFile)({
13
- path: directory_1.directoryTestAssets +
14
- '/context/tools/codeDiffViaConflictMarkers.tactic.md',
15
- }),
16
- ],
17
- facts: [
18
- await (0, getFile_1.getFile)({
19
- path: directory_1.directoryTestAssets + '/context/facts/codeEnvTypescript.scene.md',
20
- }),
21
- ],
22
- },
23
- stitches: [], // no history yet, by default
24
- });
25
- exports.getExampleThreadCodeArtist = getExampleThreadCodeArtist;
26
- //# sourceMappingURL=codeArtist.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeArtist.js","sourceRoot":"","sources":["../../../src/.test/threads/codeArtist.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAChE,wDAAqD;AAErD,4CAAmD;AAEnD,gEAAgE;AACzD,MAAM,0BAA0B,GAAG,KAAK,IAE7C,EAAE,CACF,IAAI,eAAM,CAER;IACA,OAAO,EAAE;QACP,IAAI,EAAE,QAAiB;QACvB,KAAK,EAAE;YACL,MAAM,IAAA,iBAAO,EAAC;gBACZ,IAAI,EACF,+BAAmB;oBACnB,qDAAqD;aACxD,CAAC;SACH;QACD,KAAK,EAAE;YACL,MAAM,IAAA,iBAAO,EAAC;gBACZ,IAAI,EACF,+BAAmB,GAAG,2CAA2C;aACpE,CAAC;SACH;KACF;IACD,QAAQ,EAAE,EAAE,EAAE,6BAA6B;CAC5C,CAAC,CAAC;AAvBQ,QAAA,0BAA0B,8BAuBlC"}
@@ -1,6 +0,0 @@
1
- import { Thread } from '../../domain/objects/Thread';
2
- import { ThreadContextRole } from '../../domain/objects/Threads';
3
- export declare const getExampleThreadCodeCritic: () => Promise<Thread<ThreadContextRole<'critic'> & {
4
- tools: string[];
5
- facts: string[];
6
- }>>;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExampleThreadCodeCritic = void 0;
4
- const getFile_1 = require("../../_topublish/file-fns/src/getFile");
5
- const Thread_1 = require("../../domain/objects/Thread");
6
- const directory_1 = require("../directory");
7
- // todo: use enroleThread to add role context & apply role tools
8
- const getExampleThreadCodeCritic = async () => new Thread_1.Thread({
9
- context: {
10
- role: 'critic',
11
- tools: [],
12
- facts: [
13
- await (0, getFile_1.getFile)({
14
- path: directory_1.directoryTestAssets + '/context/facts/codeEnvTypescript.scene.md',
15
- }),
16
- ],
17
- },
18
- stitches: [], // no history yet, by default
19
- });
20
- exports.getExampleThreadCodeCritic = getExampleThreadCodeCritic;
21
- //# sourceMappingURL=codeCritic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeCritic.js","sourceRoot":"","sources":["../../../src/.test/threads/codeCritic.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAChE,wDAAqD;AAErD,4CAAmD;AAEnD,gEAAgE;AACzD,MAAM,0BAA0B,GAAG,KAAK,IAE7C,EAAE,CACF,IAAI,eAAM,CAER;IACA,OAAO,EAAE;QACP,IAAI,EAAE,QAAiB;QACvB,KAAK,EAAE,EAAE;QACT,KAAK,EAAE;YACL,MAAM,IAAA,iBAAO,EAAC;gBACZ,IAAI,EACF,+BAAmB,GAAG,2CAA2C;aACpE,CAAC;SACH;KACF;IACD,QAAQ,EAAE,EAAE,EAAE,6BAA6B;CAC5C,CAAC,CAAC;AAjBQ,QAAA,0BAA0B,8BAiBlC"}
@@ -1,6 +0,0 @@
1
- import { Thread } from '../../domain/objects/Thread';
2
- import { ThreadContextRole } from '../../domain/objects/Threads';
3
- export declare const exampleThreadDirector: import("domain-objects/dist/manipulation/immute/withImmute").WithImmute<Thread<ThreadContextRole<"director"> & {
4
- tools: string[];
5
- facts: string[];
6
- }>>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exampleThreadDirector = void 0;
4
- const Thread_1 = require("../../domain/objects/Thread");
5
- // todo: use enroleThread to add role context & apply role tools
6
- exports.exampleThreadDirector = Thread_1.Thread.build({
7
- context: {
8
- role: 'director',
9
- tools: [],
10
- facts: [],
11
- },
12
- stitches: [], // no history yet, by default
13
- });
14
- //# sourceMappingURL=director.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"director.js","sourceRoot":"","sources":["../../../src/.test/threads/director.ts"],"names":[],"mappings":";;;AAAA,wDAAqD;AAGrD,gEAAgE;AACnD,QAAA,qBAAqB,GAAG,eAAM,CAAC,KAAK,CAE/C;IACA,OAAO,EAAE;QACP,IAAI,EAAE,UAAmB;QACzB,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV;IACD,QAAQ,EAAE,EAAE,EAAE,6BAA6B;CAC5C,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const test_fns_1 = require("test-fns");
8
- const directory_1 = require("../../.test/directory");
9
- const invoke_1 = require("./invoke");
10
- describe('invoke', () => {
11
- (0, test_fns_1.given)('a valid config path pointing to a basic test registry', () => {
12
- const configPath = path_1.default.resolve(directory_1.TEST_FIXTURE_DIRECTORY, './example.use.repo/example.rhachet.use.ts');
13
- (0, test_fns_1.when)('asked to readme a role', () => {
14
- const args = [
15
- '--config',
16
- configPath,
17
- 'readme',
18
- '--registry',
19
- 'echo',
20
- '--role',
21
- 'echoer',
22
- ];
23
- let logSpy;
24
- beforeAll(() => {
25
- logSpy = jest.spyOn(console, 'log');
26
- });
27
- afterAll(() => {
28
- logSpy.mockRestore();
29
- });
30
- (0, test_fns_1.then)('it should print the expected readme from the role', async () => {
31
- await (0, invoke_1.invoke)({ args });
32
- const callArgs = logSpy.mock.calls.flat();
33
- const printed = callArgs.join('\n');
34
- expect(printed).toContain('knows how to echo input back to the user.');
35
- });
36
- });
37
- });
38
- });
39
- //# sourceMappingURL=invoke.integration.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invoke.integration.test.js","sourceRoot":"","sources":["../../../src/contract/cli/invoke.integration.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,uCAA6C;AAE7C,qDAA+D;AAC/D,qCAAkC;AAElC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,IAAA,gBAAK,EAAC,uDAAuD,EAAE,GAAG,EAAE;QAClE,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAC7B,kCAAsB,EACtB,2CAA2C,CAC5C,CAAC;QAEF,IAAA,eAAI,EAAC,wBAAwB,EAAE,GAAG,EAAE;YAClC,MAAM,IAAI,GAAG;gBACX,UAAU;gBACV,UAAU;gBACV,QAAQ;gBACR,YAAY;gBACZ,MAAM;gBACN,QAAQ;gBACR,QAAQ;aACT,CAAC;YAEF,IAAI,MAA8C,CAAC;YAEnD,SAAS,CAAC,GAAG,EAAE;gBACb,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,GAAG,EAAE;gBACZ,MAAM,CAAC,WAAW,EAAE,CAAC;YACvB,CAAC,CAAC,CAAC;YAEH,IAAA,eAAI,EAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;gBACnE,MAAM,IAAA,eAAM,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC;gBAEvB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,2CAA2C,CAAC,CAAC;YACzE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const commander_1 = require("commander");
7
- const node_path_1 = __importDefault(require("node:path"));
8
- const test_fns_1 = require("test-fns");
9
- const directory_1 = require("../../.test/directory");
10
- const example_echoRegistry_1 = require("../../.test/example.use.repo/example.echoRegistry");
11
- const invokeAsk_1 = require("./invokeAsk");
12
- describe('invokeAsk (integration)', () => {
13
- (0, test_fns_1.given)('a CLI program with invokeAsk registered using EXAMPLE_REGISTRY', () => {
14
- // config path is required for nested attempts to be explicitly declared
15
- const configPath = node_path_1.default.resolve(directory_1.TEST_FIXTURE_DIRECTORY, './example.use.repo/example.rhachet.use.ts');
16
- const program = new commander_1.Command();
17
- (0, invokeAsk_1.invokeAsk)({
18
- program,
19
- config: { path: configPath },
20
- registries: [example_echoRegistry_1.EXAMPLE_REGISTRY],
21
- hooks: null,
22
- });
23
- (0, test_fns_1.when)('invoking a valid echo skill with ask input', () => {
24
- (0, test_fns_1.then)('it should execute the skill successfully', async () => {
25
- const args = [
26
- 'ask',
27
- '--role',
28
- 'echoer',
29
- '--skill',
30
- 'echo',
31
- '--ask',
32
- 'hello',
33
- ];
34
- await program.parseAsync(args, { from: 'user' });
35
- });
36
- });
37
- (0, test_fns_1.when)('invoking with an invalid skill', () => {
38
- (0, test_fns_1.then)('it should throw a bad request error', async () => {
39
- const args = ['ask', '--role', 'echoer', '--skill', 'unknown', 'hi'];
40
- const error = await (0, test_fns_1.getError)(() => program.parseAsync(args, { from: 'user' }));
41
- expect(error?.message).toContain('no skill named');
42
- });
43
- });
44
- (0, test_fns_1.when)('invoking with an invalid role', () => {
45
- (0, test_fns_1.then)('it should throw a missing role error', async () => {
46
- const args = ['ask', '--role', 'badrole', '--skill', 'echo', 'hi'];
47
- const error = await (0, test_fns_1.getError)(() => program.parseAsync(args, { from: 'user' }));
48
- expect(error?.message).toContain('no role named');
49
- });
50
- });
51
- (0, test_fns_1.when)('invoking a valid echo skill with attempts', () => {
52
- (0, test_fns_1.then)('it should execute the skill successfully', async () => {
53
- const args = [
54
- 'ask',
55
- '--role',
56
- 'echoer',
57
- '--skill',
58
- 'echo',
59
- '--ask',
60
- 'hello',
61
- '--attempts',
62
- '3',
63
- ];
64
- await program.parseAsync(args, { from: 'user' });
65
- });
66
- });
67
- });
68
- });
69
- //# sourceMappingURL=invokeAsk.integration.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invokeAsk.integration.test.js","sourceRoot":"","sources":["../../../src/contract/cli/invokeAsk.integration.test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,0DAA6B;AAC7B,uCAAuD;AAEvD,qDAA+D;AAC/D,4FAAqF;AACrF,2CAAwC;AAExC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,IAAA,gBAAK,EACH,gEAAgE,EAChE,GAAG,EAAE;QACH,wEAAwE;QACxE,MAAM,UAAU,GAAG,mBAAI,CAAC,OAAO,CAC7B,kCAAsB,EACtB,2CAA2C,CAC5C,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;QAC9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