rhachet 1.12.1 → 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 (295) hide show
  1. package/dist/contract/cli/invoke.js +1 -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 +1 -1
  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 +1 -1
  13. package/dist/contract/cli/invokeInit.js +1 -1
  14. package/dist/contract/cli/invokeInit.js.map +1 -1
  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 +1 -1
  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/invoke/assureFindRole.d.ts +2 -2
  62. package/dist/logic/invoke/assureUniqueRoles.d.ts +1 -1
  63. package/dist/logic/invoke/getInvokeHooksByOpts.d.ts +2 -2
  64. package/dist/logic/invoke/getRegistriesByOpts.d.ts +2 -2
  65. package/dist/logic/invoke/getSkillContext.d.ts +3 -3
  66. package/dist/logic/invoke/getSkillThreads.d.ts +4 -4
  67. package/dist/logic/invoke/hooks/onInvokeAskInput.d.ts +2 -2
  68. package/dist/logic/invoke/performInCurrentThread.d.ts +2 -2
  69. package/dist/logic/invoke/performInIsolatedThread.execute.d.ts +1 -1
  70. package/dist/logic/invoke/performInIsolatedThread.invoke.d.ts +2 -2
  71. package/dist/logic/invoke/performInIsolatedThread.invoke.js +3 -3
  72. package/dist/logic/invoke/performInIsolatedThread.invoke.js.map +1 -1
  73. package/dist/logic/invoke/performInIsolatedThreads.d.ts +1 -1
  74. package/dist/logic/role/addRoleTraits.d.ts +5 -5
  75. package/dist/logic/role/enrollThread.d.ts +4 -4
  76. package/dist/logic/role/genRoleSkill.d.ts +1 -1
  77. package/dist/logic/stitch/adapters/imagineViaOpenAI.d.ts +1 -1
  78. package/dist/logic/stitch/enstitch.d.ts +3 -3
  79. package/dist/logic/stitch/enstitch.js +1 -1
  80. package/dist/logic/stitch/enstitch.js.map +1 -1
  81. package/dist/logic/stitch/invokeImagineStitcher.d.ts +3 -3
  82. package/dist/logic/stitch/withStitchTrail.d.ts +4 -4
  83. package/dist/logic/stitch/withStitchTrail.js +1 -1
  84. package/dist/logic/stitch/withStitchTrail.js.map +1 -1
  85. package/dist/logic/template/genStepImagineViaTemplate.d.ts +2 -2
  86. package/dist/logic/template/genStepImagineViaTemplate.js.map +1 -1
  87. package/dist/logic/template/genTemplate.d.ts +3 -3
  88. package/dist/logic/template/getTemplatePathByCallerPath.d.ts +1 -1
  89. package/dist/logic/template/getTemplatePathByCallerPath.js +2 -2
  90. package/dist/logic/template/getTemplatePathByCallerPath.js.map +1 -1
  91. package/dist/logic/template/getTemplateValFromArtifacts.d.ts +2 -2
  92. package/dist/logic/template/getTemplateValFromArtifacts.js.map +1 -1
  93. package/dist/logic/template/getTemplateVarsFromInheritance.d.ts +1 -1
  94. package/dist/logic/template/useTemplate.d.ts +2 -2
  95. package/dist/logic/thread/getStitch.d.ts +1 -1
  96. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.d.ts +3 -3
  97. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.d.ts +4 -4
  98. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.d.ts +6 -6
  99. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.d.ts +4 -4
  100. package/dist/logic/weave/compose/ProcedureContextMerged.generic.d.ts +1 -1
  101. package/dist/logic/weave/compose/ThreadsMerged.generic.d.ts +4 -4
  102. package/dist/logic/weave/compose/asStitcher.d.ts +3 -3
  103. package/dist/logic/weave/compose/asStitcherFlat.d.ts +2 -2
  104. package/dist/logic/weave/compose/genStitchChoice.d.ts +3 -3
  105. package/dist/logic/weave/compose/genStitchCycle.d.ts +5 -5
  106. package/dist/logic/weave/compose/genStitchFanout.d.ts +5 -5
  107. package/dist/logic/weave/compose/genStitchFanout.js.map +1 -1
  108. package/dist/logic/weave/compose/genStitchRoute.d.ts +3 -3
  109. package/dist/logic/weave/compose/genStitchRoute.js.map +1 -1
  110. package/dist/logic/weave/enweaveOneChoice.d.ts +2 -2
  111. package/dist/logic/weave/enweaveOneChoice.js.map +1 -1
  112. package/dist/logic/weave/enweaveOneCycle.d.ts +2 -2
  113. package/dist/logic/weave/enweaveOneCycle.js.map +1 -1
  114. package/dist/logic/weave/enweaveOneFanout.d.ts +2 -2
  115. package/dist/logic/weave/enweaveOneFanout.js.map +1 -1
  116. package/dist/logic/weave/enweaveOneRoute.d.ts +2 -2
  117. package/dist/logic/weave/enweaveOneRoute.js.map +1 -1
  118. package/dist/logic/weave/enweaveOneStitcher.d.ts +2 -2
  119. package/dist/logic/weave/enweaveOneStitcher.js.map +1 -1
  120. package/license.md +21 -0
  121. package/package.json +36 -36
  122. package/dist/.test/directory.d.ts +0 -2
  123. package/dist/.test/directory.js +0 -6
  124. package/dist/.test/directory.js.map +0 -1
  125. package/dist/.test/example.use.repo/example.echoRegistry.d.ts +0 -2
  126. package/dist/.test/example.use.repo/example.echoRegistry.js +0 -108
  127. package/dist/.test/example.use.repo/example.echoRegistry.js.map +0 -1
  128. package/dist/.test/genContextLogTrail.d.ts +0 -2
  129. package/dist/.test/genContextLogTrail.js +0 -12
  130. package/dist/.test/genContextLogTrail.js.map +0 -1
  131. package/dist/.test/getContextOpenAI.d.ts +0 -2
  132. package/dist/.test/getContextOpenAI.js +0 -18
  133. package/dist/.test/getContextOpenAI.js.map +0 -1
  134. package/dist/.test/stitchers/genStitcherCodeFileRead.d.ts +0 -14
  135. package/dist/.test/stitchers/genStitcherCodeFileRead.js +0 -23
  136. package/dist/.test/stitchers/genStitcherCodeFileRead.js.map +0 -1
  137. package/dist/.test/stitchers/genStitcherCodeFileWrite.d.ts +0 -16
  138. package/dist/.test/stitchers/genStitcherCodeFileWrite.js +0 -29
  139. package/dist/.test/stitchers/genStitcherCodeFileWrite.js.map +0 -1
  140. package/dist/.test/stitchers/genStitcherCodeReviewImagine.d.ts +0 -15
  141. package/dist/.test/stitchers/genStitcherCodeReviewImagine.js +0 -97
  142. package/dist/.test/stitchers/genStitcherCodeReviewImagine.js.map +0 -1
  143. package/dist/.test/stitchers/stitcherCodeDiffImagine.d.ts +0 -13
  144. package/dist/.test/stitchers/stitcherCodeDiffImagine.js +0 -33
  145. package/dist/.test/stitchers/stitcherCodeDiffImagine.js.map +0 -1
  146. package/dist/.test/stitchers/stitcherFanoutRandomSum.d.ts +0 -13
  147. package/dist/.test/stitchers/stitcherFanoutRandomSum.js +0 -45
  148. package/dist/.test/stitchers/stitcherFanoutRandomSum.js.map +0 -1
  149. package/dist/.test/stitchers/stitcherFanoutSubroutes.d.ts +0 -35
  150. package/dist/.test/stitchers/stitcherFanoutSubroutes.js +0 -76
  151. package/dist/.test/stitchers/stitcherFanoutSubroutes.js.map +0 -1
  152. package/dist/.test/threads/codeArtist.d.ts +0 -6
  153. package/dist/.test/threads/codeArtist.js +0 -26
  154. package/dist/.test/threads/codeArtist.js.map +0 -1
  155. package/dist/.test/threads/codeCritic.d.ts +0 -6
  156. package/dist/.test/threads/codeCritic.js +0 -21
  157. package/dist/.test/threads/codeCritic.js.map +0 -1
  158. package/dist/.test/threads/director.d.ts +0 -6
  159. package/dist/.test/threads/director.js +0 -14
  160. package/dist/.test/threads/director.js.map +0 -1
  161. package/dist/contract/cli/invoke.integration.test.d.ts +0 -1
  162. package/dist/contract/cli/invoke.integration.test.js +0 -39
  163. package/dist/contract/cli/invoke.integration.test.js.map +0 -1
  164. package/dist/contract/cli/invokeAsk.integration.test.d.ts +0 -1
  165. package/dist/contract/cli/invokeAsk.integration.test.js +0 -69
  166. package/dist/contract/cli/invokeAsk.integration.test.js.map +0 -1
  167. package/dist/contract/cli/invokeBriefsBoot.integration.test.d.ts +0 -1
  168. package/dist/contract/cli/invokeBriefsBoot.integration.test.js +0 -159
  169. package/dist/contract/cli/invokeBriefsBoot.integration.test.js.map +0 -1
  170. package/dist/contract/cli/invokeBriefsLink.integration.test.d.ts +0 -1
  171. package/dist/contract/cli/invokeBriefsLink.integration.test.js +0 -100
  172. package/dist/contract/cli/invokeBriefsLink.integration.test.js.map +0 -1
  173. package/dist/contract/cli/invokeChoose.integration.test.d.ts +0 -1
  174. package/dist/contract/cli/invokeChoose.integration.test.js +0 -111
  175. package/dist/contract/cli/invokeChoose.integration.test.js.map +0 -1
  176. package/dist/contract/cli/invokeInit.integration.test.d.ts +0 -1
  177. package/dist/contract/cli/invokeInit.integration.test.js +0 -123
  178. package/dist/contract/cli/invokeInit.integration.test.js.map +0 -1
  179. package/dist/contract/cli/invokeReadme.integration.test.d.ts +0 -1
  180. package/dist/contract/cli/invokeReadme.integration.test.js +0 -62
  181. package/dist/contract/cli/invokeReadme.integration.test.js.map +0 -1
  182. package/dist/contract/cli/invokeRolesBoot.integration.test.d.ts +0 -1
  183. package/dist/contract/cli/invokeRolesBoot.integration.test.js +0 -152
  184. package/dist/contract/cli/invokeRolesBoot.integration.test.js.map +0 -1
  185. package/dist/contract/cli/invokeRolesLink.integration.test.d.ts +0 -1
  186. package/dist/contract/cli/invokeRolesLink.integration.test.js +0 -117
  187. package/dist/contract/cli/invokeRolesLink.integration.test.js.map +0 -1
  188. package/dist/domain/objects/InvokeOpts.test.d.ts +0 -1
  189. package/dist/domain/objects/InvokeOpts.test.js +0 -41
  190. package/dist/domain/objects/InvokeOpts.test.js.map +0 -1
  191. package/dist/domain/objects/Stitcher.test.d.ts +0 -1
  192. package/dist/domain/objects/Stitcher.test.js +0 -78
  193. package/dist/domain/objects/Stitcher.test.js.map +0 -1
  194. package/dist/domain/objects/Template.test.d.ts +0 -1
  195. package/dist/domain/objects/Template.test.js +0 -48
  196. package/dist/domain/objects/Template.test.js.map +0 -1
  197. package/dist/logic/init/generateRhachetConfig.test.d.ts +0 -1
  198. package/dist/logic/init/generateRhachetConfig.test.js +0 -35
  199. package/dist/logic/init/generateRhachetConfig.test.js.map +0 -1
  200. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.d.ts +0 -1
  201. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js +0 -130
  202. package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js.map +0 -1
  203. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.d.ts +0 -1
  204. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js +0 -77
  205. package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js.map +0 -1
  206. package/dist/logic/invoke/getSkillContext.test.d.ts +0 -1
  207. package/dist/logic/invoke/getSkillContext.test.js +0 -85
  208. package/dist/logic/invoke/getSkillContext.test.js.map +0 -1
  209. package/dist/logic/invoke/getSkillThread.test.d.ts +0 -1
  210. package/dist/logic/invoke/getSkillThread.test.js +0 -115
  211. package/dist/logic/invoke/getSkillThread.test.js.map +0 -1
  212. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.d.ts +0 -1
  213. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js +0 -74
  214. package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js.map +0 -1
  215. package/dist/logic/invoke/performInIsolatedThreads.integration.test.d.ts +0 -1
  216. package/dist/logic/invoke/performInIsolatedThreads.integration.test.js +0 -75
  217. package/dist/logic/invoke/performInIsolatedThreads.integration.test.js.map +0 -1
  218. package/dist/logic/role/addRoleTraits.test.d.ts +0 -1
  219. package/dist/logic/role/addRoleTraits.test.js +0 -93
  220. package/dist/logic/role/addRoleTraits.test.js.map +0 -1
  221. package/dist/logic/role/enrollThread.integration.test.d.ts +0 -1
  222. package/dist/logic/role/enrollThread.integration.test.js +0 -79
  223. package/dist/logic/role/enrollThread.integration.test.js.map +0 -1
  224. package/dist/logic/role/genRoleSkill.test.d.ts +0 -1
  225. package/dist/logic/role/genRoleSkill.test.js +0 -79
  226. package/dist/logic/role/genRoleSkill.test.js.map +0 -1
  227. package/dist/logic/stitch/enstitch.test.d.ts +0 -1
  228. package/dist/logic/stitch/enstitch.test.js +0 -112
  229. package/dist/logic/stitch/enstitch.test.js.map +0 -1
  230. package/dist/logic/stitch/invokeImagineStitcher.integration.test.d.ts +0 -1
  231. package/dist/logic/stitch/invokeImagineStitcher.integration.test.js +0 -195
  232. package/dist/logic/stitch/invokeImagineStitcher.integration.test.js.map +0 -1
  233. package/dist/logic/template/genStepImagineViaTemplate.test.d.ts +0 -1
  234. package/dist/logic/template/genStepImagineViaTemplate.test.js +0 -126
  235. package/dist/logic/template/genStepImagineViaTemplate.test.js.map +0 -1
  236. package/dist/logic/template/genTemplate.test.d.ts +0 -1
  237. package/dist/logic/template/genTemplate.test.js +0 -118
  238. package/dist/logic/template/genTemplate.test.js.map +0 -1
  239. package/dist/logic/template/useTemplate.integration.test.d.ts +0 -1
  240. package/dist/logic/template/useTemplate.integration.test.js +0 -28
  241. package/dist/logic/template/useTemplate.integration.test.js.map +0 -1
  242. package/dist/logic/thread/getStitch.test.d.ts +0 -1
  243. package/dist/logic/thread/getStitch.test.js +0 -73
  244. package/dist/logic/thread/getStitch.test.js.map +0 -1
  245. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.d.ts +0 -1
  246. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js +0 -67
  247. package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js.map +0 -1
  248. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.d.ts +0 -1
  249. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js +0 -132
  250. package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js.map +0 -1
  251. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.d.ts +0 -1
  252. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js +0 -74
  253. package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js.map +0 -1
  254. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.d.ts +0 -1
  255. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js +0 -190
  256. package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js.map +0 -1
  257. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.d.ts +0 -1
  258. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js +0 -29
  259. package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js.map +0 -1
  260. package/dist/logic/weave/compose/ThreadsMerged.generic.test.d.ts +0 -1
  261. package/dist/logic/weave/compose/ThreadsMerged.generic.test.js +0 -420
  262. package/dist/logic/weave/compose/ThreadsMerged.generic.test.js.map +0 -1
  263. package/dist/logic/weave/compose/asStitcher.test.d.ts +0 -1
  264. package/dist/logic/weave/compose/asStitcher.test.js +0 -95
  265. package/dist/logic/weave/compose/asStitcher.test.js.map +0 -1
  266. package/dist/logic/weave/compose/asStitcherFlat.test.d.ts +0 -1
  267. package/dist/logic/weave/compose/asStitcherFlat.test.js +0 -96
  268. package/dist/logic/weave/compose/asStitcherFlat.test.js.map +0 -1
  269. package/dist/logic/weave/compose/genStitchChoice.test.d.ts +0 -1
  270. package/dist/logic/weave/compose/genStitchChoice.test.js +0 -200
  271. package/dist/logic/weave/compose/genStitchChoice.test.js.map +0 -1
  272. package/dist/logic/weave/compose/genStitchCycle.test.d.ts +0 -1
  273. package/dist/logic/weave/compose/genStitchCycle.test.js +0 -267
  274. package/dist/logic/weave/compose/genStitchCycle.test.js.map +0 -1
  275. package/dist/logic/weave/compose/genStitchFanout.test.d.ts +0 -1
  276. package/dist/logic/weave/compose/genStitchFanout.test.js +0 -79
  277. package/dist/logic/weave/compose/genStitchFanout.test.js.map +0 -1
  278. package/dist/logic/weave/compose/genStitchRoute.test.d.ts +0 -1
  279. package/dist/logic/weave/compose/genStitchRoute.test.js +0 -120
  280. package/dist/logic/weave/compose/genStitchRoute.test.js.map +0 -1
  281. package/dist/logic/weave/enweaveOneChoice.test.d.ts +0 -1
  282. package/dist/logic/weave/enweaveOneChoice.test.js +0 -181
  283. package/dist/logic/weave/enweaveOneChoice.test.js.map +0 -1
  284. package/dist/logic/weave/enweaveOneCycle.test.d.ts +0 -1
  285. package/dist/logic/weave/enweaveOneCycle.test.js +0 -180
  286. package/dist/logic/weave/enweaveOneCycle.test.js.map +0 -1
  287. package/dist/logic/weave/enweaveOneFanout.integration.test.d.ts +0 -1
  288. package/dist/logic/weave/enweaveOneFanout.integration.test.js +0 -166
  289. package/dist/logic/weave/enweaveOneFanout.integration.test.js.map +0 -1
  290. package/dist/logic/weave/enweaveOneRoute.integration.test.d.ts +0 -1
  291. package/dist/logic/weave/enweaveOneRoute.integration.test.js +0 -159
  292. package/dist/logic/weave/enweaveOneRoute.integration.test.js.map +0 -1
  293. package/dist/logic/weave/enweaveOneStitcher.integration.test.d.ts +0 -2
  294. package/dist/logic/weave/enweaveOneStitcher.integration.test.js +0 -258
  295. package/dist/logic/weave/enweaveOneStitcher.integration.test.js.map +0 -1
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const test_fns_1 = require("test-fns");
4
- const genContextLogTrail_1 = require("../../../.test/genContextLogTrail");
5
- const StitchStep_1 = require("../../../domain/objects/StitchStep");
6
- const genContextStitchTrail_1 = require("../../context/genContextStitchTrail");
7
- const genThread_1 = require("../../thread/genThread");
8
- const stitcherComputeRandom = new StitchStep_1.StitchStepCompute({
9
- slug: `compute-random`,
10
- form: 'COMPUTE',
11
- readme: null,
12
- stitchee: 'main',
13
- invoke: () => ({
14
- input: null,
15
- output: Math.floor(Math.random() * 100),
16
- }),
17
- });
18
- const stitcherAddAll = new StitchStep_1.StitchStepCompute({
19
- slug: 'sum-up',
20
- form: 'COMPUTE',
21
- readme: null,
22
- stitchee: 'main',
23
- invoke: ({ threads }) => {
24
- const numbers = threads.main.peers.map((t) => {
25
- const last = t.stitches.at(-1);
26
- if (!last)
27
- throw new Error('Missing stitch on thread');
28
- return last.output;
29
- });
30
- const sum = numbers.reduce((a, b) => a + b, 0);
31
- return {
32
- input: numbers,
33
- output: sum,
34
- };
35
- },
36
- });
37
- describe('GStitcherInferredFromFanout', () => {
38
- (0, test_fns_1.given)('two parallel single-threaded compute steps', () => {
39
- const parallels = [stitcherComputeRandom, stitcherComputeRandom];
40
- const concluder = stitcherAddAll;
41
- (0, test_fns_1.then)('it should merge the thread maps and infer the output from the concluder', () => {
42
- // prove can assign to threads
43
- const threads = {
44
- main: (0, genThread_1.genThread)({ role: 'main' }),
45
- };
46
- expect(threads);
47
- const context = {
48
- ...(0, genContextLogTrail_1.genContextLogTrail)(),
49
- ...(0, genContextStitchTrail_1.genContextStitchTrail)(),
50
- };
51
- expect(context);
52
- const output = 42;
53
- expect(typeof output).toBe('number');
54
- });
55
- (0, test_fns_1.then)('it should error if threads has unknown keys', () => {
56
- const badThreads = {
57
- // @ts-expect-error unknown thread key "notreal"
58
- notreal: (0, genThread_1.genThread)({ role: 'notreal' }),
59
- };
60
- expect(badThreads);
61
- });
62
- (0, test_fns_1.then)('it should error if context is missing required fields', () => {
63
- // @ts-expect-error missing ContextLogTrail + ContextStitchTrail
64
- const badContext = {};
65
- expect(badContext);
66
- });
67
- (0, test_fns_1.then)('it should error if output is not a number', () => {
68
- // @ts-expect-error string is not assignable to number
69
- const badOutput = 'not-a-number';
70
- expect(badOutput);
71
- });
72
- });
73
- });
74
- //# sourceMappingURL=GStitcherInferredFromFanout.generic.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GStitcherInferredFromFanout.generic.test.js","sourceRoot":"","sources":["../../../../src/logic/weave/compose/GStitcherInferredFromFanout.generic.test.ts"],"names":[],"mappings":";;AAAA,uCAAuC;AAGvC,0EAAuE;AAEvE,mEAAuE;AAGvE,+EAA4E;AAC5E,sDAAmD;AAGnD,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,G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AE,CAAC;YAC3C,MAAM,CAAC,UAAU,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,IAAA,eAAI,EAAC,2CAA2C,EAAE,GAAG,EAAE;YACrD,sDAAsD;YACtD,MAAM,SAAS,GAAuB,cAAc,CAAC;YACrD,MAAM,CAAC,SAAS,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,190 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const uni_time_1 = require("@ehmpathy/uni-time");
4
- const helpful_errors_1 = require("helpful-errors");
5
- const test_fns_1 = require("test-fns");
6
- const genContextLogTrail_1 = require("../../../.test/genContextLogTrail");
7
- const StitchStep_1 = require("../../../domain/objects/StitchStep");
8
- const Thread_1 = require("../../../domain/objects/Thread");
9
- const genContextStitchTrail_1 = require("../../context/genContextStitchTrail");
10
- describe('GStitcherInferredFromRoute', () => {
11
- const exampleContext = {
12
- ...(0, genContextLogTrail_1.genContextLogTrail)(),
13
- ...(0, genContextStitchTrail_1.genContextStitchTrail)(),
14
- };
15
- const stitcherGetTime = new StitchStep_1.StitchStepCompute({
16
- form: 'COMPUTE',
17
- readme: null,
18
- slug: 'get-time',
19
- stitchee: 'main',
20
- invoke: () => ({ input: null, output: (0, uni_time_1.asUniDateTime)(new Date()) }),
21
- });
22
- const stitcherAddHours = new StitchStep_1.StitchStepCompute({
23
- form: 'COMPUTE',
24
- readme: null,
25
- slug: 'add-time',
26
- stitchee: 'main',
27
- invoke: ({ threads }) => {
28
- const lastStitch = threads.main.stitches.slice(-1)[0] ??
29
- helpful_errors_1.UnexpectedCodePathError.throw('no stitches found on main thread yet.', {
30
- threads,
31
- });
32
- return {
33
- input: lastStitch.output,
34
- output: (0, uni_time_1.addDuration)(uni_time_1.isUniDateTime.assure(lastStitch.output), {
35
- hours: 1,
36
- }),
37
- };
38
- },
39
- });
40
- (0, test_fns_1.given)('a sequence of stitchers declared not readonly', () => {
41
- const sequence = [stitcherGetTime, stitcherAddHours];
42
- (0, test_fns_1.then)('there should be a type error at usage, as we enforce readonly consts to maximize type inference, and fail fast when omitted', () => {
43
- expect(true); // just to satisfy the linter of unused type
44
- });
45
- });
46
- (0, test_fns_1.given)('a sequence of two compatible stitchers on the same thread', () => {
47
- const sequence = [stitcherGetTime, stitcherAddHours];
48
- (0, test_fns_1.then)('procedure context should be assignable', () => {
49
- const assertContext = { ...exampleContext };
50
- expect(assertContext);
51
- });
52
- (0, test_fns_1.then)('expected threads should be assignable', () => {
53
- const threadsExpected = {
54
- main: new Thread_1.Thread({ context: { role: 'main' }, stitches: [] }),
55
- };
56
- const threadsInferred = threadsExpected;
57
- expect(threadsInferred);
58
- });
59
- (0, test_fns_1.then)('output should match expected shape', () => {
60
- // positive case
61
- const assertOutput = (0, uni_time_1.asUniDateTime)(new Date());
62
- expect(assertOutput);
63
- // negative case
64
- // @ts-expect-error: number is not assignable to UniDateTime
65
- const expectError = 821;
66
- expect(expectError);
67
- });
68
- (0, test_fns_1.then)('extra thread SHOULD be assignable', { because: 'all of the required threads are still available' }, () => {
69
- const threadsExpected = {
70
- main: new Thread_1.Thread({ context: { role: 'main' }, stitches: [] }),
71
- extra: new Thread_1.Thread({ context: { role: 'extra' }, stitches: [] }),
72
- };
73
- const threadsInferred = threadsExpected;
74
- expect(threadsInferred);
75
- });
76
- (0, test_fns_1.then)('missing required thread should not be assignable', () => {
77
- const threadsExpected = {
78
- extra: new Thread_1.Thread({ context: { role: 'extra' }, stitches: [] }),
79
- };
80
- // @ts-expect-error: Property 'main' is missing in type 'Threads<{ extra: Empty; }>' but required in type 'ThreadsMerged<Threads<{ main: Empty; }>[]>'.ts(2741)
81
- const threadsInferred = threadsExpected;
82
- expect(threadsInferred);
83
- });
84
- (0, test_fns_1.then)('thread with extra context shape SHOULD be assignable', () => {
85
- const threadsExpected = {
86
- main: new Thread_1.Thread({
87
- context: { role: 'main', foo: 'unexpected' },
88
- stitches: [],
89
- }),
90
- };
91
- const threadsInferred = threadsExpected;
92
- expect(threadsInferred);
93
- });
94
- });
95
- (0, test_fns_1.given)('a sequence of stitchers with different thread roles or output', () => {
96
- const stitcherWithClock = new StitchStep_1.StitchStepCompute({
97
- form: 'COMPUTE',
98
- readme: null,
99
- slug: 'with-clock',
100
- stitchee: 'clock',
101
- invoke: () => ({ input: null, output: (0, uni_time_1.asUniDateTime)(new Date()) }),
102
- });
103
- const sequence = [stitcherGetTime, stitcherWithClock];
104
- (0, test_fns_1.then)('GStitcherInferred merges thread roles', () => {
105
- const keys = ['main', 'clock'];
106
- expect(keys).toEqual(expect.arrayContaining(['main', 'clock']));
107
- });
108
- });
109
- (0, test_fns_1.given)('a custom context', () => {
110
- (0, test_fns_1.when)('use any stitcher', () => {
111
- (0, test_fns_1.then)('when only one context is defined, it should infer that context', () => {
112
- const context = { foo: 123, ...exampleContext };
113
- expect(context.foo).toBe(123);
114
- // @ts-expect-error: 'bob' does not exist in type '{ foo: number; log: LogMethods
115
- const contextFail = { bob: 123 };
116
- expect(contextFail);
117
- });
118
- });
119
- (0, test_fns_1.when)('use a compute step ', () => {
120
- (0, test_fns_1.then)('when only one context is defined, it should infer that context', () => {
121
- const context = { foo: 123, ...exampleContext };
122
- expect(context.foo).toBe(123);
123
- // @ts-expect-error: 'bob' does not exist in type '{ foo: number; log: LogMethods
124
- const contextFail = { bob: 123 };
125
- expect(contextFail);
126
- });
127
- });
128
- });
129
- (0, test_fns_1.given)('a sequence of stitchers with varied procedure.contexts', () => {
130
- const stitcherWithEmptyContext = new StitchStep_1.StitchStepCompute({
131
- form: 'COMPUTE',
132
- readme: null,
133
- slug: 'slug',
134
- stitchee: 'one',
135
- invoke: () => ({ input: null, output: (0, uni_time_1.asUniDateTime)(new Date()) }),
136
- });
137
- const stitcherWithFooContext = new StitchStep_1.StitchStepCompute({
138
- form: 'COMPUTE',
139
- readme: null,
140
- slug: 'slug',
141
- stitchee: 'two',
142
- invoke: () => ({ input: null, output: (0, uni_time_1.asUniDateTime)(new Date()) }),
143
- });
144
- (0, test_fns_1.then)('when only one context is defined, it should infer that context', () => {
145
- const sequence = [stitcherWithFooContext];
146
- const context = { foo: 123, ...exampleContext };
147
- expect(context.foo).toBe(123);
148
- // @ts-expect-error: 'bob' does not exist in type '{ foo: number;
149
- const failure = { bob: 123, ...exampleContext };
150
- expect(failure);
151
- });
152
- const stitcherWithBarContext = new StitchStep_1.StitchStepCompute({
153
- form: 'COMPUTE',
154
- readme: null,
155
- slug: 'slug',
156
- stitchee: 'three',
157
- invoke: () => ({ input: null, output: (0, uni_time_1.asUniDateTime)(new Date()) }),
158
- });
159
- (0, test_fns_1.then)('when multiple contexts are defined, it should merge them', () => {
160
- const sequence = [
161
- stitcherWithFooContext,
162
- stitcherWithBarContext,
163
- ];
164
- const context = {
165
- foo: 123,
166
- bar: 'hello',
167
- ...exampleContext,
168
- };
169
- expect(context.foo).toBe(123);
170
- expect(context.bar).toBe('hello');
171
- });
172
- (0, test_fns_1.then)('when all contexts are Empty, result should be Empty', () => {
173
- const sequence = [stitcherWithEmptyContext];
174
- const context = { ...exampleContext };
175
- expect(context);
176
- });
177
- (0, test_fns_1.then)('when mix of Empty and defined, it should merge correctly', () => {
178
- const sequence = [
179
- stitcherWithEmptyContext,
180
- stitcherWithBarContext,
181
- ];
182
- const context = {
183
- bar: 'hello',
184
- ...exampleContext,
185
- };
186
- expect(context.bar).toBe('hello');
187
- });
188
- });
189
- });
190
- //# sourceMappingURL=GStitcherInferredFromRoute.generic.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GStitcherInferredFromRoute.generic.test.js","sourceRoot":"","sources":["../../../../src/logic/weave/compose/GStitcherInferredFromRoute.generic.test.ts"],"names":[],"mappings":";;AAAA,iDAK4B;AAE5B,mDAAyD;AACzD,uCAA6C;AAG7C,0EAAuE;AAEvE,mEAAuE;AAEvE,2DAAwD;AAExD,+EAA4E;AAI5E,QAAQ,CAAC,4BAA4B,EAAE,G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e('ProcedureContextMerged', () => {
5
- (0, test_fns_1.given)('a tuple with only one context', () => {
6
- (0, test_fns_1.then)('it should infer that context directly', () => {
7
- const context = { foo: 123 };
8
- expect(context.foo).toBe(123);
9
- });
10
- });
11
- (0, test_fns_1.given)('a tuple with multiple contexts', () => {
12
- (0, test_fns_1.then)('it should merge them into one', () => {
13
- const context = { foo: 1, bar: 'hello' };
14
- expect(context.foo).toBe(1);
15
- expect(context.bar).toBe('hello');
16
- });
17
- });
18
- (0, test_fns_1.given)('a tuple with overlapping keys', () => {
19
- (0, test_fns_1.then)('the intersection should be used (number & string = never)', () => {
20
- // @ts-expect-error: 'foo' cannot be both number and string
21
- const context = { foo: 123 };
22
- expect(context);
23
- });
24
- });
25
- (0, test_fns_1.given)('an input that is not a tuple of at least one context', () => {
26
- expect(true);
27
- });
28
- });
29
- //# sourceMappingURL=ProcedureContextMerged.generic.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProcedureContextMerged.generic.test.js","sourceRoot":"","sources":["../../../../src/logic/weave/compose/ProcedureContextMerged.generic.test.ts"],"names":[],"mappings":";;AAAA,uCAAuC;AAIvC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAA,gBAAK,EAAC,+BAA+B,EAAE,GAAG,EAAE;QAG1C,IAAA,eAAI,EAAC,uCAAuC,EAAE,GAAG,EAAE;YACjD,MAAM,OAAO,GAAW,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;YACrC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,gBAAK,EAAC,gCAAgC,EAAE,GAAG,EAAE;QAK3C,IAAA,eAAI,EAAC,+BAA+B,EAAE,GAAG,EAAE;YACzC,MAAM,OAAO,GAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;YACjD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,gBAAK,EAAC,+BAA+B,EAAE,GAAG,EAAE;QAK1C,IAAA,eAAI,EAAC,2DAA2D,EAAE,GAAG,EAAE;YACrE,2DAA2D;YAC3D,MAAM,OAAO,GAAW,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;YACrC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,gBAAK,EAAC,sDAAsD,EAAE,GAAG,EAAE;QAGjE,MAAM,CAAC,IAAsB,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}