@exellix/ai-tasks 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. package/.env.example +3 -0
  2. package/.metadata/instructions-builders/create-expected-output-instructions.md +195 -0
  3. package/.metadata/readme.md +48 -0
  4. package/.metadata/shared/audit.md +29 -0
  5. package/.metadata/skills/professional-answer +32 -0
  6. package/.metadata/skills/professional-answer.compressed.md +11 -0
  7. package/.metadata/skills/professional-answer.instructions +33 -0
  8. package/.metadata/skills/professional-answer.instructions.md +33 -0
  9. package/.metadata/skills/professional-answer.l2.md +28 -0
  10. package/.metadata/skills/professional-answer.md +32 -0
  11. package/.metadata/skills/professional-answer.prompt +1 -0
  12. package/.metadata/skills/professional-answer.prompt.md +1 -0
  13. package/.metadata/skills/professional-decision.md +26 -0
  14. package/BREAKING-CHANGES.md +43 -0
  15. package/CHANGELOG.md +147 -0
  16. package/README.md +2497 -0
  17. package/RUNTASK_REQUEST.md +369 -0
  18. package/dist/activix/activixClient.d.ts +6 -0
  19. package/dist/activix/activixClient.d.ts.map +1 -0
  20. package/dist/activix/activixClient.js +131 -0
  21. package/dist/activix/activixClient.js.map +1 -0
  22. package/dist/activix/getTaskActivities.d.ts +10 -0
  23. package/dist/activix/getTaskActivities.d.ts.map +1 -0
  24. package/dist/activix/getTaskActivities.js +17 -0
  25. package/dist/activix/getTaskActivities.js.map +1 -0
  26. package/dist/activix/phaseTracking.d.ts +17 -0
  27. package/dist/activix/phaseTracking.d.ts.map +1 -0
  28. package/dist/activix/phaseTracking.js +85 -0
  29. package/dist/activix/phaseTracking.js.map +1 -0
  30. package/dist/aiScoping/index.d.ts +6 -0
  31. package/dist/aiScoping/index.d.ts.map +1 -0
  32. package/dist/aiScoping/index.js +4 -0
  33. package/dist/aiScoping/index.js.map +1 -0
  34. package/dist/aiScoping/runAiScoping.d.ts +36 -0
  35. package/dist/aiScoping/runAiScoping.d.ts.map +1 -0
  36. package/dist/aiScoping/runAiScoping.js +100 -0
  37. package/dist/aiScoping/runAiScoping.js.map +1 -0
  38. package/dist/aiScoping/runScopingCall.d.ts +23 -0
  39. package/dist/aiScoping/runScopingCall.d.ts.map +1 -0
  40. package/dist/aiScoping/runScopingCall.js +50 -0
  41. package/dist/aiScoping/runScopingCall.js.map +1 -0
  42. package/dist/aiScoping/validateAiScoping.d.ts +7 -0
  43. package/dist/aiScoping/validateAiScoping.d.ts.map +1 -0
  44. package/dist/aiScoping/validateAiScoping.js +33 -0
  45. package/dist/aiScoping/validateAiScoping.js.map +1 -0
  46. package/dist/aiSkillsUpstreamExports.d.ts +13 -0
  47. package/dist/aiSkillsUpstreamExports.d.ts.map +1 -0
  48. package/dist/aiSkillsUpstreamExports.js +12 -0
  49. package/dist/aiSkillsUpstreamExports.js.map +1 -0
  50. package/dist/analysis/analyzeRunTaskRequest.d.ts +29 -0
  51. package/dist/analysis/analyzeRunTaskRequest.d.ts.map +1 -0
  52. package/dist/analysis/analyzeRunTaskRequest.js +85 -0
  53. package/dist/analysis/analyzeRunTaskRequest.js.map +1 -0
  54. package/dist/analysis/index.d.ts +3 -0
  55. package/dist/analysis/index.d.ts.map +1 -0
  56. package/dist/analysis/index.js +2 -0
  57. package/dist/analysis/index.js.map +1 -0
  58. package/dist/builders/task-request-builder.d.ts +310 -0
  59. package/dist/builders/task-request-builder.d.ts.map +1 -0
  60. package/dist/builders/task-request-builder.js +581 -0
  61. package/dist/builders/task-request-builder.js.map +1 -0
  62. package/dist/compile/compileTaskConfiguration.d.ts +15 -0
  63. package/dist/compile/compileTaskConfiguration.d.ts.map +1 -0
  64. package/dist/compile/compileTaskConfiguration.js +184 -0
  65. package/dist/compile/compileTaskConfiguration.js.map +1 -0
  66. package/dist/compile/index.d.ts +2 -0
  67. package/dist/compile/index.d.ts.map +1 -0
  68. package/dist/compile/index.js +2 -0
  69. package/dist/compile/index.js.map +1 -0
  70. package/dist/core/task-sdk.d.ts +36 -0
  71. package/dist/core/task-sdk.d.ts.map +1 -0
  72. package/dist/core/task-sdk.js +2432 -0
  73. package/dist/core/task-sdk.js.map +1 -0
  74. package/dist/errors/smartInputValidationError.d.ts +39 -0
  75. package/dist/errors/smartInputValidationError.d.ts.map +1 -0
  76. package/dist/errors/smartInputValidationError.js +97 -0
  77. package/dist/errors/smartInputValidationError.js.map +1 -0
  78. package/dist/errors/taskConfigurationCompileError.d.ts +16 -0
  79. package/dist/errors/taskConfigurationCompileError.d.ts.map +1 -0
  80. package/dist/errors/taskConfigurationCompileError.js +20 -0
  81. package/dist/errors/taskConfigurationCompileError.js.map +1 -0
  82. package/dist/execution-strategies/applyExecutionStrategyOutputs.d.ts +17 -0
  83. package/dist/execution-strategies/applyExecutionStrategyOutputs.d.ts.map +1 -0
  84. package/dist/execution-strategies/applyExecutionStrategyOutputs.js +63 -0
  85. package/dist/execution-strategies/applyExecutionStrategyOutputs.js.map +1 -0
  86. package/dist/execution-strategies/constants.d.ts +14 -0
  87. package/dist/execution-strategies/constants.d.ts.map +1 -0
  88. package/dist/execution-strategies/constants.js +13 -0
  89. package/dist/execution-strategies/constants.js.map +1 -0
  90. package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts +9 -0
  91. package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts.map +1 -0
  92. package/dist/execution-strategies/executionStrategyCatalogMetadata.js +37 -0
  93. package/dist/execution-strategies/executionStrategyCatalogMetadata.js.map +1 -0
  94. package/dist/execution-strategies/genericExecutionFuncxEnvelope.d.ts +94 -0
  95. package/dist/execution-strategies/genericExecutionFuncxEnvelope.d.ts.map +1 -0
  96. package/dist/execution-strategies/genericExecutionFuncxEnvelope.js +306 -0
  97. package/dist/execution-strategies/genericExecutionFuncxEnvelope.js.map +1 -0
  98. package/dist/execution-strategies/resolveExecutionStrategies.d.ts +14 -0
  99. package/dist/execution-strategies/resolveExecutionStrategies.d.ts.map +1 -0
  100. package/dist/execution-strategies/resolveExecutionStrategies.js +108 -0
  101. package/dist/execution-strategies/resolveExecutionStrategies.js.map +1 -0
  102. package/dist/execution-strategies/runFuncxExecutionStrategy.d.ts +37 -0
  103. package/dist/execution-strategies/runFuncxExecutionStrategy.d.ts.map +1 -0
  104. package/dist/execution-strategies/runFuncxExecutionStrategy.js +72 -0
  105. package/dist/execution-strategies/runFuncxExecutionStrategy.js.map +1 -0
  106. package/dist/index.d.ts +99 -0
  107. package/dist/index.d.ts.map +1 -0
  108. package/dist/index.js +106 -0
  109. package/dist/index.js.map +1 -0
  110. package/dist/internal/resolveLlmCallForXynthesis.d.ts +52 -0
  111. package/dist/internal/resolveLlmCallForXynthesis.d.ts.map +1 -0
  112. package/dist/internal/resolveLlmCallForXynthesis.js +81 -0
  113. package/dist/internal/resolveLlmCallForXynthesis.js.map +1 -0
  114. package/dist/internal/resolveRunTaskRuntimeKnobs.d.ts +19 -0
  115. package/dist/internal/resolveRunTaskRuntimeKnobs.d.ts.map +1 -0
  116. package/dist/internal/resolveRunTaskRuntimeKnobs.js +52 -0
  117. package/dist/internal/resolveRunTaskRuntimeKnobs.js.map +1 -0
  118. package/dist/internal/runPostStepLlmCall.d.ts +52 -0
  119. package/dist/internal/runPostStepLlmCall.d.ts.map +1 -0
  120. package/dist/internal/runPostStepLlmCall.js +170 -0
  121. package/dist/internal/runPostStepLlmCall.js.map +1 -0
  122. package/dist/localTasks/collectEvidence.d.ts +3 -0
  123. package/dist/localTasks/collectEvidence.d.ts.map +1 -0
  124. package/dist/localTasks/collectEvidence.js +364 -0
  125. package/dist/localTasks/collectEvidence.js.map +1 -0
  126. package/dist/localTasks/decideWebScope.d.ts +3 -0
  127. package/dist/localTasks/decideWebScope.d.ts.map +1 -0
  128. package/dist/localTasks/decideWebScope.js +56 -0
  129. package/dist/localTasks/decideWebScope.js.map +1 -0
  130. package/dist/localTasks/index.d.ts +5 -0
  131. package/dist/localTasks/index.d.ts.map +1 -0
  132. package/dist/localTasks/index.js +19 -0
  133. package/dist/localTasks/index.js.map +1 -0
  134. package/dist/localTasks/narrixAssetPlayground.d.ts +13 -0
  135. package/dist/localTasks/narrixAssetPlayground.d.ts.map +1 -0
  136. package/dist/localTasks/narrixAssetPlayground.js +161 -0
  137. package/dist/localTasks/narrixAssetPlayground.js.map +1 -0
  138. package/dist/localTasks/narrixSubnetPlayground.d.ts +14 -0
  139. package/dist/localTasks/narrixSubnetPlayground.d.ts.map +1 -0
  140. package/dist/localTasks/narrixSubnetPlayground.js +168 -0
  141. package/dist/localTasks/narrixSubnetPlayground.js.map +1 -0
  142. package/dist/localTasks/narrixVulnGroupPlayground.d.ts +13 -0
  143. package/dist/localTasks/narrixVulnGroupPlayground.d.ts.map +1 -0
  144. package/dist/localTasks/narrixVulnGroupPlayground.js +161 -0
  145. package/dist/localTasks/narrixVulnGroupPlayground.js.map +1 -0
  146. package/dist/localTasks/narrixVulnInstancePlayground.d.ts +13 -0
  147. package/dist/localTasks/narrixVulnInstancePlayground.d.ts.map +1 -0
  148. package/dist/localTasks/narrixVulnInstancePlayground.js +165 -0
  149. package/dist/localTasks/narrixVulnInstancePlayground.js.map +1 -0
  150. package/dist/localTasks/nodeCallExport.d.ts +6 -0
  151. package/dist/localTasks/nodeCallExport.d.ts.map +1 -0
  152. package/dist/localTasks/nodeCallExport.js +99 -0
  153. package/dist/localTasks/nodeCallExport.js.map +1 -0
  154. package/dist/localTasks/nodeCallExportBatch.d.ts +3 -0
  155. package/dist/localTasks/nodeCallExportBatch.d.ts.map +1 -0
  156. package/dist/localTasks/nodeCallExportBatch.js +52 -0
  157. package/dist/localTasks/nodeCallExportBatch.js.map +1 -0
  158. package/dist/localTasks/normalizeNarrixResult.d.ts +3 -0
  159. package/dist/localTasks/normalizeNarrixResult.d.ts.map +1 -0
  160. package/dist/localTasks/normalizeNarrixResult.js +106 -0
  161. package/dist/localTasks/normalizeNarrixResult.js.map +1 -0
  162. package/dist/localTasks/registry.d.ts +4 -0
  163. package/dist/localTasks/registry.d.ts.map +1 -0
  164. package/dist/localTasks/registry.js +8 -0
  165. package/dist/localTasks/registry.js.map +1 -0
  166. package/dist/localTasks/types.d.ts +28 -0
  167. package/dist/localTasks/types.d.ts.map +1 -0
  168. package/dist/localTasks/types.js +2 -0
  169. package/dist/localTasks/types.js.map +1 -0
  170. package/dist/localTasks/validateInput.d.ts +3 -0
  171. package/dist/localTasks/validateInput.d.ts.map +1 -0
  172. package/dist/localTasks/validateInput.js +66 -0
  173. package/dist/localTasks/validateInput.js.map +1 -0
  174. package/dist/methods/convenience-methods.d.ts +45 -0
  175. package/dist/methods/convenience-methods.d.ts.map +1 -0
  176. package/dist/methods/convenience-methods.js +39 -0
  177. package/dist/methods/convenience-methods.js.map +1 -0
  178. package/dist/narrix/applyNarrixScope.d.ts +10 -0
  179. package/dist/narrix/applyNarrixScope.d.ts.map +1 -0
  180. package/dist/narrix/applyNarrixScope.js +69 -0
  181. package/dist/narrix/applyNarrixScope.js.map +1 -0
  182. package/dist/narrix/buildNarrixAttachment.d.ts +9 -0
  183. package/dist/narrix/buildNarrixAttachment.d.ts.map +1 -0
  184. package/dist/narrix/buildNarrixAttachment.js +29 -0
  185. package/dist/narrix/buildNarrixAttachment.js.map +1 -0
  186. package/dist/narrix/buildWebScopeScopeInput.d.ts +39 -0
  187. package/dist/narrix/buildWebScopeScopeInput.d.ts.map +1 -0
  188. package/dist/narrix/buildWebScopeScopeInput.js +193 -0
  189. package/dist/narrix/buildWebScopeScopeInput.js.map +1 -0
  190. package/dist/narrix/flags.d.ts +4 -0
  191. package/dist/narrix/flags.d.ts.map +1 -0
  192. package/dist/narrix/flags.js +4 -0
  193. package/dist/narrix/flags.js.map +1 -0
  194. package/dist/narrix/index.d.ts +11 -0
  195. package/dist/narrix/index.d.ts.map +1 -0
  196. package/dist/narrix/index.js +14 -0
  197. package/dist/narrix/index.js.map +1 -0
  198. package/dist/narrix/narrixClient.d.ts +9 -0
  199. package/dist/narrix/narrixClient.d.ts.map +1 -0
  200. package/dist/narrix/narrixClient.js +46 -0
  201. package/dist/narrix/narrixClient.js.map +1 -0
  202. package/dist/narrix/narrixContextMarkdown.d.ts +15 -0
  203. package/dist/narrix/narrixContextMarkdown.d.ts.map +1 -0
  204. package/dist/narrix/narrixContextMarkdown.js +98 -0
  205. package/dist/narrix/narrixContextMarkdown.js.map +1 -0
  206. package/dist/narrix/narrixRunnerModule.d.ts +11 -0
  207. package/dist/narrix/narrixRunnerModule.d.ts.map +1 -0
  208. package/dist/narrix/narrixRunnerModule.js +17 -0
  209. package/dist/narrix/narrixRunnerModule.js.map +1 -0
  210. package/dist/narrix/runNarrixForChat.d.ts +3 -0
  211. package/dist/narrix/runNarrixForChat.d.ts.map +1 -0
  212. package/dist/narrix/runNarrixForChat.js +51 -0
  213. package/dist/narrix/runNarrixForChat.js.map +1 -0
  214. package/dist/narrix/runNarrixForDocs.d.ts +3 -0
  215. package/dist/narrix/runNarrixForDocs.d.ts.map +1 -0
  216. package/dist/narrix/runNarrixForDocs.js +50 -0
  217. package/dist/narrix/runNarrixForDocs.js.map +1 -0
  218. package/dist/narrix/runNarrixForRecord.d.ts +3 -0
  219. package/dist/narrix/runNarrixForRecord.d.ts.map +1 -0
  220. package/dist/narrix/runNarrixForRecord.js +47 -0
  221. package/dist/narrix/runNarrixForRecord.js.map +1 -0
  222. package/dist/narrix/runNarrixForText.d.ts +3 -0
  223. package/dist/narrix/runNarrixForText.d.ts.map +1 -0
  224. package/dist/narrix/runNarrixForText.js +49 -0
  225. package/dist/narrix/runNarrixForText.js.map +1 -0
  226. package/dist/narrix/runnerDispatch.d.ts +12 -0
  227. package/dist/narrix/runnerDispatch.d.ts.map +1 -0
  228. package/dist/narrix/runnerDispatch.js +19 -0
  229. package/dist/narrix/runnerDispatch.js.map +1 -0
  230. package/dist/narrix/seedBundleRouting.d.ts +15 -0
  231. package/dist/narrix/seedBundleRouting.d.ts.map +1 -0
  232. package/dist/narrix/seedBundleRouting.js +46 -0
  233. package/dist/narrix/seedBundleRouting.js.map +1 -0
  234. package/dist/narrix/task.d.ts +4 -0
  235. package/dist/narrix/task.d.ts.map +1 -0
  236. package/dist/narrix/task.js +143 -0
  237. package/dist/narrix/task.js.map +1 -0
  238. package/dist/narrix/types.d.ts +104 -0
  239. package/dist/narrix/types.d.ts.map +1 -0
  240. package/dist/narrix/types.js +3 -0
  241. package/dist/narrix/types.js.map +1 -0
  242. package/dist/narrix/webContextMarkdown.d.ts +54 -0
  243. package/dist/narrix/webContextMarkdown.d.ts.map +1 -0
  244. package/dist/narrix/webContextMarkdown.js +206 -0
  245. package/dist/narrix/webContextMarkdown.js.map +1 -0
  246. package/dist/narrix/webScoper.d.ts +43 -0
  247. package/dist/narrix/webScoper.d.ts.map +1 -0
  248. package/dist/narrix/webScoper.js +144 -0
  249. package/dist/narrix/webScoper.js.map +1 -0
  250. package/dist/observability/debugTrace.d.ts +31 -0
  251. package/dist/observability/debugTrace.d.ts.map +1 -0
  252. package/dist/observability/debugTrace.js +117 -0
  253. package/dist/observability/debugTrace.js.map +1 -0
  254. package/dist/observability/extractAiTasksObservability.d.ts +7 -0
  255. package/dist/observability/extractAiTasksObservability.d.ts.map +1 -0
  256. package/dist/observability/extractAiTasksObservability.js +98 -0
  257. package/dist/observability/extractAiTasksObservability.js.map +1 -0
  258. package/dist/observability/graphExecutionRunLogContract.d.ts +19 -0
  259. package/dist/observability/graphExecutionRunLogContract.d.ts.map +1 -0
  260. package/dist/observability/graphExecutionRunLogContract.js +11 -0
  261. package/dist/observability/graphExecutionRunLogContract.js.map +1 -0
  262. package/dist/packaged-tasks-client.d.ts +66 -0
  263. package/dist/packaged-tasks-client.d.ts.map +1 -0
  264. package/dist/packaged-tasks-client.js +100 -0
  265. package/dist/packaged-tasks-client.js.map +1 -0
  266. package/dist/planWebScopeQuestions/index.d.ts +78 -0
  267. package/dist/planWebScopeQuestions/index.d.ts.map +1 -0
  268. package/dist/planWebScopeQuestions/index.js +282 -0
  269. package/dist/planWebScopeQuestions/index.js.map +1 -0
  270. package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.d.ts +18 -0
  271. package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.d.ts.map +1 -0
  272. package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.js +42 -0
  273. package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.js.map +1 -0
  274. package/dist/post-steps/audit/loadAuditTemplates.d.ts +72 -0
  275. package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -0
  276. package/dist/post-steps/audit/loadAuditTemplates.js +62 -0
  277. package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -0
  278. package/dist/post-steps/audit/parseAuditOutput.d.ts +11 -0
  279. package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -0
  280. package/dist/post-steps/audit/parseAuditOutput.js +50 -0
  281. package/dist/post-steps/audit/parseAuditOutput.js.map +1 -0
  282. package/dist/post-steps/audit/runAudit.d.ts +22 -0
  283. package/dist/post-steps/audit/runAudit.d.ts.map +1 -0
  284. package/dist/post-steps/audit/runAudit.js +406 -0
  285. package/dist/post-steps/audit/runAudit.js.map +1 -0
  286. package/dist/post-steps/audit/runAuditCall.d.ts +23 -0
  287. package/dist/post-steps/audit/runAuditCall.d.ts.map +1 -0
  288. package/dist/post-steps/audit/runAuditCall.js +32 -0
  289. package/dist/post-steps/audit/runAuditCall.js.map +1 -0
  290. package/dist/post-steps/polish/loadPolishTemplates.d.ts +35 -0
  291. package/dist/post-steps/polish/loadPolishTemplates.d.ts.map +1 -0
  292. package/dist/post-steps/polish/loadPolishTemplates.js +38 -0
  293. package/dist/post-steps/polish/loadPolishTemplates.js.map +1 -0
  294. package/dist/post-steps/polish/parsePolishOutput.d.ts +6 -0
  295. package/dist/post-steps/polish/parsePolishOutput.d.ts.map +1 -0
  296. package/dist/post-steps/polish/parsePolishOutput.js +47 -0
  297. package/dist/post-steps/polish/parsePolishOutput.js.map +1 -0
  298. package/dist/post-steps/polish/runPolish.d.ts +24 -0
  299. package/dist/post-steps/polish/runPolish.d.ts.map +1 -0
  300. package/dist/post-steps/polish/runPolish.js +147 -0
  301. package/dist/post-steps/polish/runPolish.js.map +1 -0
  302. package/dist/post-steps/polish/runPolishCall.d.ts +22 -0
  303. package/dist/post-steps/polish/runPolishCall.d.ts.map +1 -0
  304. package/dist/post-steps/polish/runPolishCall.js +32 -0
  305. package/dist/post-steps/polish/runPolishCall.js.map +1 -0
  306. package/dist/post-steps/resolvePostStepConfig.d.ts +58 -0
  307. package/dist/post-steps/resolvePostStepConfig.d.ts.map +1 -0
  308. package/dist/post-steps/resolvePostStepConfig.js +105 -0
  309. package/dist/post-steps/resolvePostStepConfig.js.map +1 -0
  310. package/dist/rendrixUpstreamExports.d.ts +7 -0
  311. package/dist/rendrixUpstreamExports.d.ts.map +1 -0
  312. package/dist/rendrixUpstreamExports.js +6 -0
  313. package/dist/rendrixUpstreamExports.js.map +1 -0
  314. package/dist/skillCatalogExports.d.ts +8 -0
  315. package/dist/skillCatalogExports.d.ts.map +1 -0
  316. package/dist/skillCatalogExports.js +8 -0
  317. package/dist/skillCatalogExports.js.map +1 -0
  318. package/dist/strategies/direct-execution-strategy.d.ts +31 -0
  319. package/dist/strategies/direct-execution-strategy.d.ts.map +1 -0
  320. package/dist/strategies/direct-execution-strategy.js +107 -0
  321. package/dist/strategies/direct-execution-strategy.js.map +1 -0
  322. package/dist/strategies/execution-strategy.interface.d.ts +31 -0
  323. package/dist/strategies/execution-strategy.interface.d.ts.map +1 -0
  324. package/dist/strategies/execution-strategy.interface.js +2 -0
  325. package/dist/strategies/execution-strategy.interface.js.map +1 -0
  326. package/dist/strategies/index.d.ts +9 -0
  327. package/dist/strategies/index.d.ts.map +1 -0
  328. package/dist/strategies/index.js +8 -0
  329. package/dist/strategies/index.js.map +1 -0
  330. package/dist/strategies/strategy-factory.d.ts +45 -0
  331. package/dist/strategies/strategy-factory.d.ts.map +1 -0
  332. package/dist/strategies/strategy-factory.js +59 -0
  333. package/dist/strategies/strategy-factory.js.map +1 -0
  334. package/dist/synthesis/index.d.ts +9 -0
  335. package/dist/synthesis/index.d.ts.map +1 -0
  336. package/dist/synthesis/index.js +8 -0
  337. package/dist/synthesis/index.js.map +1 -0
  338. package/dist/synthesis/resolveSourceMaterial.d.ts +35 -0
  339. package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -0
  340. package/dist/synthesis/resolveSourceMaterial.js +152 -0
  341. package/dist/synthesis/resolveSourceMaterial.js.map +1 -0
  342. package/dist/synthesis/runStructuredSynthesisRobust.d.ts +42 -0
  343. package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -0
  344. package/dist/synthesis/runStructuredSynthesisRobust.js +303 -0
  345. package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -0
  346. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +19 -0
  347. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -0
  348. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +242 -0
  349. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -0
  350. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +171 -0
  351. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -0
  352. package/dist/task-strategies/canonicalInputExecutionStrategies.js +117 -0
  353. package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -0
  354. package/dist/task-strategies/canonicalNarrixModes.d.ts +31 -0
  355. package/dist/task-strategies/canonicalNarrixModes.d.ts.map +1 -0
  356. package/dist/task-strategies/canonicalNarrixModes.js +35 -0
  357. package/dist/task-strategies/canonicalNarrixModes.js.map +1 -0
  358. package/dist/task-strategies/canonicalTaskStrategies.d.ts +104 -0
  359. package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -0
  360. package/dist/task-strategies/canonicalTaskStrategies.js +77 -0
  361. package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -0
  362. package/dist/task-strategies/cataloxCatalogViews.d.ts +55 -0
  363. package/dist/task-strategies/cataloxCatalogViews.d.ts.map +1 -0
  364. package/dist/task-strategies/cataloxCatalogViews.js +65 -0
  365. package/dist/task-strategies/cataloxCatalogViews.js.map +1 -0
  366. package/dist/task-strategies/constants.d.ts +49 -0
  367. package/dist/task-strategies/constants.d.ts.map +1 -0
  368. package/dist/task-strategies/constants.js +49 -0
  369. package/dist/task-strategies/constants.js.map +1 -0
  370. package/dist/task-strategies/index.d.ts +22 -0
  371. package/dist/task-strategies/index.d.ts.map +1 -0
  372. package/dist/task-strategies/index.js +13 -0
  373. package/dist/task-strategies/index.js.map +1 -0
  374. package/dist/task-strategies/listAiTaskStrategies.d.ts +43 -0
  375. package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -0
  376. package/dist/task-strategies/listAiTaskStrategies.js +74 -0
  377. package/dist/task-strategies/listAiTaskStrategies.js.map +1 -0
  378. package/dist/task-strategies/normalize.d.ts +7 -0
  379. package/dist/task-strategies/normalize.d.ts.map +1 -0
  380. package/dist/task-strategies/normalize.js +44 -0
  381. package/dist/task-strategies/normalize.js.map +1 -0
  382. package/dist/task-strategies/types.d.ts +37 -0
  383. package/dist/task-strategies/types.d.ts.map +1 -0
  384. package/dist/task-strategies/types.js +2 -0
  385. package/dist/task-strategies/types.js.map +1 -0
  386. package/dist/types/decision-contracts.d.ts +31 -0
  387. package/dist/types/decision-contracts.d.ts.map +1 -0
  388. package/dist/types/decision-contracts.js +23 -0
  389. package/dist/types/decision-contracts.js.map +1 -0
  390. package/dist/types/evidence-types.d.ts +108 -0
  391. package/dist/types/evidence-types.d.ts.map +1 -0
  392. package/dist/types/evidence-types.js +9 -0
  393. package/dist/types/evidence-types.js.map +1 -0
  394. package/dist/types/executionType.d.ts +9 -0
  395. package/dist/types/executionType.d.ts.map +1 -0
  396. package/dist/types/executionType.js +8 -0
  397. package/dist/types/executionType.js.map +1 -0
  398. package/dist/types/index.d.ts +28 -0
  399. package/dist/types/index.d.ts.map +1 -0
  400. package/dist/types/index.js +12 -0
  401. package/dist/types/index.js.map +1 -0
  402. package/dist/types/llmCall.d.ts +121 -0
  403. package/dist/types/llmCall.d.ts.map +1 -0
  404. package/dist/types/llmCall.js +39 -0
  405. package/dist/types/llmCall.js.map +1 -0
  406. package/dist/types/task-configuration.d.ts +60 -0
  407. package/dist/types/task-configuration.d.ts.map +1 -0
  408. package/dist/types/task-configuration.js +3 -0
  409. package/dist/types/task-configuration.js.map +1 -0
  410. package/dist/types/task-types.d.ts +887 -0
  411. package/dist/types/task-types.d.ts.map +1 -0
  412. package/dist/types/task-types.js +21 -0
  413. package/dist/types/task-types.js.map +1 -0
  414. package/dist/utilities/runUtility.d.ts +3 -0
  415. package/dist/utilities/runUtility.d.ts.map +1 -0
  416. package/dist/utilities/runUtility.js +204 -0
  417. package/dist/utilities/runUtility.js.map +1 -0
  418. package/dist/utils/assertRequiredRunSkillCorrelation.d.ts +7 -0
  419. package/dist/utils/assertRequiredRunSkillCorrelation.d.ts.map +1 -0
  420. package/dist/utils/assertRequiredRunSkillCorrelation.js +17 -0
  421. package/dist/utils/assertRequiredRunSkillCorrelation.js.map +1 -0
  422. package/dist/utils/assertValidSmartInputConfig.d.ts +5 -0
  423. package/dist/utils/assertValidSmartInputConfig.d.ts.map +1 -0
  424. package/dist/utils/assertValidSmartInputConfig.js +71 -0
  425. package/dist/utils/assertValidSmartInputConfig.js.map +1 -0
  426. package/dist/utils/bridgeRunSkillGatewayMemory.d.ts +13 -0
  427. package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -0
  428. package/dist/utils/bridgeRunSkillGatewayMemory.js +65 -0
  429. package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -0
  430. package/dist/utils/extractSmartInputRenderResult.d.ts +7 -0
  431. package/dist/utils/extractSmartInputRenderResult.d.ts.map +1 -0
  432. package/dist/utils/extractSmartInputRenderResult.js +30 -0
  433. package/dist/utils/extractSmartInputRenderResult.js.map +1 -0
  434. package/dist/utils/jsonPaths.d.ts +6 -0
  435. package/dist/utils/jsonPaths.d.ts.map +1 -0
  436. package/dist/utils/jsonPaths.js +32 -0
  437. package/dist/utils/jsonPaths.js.map +1 -0
  438. package/dist/utils/normalizeSmartInputConfig.d.ts +5 -0
  439. package/dist/utils/normalizeSmartInputConfig.d.ts.map +1 -0
  440. package/dist/utils/normalizeSmartInputConfig.js +30 -0
  441. package/dist/utils/normalizeSmartInputConfig.js.map +1 -0
  442. package/dist/utils/outputValidation.d.ts +19 -0
  443. package/dist/utils/outputValidation.d.ts.map +1 -0
  444. package/dist/utils/outputValidation.js +75 -0
  445. package/dist/utils/outputValidation.js.map +1 -0
  446. package/dist/utils/runTaskRequestShape.d.ts +16 -0
  447. package/dist/utils/runTaskRequestShape.d.ts.map +1 -0
  448. package/dist/utils/runTaskRequestShape.js +80 -0
  449. package/dist/utils/runTaskRequestShape.js.map +1 -0
  450. package/dist/utils/skillTemplateVariables.d.ts +20 -0
  451. package/dist/utils/skillTemplateVariables.d.ts.map +1 -0
  452. package/dist/utils/skillTemplateVariables.js +63 -0
  453. package/dist/utils/skillTemplateVariables.js.map +1 -0
  454. package/dist/utils/xynthesizedSmartInputPaths.d.ts +16 -0
  455. package/dist/utils/xynthesizedSmartInputPaths.d.ts.map +1 -0
  456. package/dist/utils/xynthesizedSmartInputPaths.js +56 -0
  457. package/dist/utils/xynthesizedSmartInputPaths.js.map +1 -0
  458. package/dist/utils/xynthesizedWrite.d.ts +10 -0
  459. package/dist/utils/xynthesizedWrite.d.ts.map +1 -0
  460. package/dist/utils/xynthesizedWrite.js +61 -0
  461. package/dist/utils/xynthesizedWrite.js.map +1 -0
  462. package/dist/validation/analyzeExpectedRunTaskInput.d.ts +41 -0
  463. package/dist/validation/analyzeExpectedRunTaskInput.d.ts.map +1 -0
  464. package/dist/validation/analyzeExpectedRunTaskInput.js +133 -0
  465. package/dist/validation/analyzeExpectedRunTaskInput.js.map +1 -0
  466. package/dist/validation/collectSmartInputValidationIssues.d.ts +6 -0
  467. package/dist/validation/collectSmartInputValidationIssues.d.ts.map +1 -0
  468. package/dist/validation/collectSmartInputValidationIssues.js +38 -0
  469. package/dist/validation/collectSmartInputValidationIssues.js.map +1 -0
  470. package/dist/validation/helpers.d.ts +15 -0
  471. package/dist/validation/helpers.d.ts.map +1 -0
  472. package/dist/validation/helpers.js +184 -0
  473. package/dist/validation/helpers.js.map +1 -0
  474. package/dist/validation/index.d.ts +9 -0
  475. package/dist/validation/index.d.ts.map +1 -0
  476. package/dist/validation/index.js +6 -0
  477. package/dist/validation/index.js.map +1 -0
  478. package/dist/validation/types.d.ts +51 -0
  479. package/dist/validation/types.d.ts.map +1 -0
  480. package/dist/validation/types.js +5 -0
  481. package/dist/validation/types.js.map +1 -0
  482. package/dist/validation/validateRunTaskConfig.d.ts +8 -0
  483. package/dist/validation/validateRunTaskConfig.d.ts.map +1 -0
  484. package/dist/validation/validateRunTaskConfig.js +158 -0
  485. package/dist/validation/validateRunTaskConfig.js.map +1 -0
  486. package/dist/validation/validateRunTaskInvoke.d.ts +30 -0
  487. package/dist/validation/validateRunTaskInvoke.d.ts.map +1 -0
  488. package/dist/validation/validateRunTaskInvoke.js +108 -0
  489. package/dist/validation/validateRunTaskInvoke.js.map +1 -0
  490. package/documenations/activix-feature-request-identity.md +123 -0
  491. package/documenations/activix.md +175 -0
  492. package/documenations/bug-report-xynthesis-and-synthesis-call.md +217 -0
  493. package/documenations/core-runtime-tokens-and-strategies.md +123 -0
  494. package/documenations/downstream-environment.md +48 -0
  495. package/documenations/downstream-test-runtime-teardown-cleanup.md +73 -0
  496. package/documenations/examples/xynthesis-run-task-request.example.json +170 -0
  497. package/documenations/feature-request-ai-skills-raw-template-access.md +82 -0
  498. package/documenations/feature-request-athenix-core-directive.md +145 -0
  499. package/documenations/feature-request-athenix-token-extraction.md +124 -0
  500. package/documenations/funcx-catalog-hosting-checklist.md +107 -0
  501. package/documenations/funcx-scoping-integration-gaps.md +120 -0
  502. package/documenations/funcx-upstream-github-issues-draft.md +153 -0
  503. package/documenations/identity-metadata-contract.md +165 -0
  504. package/documenations/intermediate-steps.md +33 -0
  505. package/documenations/record-and-template-variables.md +32 -0
  506. package/documenations/run-task-execution-flow.md +153 -0
  507. package/documenations/run-task-single-run-checklist.md +109 -0
  508. package/documenations/schemas/README.md +40 -0
  509. package/documenations/schemas/openapi-3.1-components.yaml +24 -0
  510. package/documenations/schemas/v1/output-schema.json +55 -0
  511. package/documenations/schemas/v1/output-validation-result.json +41 -0
  512. package/documenations/schemas/v1/run-task-request.json +219 -0
  513. package/documenations/schemas/v1/synthesized-artifacts.json +133 -0
  514. package/documenations/synthesis-invocation-notes.md +26 -0
  515. package/documenations/synthesized-context-guide.md +84 -0
  516. package/documenations/task-core-and-core-aware-synthesis.md +58 -0
  517. package/documenations/upstream-feature-requests/ai-skills-llm-observability.md +129 -0
  518. package/documenations/upstream-feature-requests/xynthesis-llm-observability.md +125 -0
  519. package/documenations/upstream-feedback-request-shape-clarification.md +101 -0
  520. package/documenations/web-context-precedence.md +33 -0
  521. package/documenations/web-scoping-in-ai-tasks.md +503 -0
  522. package/documenations/xynthesis-activix-telemetry.md +28 -0
  523. package/documenations/xynthesis-upstream-fixes-checklist.md +71 -0
  524. package/package.json +92 -0
@@ -0,0 +1,72 @@
1
+ import { createClient } from "@x12i/funcx";
2
+ import { run } from "@x12i/funcx/functions";
3
+ import { FUNCX_EXECUTION_EVALUATE_RESULT_FUNCTION_ID, FUNCX_EXECUTION_PLAN_FUNCTION_ID, } from "./constants.js";
4
+ import { adaptEvaluateResultResponse, adaptExecutionPlanResult, buildOptimizerGenericPayload, buildPlannerGenericPayload, unwrapFuncxRunValue, } from "./genericExecutionFuncxEnvelope.js";
5
+ /**
6
+ * Test-only override: if set, replaces live FuncX `run()` for execution strategies.
7
+ */
8
+ let injectedInvoker = null;
9
+ export function setFuncxExecutionStrategyInvoker(fn) {
10
+ injectedInvoker = fn;
11
+ }
12
+ let cachedClient = null;
13
+ function defaultOpenRouterClient() {
14
+ if (!cachedClient) {
15
+ cachedClient = createClient({ backend: "openrouter" });
16
+ }
17
+ return cachedClient;
18
+ }
19
+ async function invokeFuncx(functionId, payload) {
20
+ if (injectedInvoker) {
21
+ return injectedInvoker({ functionId, payload });
22
+ }
23
+ const client = defaultOpenRouterClient();
24
+ const raw = await run(functionId, payload, { client });
25
+ return unwrapFuncxRunValue(raw);
26
+ }
27
+ function pickFunctionId(explicit, fallback) {
28
+ if (typeof explicit === "string" && explicit.trim())
29
+ return explicit.trim();
30
+ return fallback;
31
+ }
32
+ /** Build a JSON-safe snapshot from task state (feeds generic `context` / attribution builders). */
33
+ export function buildExecutionStrategyRequestPayload(req) {
34
+ return {
35
+ skillKey: req.skillKey,
36
+ input: req.input,
37
+ variables: req.variables ?? {},
38
+ jobContext: req.jobContext ?? {},
39
+ jobMemory: req.jobMemory ?? {},
40
+ taskMemory: req.taskMemory ?? {},
41
+ executionMemory: req.executionMemory ?? {},
42
+ jobId: req.jobId,
43
+ taskId: req.taskId,
44
+ agentId: req.agentId,
45
+ graphId: req.graphId,
46
+ nodeId: req.nodeId,
47
+ prevNodeId: req.prevNodeId,
48
+ coreSkillId: req.coreSkillId,
49
+ includeContextInPrompt: req.includeContextInPrompt === true,
50
+ };
51
+ }
52
+ export async function runPlannerFuncx(params) {
53
+ const functionId = pickFunctionId(params.args?.functionId, pickFunctionId(params.defaultFunctionId, FUNCX_EXECUTION_PLAN_FUNCTION_ID));
54
+ const payload = buildPlannerGenericPayload({
55
+ requestPayload: params.requestPayload,
56
+ strategyArgs: params.args,
57
+ });
58
+ const raw = await invokeFuncx(functionId, payload);
59
+ return adaptExecutionPlanResult(raw);
60
+ }
61
+ export async function runOptimizerFuncx(params) {
62
+ const functionId = pickFunctionId(params.args?.functionId, pickFunctionId(params.defaultFunctionId, FUNCX_EXECUTION_EVALUATE_RESULT_FUNCTION_ID));
63
+ const payload = buildOptimizerGenericPayload({
64
+ requestPayload: params.requestPayload,
65
+ mainResultSummary: params.mainResultSummary,
66
+ iterationIndex: params.iterationIndex,
67
+ strategyArgs: params.args,
68
+ });
69
+ const raw = await invokeFuncx(functionId, payload);
70
+ return adaptEvaluateResultResponse(raw);
71
+ }
72
+ //# sourceMappingURL=runFuncxExecutionStrategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runFuncxExecutionStrategy.js","sourceRoot":"","sources":["../../src/execution-strategies/runFuncxExecutionStrategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EACL,2CAA2C,EAC3C,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAO5C;;GAEG;AACH,IAAI,eAAe,GAA4E,IAAI,CAAC;AAEpG,MAAM,UAAU,gCAAgC,CAC9C,EAA2E;IAE3E,eAAe,GAAG,EAAE,CAAC;AACvB,CAAC;AAED,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,SAAS,uBAAuB;IAC9B,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,YAAY,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,UAAkB,EAAE,OAAgB;IAC7D,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,eAAe,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACvD,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,cAAc,CAAC,QAAiB,EA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C,UAAU,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,wBAAwB,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAMvC;IACC,MAAM,UAAU,GAAG,cAAc,CAC/B,MAAM,CAAC,IAAI,EAAE,UAAU,EACvB,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,2CAA2C,CAAC,CACtF,CAAC;IACF,MAAM,OAAO,GAAG,4BAA4B,CAAC;QAC3C,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,YAAY,EAAE,MAAM,CAAC,IAAI;KAC1B,CAAC,CAAC;IACH,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,2BAA2B,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Main entry point for the Task SDK
3
+ *
4
+ * Provides both class-based and function-based APIs for executing tasks.
5
+ */
6
+ import { ExellixSkillsClient } from "@exellix/ai-skills";
7
+ import type { ExellixSkillsClientOptions } from "@exellix/ai-skills";
8
+ import type { RunTaskRequest, RunTaskResponse } from "./types/index.js";
9
+ import type { RunUtilityRequest, RunUtilityResponse } from "./types/index.js";
10
+ import { createDefaultWorexClientTasks } from "./packaged-tasks-client.js";
11
+ export { getTaskActivities } from "./activix/getTaskActivities.js";
12
+ export { createDefaultWorexClientTasks, getPackagedAiTasksMetadataDir, PackagedWorexClientTasks, resolvePackagedSkillContentSource, } from "./packaged-tasks-client.js";
13
+ export type { CreateDefaultWorexClientTasksOptions, PackagedWorexClientTasksLifecycle, } from "./packaged-tasks-client.js";
14
+ export { mergeSkillTemplateVariables, passthroughJobTemplateVariables, } from "./utils/skillTemplateVariables.js";
15
+ export { bridgeJobMemoryForGatewayExecutionMemory, pickRunSkillRequestFields, } from "./utils/bridgeRunSkillGatewayMemory.js";
16
+ export { normalizeRunTaskRequest, collectRunTaskRequestWarnings, collectExecutionPipelineWarnings, isRunTaskRequestWarningsEnabled, } from "./utils/runTaskRequestShape.js";
17
+ export { compileTaskConfigurationOnRunTaskRequest, type CompileTaskConfigurationResult, } from "./compile/index.js";
18
+ export { TaskConfigurationCompileError, TASK_CONFIGURATION_COMPILE_ERROR_NAME, isTaskConfigurationCompileError, } from "./errors/taskConfigurationCompileError.js";
19
+ export { AI_TASK_PRE_ENABLE_SYNTHESIS, type TaskConfigurationAuthoring, type AiTaskStrategiesAuthoring, type AiTaskProfileAuthoring, type InputSynthesisAuthoring, } from "./types/task-configuration.js";
20
+ export { assertRequiredRunSkillCorrelation } from "./utils/assertRequiredRunSkillCorrelation.js";
21
+ export { SmartInputValidationError, SMART_INPUT_VALIDATION_ERROR_NAME, isSmartInputValidationError, formatSmartInputValidationMessage, } from "./errors/smartInputValidationError.js";
22
+ export type { SmartInputValidationErrorCode, SmartInputValidationErrorDetails, } from "./errors/smartInputValidationError.js";
23
+ export { validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, collectSmartInputValidationIssues, buildRunTaskValidationContext, } from "./validation/index.js";
24
+ export type { RunTaskValidationIssue, RunTaskValidationResult, RunTaskInvokeValidationResult, ExpectedRunTaskInputPath, AnalyzeExpectedRunTaskInputResult, ValidateRunTaskInvokeParams, RunTaskTemplateResolver, } from "./validation/index.js";
25
+ export { analyzeRunTaskRequest } from "./analysis/index.js";
26
+ export type { AnalyzeRunTaskRequestOptions, AnalyzeRunTaskRequestResult } from "./analysis/index.js";
27
+ export type { OutputValidationErrorCode, OutputValidationErrorItem, OutputValidationResult, } from "./utils/outputValidation.js";
28
+ export { validateParsedOutput } from "./utils/outputValidation.js";
29
+ export { extractAiTasksObservabilityFromRunTaskResponse } from "./observability/extractAiTasksObservability.js";
30
+ export { resolveRunTaskRuntimeKnobs, type ResolvedRunTaskRuntimeKnobs, type ResolvedExecutionStrategies, } from "./internal/resolveRunTaskRuntimeKnobs.js";
31
+ export { setFuncxExecutionStrategyInvoker } from "./execution-strategies/runFuncxExecutionStrategy.js";
32
+ export { FUNCX_EXECUTION_PLAN_FUNCTION_ID, FUNCX_EXECUTION_EVALUATE_RESULT_FUNCTION_ID, FUNCX_RESEARCH_PLAN_QUESTIONS_FUNCTION_ID, DEFAULT_OPTIMIZER_MAX_ITERATIONS, ENV_OPTIMIZER_MAX_ITERATIONS, } from "./execution-strategies/constants.js";
33
+ export { adaptExecutionPlanResult, adaptEvaluateResultResponse, buildOptimizerGenericPayload, buildPlannerGenericPayload, buildResearchPlanQuestionsPayload, adaptResearchPlanQuestionsResult, unwrapFuncxRunValue, } from "./execution-strategies/genericExecutionFuncxEnvelope.js";
34
+ export { resolveSafeExecutionStrategyCatalogDefaultFunctionId } from "./execution-strategies/executionStrategyCatalogMetadata.js";
35
+ /** @see https://github.com/x12i/funcx — canonical `run()` JSON normalization (≥3.8.2). */
36
+ export { getRunJsonResult, isHttpRunSuccessBody, genericExecutionEnvelopeJsonSchema, buildAskAttribution, } from "@x12i/funcx/functions";
37
+ export type { GenericExecutionEnvelope } from "@x12i/funcx/functions";
38
+ export type { GenericExecutionStrategyPayload, GenericFuncxAttribution, ResearchPlanQuestionsGenericPayload, ResearchPlanQuestionsInputShape, } from "./execution-strategies/genericExecutionFuncxEnvelope.js";
39
+ export type { GraphExecutionConsoleFields } from "./observability/graphExecutionRunLogContract.js";
40
+ export * from "./skillCatalogExports.js";
41
+ export * from "./aiSkillsUpstreamExports.js";
42
+ export * from "./rendrixUpstreamExports.js";
43
+ export * from "./analysis/index.js";
44
+ export * from "./task-strategies/index.js";
45
+ export { PlanWebScopeQuestionsReasonCode, parseAndValidatePlanWebScopeQuestionsOutput, buildPlanWebScopeQuestionsUserPrompt, runPlanWebScopeQuestions, setResearchPlanQuestionsFuncxInvoker, } from "./planWebScopeQuestions/index.js";
46
+ export type { PlanWebScopeQuestionsInput, PlanWebScopeQuestionsOutput, PlanWebScopeQuestionItem, PlanWebScopeQuestionsMemorySummary, RunPlanWebScopeQuestionsParams, ParsePlanWebScopeQuestionsResult, } from "./planWebScopeQuestions/index.js";
47
+ /** @alias createDefaultWorexClientTasks — name aligned with optional `WorexClientTasks.forPackagedSkills` style API. */
48
+ export declare const forPackagedSkills: typeof createDefaultWorexClientTasks;
49
+ export type WorexClientSkills = ExellixSkillsClient;
50
+ export type WorexClientSkillsOptions = ExellixSkillsClientOptions;
51
+ export { ExellixSkillsClient };
52
+ export { WorexClientTasks } from "./core/task-sdk.js";
53
+ export { TaskRequestBuilder } from "./builders/task-request-builder.js";
54
+ export { setContextSynthesizer, getContextSynthesizer, runStructuredSynthesisGatewayCall, createGatewayStructuredContextSynthesizer, buildSynthesizedContextMarkdown, resolveSynthesisQuestion, resolveSourceMaterialParts, parseAndValidateSynthesizedPromptPayload, normalizeAndValidateSynthesizedPayload, executeXynthesisAction, setSynthesisInvoker, getSynthesisInvoker, } from "./synthesis/index.js";
55
+ export type { RunStructuredSynthesisParams, ParseSynthesizedPayloadOptions, SourceMaterialParts, SynthesisInvoker, SynthesisInvokerOptions, ExecuteXynthesisActionRequest, } from "./synthesis/index.js";
56
+ /**
57
+ * Execute a task with the specified execution strategy (function-based API).
58
+ *
59
+ * This is a convenience function that automatically initializes the SDK.
60
+ * For more control, use the WorexClientTasks class directly.
61
+ *
62
+ * @param request The task execution request
63
+ * @param options Optional client configuration (only used on first call)
64
+ * @returns Promise resolving to the task response
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * import { runTask } from "@exellix/ai-tasks";
69
+ *
70
+ * const result = await runTask({
71
+ * skillKey: "tasks/security-risk-summary",
72
+ * agentId: "my-agent",
73
+ * jobTypeId: "security-summary-job",
74
+ * taskTypeId: "security-summary-task",
75
+ * input: { assetId: "a-123" },
76
+ * variables: { orgName: "MyOrganization" },
77
+ * });
78
+ * ```
79
+ */
80
+ export declare function runTask<TParsed = any>(request: RunTaskRequest, options?: ExellixSkillsClientOptions): Promise<RunTaskResponse<TParsed>>;
81
+ /**
82
+ * Execute an ai-tasks utility request (function-based API).
83
+ *
84
+ * This is used by upstream orchestration (e.g. worox-graph) to run deterministic utility kinds
85
+ * like `xynthesis/finalize` and return canonical structured output in `response.parsed`.
86
+ */
87
+ export declare function runUtility<TParsed = any>(request: RunUtilityRequest): Promise<RunUtilityResponse<TParsed>>;
88
+ export type { RunTaskRequest, RunTaskResponse, RunTaskTraceResponse, DebugTraceTask, RunSkillResponse, RunSkillRequest, RunUtilityRequest, RunUtilityResponse, UtilityExecutionPolicy, EvidenceCollectionInput, EvidenceBundle, EvidenceRequest, EvidencePolicy, EvidenceExtractionConfig, EvidenceRequestInputKind, EvidenceRequestStatus, EvidenceBundleValue, EvidenceBundleRequestResult, EvidenceSource, EvidenceFact, EvidenceCoverage, EvidenceBundleError, EvidenceBundleWarning, JobHistory, TaskHistory, ExecutionHistory, TaskMemoryNarrixEntry, NarrixScope, NarrixRunInput, IntermediateStep, IntermediateSteps, RunTaskResponseWithSteps, ExecutionPhase, ExecutionStep, ContextSourcePolicy, WebEvidenceConfig, SynthesisConfig, SynthesisMode, TaskCore, SynthesisInput, SynthesizedItem, SynthesizedContext, SynthesizedPromptPayload, ContextSynthesizer, AuditConfig, AuditCheck, AuditResult, AuditCheckResult, AuditLLMOutput, AuditPostStepMetadata, PolishConfig, PolishChecklistItem, PolishLLMOutput, PolishPostStepMetadata, RunTaskResponsePostStepsMetadata, SynthesizedContextArtifact, QuestionDrivenSynthesizedContext, AnySynthesizedContextArtifact, SynthesizedInputArtifact, TemplateRenderOptions, GatewayTemplateTokens, OutputSchema, AiTasksObservabilityDigest, XynthesizedMemory, SmartInputConfig, SmartInputRenderOptions, SmartInputRenderResult, RunTaskSmartInput, XynthesizedDestinationScope, XynthesizedOutputConfig, ExecutionStrategyInvocation, ExecutionStrategyPhase, ExecutionStrategyWrapperKey, } from "./types/index.js";
89
+ export { ExecutionType, NARRIX_THEN_DIRECT, SYNTHESIZED_CONTEXT, } from "./types/index.js";
90
+ export { registerLocalTask, getLocalTask, registerBuiltInLocalTasks, } from "./localTasks/index.js";
91
+ export type { LocalTaskContext, LocalTaskHandler } from "./localTasks/index.js";
92
+ export { runAiScoping, AI_SCOPING_DEFAULT_OUTPUT_EXPECTATION, } from "./aiScoping/index.js";
93
+ export type { RunAiScopingResult } from "./aiScoping/index.js";
94
+ export type { LlmCallConfig, LlmCallStage, LlmCallRequestSnapshot, LlmCallObservation, LlmCallError, AiScopingFailureRecord, RunTaskResponseTraceMetadata, InvokeAttemptSummary, UsageDiagnostics, RoutingDiagnostics, MaxTokensResolution, OutputExpectation, XynthesisDebugTrace, SkillDiagnosticsTrace, SkillTraceUsage, RunSkillDiagnostics, } from "./types/index.js";
95
+ export { LlmCallContextError } from "./types/index.js";
96
+ export { XynthesisInvokeError, XynthesisResponseParseError, resolveMaxTokens, resolveOutputExpectation, PACKAGE_FALLBACK_OUTPUT_EXPECTATION, } from "@exellix/xynthesis/ai-actions";
97
+ export { buildInvokeAttemptSummary, ACTION_OUTPUT_DEFAULTS, MODEL_CAPABILITIES } from "@exellix/xynthesis";
98
+ export { SkillExecutionTraceError, mapGatewayInvokeToTrace, traceToDiagnostics, } from "@exellix/ai-skills";
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EACL,6BAA6B,EAI9B,MAAM,4BAA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EACL,YAAY,EACZ,qCAAqC,GACtC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAW/D,YAAY,EACV,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Main entry point for the Task SDK
3
+ *
4
+ * Provides both class-based and function-based APIs for executing tasks.
5
+ */
6
+ import { ExellixSkillsClient } from "@exellix/ai-skills";
7
+ import { runUtility as runUtilityImpl } from "./utilities/runUtility.js";
8
+ import { createDefaultWorexClientTasks, } from "./packaged-tasks-client.js";
9
+ export { getTaskActivities } from "./activix/getTaskActivities.js";
10
+ export { createDefaultWorexClientTasks, getPackagedAiTasksMetadataDir, PackagedWorexClientTasks, resolvePackagedSkillContentSource, } from "./packaged-tasks-client.js";
11
+ export { mergeSkillTemplateVariables, passthroughJobTemplateVariables, } from "./utils/skillTemplateVariables.js";
12
+ export { bridgeJobMemoryForGatewayExecutionMemory, pickRunSkillRequestFields, } from "./utils/bridgeRunSkillGatewayMemory.js";
13
+ export { normalizeRunTaskRequest, collectRunTaskRequestWarnings, collectExecutionPipelineWarnings, isRunTaskRequestWarningsEnabled, } from "./utils/runTaskRequestShape.js";
14
+ export { compileTaskConfigurationOnRunTaskRequest, } from "./compile/index.js";
15
+ export { TaskConfigurationCompileError, TASK_CONFIGURATION_COMPILE_ERROR_NAME, isTaskConfigurationCompileError, } from "./errors/taskConfigurationCompileError.js";
16
+ export { AI_TASK_PRE_ENABLE_SYNTHESIS, } from "./types/task-configuration.js";
17
+ export { assertRequiredRunSkillCorrelation } from "./utils/assertRequiredRunSkillCorrelation.js";
18
+ export { SmartInputValidationError, SMART_INPUT_VALIDATION_ERROR_NAME, isSmartInputValidationError, formatSmartInputValidationMessage, } from "./errors/smartInputValidationError.js";
19
+ export { validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, collectSmartInputValidationIssues, buildRunTaskValidationContext, } from "./validation/index.js";
20
+ export { analyzeRunTaskRequest } from "./analysis/index.js";
21
+ export { validateParsedOutput } from "./utils/outputValidation.js";
22
+ export { extractAiTasksObservabilityFromRunTaskResponse } from "./observability/extractAiTasksObservability.js";
23
+ export { resolveRunTaskRuntimeKnobs, } from "./internal/resolveRunTaskRuntimeKnobs.js";
24
+ export { setFuncxExecutionStrategyInvoker } from "./execution-strategies/runFuncxExecutionStrategy.js";
25
+ export { FUNCX_EXECUTION_PLAN_FUNCTION_ID, FUNCX_EXECUTION_EVALUATE_RESULT_FUNCTION_ID, FUNCX_RESEARCH_PLAN_QUESTIONS_FUNCTION_ID, DEFAULT_OPTIMIZER_MAX_ITERATIONS, ENV_OPTIMIZER_MAX_ITERATIONS, } from "./execution-strategies/constants.js";
26
+ export { adaptExecutionPlanResult, adaptEvaluateResultResponse, buildOptimizerGenericPayload, buildPlannerGenericPayload, buildResearchPlanQuestionsPayload, adaptResearchPlanQuestionsResult, unwrapFuncxRunValue, } from "./execution-strategies/genericExecutionFuncxEnvelope.js";
27
+ export { resolveSafeExecutionStrategyCatalogDefaultFunctionId } from "./execution-strategies/executionStrategyCatalogMetadata.js";
28
+ /** @see https://github.com/x12i/funcx — canonical `run()` JSON normalization (≥3.8.2). */
29
+ export { getRunJsonResult, isHttpRunSuccessBody, genericExecutionEnvelopeJsonSchema, buildAskAttribution, } from "@x12i/funcx/functions";
30
+ export * from "./skillCatalogExports.js";
31
+ export * from "./aiSkillsUpstreamExports.js";
32
+ export * from "./rendrixUpstreamExports.js";
33
+ export * from "./analysis/index.js";
34
+ export * from "./task-strategies/index.js";
35
+ export { PlanWebScopeQuestionsReasonCode, parseAndValidatePlanWebScopeQuestionsOutput, buildPlanWebScopeQuestionsUserPrompt, runPlanWebScopeQuestions, setResearchPlanQuestionsFuncxInvoker, } from "./planWebScopeQuestions/index.js";
36
+ /** @alias createDefaultWorexClientTasks — name aligned with optional `WorexClientTasks.forPackagedSkills` style API. */
37
+ export const forPackagedSkills = createDefaultWorexClientTasks;
38
+ export { ExellixSkillsClient };
39
+ // Export the main class
40
+ export { WorexClientTasks } from "./core/task-sdk.js";
41
+ // Export builders
42
+ export { TaskRequestBuilder } from "./builders/task-request-builder.js";
43
+ // Synthesis via @exellix/xynthesis (+ resolveSourceMaterial*, tests use setSynthesisInvoker)
44
+ export { setContextSynthesizer, getContextSynthesizer, runStructuredSynthesisGatewayCall, createGatewayStructuredContextSynthesizer, buildSynthesizedContextMarkdown, resolveSynthesisQuestion, resolveSourceMaterialParts, parseAndValidateSynthesizedPromptPayload, normalizeAndValidateSynthesizedPayload, executeXynthesisAction, setSynthesisInvoker, getSynthesisInvoker, } from "./synthesis/index.js";
45
+ // Internal SDK instance (singleton pattern for function-based API)
46
+ let internalSDKPromise = null;
47
+ /**
48
+ * Initialize the internal SDK instance for function-based API.
49
+ * Uses {@link createDefaultWorexClientTasks} (xillix when `MONGO_URI` is set, else gateway + packaged `.metadata`).
50
+ * @internal
51
+ */
52
+ async function getInternalSDK(options) {
53
+ if (!internalSDKPromise) {
54
+ internalSDKPromise = createDefaultWorexClientTasks(options);
55
+ }
56
+ return internalSDKPromise;
57
+ }
58
+ /**
59
+ * Execute a task with the specified execution strategy (function-based API).
60
+ *
61
+ * This is a convenience function that automatically initializes the SDK.
62
+ * For more control, use the WorexClientTasks class directly.
63
+ *
64
+ * @param request The task execution request
65
+ * @param options Optional client configuration (only used on first call)
66
+ * @returns Promise resolving to the task response
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * import { runTask } from "@exellix/ai-tasks";
71
+ *
72
+ * const result = await runTask({
73
+ * skillKey: "tasks/security-risk-summary",
74
+ * agentId: "my-agent",
75
+ * jobTypeId: "security-summary-job",
76
+ * taskTypeId: "security-summary-task",
77
+ * input: { assetId: "a-123" },
78
+ * variables: { orgName: "MyOrganization" },
79
+ * });
80
+ * ```
81
+ */
82
+ export async function runTask(request, options) {
83
+ const sdk = await getInternalSDK(options);
84
+ return sdk.runTask(request);
85
+ }
86
+ /**
87
+ * Execute an ai-tasks utility request (function-based API).
88
+ *
89
+ * This is used by upstream orchestration (e.g. worox-graph) to run deterministic utility kinds
90
+ * like `xynthesis/finalize` and return canonical structured output in `response.parsed`.
91
+ */
92
+ export async function runUtility(request) {
93
+ return runUtilityImpl(request);
94
+ }
95
+ export { ExecutionType, NARRIX_THEN_DIRECT, SYNTHESIZED_CONTEXT, } from "./types/index.js";
96
+ // Local task registry (for custom local tasks)
97
+ export { registerLocalTask, getLocalTask, registerBuiltInLocalTasks, } from "./localTasks/index.js";
98
+ // AI scoping (programmatic API for the same code path used by `RunTaskRequest.aiScoping[]`).
99
+ export { runAiScoping, AI_SCOPING_DEFAULT_OUTPUT_EXPECTATION, } from "./aiScoping/index.js";
100
+ export { LlmCallContextError } from "./types/index.js";
101
+ // Upstream value re-exports: orchestrator-sized budgeting + errors from `@exellix/xynthesis/ai-actions`;
102
+ // model-routing table exports remain on the full `@exellix/xynthesis` entry.
103
+ export { XynthesisInvokeError, XynthesisResponseParseError, resolveMaxTokens, resolveOutputExpectation, PACKAGE_FALLBACK_OUTPUT_EXPECTATION, } from "@exellix/xynthesis/ai-actions";
104
+ export { buildInvokeAttemptSummary, ACTION_OUTPUT_DEFAULTS, MODEL_CAPABILITIES } from "@exellix/xynthesis";
105
+ export { SkillExecutionTraceError, mapGatewayInvokeToTrace, traceToDiagnostics, } from "@exellix/ai-skills";
106
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAMzD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EACL,6BAA6B,GAI9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,wCAAwC,EACxC,yBAAyB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,wCAAwC,GAEzC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,+BAA+B,GAChC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,4BAA4B,GAK7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EACL,qBAAqB,EACrB,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L,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Pure helper: resolves the effective `outputExpectation` and runs xynthesis `resolveMaxTokens`
3
+ * for any ai-tasks LLM call site that goes through `executeXynthesisAction` (PRE markdown / question-driven /
4
+ * structured, POST audit, POST polish, AI scoping, utility finalize, structured-repair).
5
+ *
6
+ * Caller passes prompts (system + user + material), the resolved model id, and the user-facing
7
+ * `LlmCallConfig`. Returns the auto-resolved `maxTokens` to forward to xynthesis, plus the
8
+ * `tokenResolutionMetadata` blob that xynthesis writes into Activix telemetry.
9
+ *
10
+ * Per-stage default `outputExpectation`:
11
+ * - When the stage maps to a `SidekickActionType` (`synthesis` / `audit` / `fix` / `pick-best` / `craft-final`),
12
+ * uses xynthesis `resolveOutputExpectation(actionType)`.
13
+ * - Otherwise (AI scoping / utility-finalize / structured-repair) uses the supplied `stageDefault`
14
+ * or `PACKAGE_FALLBACK_OUTPUT_EXPECTATION`.
15
+ *
16
+ * Caller's `outputExpectation` ALWAYS wins over the per-stage default (passed through `resolveOutputExpectation`).
17
+ */
18
+ import type { MaxTokensResolution, OutputExpectation } from "@exellix/xynthesis/ai-actions";
19
+ import type { LlmCallConfig, LlmCallStage } from "../types/llmCall.js";
20
+ export type ResolveLlmCallForXynthesisInput = {
21
+ stage: LlmCallStage;
22
+ llmCall?: LlmCallConfig;
23
+ /**
24
+ * Combined text used as `inputText` for `resolveMaxTokens` (system + user + material).
25
+ * Order/composition does not matter for sizing — only total length.
26
+ */
27
+ inputText: string;
28
+ /** Resolved model id (after caller / env / fallback resolution). */
29
+ modelId: string;
30
+ /** Set true for JSON / structured outputs so xynthesis multiplies estimated output tokens. */
31
+ structuredOutput?: boolean;
32
+ /**
33
+ * Override for the per-stage default `outputExpectation` (used when the stage doesn't map to a
34
+ * `SidekickActionType`, e.g. AI scoping). Falls back to `PACKAGE_FALLBACK_OUTPUT_EXPECTATION`.
35
+ */
36
+ stageDefault?: OutputExpectation;
37
+ /** Optional: structured-mode output multiplier override (forwarded to `resolveMaxTokens`). */
38
+ structuredModeMultiplier?: number;
39
+ };
40
+ export type ResolveLlmCallForXynthesisResult = {
41
+ /** Auto-resolved cap to forward as `executeXynthesisAction({ maxTokens })`. */
42
+ maxTokens: number;
43
+ /** Effective expectation after caller -> action default -> stage default chain. */
44
+ effectiveOutputExpectation: OutputExpectation;
45
+ /** Verbatim `MaxTokensResolution` (reason + diagnostics) for trace + telemetry. */
46
+ resolution: MaxTokensResolution;
47
+ /** Blob to forward as `executeXynthesisAction({ tokenResolutionMetadata })` (Activix outer.metadata). */
48
+ tokenResolutionMetadata: Record<string, unknown>;
49
+ };
50
+ /** Resolve effective `outputExpectation` + auto-sized `maxTokens` for one LLM call. */
51
+ export declare function resolveLlmCallForXynthesis(input: ResolveLlmCallForXynthesisInput): ResolveLlmCallForXynthesisResult;
52
+ //# sourceMappingURL=resolveLlmCallForXynthesis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveLlmCallForXynthesis.d.ts","sourceRoot":"","sources":["../../src/internal/resolveLlmCallForXynthesis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE5F,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA4BvE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,8FAA8F;IAC9F,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,0BAA0B,EAAE,iBAAiB,CAAC;IAC9C,mFAAmF;IACnF,UAAU,EAAE,mBAAmB,CAAC;IAChC,yGAAyG;IACzG,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,+BAA+B,GACrC,gCAAgC,CAuClC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Pure helper: resolves the effective `outputExpectation` and runs xynthesis `resolveMaxTokens`
3
+ * for any ai-tasks LLM call site that goes through `executeXynthesisAction` (PRE markdown / question-driven /
4
+ * structured, POST audit, POST polish, AI scoping, utility finalize, structured-repair).
5
+ *
6
+ * Caller passes prompts (system + user + material), the resolved model id, and the user-facing
7
+ * `LlmCallConfig`. Returns the auto-resolved `maxTokens` to forward to xynthesis, plus the
8
+ * `tokenResolutionMetadata` blob that xynthesis writes into Activix telemetry.
9
+ *
10
+ * Per-stage default `outputExpectation`:
11
+ * - When the stage maps to a `SidekickActionType` (`synthesis` / `audit` / `fix` / `pick-best` / `craft-final`),
12
+ * uses xynthesis `resolveOutputExpectation(actionType)`.
13
+ * - Otherwise (AI scoping / utility-finalize / structured-repair) uses the supplied `stageDefault`
14
+ * or `PACKAGE_FALLBACK_OUTPUT_EXPECTATION`.
15
+ *
16
+ * Caller's `outputExpectation` ALWAYS wins over the per-stage default (passed through `resolveOutputExpectation`).
17
+ */
18
+ import { PACKAGE_FALLBACK_OUTPUT_EXPECTATION, resolveMaxTokens, resolveOutputExpectation, } from "@exellix/xynthesis/ai-actions";
19
+ /** Map every `LlmCallStage` to a `SidekickActionType` when one applies, else null (use stage default). */
20
+ function actionTypeForStage(stage) {
21
+ switch (stage) {
22
+ case "pre-synthesis-markdown":
23
+ case "pre-synthesis-question":
24
+ case "pre-synthesis-structured":
25
+ return "synthesis";
26
+ case "post-audit":
27
+ case "post-audit-merge":
28
+ return "audit";
29
+ case "post-polish":
30
+ return "fix";
31
+ case "main-skill":
32
+ case "ai-scoping":
33
+ case "plan-web-scope-questions":
34
+ case "utility-finalize":
35
+ case "structured-repair":
36
+ return null;
37
+ default: {
38
+ const _exhaustive = stage;
39
+ void _exhaustive;
40
+ return null;
41
+ }
42
+ }
43
+ }
44
+ /** Resolve effective `outputExpectation` + auto-sized `maxTokens` for one LLM call. */
45
+ export function resolveLlmCallForXynthesis(input) {
46
+ const callerOverride = input.llmCall?.outputExpectation;
47
+ const actionType = actionTypeForStage(input.stage);
48
+ let effectiveOutputExpectation;
49
+ if (actionType) {
50
+ // resolveOutputExpectation chains: caller override -> action default (model-routing.json) -> package fallback.
51
+ effectiveOutputExpectation = resolveOutputExpectation(actionType, callerOverride);
52
+ }
53
+ else {
54
+ effectiveOutputExpectation =
55
+ callerOverride ?? input.stageDefault ?? PACKAGE_FALLBACK_OUTPUT_EXPECTATION;
56
+ }
57
+ const callerMaxTokens = input.llmCall?.maxTokensCap;
58
+ const resolution = resolveMaxTokens({
59
+ inputText: input.inputText,
60
+ outputExpectation: effectiveOutputExpectation,
61
+ modelId: input.modelId,
62
+ callerMaxTokens,
63
+ structuredOutput: input.structuredOutput,
64
+ structuredModeMultiplier: input.structuredModeMultiplier,
65
+ });
66
+ const tokenResolutionMetadata = {
67
+ stage: input.stage,
68
+ reason: resolution.reason,
69
+ diagnostics: resolution.diagnostics,
70
+ outputExpectation: effectiveOutputExpectation,
71
+ callerMaxTokensCap: callerMaxTokens,
72
+ structuredOutput: input.structuredOutput ?? false,
73
+ };
74
+ return {
75
+ maxTokens: resolution.maxTokens,
76
+ effectiveOutputExpectation,
77
+ resolution,
78
+ tokenResolutionMetadata,
79
+ };
80
+ }
81
+ //# sourceMappingURL=resolveLlmCallForXynthesis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveLlmCallForXynthesis.js","sourceRoot":"","sources":["../../src/internal/resolveLlmCallForXynthesis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,mCAAmC,EACnC,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AAKvC,0GAA0G;AAC1G,SAAS,kBAAkB,CAAC,KAAmB;IAC7C,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,wBAAwB,CAAC;QAC9B,KAAK,wBAAwB,CAAC;QAC9B,KAAK,0BAA0B;YAC7B,OAAO,WAAW,CAAC;QACrB,KAAK,YAAY,CAAC;QAClB,KAAK,kBAAkB;YACrB,OAAO,OAAO,CAAC;QACjB,KAAK,aAAa;YAChB,OAAO,KAAK,CAAC;QACf,KAAK,YAAY,CAAC;QAClB,KAAK,YAAY,CAAC;QAClB,KAAK,0BAA0B,CAAC;QAChC,KAAK,kBAAkB,CAAC;QACxB,KAAK,mBAAmB;YACtB,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,KAAK,CAAC;YACjC,KAAK,WAAW,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;AACH,CAAC;AAkCD,uFAAuF;AACvF,MAAM,UAAU,0BAA0B,CACxC,KAAsC;IAEtC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACxD,MAAM,UAAU,GAAG,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEnD,IAAI,0BAA6C,CAAC;IAClD,IAAI,UAAU,EAAE,CAAC;QACf,+GAA+G;QAC/G,0BAA0B,GAAG,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACpF,CAAC;SAAM,CAAC;QACN,0BAA0B;YACxB,cAAc,IAAI,KAAK,CAAC,YAAY,IAAI,mCAAmC,CAAC;IAChF,CAAC;IAED,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC;IAEpD,MAAM,UAAU,GAAG,gBAAgB,CAAC;QAClC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,iBAAiB,EAAE,0BAA0B;QAC7C,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,eAAe;QACf,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,wBAAwB,EAAE,KAAK,CAAC,wBAAwB;KACzD,CAAC,CAAC;IAEH,MAAM,uBAAuB,GAA4B;QACvD,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,UAAU,CAAC,MAAM;QACzB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,iBAAiB,EAAE,0BAA0B;QAC7C,kBAAkB,EAAE,eAAe;QACnC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,IAAI,KAAK;KAClD,CAAC;IAEF,OAAO;QACL,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,0BAA0B;QAC1B,UAAU;QACV,uBAAuB;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { RunTaskRequest } from "../types/task-types.js";
2
+ import type { InputStrategyKey } from "../task-strategies/canonicalInputExecutionStrategies.js";
3
+ import { type NarrixModeKey } from "../task-strategies/canonicalNarrixModes.js";
4
+ import { type ResolvedExecutionStrategies } from "../execution-strategies/resolveExecutionStrategies.js";
5
+ export type { ResolvedExecutionStrategies };
6
+ export type ResolvedRunTaskRuntimeKnobs = {
7
+ narrixMode: NarrixModeKey;
8
+ inputStrategyKey: InputStrategyKey | string;
9
+ resolvedExecutionStrategies: ResolvedExecutionStrategies;
10
+ };
11
+ /**
12
+ * Resolves independent runtime dimensions for `runTask` (early, before side effects).
13
+ *
14
+ * - **narrixMode:** explicit field, else inferred from `narrix` / `narrixInput`.
15
+ * - **inputStrategyKey:** explicit or default `no-narrative` — **not** inferred from Narrix wiring.
16
+ * - **executionStrategies:** required array; validated and sorted (see `resolveExecutionStrategies`).
17
+ */
18
+ export declare function resolveRunTaskRuntimeKnobs(request: RunTaskRequest): ResolvedRunTaskRuntimeKnobs;
19
+ //# sourceMappingURL=resolveRunTaskRuntimeKnobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRunTaskRuntimeKnobs.d.ts","sourceRoot":"","sources":["../../src/internal/resolveRunTaskRuntimeKnobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,uDAAuD,CAAC;AAE/D,YAAY,EAAE,2BAA2B,EAAE,CAAC;AAQ5C,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,aAAa,CAAC;IAC1B,gBAAgB,EAAE,gBAAgB,GAAG,MAAM,CAAC;IAC5C,2BAA2B,EAAE,2BAA2B,CAAC;CAC1D,CAAC;AAMF;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,cAAc,GAAG,2BAA2B,CAyC/F"}
@@ -0,0 +1,52 @@
1
+ import { CANONICAL_NARRIX_MODE_KEYS, } from "../task-strategies/canonicalNarrixModes.js";
2
+ import { resolveExecutionStrategies, } from "../execution-strategies/resolveExecutionStrategies.js";
3
+ function trimStr(v) {
4
+ if (typeof v !== "string")
5
+ return undefined;
6
+ const t = v.trim();
7
+ return t ? t : undefined;
8
+ }
9
+ function isNarrixModeKey(v) {
10
+ return CANONICAL_NARRIX_MODE_KEYS.includes(v);
11
+ }
12
+ /**
13
+ * Resolves independent runtime dimensions for `runTask` (early, before side effects).
14
+ *
15
+ * - **narrixMode:** explicit field, else inferred from `narrix` / `narrixInput`.
16
+ * - **inputStrategyKey:** explicit or default `no-narrative` — **not** inferred from Narrix wiring.
17
+ * - **executionStrategies:** required array; validated and sorted (see `resolveExecutionStrategies`).
18
+ */
19
+ export function resolveRunTaskRuntimeKnobs(request) {
20
+ const hasNarrixCfg = !!request.narrix;
21
+ const hasNarrixInput = !!request.narrixInput;
22
+ const explicitModeRaw = trimStr(request.narrixMode);
23
+ if (hasNarrixCfg && hasNarrixInput && !explicitModeRaw) {
24
+ throw new Error('Ambiguous Narrix wiring: both `request.narrix` and `narrixInput` are set. Set `narrixMode` to "preprocessor" or "handler" to choose exactly one path.');
25
+ }
26
+ if (explicitModeRaw && !isNarrixModeKey(explicitModeRaw)) {
27
+ throw new Error(`Unknown narrixMode "${explicitModeRaw}". Expected one of: ${CANONICAL_NARRIX_MODE_KEYS.join(", ")}.`);
28
+ }
29
+ if (explicitModeRaw === "preprocessor" && !hasNarrixCfg) {
30
+ throw new Error('narrixMode "preprocessor" requires `request.narrix` to be set.');
31
+ }
32
+ if (explicitModeRaw === "handler" && !hasNarrixInput) {
33
+ throw new Error('narrixMode "handler" requires `narrixInput` to be set.');
34
+ }
35
+ let narrixMode;
36
+ if (explicitModeRaw) {
37
+ narrixMode = explicitModeRaw;
38
+ }
39
+ else if (hasNarrixCfg) {
40
+ narrixMode = "preprocessor";
41
+ }
42
+ else if (hasNarrixInput) {
43
+ narrixMode = "handler";
44
+ }
45
+ else {
46
+ narrixMode = "off";
47
+ }
48
+ const inputStrategyKey = trimStr(request.inputStrategyKey) ?? "no-narrative";
49
+ const resolvedExecutionStrategies = resolveExecutionStrategies(request);
50
+ return { narrixMode, inputStrategyKey, resolvedExecutionStrategies };
51
+ }
52
+ //# sourceMappingURL=resolveRunTaskRuntimeKnobs.js.map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CAAC;IACD,IAAI,eAAe,KAAK,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,UAAyB,CAAC;IAC9B,IAAI,eAAe,EAAE,CAAC;QACpB,UAAU,GAAG,eAAgC,CAAC;IAChD,CAAC;SAAM,IAAI,YAAY,EAAE,CAAC;QACxB,UAAU,GAAG,cAAc,CAAC;IAC9B,CAAC;SAAM,IAAI,cAAc,EAAE,CAAC;QAC1B,UAAU,GAAG,SAAS,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,gBAAgB,GAA8B,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,cAAc,CAAC;IAExG,MAAM,2BAA2B,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAExE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,CAAC;AACvE,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Post-step (audit / polish / scoping / utility) LLM calls via `@exellix/xynthesis` `executeXynthesisAction`.
3
+ *
4
+ * Centralizes:
5
+ * - Auto-sized `maxTokens` via `resolveLlmCallForXynthesis` (xynthesis `resolveMaxTokens`).
6
+ * - Forwarding `tokenResolutionMetadata` and `executionMode: "trace"` (when a trace collector is supplied).
7
+ * - Lifting `result.invokeSummary` into a structured `LlmCallObservation`.
8
+ * - Pass-through of upstream typed errors (`XynthesisInvokeError`, `XynthesisResponseParseError`).
9
+ * - Wrapping raw `setTimeout`-style timeouts with `LlmCallContextError` on the production path only.
10
+ *
11
+ * Tests mock the LLM via `@exellix/xynthesis` `setSynthesisInvoker`, not this module.
12
+ */
13
+ import type { DebugTraceCollector } from "../observability/debugTrace.js";
14
+ import type { DebugTraceTask } from "../types/task-types.js";
15
+ import type { InvokeAttemptSummary, LlmCallConfig, LlmCallObservation, LlmCallStage, OutputExpectation, XynthesisDebugTrace } from "../types/llmCall.js";
16
+ export type RunPostStepLlmCallParams = {
17
+ systemPrompt: string;
18
+ userPrompt: string;
19
+ /**
20
+ * Optional extra material concatenated with `systemPrompt` + `userPrompt` for the auto-sizer's `inputText`.
21
+ */
22
+ extraMaterial?: string;
23
+ /** Per-stage default `outputExpectation` when neither `llmCall.outputExpectation` nor an action-default applies. */
24
+ outputExpectationDefault?: OutputExpectation;
25
+ /** Caller-supplied LLM config (model / cap / temperature / topP / outputExpectation / timeoutMs / maxOutputLength). */
26
+ llmCall?: LlmCallConfig;
27
+ /** Drives stage-default `outputExpectation` selection in `resolveLlmCallForXynthesis`. */
28
+ stage?: LlmCallStage;
29
+ stepId?: string;
30
+ structuredOutput?: boolean;
31
+ jobId?: string;
32
+ taskId?: string;
33
+ agentId?: string;
34
+ traceCollector?: DebugTraceCollector | null;
35
+ traceTask?: Omit<DebugTraceTask, "metadata"> & {
36
+ metadata?: Record<string, unknown>;
37
+ };
38
+ observationSink?: (obs: LlmCallObservation) => void;
39
+ };
40
+ export type RunPostStepLlmCallResult = {
41
+ text: string;
42
+ raw?: unknown;
43
+ usage?: unknown;
44
+ model?: string;
45
+ invokeSummary?: InvokeAttemptSummary;
46
+ debugTrace?: XynthesisDebugTrace;
47
+ };
48
+ /**
49
+ * Single completion: system + user → text via xynthesis `executeXynthesisAction` (nested request shape).
50
+ */
51
+ export declare function runPostStepLlmCall(params: RunPostStepLlmCallParams): Promise<RunPostStepLlmCallResult>;
52
+ //# sourceMappingURL=runPostStepLlmCall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runPostStepLlmCall.d.ts","sourceRoot":"","sources":["../../src/internal/runPostStepLlmCall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,O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