@exellix/ai-tasks 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +34 -4
  2. package/README.md +2 -2
  3. package/RUNTASK_REQUEST.md +32 -17
  4. package/dist/builders/task-request-builder.d.ts.map +1 -1
  5. package/dist/builders/task-request-builder.js +2 -1
  6. package/dist/builders/task-request-builder.js.map +1 -1
  7. package/dist/compile/compileTaskConfiguration.d.ts.map +1 -1
  8. package/dist/compile/compileTaskConfiguration.js +3 -0
  9. package/dist/compile/compileTaskConfiguration.js.map +1 -1
  10. package/dist/core/task-sdk.d.ts.map +1 -1
  11. package/dist/core/task-sdk.js +148 -180
  12. package/dist/core/task-sdk.js.map +1 -1
  13. package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
  14. package/dist/errors/runTaskExecutionError.js +0 -2
  15. package/dist/errors/runTaskExecutionError.js.map +1 -1
  16. package/dist/index.d.ts +0 -4
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +0 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/invocation/types.d.ts +1 -1
  21. package/dist/narrix/applyWebScopeToRequest.d.ts +9 -0
  22. package/dist/narrix/applyWebScopeToRequest.d.ts.map +1 -0
  23. package/dist/narrix/applyWebScopeToRequest.js +156 -0
  24. package/dist/narrix/applyWebScopeToRequest.js.map +1 -0
  25. package/dist/narrix/narrixUnitExecution.d.ts.map +1 -1
  26. package/dist/narrix/narrixUnitExecution.js +8 -3
  27. package/dist/narrix/narrixUnitExecution.js.map +1 -1
  28. package/dist/node-execution/buildRequestFromNodePlan.d.ts +6 -0
  29. package/dist/node-execution/buildRequestFromNodePlan.d.ts.map +1 -1
  30. package/dist/node-execution/buildRequestFromNodePlan.js +4 -16
  31. package/dist/node-execution/buildRequestFromNodePlan.js.map +1 -1
  32. package/dist/node-execution/compileProfessionalAnswerRequest.d.ts +2 -0
  33. package/dist/node-execution/compileProfessionalAnswerRequest.d.ts.map +1 -0
  34. package/dist/node-execution/compileProfessionalAnswerRequest.js +4 -0
  35. package/dist/node-execution/compileProfessionalAnswerRequest.js.map +1 -0
  36. package/dist/node-execution/createNodeExecutionHost.d.ts.map +1 -1
  37. package/dist/node-execution/createNodeExecutionHost.js +97 -26
  38. package/dist/node-execution/createNodeExecutionHost.js.map +1 -1
  39. package/dist/node-execution/dispatchExecutionUnit.d.ts.map +1 -1
  40. package/dist/node-execution/dispatchExecutionUnit.js +4 -2
  41. package/dist/node-execution/dispatchExecutionUnit.js.map +1 -1
  42. package/dist/node-execution/orchestration/runPostOrchestration.d.ts +11 -0
  43. package/dist/node-execution/orchestration/runPostOrchestration.d.ts.map +1 -0
  44. package/dist/node-execution/orchestration/runPostOrchestration.js +123 -0
  45. package/dist/node-execution/orchestration/runPostOrchestration.js.map +1 -0
  46. package/dist/node-execution/orchestration/runPreOrchestration.d.ts +3 -0
  47. package/dist/node-execution/orchestration/runPreOrchestration.d.ts.map +1 -0
  48. package/dist/node-execution/orchestration/runPreOrchestration.js +110 -0
  49. package/dist/node-execution/orchestration/runPreOrchestration.js.map +1 -0
  50. package/dist/node-execution/orchestration/shardContext.d.ts +12 -0
  51. package/dist/node-execution/orchestration/shardContext.d.ts.map +1 -0
  52. package/dist/node-execution/orchestration/shardContext.js +71 -0
  53. package/dist/node-execution/orchestration/shardContext.js.map +1 -0
  54. package/dist/node-execution/orchestration/types.d.ts +21 -0
  55. package/dist/node-execution/orchestration/types.d.ts.map +1 -0
  56. package/dist/node-execution/orchestration/types.js +2 -0
  57. package/dist/node-execution/orchestration/types.js.map +1 -0
  58. package/dist/node-execution/rejectForbiddenWireFields.d.ts +2 -0
  59. package/dist/node-execution/rejectForbiddenWireFields.d.ts.map +1 -1
  60. package/dist/node-execution/rejectForbiddenWireFields.js +42 -7
  61. package/dist/node-execution/rejectForbiddenWireFields.js.map +1 -1
  62. package/dist/observability/classifyRunTaskFailure.d.ts.map +1 -1
  63. package/dist/observability/classifyRunTaskFailure.js +4 -3
  64. package/dist/observability/classifyRunTaskFailure.js.map +1 -1
  65. package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
  66. package/dist/observability/logRunTaskFailure.js +0 -2
  67. package/dist/observability/logRunTaskFailure.js.map +1 -1
  68. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts +19 -3
  69. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts.map +1 -1
  70. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js +7 -1
  71. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js.map +1 -1
  72. package/dist/post-steps/audit/loadAuditTemplates.d.ts +2 -55
  73. package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -1
  74. package/dist/post-steps/audit/loadAuditTemplates.js +3 -38
  75. package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -1
  76. package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts +8 -0
  77. package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts.map +1 -0
  78. package/dist/post-steps/audit/parseAuditFuncxOutput.js +62 -0
  79. package/dist/post-steps/audit/parseAuditFuncxOutput.js.map +1 -0
  80. package/dist/post-steps/audit/parseAuditOutput.d.ts +2 -0
  81. package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -1
  82. package/dist/post-steps/audit/parseAuditOutput.js +56 -0
  83. package/dist/post-steps/audit/parseAuditOutput.js.map +1 -1
  84. package/dist/post-steps/audit/runAudit.d.ts.map +1 -1
  85. package/dist/post-steps/audit/runAudit.js +53 -113
  86. package/dist/post-steps/audit/runAudit.js.map +1 -1
  87. package/dist/post-steps/audit/runAuditFuncxCall.d.ts +18 -0
  88. package/dist/post-steps/audit/runAuditFuncxCall.d.ts.map +1 -0
  89. package/dist/post-steps/audit/runAuditFuncxCall.js +59 -0
  90. package/dist/post-steps/audit/runAuditFuncxCall.js.map +1 -0
  91. package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -1
  92. package/dist/synthesis/resolveSourceMaterial.js +14 -0
  93. package/dist/synthesis/resolveSourceMaterial.js.map +1 -1
  94. package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -1
  95. package/dist/synthesis/runStructuredSynthesisRobust.js +24 -4
  96. package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -1
  97. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +3 -0
  98. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -1
  99. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +28 -4
  100. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -1
  101. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +4 -4
  102. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -1
  103. package/dist/task-strategies/canonicalInputExecutionStrategies.js +2 -1
  104. package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -1
  105. package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts +42 -0
  106. package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts.map +1 -0
  107. package/dist/task-strategies/canonicalOrchestrationStrategies.js +47 -0
  108. package/dist/task-strategies/canonicalOrchestrationStrategies.js.map +1 -0
  109. package/dist/task-strategies/canonicalTaskStrategies.d.ts +2 -1
  110. package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -1
  111. package/dist/task-strategies/canonicalTaskStrategies.js +2 -1
  112. package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -1
  113. package/dist/task-strategies/constants.d.ts +9 -1
  114. package/dist/task-strategies/constants.d.ts.map +1 -1
  115. package/dist/task-strategies/constants.js +9 -1
  116. package/dist/task-strategies/constants.js.map +1 -1
  117. package/dist/task-strategies/index.d.ts +5 -3
  118. package/dist/task-strategies/index.d.ts.map +1 -1
  119. package/dist/task-strategies/index.js +4 -3
  120. package/dist/task-strategies/index.js.map +1 -1
  121. package/dist/task-strategies/listAiTaskStrategies.d.ts +10 -1
  122. package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -1
  123. package/dist/task-strategies/listAiTaskStrategies.js +17 -2
  124. package/dist/task-strategies/listAiTaskStrategies.js.map +1 -1
  125. package/dist/types/task-types.d.ts +4 -11
  126. package/dist/types/task-types.d.ts.map +1 -1
  127. package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -1
  128. package/dist/utils/bridgeRunSkillGatewayMemory.js +1 -0
  129. package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -1
  130. package/dist/utils/executionMemoryInputRecord.d.ts +12 -0
  131. package/dist/utils/executionMemoryInputRecord.d.ts.map +1 -0
  132. package/dist/utils/executionMemoryInputRecord.js +28 -0
  133. package/dist/utils/executionMemoryInputRecord.js.map +1 -0
  134. package/dist/utils/resolveAiProfileModel.d.ts +1 -1
  135. package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
  136. package/dist/utils/resolveRunTaskModelReferences.d.ts.map +1 -1
  137. package/dist/utils/resolveRunTaskModelReferences.js +0 -32
  138. package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
  139. package/dist/utils/runTaskRequestShape.d.ts.map +1 -1
  140. package/dist/utils/runTaskRequestShape.js +4 -26
  141. package/dist/utils/runTaskRequestShape.js.map +1 -1
  142. package/dist/utils/skillTemplateVariables.d.ts +3 -2
  143. package/dist/utils/skillTemplateVariables.d.ts.map +1 -1
  144. package/dist/utils/skillTemplateVariables.js +3 -2
  145. package/dist/utils/skillTemplateVariables.js.map +1 -1
  146. package/dist/validation/validateProfessionalAnswerContract.d.ts +8 -0
  147. package/dist/validation/validateProfessionalAnswerContract.d.ts.map +1 -0
  148. package/dist/validation/validateProfessionalAnswerContract.js +45 -0
  149. package/dist/validation/validateProfessionalAnswerContract.js.map +1 -0
  150. package/dist/validation/validateRunTaskConfig.d.ts.map +1 -1
  151. package/dist/validation/validateRunTaskConfig.js +3 -66
  152. package/dist/validation/validateRunTaskConfig.js.map +1 -1
  153. package/documenations/record-and-template-variables.md +21 -13
  154. package/documenations/run-task-execution-flow.md +1 -1
  155. package/documenations/skill-orchestration-strategy-cr-fr.md +147 -0
  156. package/documenations/upstream-feature-requests/README.md +9 -5
  157. package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +1 -1
  158. package/documenations/upstream-feature-requests/funcx-4.9.13-open-items.md +62 -0
  159. package/documenations/upstream-feature-requests/funcx-gap-analysis-cr-fr.md +401 -0
  160. package/documenations/upstream-feature-requests/funcx-pre-post-sidekick-actions.md +1 -0
  161. package/documenations/upstream-feature-requests/graph-engine-runtask-contract-alignment-investigation.md +370 -0
  162. package/documenations/upstream-feature-requests/xynthesis-ai-profiles-2.1-import-break.md +2 -2
  163. package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md +1 -1
  164. package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +1 -1
  165. package/package.json +10 -9
  166. package/.docs/DOWNSTREAM_ENV.md +0 -42
  167. package/.docs/FEEDBACK_TO_CLIENT_DOWNSTREAM_FIXES.md +0 -64
  168. package/.docs/INTERMEDIATE_STEPS.md +0 -82
  169. package/.docs/activity-structure.md +0 -31
  170. package/.docs/ai-task-ai-scoping-spec.md +0 -338
  171. package/.docs/ai-tasks-model-profile-aliases-7x.md +0 -96
  172. package/.docs/blockers-and-issues.md +0 -346
  173. package/.docs/building-runTask-sdk.md +0 -659
  174. package/.docs/building-skill-execution-orchestrator.md +0 -968
  175. package/.docs/code-used-before/run-task.txt +0 -39
  176. package/.docs/code-used-before/task-executor.ts.old +0 -57
  177. package/.docs/code-used-before/test-run-task.ts.old +0 -42
  178. package/.docs/code-used-before/types.txt +0 -23
  179. package/.docs/env-ready-policy.md +0 -40
  180. package/.docs/flow-io/flow-README.md +0 -76
  181. package/.docs/flow-io/narrix.md +0 -124
  182. package/.docs/flow-io/web-scoping.md +0 -135
  183. package/.docs/flow-io/xynthesis-post.md +0 -154
  184. package/.docs/flow-io/xynthesis-pre.md +0 -181
  185. package/.docs/gap-analysis.md +0 -201
  186. package/.docs/integration-facts-ai-tasks.md +0 -109
  187. package/.docs/investigation/ai-skills.md +0 -170
  188. package/.docs/investigation/external-packages-assignments.md +0 -66
  189. package/.docs/investigation/integration-summary.md +0 -20
  190. package/.docs/investigation/narrix-catalox.md +0 -29
  191. package/.docs/investigation/workplan-close-graph-engine-gaps.md +0 -101
  192. package/.docs/logging-stack.md +0 -30
  193. package/.docs/memory-narrix-adapter-developer-guide.md +0 -402
  194. package/.docs/memory-narrix-adapter-requirements.md +0 -112
  195. package/.docs/narrix-context-consumption-gap.md +0 -184
  196. package/.docs/narrix-context-downstream-report.md +0 -30
  197. package/.docs/narrix-ingest-and-packs-library-spec.md +0 -240
  198. package/.docs/narrix-record-input-current-design.md +0 -48
  199. package/.docs/pacakge.md +0 -48
  200. package/.docs/possible-components/README.md +0 -11
  201. package/.docs/possible-components/integration/README.md +0 -10
  202. package/.docs/possible-components/integration/gaps-when-merging.md +0 -16
  203. package/.docs/possible-components/integration/platform.md +0 -54
  204. package/.docs/possible-components/integration/reintegrate-into-ai-tasks.md +0 -26
  205. package/.docs/possible-components/integration/roadmap-and-checklists.md +0 -54
  206. package/.docs/possible-components/post-component/README.md +0 -18
  207. package/.docs/possible-components/post-component/builder-guide.md +0 -175
  208. package/.docs/possible-components/post-component/gaps-and-artifacts.md +0 -52
  209. package/.docs/possible-components/post-component/handler-audit.md +0 -47
  210. package/.docs/possible-components/post-component/handler-polish.md +0 -41
  211. package/.docs/possible-components/post-component/unified-protocol.md +0 -59
  212. package/.docs/possible-components/pre-component/README.md +0 -22
  213. package/.docs/possible-components/pre-component/builder-guide.md +0 -127
  214. package/.docs/possible-components/pre-component/gaps-and-artifacts.md +0 -35
  215. package/.docs/possible-components/pre-component/handler-ai-scoping.md +0 -45
  216. package/.docs/possible-components/pre-component/handler-narrix-preprocessor.md +0 -49
  217. package/.docs/possible-components/pre-component/handler-narrix-system2.md +0 -35
  218. package/.docs/possible-components/pre-component/handler-synthesized-context.md +0 -65
  219. package/.docs/possible-components/pre-component/handler-web-scope.md +0 -29
  220. package/.docs/possible-components/pre-component/unified-protocol.md +0 -89
  221. package/.docs/prefer-openrouter-routing-policy.md +0 -114
  222. package/.docs/questions-for-ai-skills.md +0 -123
  223. package/.docs/realtime-narrixing-gap-analysis.md +0 -40
  224. package/.docs/realtime-narrixing.md +0 -433
  225. package/.docs/run-context-object.md +0 -32
  226. package/.docs/session-id-usage.md +0 -26
  227. package/.docs/skill-library-spec.md +0 -249
  228. package/.docs/synthesized-context-strategy-spec.md +0 -906
  229. package/.docs/upstream-issue/2026-03-21_woroces-ai-tasks_ISSUE-006_web-scope-question-from-cni-entity.md +0 -46
  230. package/.docs/web-scopper-embed.md +0 -93
  231. package/.docs/xynthesis-wiring-and-io.md +0 -12
  232. package/documenations/activix-feature-request-identity.md +0 -123
  233. package/documenations/bug-report-xynthesis-and-synthesis-call.md +0 -217
  234. package/documenations/feature-request-ai-skills-raw-template-access.md +0 -82
  235. package/documenations/feature-request-athenix-core-directive.md +0 -145
  236. package/documenations/feature-request-athenix-token-extraction.md +0 -124
  237. package/documenations/funcx-upstream-github-issues-draft.md +0 -153
  238. package/documenations/identity-metadata-contract.md +0 -165
  239. package/documenations/run-task-single-run-checklist.md +0 -109
  240. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-1-no-concrete-wire-in-graph-plans.md +0 -93
  241. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-2-skillModel-profile-only-at-storage.md +0 -88
  242. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-3-reject-concrete-models-in-catalog-rows.md +0 -76
  243. package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-1-suggested-profile-in-catalogs.md +0 -96
  244. package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-2-graph-engine-failure-phase-attribution.md +0 -92
  245. package/documenations/sessions/2026-06-08-subnets-model-resolution/INVESTIGATION-original-bug.md +0 -182
  246. package/documenations/sessions/2026-06-08-subnets-model-resolution/PROBLEM.md +0 -236
  247. package/documenations/sessions/2026-06-08-subnets-model-resolution/README.md +0 -11
  248. package/documenations/sessions/2026-06-08-subnets-model-resolution/funcx-test-resolveModel.cheapDefaultWireSlug.test.ts +0 -117
  249. package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +0 -129
  250. package/documenations/upstream-feedback-request-shape-clarification.md +0 -101
  251. package/documenations/web-context-precedence.md +0 -33
  252. package/documenations/xynthesis-activix-telemetry.md +0 -28
@@ -55,11 +55,11 @@ function collectRunTaskObservabilityHints(req) {
55
55
  if (req.executionMode === "trace")
56
56
  return [];
57
57
  const hints = [];
58
- const pipe = req.executionPipeline;
59
- if (pipe?.some((s) => s.phase === "pre" && s.type === SYNTHESIZED_CONTEXT)) {
60
- hints.push('Observability: PRE "synthesized-context" invokes xynthesis; use executionMode: "trace" for synthesis diagnostics.');
58
+ const units = req.nodePlan?.executionUnits ?? [];
59
+ if (units.some((u) => u.unitKind === "externalPreUtility" && (u.strategyKey === "synthesis" || u.actionKey === "synthesis"))) {
60
+ hints.push('Observability: PRE synthesis invokes xynthesis; use executionMode: "trace" for synthesis diagnostics.');
61
61
  }
62
- if (pipe?.some((s) => s.phase === "post" && (s.type === "audit" || s.type === "polish"))) {
62
+ if (units.some((u) => u.unitKind === "externalPostUtility")) {
63
63
  hints.push('Observability: POST audit/polish invokes xynthesis; use executionMode: "trace" for per-step LLM observations.');
64
64
  }
65
65
  if (req.aiScoping && req.aiScoping.length > 0) {
@@ -84,28 +84,6 @@ export function emitRunTaskRequestWarnings(req) {
84
84
  fieldEvidence("inputs.present", req.inputs !== undefined),
85
85
  ]);
86
86
  }
87
- const pipeline = req.executionPipeline;
88
- if (pipeline?.length) {
89
- const pre = pipeline.filter((s) => s.phase === "pre");
90
- const synthPre = pre.filter((s) => s.type === SYNTHESIZED_CONTEXT);
91
- if (synthPre.length > 1) {
92
- emitAiTasksDiagnosticWarning(AI_TASKS_DIAGNOSTIC_CODES.EXECUTION_PIPELINE_MULTIPLE_SYNTH_PRE, `executionPipeline: ${synthPre.length} PRE steps with type "${SYNTHESIZED_CONTEXT}"; only the first is executed — consolidate extra PRE steps.`, [
93
- fieldEvidence("executionPipeline.pre.synthesizedContext.count", synthPre.length),
94
- fieldEvidence("executionPipeline.pre.synthesizedContext.allowed", 1),
95
- ]);
96
- }
97
- for (const s of pre) {
98
- if (s.type !== SYNTHESIZED_CONTEXT) {
99
- emitAiTasksDiagnosticWarning(AI_TASKS_DIAGNOSTIC_CODES.EXECUTION_PIPELINE_UNSUPPORTED_PRE, `executionPipeline: PRE step type "${String(s.type)}" is not supported — runTask throws at execution (only "${SYNTHESIZED_CONTEXT}" is allowed).`, [fieldEvidence("executionPipeline.pre.type", s.type)]);
100
- }
101
- }
102
- const post = pipeline.filter((s) => s.phase === "post");
103
- for (const s of post) {
104
- if (s.type !== "audit" && s.type !== "polish") {
105
- emitAiTasksDiagnosticWarning(AI_TASKS_DIAGNOSTIC_CODES.EXECUTION_PIPELINE_UNSUPPORTED_POST, `executionPipeline: POST step type "${String(s.type)}" is not supported — ignored (only "audit" and "polish").`, [fieldEvidence("executionPipeline.post.type", s.type)]);
106
- }
107
- }
108
- }
109
87
  for (const message of collectRunTaskObservabilityHints(req)) {
110
88
  emitAiTasksDiagnosticWarning(AI_TASKS_DIAGNOSTIC_CODES.RUN_TASK_OBSERVABILITY_HINT, message, [
111
89
  fieldEvidence("executionMode", req.executionMode ?? "default"),
@@ -1 +1 @@
1
- {"version":3,"file":"runTaskRequestShape.js","sourceRoot":"","sources":["../../src/utils/runTaskRequestShape.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MA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K,CAAC;AACf,CAAC;AAED,SAAS,4BAA4B,CACnC,IAAY,EACZ,OAAe,EACf,QAA6C;IAE7C,gBAAgB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE;QAChC,MAAM,EAAE,mBAAmB;QAC3B,SAAS,EAAE,gBAAgB,CAAC,OAAO;QACnC,WAAW,EAAE,EAAE,OAAO,EAAE;QACxB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,GAAmB;IAC5D,IAAI,CAAC,+BAA+B,EAAE;QAAE,OAAO;IAE/C,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACxD,4BAA4B,CAC1B,yBAAyB,CAAC,wCAAwC,EAClE,mJAAmJ,EACnJ;YACE,aAAa,CAAC,eAAe,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC;YACvD,aAAa,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC;SAC1D,CACF,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,gCAAgC,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5D,4BAA4B,CAAC,yBAAyB,CAAC,2BAA2B,EAAE,OAAO,EAAE;YAC3F,aAAa,CAAC,eAAe,EAAE,GAAG,CAAC,aAAa,IAAI,SAAS,CAAC;SAC/D,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -7,8 +7,9 @@ export declare function passthroughJobTemplateVariables(variables: unknown): Rec
7
7
  /**
8
8
  * Merges caller fields into a single template `variables` map (optional host helper — **not** used on `runTask` MAIN).
9
9
  *
10
- * Normative precedence: see `RUNTASK_REQUEST.md`. Graph-engine 5.13+ should compile scopes into
11
- * `variables` (job) + `executionMemory.taskVariables` instead of relying on this merge at invoke time.
10
+ * Normative precedence: see `RUNTASK_REQUEST.md`. Graph-engine should compile job scope into
11
+ * `variables` / `executionMemory.jobVariables` and node scope into `nodePlan.invokeContract.taskVariable`
12
+ * instead of relying on this merge at invoke time.
12
13
  */
13
14
  export declare function mergeSkillTemplateVariables(req: {
14
15
  variables?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"skillTemplateVariables.d.ts","sourceRoot":"","sources":["../../src/utils/skillTemplateVariables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAErG;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK3F;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,UAAU,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;CACnD,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmD1B"}
1
+ {"version":3,"file":"skillTemplateVariables.d.ts","sourceRoot":"","sources":["../../src/utils/skillTemplateVariables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAErG;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK3F;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,UAAU,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;CACnD,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmD1B"}
@@ -11,8 +11,9 @@ export function passthroughJobTemplateVariables(variables) {
11
11
  /**
12
12
  * Merges caller fields into a single template `variables` map (optional host helper — **not** used on `runTask` MAIN).
13
13
  *
14
- * Normative precedence: see `RUNTASK_REQUEST.md`. Graph-engine 5.13+ should compile scopes into
15
- * `variables` (job) + `executionMemory.taskVariables` instead of relying on this merge at invoke time.
14
+ * Normative precedence: see `RUNTASK_REQUEST.md`. Graph-engine should compile job scope into
15
+ * `variables` / `executionMemory.jobVariables` and node scope into `nodePlan.invokeContract.taskVariable`
16
+ * instead of relying on this merge at invoke time.
16
17
  */
17
18
  export function mergeSkillTemplateVariables(req) {
18
19
  const job = req.jobContext && typeof req.jobContext === "object" && !Array.isArray(req.jobContext)
@@ -1 +1 @@
1
- {"version":3,"file":"skillTemplateVariables.js","sourceRoot":"","sources":["../../src/utils/skillTemplateVariables.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,SAAkB;IAChE,IAAI,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAI,SAAqC,EAAE,CAAC;IACvD,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAM3C;IACC,MAAM,GAAG,GACP,GAAG,CAAC,UAAU,IAAI,OAAO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Request } from "../types/task-types.js";
2
+ import type { RunTaskValidationIssue } from "./types.js";
3
+ /**
4
+ * `professional-answer` requires `nodePlan.invokeContract.taskVariable.question`
5
+ * (Rendrix prompt `{{taskVariables.question}}`). Node design must not live on `input` or `executionMemory`.
6
+ */
7
+ export declare function validateProfessionalAnswerContract(request: RunTaskRequest, issues: RunTaskValidationIssue[]): void;
8
+ //# sourceMappingURL=validateProfessionalAnswerContract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateProfessionalAnswerContract.d.ts","sourceRoot":"","sources":["../../src/validation/validateProfessionalAnswerContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAgBzD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,sBAAsB,EAAE,GAC/B,IAAI,CA0BN"}
@@ -0,0 +1,45 @@
1
+ import { isProfessionalAnswerSkillKey } from "../node-execution/compileProfessionalAnswerRequest.js";
2
+ import { collectForbiddenWireFieldPaths } from "../node-execution/rejectForbiddenWireFields.js";
3
+ import { isNonEmptyString, pushIssue } from "./helpers.js";
4
+ function isRecord(v) {
5
+ return !!v && typeof v === "object" && !Array.isArray(v);
6
+ }
7
+ function readPlanTaskVariableQuestion(request) {
8
+ const contract = request.nodePlan?.invokeContract;
9
+ if (!isRecord(contract))
10
+ return undefined;
11
+ const taskVariable = contract.taskVariable;
12
+ if (!isRecord(taskVariable))
13
+ return undefined;
14
+ return isNonEmptyString(taskVariable.question)
15
+ ? String(taskVariable.question).trim()
16
+ : undefined;
17
+ }
18
+ /**
19
+ * `professional-answer` requires `nodePlan.invokeContract.taskVariable.question`
20
+ * (Rendrix prompt `{{taskVariables.question}}`). Node design must not live on `input` or `executionMemory`.
21
+ */
22
+ export function validateProfessionalAnswerContract(request, issues) {
23
+ if (!isProfessionalAnswerSkillKey(String(request.skillKey ?? "")))
24
+ return;
25
+ for (const path of collectForbiddenWireFieldPaths(request)) {
26
+ if (path === "question" ||
27
+ path === "input.question" ||
28
+ path === "input.outputContract" ||
29
+ path === "executionMemory.taskVariables") {
30
+ pushIssue(issues, {
31
+ code: "PROFESSIONAL_ANSWER_FORBIDDEN_WIRE_FIELD",
32
+ path,
33
+ message: `professional-answer: forbidden on wire when nodePlan is set — ${path}. Use nodePlan.invokeContract.taskVariable instead.`,
34
+ });
35
+ }
36
+ }
37
+ if (!readPlanTaskVariableQuestion(request)) {
38
+ pushIssue(issues, {
39
+ code: "PROFESSIONAL_ANSWER_MISSING_TASK_VARIABLE_QUESTION",
40
+ path: "nodePlan.invokeContract.taskVariable.question",
41
+ message: "professional-answer requires nodePlan.invokeContract.taskVariable.question (Rendrix {{taskVariables.question}}).",
42
+ });
43
+ }
44
+ }
45
+ //# sourceMappingURL=validateProfessionalAnswerContract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateProfessionalAnswerContract.js","sourceRoot":"","sources":["../../src/validation/validateProfessionalAnswerContract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3D,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,4BAA4B,CAAC,OAAuB;IAC3D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,YAAY,GAAG,QAAQ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AqB,CAAC,OAAO,EAAE,cAAc,GAAG,uBAAuB,CA2GtF"}
1
+ {"version":3,"file":"validateRunTaskConfig.d.ts","sourceRoot":"","sources":["../../src/validation/validateRunTaskConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAc7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,uBAAuB,CA0GtF"}
@@ -1,71 +1,9 @@
1
- import { SYNTHESIZED_CONTEXT } from "../types/task-types.js";
2
1
  import { validateNodeExecutionPlan } from "@x12i/graphenix-plan-format";
3
2
  import { rejectForbiddenWireFields } from "../node-execution/rejectForbiddenWireFields.js";
4
- import { collectExecutionPipelineWarnings } from "../utils/runTaskRequestShape.js";
5
3
  import { resolveRunTaskRuntimeKnobs } from "../internal/resolveRunTaskRuntimeKnobs.js";
6
4
  import { collectSmartInputValidationIssues } from "./collectSmartInputValidationIssues.js";
7
- import { finalizeValidationResult, isNonEmptyString, pushIssue, validateLlmCallFields, validateModelConfigFields, validateRunTaskModelConfig, validateRootLlmCallModelScope, } from "./helpers.js";
8
- function validateExecutionPipeline(pipeline, issues) {
9
- if (!pipeline?.length)
10
- return;
11
- const mainSteps = pipeline.filter((s) => s.phase === "main");
12
- if (mainSteps.length !== 1) {
13
- pushIssue(issues, {
14
- code: "PIPELINE_MAIN_COUNT",
15
- path: "executionPipeline",
16
- message: `executionPipeline must contain exactly one step with phase "main"; got ${mainSteps.length}.`,
17
- });
18
- }
19
- for (const w of collectExecutionPipelineWarnings(pipeline)) {
20
- pushIssue(issues, {
21
- code: "PIPELINE_UNSUPPORTED_STEP",
22
- severity: "warning",
23
- path: "executionPipeline",
24
- message: w,
25
- });
26
- }
27
- for (let i = 0; i < pipeline.length; i++) {
28
- const step = pipeline[i];
29
- if (step.phase === "pre" && step.type === SYNTHESIZED_CONTEXT) {
30
- const cfg = (step.config ?? {});
31
- validateModelConfigFields(cfg.modelConfig, `executionPipeline[${i}].config.modelConfig`, issues);
32
- validateLlmCallFields(cfg.llmCall, `executionPipeline[${i}].config.llmCall`, issues);
33
- }
34
- if (step.phase === "post" && (step.type === "audit" || step.type === "polish")) {
35
- const cfg = step.config;
36
- if (cfg && typeof cfg === "object") {
37
- validateModelConfigFields(cfg.modelConfig, `executionPipeline[${i}].config.modelConfig`, issues);
38
- validateLlmCallFields(cfg.llmCall, `executionPipeline[${i}].config.llmCall`, issues);
39
- const llm = cfg.llmCall;
40
- if (llm && typeof llm === "object" && !Array.isArray(llm)) {
41
- const nested = llm;
42
- if (nested.audit) {
43
- validateLlmCallFields(nested.audit, `executionPipeline[${i}].config.llmCall.audit`, issues);
44
- }
45
- if (nested.synthesis) {
46
- validateLlmCallFields(nested.synthesis, `executionPipeline[${i}].config.llmCall.synthesis`, issues);
47
- }
48
- }
49
- }
50
- }
51
- }
52
- }
53
- function validateSynthesisPreRequirements(request, issues) {
54
- const pipeline = request.executionPipeline;
55
- if (!pipeline?.some((s) => s.phase === "pre" && s.type === SYNTHESIZED_CONTEXT))
56
- return;
57
- const hasContext = request.includeContextInPrompt === true ||
58
- pipeline.some((s) => s.phase === "pre" &&
59
- s.type === SYNTHESIZED_CONTEXT &&
60
- s.config?.autoEnableContext === true);
61
- if (!hasContext) {
62
- pushIssue(issues, {
63
- code: "SYNTHESIS_PRE_REQUIRES_CONTEXT",
64
- path: "includeContextInPrompt",
65
- message: 'PRE "synthesized-context" requires includeContextInPrompt: true or synthesisConfig.autoEnableContext: true on the PRE step.',
66
- });
67
- }
68
- }
5
+ import { finalizeValidationResult, isNonEmptyString, pushIssue, validateLlmCallFields, validateRunTaskModelConfig, validateRootLlmCallModelScope, } from "./helpers.js";
6
+ import { validateProfessionalAnswerContract } from "./validateProfessionalAnswerContract.js";
69
7
  /**
70
8
  * Validate **static** `RunTaskRequest` configuration (model, pipeline, correlation ids, smartInput shape).
71
9
  * Does **not** check whether memory paths resolve — use {@link validateRunTaskInvoke} for that.
@@ -165,8 +103,7 @@ export function validateRunTaskConfig(request) {
165
103
  });
166
104
  }
167
105
  }
168
- validateExecutionPipeline(resolved.executionPipeline, issues);
169
- validateSynthesisPreRequirements(resolved, issues);
106
+ validateProfessionalAnswerContract(resolved, issues);
170
107
  if (resolved.aiScopingOptions?.llmCall) {
171
108
  validateLlmCallFields(resolved.aiScopingOptions.llmCall, "aiScopingOptions.llmCall", issues);
172
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validateRunTaskConfig.js","sourceRoot":"","sources":["../../src/validation/validateRunTaskConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AAGtB,SAAS,yBAAyB,CAAC,QAAqC,EAAE,MAAqD;IAC7H,IAAI,CAAC,QAAQ,EAAE,MAAM;QAAE,OAAO;IAE9B,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC;IAC7D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,MAAM,EAAE;YAChB,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,mBA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AAC,SAAS,CAAC,IAAI,QAAQ,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC;YAC7G,SAAS,CAAC,MAAM,EAAE;gBAChB,IAAI,EAAE,oBAAoB;gBAC1B,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kDAAkD;aAC5D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,kCAAkC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAErD,IAAI,QAAQ,CAAC,gBAAgB,EAAE,OAAO,EAAE,CAAC;QACvC,qBAAqB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,0BAA0B,EAAE,MAAM,CAAC,CAAC;IAC/F,CAAC;IAED,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,32 +1,40 @@
1
1
  # Record fields and template variables (`runTask`)
2
2
 
3
- This document describes how **task input** and **record-shaped** payloads reach gateway templates and skills, and how that relates to NARRIX pre-processing.
3
+ How **task input**, **execution memory buckets**, and **record-shaped** payloads reach gateway templates and skills and how that relates to NARRIX pre-processing.
4
+
5
+ ## Scope buckets (graph-engine 5.13+)
6
+
7
+ | Scope | Authoring / wire | Template tokens |
8
+ |--------|------------------|-----------------|
9
+ | **Job / graph** | `executionMemory.jobVariables` (legacy top-level `variables` ≡ job bag on MAIN) | `{{jobVariables.*}}` |
10
+ | **Node / task** | `executionMemory.taskVariables` | `{{taskVariables.*}}` |
11
+ | **Payload** | top-level `input`, `xynthesized`, `smartInput` | `{{input}}`, `{{smartInput}}`, … |
12
+
13
+ Node-scoped values such as **`question`** for `skills/professional-answer` belong in **`executionMemory.taskVariables.question`**, not in `variables` or merged into `input` alone.
4
14
 
5
15
  ## Default: forward opaque fields (no allowlist)
6
16
 
7
- For the **MAIN** LLM path, `mergeSkillTemplateVariables` builds the `variables` object sent to the executor / gateway:
17
+ On the **MAIN** LLM path, `mergeSkillTemplateVariables` builds the job-scope **`variables`** object for legacy templates. It does **not** fold `executionMemory.taskVariables` into that bag.
8
18
 
9
19
  - **`jobContext`** is merged first (lowest precedence).
10
- - Explicit **`variables`** are merged on top.
11
- - When **`input`** is a plain object, **every enumerable key** on `input` is copied into **`variables.inputs`** (merged with any existing `variables.inputs`). If `input.question` is a string and `variables.question` is unset, it is also copied to **`variables.question`**.
12
-
13
- There is **no** stripping of unknown or “enrichment” keys such as **`mitreAttack`**, nested blobs, or vendor-specific fields, as long as they live on the **`input`** object (or on nested objects under `input`, e.g. `input.record.mitreAttack`).
20
+ - Explicit **`variables`** (job scope) are merged on top.
21
+ - When **`input`** is a plain object, enumerable keys are copied into **`variables.inputs`**.
14
22
 
15
- **Implication:** templates that reference `inputs.record.mitreAttack`, `inputs.mitreAttack`, etc. receive the same JSON shape the caller passed on `RunTaskRequest.input`, unless a **future** explicit blocklist is added (none by default).
23
+ There is **no** stripping of unknown keys on **`input`** (e.g. `input.record.mitreAttack`).
16
24
 
17
25
  ## Reserved / runtime-owned names (conventions)
18
26
 
19
- These are **not** automatically stripped today, but **callers should avoid** using them on `input` for domain data if they conflict with runtime-injected fields:
27
+ Avoid using these on **`input`** for domain data when they conflict with runtime injection:
20
28
 
21
- - **`aiScoped`** — may be injected by the AI scoping pre-step when `aiScoping` is configured.
22
- - **`question`** — special-cased for template convenience (`variables.question`).
29
+ - **`aiScoped`** — injected by the AI scoping pre-step when configured.
30
+ - **`outputContract`** — belongs on the run request / `taskVariable`, not inside `input` for `professional-answer`.
23
31
 
24
- Memory surfaces (**`jobMemory`**, **`taskMemory`**, **`executionMemory`**) use their own keys (`_narrix`, `webContext`, `synthesizedContext`, `synthesizedInput`, `webContextMarkdown`, etc.). Domain records are usually under **`input`**, **`jobMemory.record`**, **`jobMemory.currentRecord`**, or **`executionMemory.input.raw`** / **`executionMemory.input.record`** depending on orchestration; see NARRIX adapter tests and [run-task-execution-flow.md](./run-task-execution-flow.md).
32
+ Memory surfaces (**`jobMemory`**, **`taskMemory`**, **`executionMemory`**) use their own keys (`_narrix`, `webContext`, `synthesizedContext`, `taskVariables`, `jobVariables`, etc.). Domain records are usually under **`input`**, **`executionMemory.input`** (flat MAIN bucket not `input.raw`), or NARRIX attachments. See [run-task-execution-flow.md](./run-task-execution-flow.md).
25
33
 
26
34
  ## NARRIX `record` medium
27
35
 
28
- For **`medium: "record"`**, the object passed to Narrix is produced by **`@woroces/memory-narrix-adapter`** from configured memory paths. That adapter returns the **resolved record object**; enrichment fields on that object are preserved **unless** a future blocklist is introduced in the adapter or caller.
36
+ For **`medium: "record"`**, the object passed to Narrix is produced by **`@woroces/memory-narrix-adapter`** from configured memory paths. Enrichment fields on that object are preserved unless a future blocklist is introduced.
29
37
 
30
38
  ## Regression expectation
31
39
 
32
- A record that includes **`mitreAttack`** on the task **`input`** (e.g. under **`input.record`**) is reflected unchanged under **`variables.inputs`** for the MAIN skill invocation.
40
+ A record that includes **`mitreAttack`** on task **`input`** (e.g. under **`input.record`**) is reflected unchanged under **`variables.inputs`** for the MAIN skill invocation when using the legacy merge helper.
@@ -144,7 +144,7 @@ flowchart LR
144
144
 
145
145
  ## Diagnostics, trace mode, and observability digest
146
146
 
147
- **Current `runTask` implementation (`task-sdk.ts`)** does **not** implement **`request.diagnostics`**, **`appendRunLog`**, **`RunLogEntry` buffering**, or a Logxer-shaped sink on the request. Orchestrators that merge **`runLog`** / **`exellixRunLog`** / **`logxerRunId`** / **`logxerCorrelationId`** into **`response.metadata`** own that contract — see [.docs/investigation/external-packages-assignments.md](../.docs/investigation/external-packages-assignments.md).
147
+ **Current `runTask` implementation (`task-sdk.ts`)** does **not** implement **`request.diagnostics`**, **`appendRunLog`**, **`RunLogEntry` buffering**, or a Logxer-shaped sink on the request. Orchestrators that merge **`runLog`** / **`exellixRunLog`** / **`logxerRunId`** / **`logxerCorrelationId`** into **`response.metadata`** own that contract — see [external-packages-assignments.md](../../archived/ai-tasks/.docs/investigation/external-packages-assignments.md).
148
148
 
149
149
  - **`executionMode: "trace"`**: forwards trace-related flags to **`@exellix/ai-skills`** `runSkill`; see **`RunSkillDiagnostics`** / **`SkillDiagnosticsTrace`** on that package. Structured **SDK log lines** use **`@x12i/logxer`** from ai-skills execution — not the orchestrator run-log row shape.
150
150
  - **`extractAiTasksObservabilityFromRunTaskResponse`**: builds a versioned **`AiTasksObservabilityDigest`** from `metadata` + execution memory for graph UIs (optional attachment).
@@ -0,0 +1,147 @@
1
+ # Skill execution strategy model — CR/FR (ai-tasks + consumers)
2
+
3
+ Filed by: `@exellix/ai-tasks` (runtime), `@exellix/graph-engine` (compile/plan), `@exellix/xynthesis` (sidekick actions)
4
+ Status: Draft — target architecture agreed in product discussion (2026-06-13)
5
+ Baseline: `@exellix/ai-tasks` 9.x+, graph-engine 8.1.x nodePlan path
6
+ Related: [run-task-execution-flow.md](./run-task-execution-flow.md), [funcx-pre-post-sidekick-actions.md](./funcx-pre-post-sidekick-actions.md), [graph-engine-runtask-contract-alignment-investigation.md](./upstream-feature-requests/graph-engine-runtask-contract-alignment-investigation.md)
7
+
8
+ ## 0. Executive summary
9
+
10
+ The runtime today mixes three different concepts under “PRE/POST strategy”:
11
+
12
+ | Concept | What it should mean | What the code calls it today |
13
+ |---------|---------------------|------------------------------|
14
+ | Pre-SKILL actions | web-scope, Narrix, memory enrichment | `narrixMode`, NARRIX units, web scoper |
15
+ | PRE strategy (fan-out) | plan/split → N MAIN instances with sub-inputs | Not implemented; planner only merges prompt vars into one MAIN |
16
+ | PRE step (context synthesis) | Build prompt context before MAIN | `externalPreUtility` synthesis; catalog `ai-task-strategies-pre` (misnamed) |
17
+ | POST strategy (fan-in) | merge N MAIN outputs → one answer | Not implemented; FuncX `post/craft-final` exists upstream but unwired |
18
+ | POST strategy (self-improve) | audit loop + feedback + pick-best | Partially: audit POST step + separate optimizer execution strategy |
19
+
20
+ **Goal:** Align naming, catalogs, and runtime so engineers can reason in two layers:
21
+
22
+ ```
23
+ [Layer 1 — pre-SKILL] web-scope → narrix / pre-actions
24
+ [Layer 2 — in-SKILL] PRE strategy → MAIN (1..N) → POST strategy
25
+ ```
26
+
27
+ ## 1. Target architecture (normative)
28
+
29
+ ### 1.1 Layer 1 — Pre-SKILL actions (outside skill boundary)
30
+
31
+ `web-scope? → narrix / other pre-actions → enter SKILL`
32
+
33
+ Purpose: enrich memory/evidence before the skill runs. Controls: `narrixMode`, `request.narrix`, web scoping, graph-level utilities. Not in scope: splitting work, multiple MAIN, audit loops.
34
+
35
+ ### 1.2 Layer 2 — Inside SKILL
36
+
37
+ `PRE strategy? → MAIN (1 or N) → POST strategy?`
38
+
39
+ **Pattern A — Map-reduce (fan-out / fan-in)**
40
+
41
+ | Phase | Role | Examples |
42
+ |-------|------|----------|
43
+ | PRE strategy | Decide how many MAIN runs and sub-inputs | `plan`, `split` |
44
+ | MAIN | N independent skill invocations | same `skillKey`, different input per shard |
45
+ | POST strategy | Combine partial answers | `merge`, `craft-final`, `synthesis` |
46
+
47
+ **Pattern B — Self-improving loop (no PRE strategy)**
48
+
49
+ MAIN → audit gate → retry if allowed → pick best (optional merge of top candidates).
50
+
51
+ Invariants:
52
+
53
+ - PRE/POST strategy keys describe orchestration of MAIN, not memory-source selection.
54
+ - `narrixMode` is orthogonal to PRE/POST strategy.
55
+ - Pattern A and B may compose (e.g. split → 3 MAIN each with audit loop → merge).
56
+
57
+ ## 2. Gap taxonomy
58
+
59
+ | Kind | Meaning |
60
+ |------|---------|
61
+ | CR | Existing behavior or naming contradicts the target model; fix or deprecate |
62
+ | FR | New capability required to reach the target model |
63
+
64
+ ## 3. Change requests (CR)
65
+
66
+ ### CR-AITASKS-1 — Rename / re-scope `ai-task-strategies-pre` catalog
67
+
68
+ Treat as **synthesis input source** (`ai-task-synthesis-input-strategies` alias). UI/docs: “Synthesis input source”, not “Pre strategy”.
69
+
70
+ ### CR-AITASKS-2 — Disentangle `executionStrategies` planner/optimizer from PRE/POST strategy
71
+
72
+ Document as MAIN wrappers (prompt shaping + lightweight retry), not fan-out PRE strategy.
73
+
74
+ ### CR-AITASKS-3 — synthesized-context PRE step is not PRE strategy
75
+
76
+ Reserve `synthesis` on `aiTaskStrategies.pre` for “enable synthesized-context step”. POST merge uses distinct keys (`merge`, `craft-final`).
77
+
78
+ ### CR-AITASKS-4 — nodePlan `externalPostUtility` audit path incomplete
79
+
80
+ Wire real `reRunMain` and `contextMarkdown` on nodePlan audit units.
81
+
82
+ ### CR-AITASKS-5 — Exactly-one MAIN invariant blocks Pattern A
83
+
84
+ Document until FR-AITASKS-1 ships.
85
+
86
+ ### CR-GRAPH-1 — `preStrategyKey` / `postStrategyKey` semantics
87
+
88
+ Define allowed orchestration keys per pattern; compile into typed `nodePlan.executionUnits`.
89
+
90
+ ## 4. Feature requests (FR)
91
+
92
+ ### FR-AITASKS-1 — PRE orchestration fan-out (`plan`, `split`)
93
+
94
+ ### FR-AITASKS-2 — MAIN shard execution policy (sequential first)
95
+
96
+ ### FR-AITASKS-3 — POST orchestration fan-in (`merge`, `pick-best`)
97
+
98
+ ### FR-AITASKS-4 — Canonical PRE/POST orchestration catalogs
99
+
100
+ `ai-task-pre-orchestration-strategies`, `ai-task-post-orchestration-strategies`
101
+
102
+ ### FR-AITASKS-5 — Unify audit-loop POST strategy (Pattern B)
103
+
104
+ ### FR-AITASKS-6 — Compose Pattern A + B (P2)
105
+
106
+ ### FR-GRAPH-1 — Compile `aiTaskOrchestration` → nodePlan units
107
+
108
+ ### FR-XYN-1 — Sidekick actions for orchestration (`execution/split`, extended `execution/plan`)
109
+
110
+ ## 5. Phasing
111
+
112
+ **Phase 1 (P0):** CR-AITASKS-1/2/5, FR-AITASKS-4/5, CR-AITASKS-4, legacy removal, skill support templates, synthesis context wiring.
113
+
114
+ **Phase 2 (P0):** FR-AITASKS-1/3, FR-XYN-1, FR-GRAPH-1.
115
+
116
+ **Phase 3 (P2):** FR-AITASKS-6.
117
+
118
+ ## Phase 2 (implemented in ai-tasks 10.x)
119
+
120
+ Fan-out/fan-in orchestration runtime:
121
+
122
+ - **PRE** `externalPreUtility` with `strategyKey: plan | split` → `executionMemory.orchestration.shards`
123
+ - **MAIN** single `mainSkill` unit runs all shards sequentially when no `unitParams.shardId`; or one unit per shard from graph-engine compile
124
+ - **POST** `externalPostUtility` with `strategyKey: merge | pick-best` → FuncX `post/craft-final` / `post/pick-best`
125
+ - **Web scope (Layer 1)** standalone `externalPreUtility` `strategyKey: webScope` or `narrix.enableWebScope` on narrative preprocessor
126
+
127
+ Graph-engine (FR-GRAPH-1) still compiles `aiTaskOrchestration` into frozen `nodePlan.executionUnits`; runtime accepts compiled plans.
128
+
129
+ **Graphenix validator note:** `@x12i/graphenix-plan-format` may reject unknown `strategyKey` on units until graph-engine/graphenix allowlist is updated for `split`, `plan`, `merge`, `pick-best`, `webScope`. Runtime implements these keys; coordinate a graphenix minor release if validation blocks compiled plans.
130
+
131
+ ## Phase 2 (deferred — graph-engine / xynthesis only)
132
+
133
+ - FR-GRAPH-1: compile `aiTaskOrchestration` → typed units (consumer repo)
134
+ - FR-XYN-1: dedicated `execution/split` sidekick action (deterministic split works without it)
135
+ - FR-AITASKS-6: Pattern A + B composition at scale
136
+
137
+ ## 6. Skill support templates (ai-skills)
138
+
139
+ Skill catalog rows declare **support-role templates** for actions that help MAIN:
140
+
141
+ - **MAIN:** `instructionsText` / `promptText`
142
+ - **Synthesis context step:** `supportTemplates.synthesisContext[strategyKey]` (keyed by synthesis **input** strategy)
143
+ - **PRE orchestration:** `supportTemplates.preOrchestration[plan|split]` (Phase 2)
144
+ - **POST orchestration:** `supportTemplates.postOrchestration[merge|pick-best]` (Phase 2)
145
+ - **Audit loop:** `auditInstructionsText` / `auditPromptText`
146
+
147
+ See [RUNTASK_REQUEST.md](../RUNTASK_REQUEST.md) glossary.
@@ -11,16 +11,20 @@ Fix reports filed for sibling packages. Hand these to the package owners; after
11
11
  | `@exellix/xynthesis` 4.3 | [xynthesis-orchestrator-invoke-contract-4.2.md](./xynthesis-orchestrator-invoke-contract-4.2.md) | **partial** — `reasoningEffort` shipped in 4.3.0; ai-profiles 2.1 import fixed in **4.3.1** (see CR above) |
12
12
  | `@exellix/xynthesis` 4.4 | [**xynthesis-execution-strategies-option-a.md**](./xynthesis-execution-strategies-option-a.md) | **shipped** — execution-strategy sidekick actions; ai-tasks 8.5+ uses xynthesis (FuncX path deprecated) |
13
13
  | `@x12i/ai-profiles` 2.1 | — | **shipped** — `catalogLane` required; sync `isKnownProfileOrShortcut` removed (safer — resolve at invoke) |
14
- | `@exellix/ai-tasks` | [ai-tasks-wrap-up-after-upstream.md](./ai-tasks-wrap-up-after-upstream.md) | **done** in 8.4 — no legacy tiers; resolve at invoke via `resolveAIProfile` |
14
+ | `@exellix/ai-tasks` | [ai-tasks-wrap-up-after-upstream.md](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/ai-tasks-wrap-up-after-upstream.md) | **done** in 8.4 — no legacy tiers; resolve at invoke via `resolveAIProfile` |
15
15
 
16
16
  ## FuncX generic hosting (xynthesis domain)
17
17
 
18
18
  | Package | Document | Status |
19
19
  |---------|----------|--------|
20
- | `@x12i/funcx` **4.4.0** | [**funcx-generic-xynthesis-hosting.md**](./funcx-generic-xynthesis-hosting.md) | **partial** execution/research envelope + built-ins **shipped**; template-vars helper, `runGenericExecution`, sampling on `RunOptions` **open** |
21
- | `@x12i/funcx` | [**funcx-pre-post-sidekick-actions.md**](./funcx-pre-post-sidekick-actions.md) | **open**`pre/synthesize`, `post/*` built-ins; execution wire-only (FR-PRE-POST-6) |
22
- | `@exellix/xynthesis` | `sidekickFuncxCatalogMap.ts`, `sidekickFuncxEnvelope.ts` | **shipped** — Catalox `funcx.functionId` on seeds; `XYNTHESIS_FUNCX_SIDEKICK=1` gates `run()` (not wired in gateway yet) |
23
- | `@exellix/ai-tasks` | `auditChecklistFuncxEnvelope.ts`, [funcx-scoping-integration-gaps.md](../funcx-scoping-integration-gaps.md) §6 | **partial** envelopes + adapters; 8.5+ uses xynthesis actions for execution/web-scope |
20
+ | `@x12i/funcx` **4.9.13** | [**funcx-4.9.13-open-items.md**](./funcx-4.9.13-open-items.md) | **No open FuncX items** @ 4.9.13 consumer follow-up only |
21
+ | `@x12i/funcx` **4.9.11** | [funcx-4.9.11-open-items.md](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/funcx-4.9.11-open-items.md) | Supersededhistorical open list |
22
+ | `@x12i/funcx` **4.9.9** | [**funcx-4.9.9-residual-upstream-cr-fr.md**](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/funcx-4.9.9-residual-upstream-cr-fr.md) | Superseded for filing historical @ 4.9.9 |
23
+ | `@x12i/funcx` | [**funcx-gap-analysis-cr-fr.md**](./funcx-gap-analysis-cr-fr.md) | Full history + closed items; §10 = 4.9.11 recheck |
24
+ | `@x12i/funcx` **4.4.0+** | [**funcx-generic-xynthesis-hosting.md**](./funcx-generic-xynthesis-hosting.md) | **mostly shipped** @ 4.9.9 — FR-GEN-1, FR-GEN-4 closed |
25
+ | `@x12i/funcx` | [**funcx-pre-post-sidekick-actions.md**](./funcx-pre-post-sidekick-actions.md) | **mostly shipped** @ 4.9.9 — built-ins callable; CR-FUNCX-2 + FR-GEN-11 remain |
26
+ | `@exellix/xynthesis` | `invokeFuncxRun.ts`, `sidekickFuncxCatalogMap.ts` | **shipped** — FuncX `run()` only in gateway + execution strategy (no flag) |
27
+ | `@exellix/ai-tasks` | `runAuditFuncxCall.ts`, `parseAuditChecklistOutput` | **shipped** — audit checklist/merge via FuncX only |
24
28
 
25
29
  ## Older / parallel tracks
26
30
 
@@ -144,7 +144,7 @@ Still valuable; see [`ai-skills-llm-observability.md` §1](./ai-skills-llm-obser
144
144
 
145
145
  ## After this ships — ai-tasks follow-up
146
146
 
147
- See [`ai-tasks-wrap-up-after-upstream.md`](./ai-tasks-wrap-up-after-upstream.md):
147
+ See [`ai-tasks-wrap-up-after-upstream.md`](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/ai-tasks-wrap-up-after-upstream.md):
148
148
 
149
149
  - Add `reasoningEffort` to `LlmCallConfig` / tuning passthrough → `buildAiSkillsModelConfigForMain`.
150
150
  - Stop forwarding any `maxTokens` / `maxTokensCap` to `runSkill`.
@@ -0,0 +1,62 @@
1
+ # `@x12i/funcx` — open items @ 4.9.13
2
+
3
+ **Validated:** `@x12i/funcx` **4.9.13** (live OpenRouter, 2026-06-12)
4
+ **Filed by:** `@exellix/ai-tasks` + `@exellix/xynthesis`
5
+ **Evidence:** `temp/funcx-functions/` (`live-run-summary.md`, `_live-results.json`)
6
+
7
+ **No open FuncX upstream items remain** from the 4.9.11 tracker. All four prior gaps are closed in the package @ 4.9.13.
8
+
9
+ ---
10
+
11
+ ## Recheck results
12
+
13
+ | Suite | Result |
14
+ |-------|--------|
15
+ | Mock (`npm run test:mock`) | **10/10** |
16
+ | Live batch, `transportRetries: 0` | **9/10** — `pre/synthesize` `fetch failed` @ ~30s |
17
+ | Live `pre/synthesize` + `transportRetries: 2` | **OK** (~5s) |
18
+ | `post/audit-checklist` output | Markdown string (`### Checks` / `### Overall feedback`) |
19
+ | `post/audit-merge` output | Plain text string |
20
+
21
+ ---
22
+
23
+ ## Closed @ 4.9.13 (was open @ 4.9.11)
24
+
25
+ | Id | Was | Fixed in |
26
+ |----|-----|----------|
27
+ | **CR-FUNCX-5** | Opaque `fetch failed`; flaky `pre/synthesize` | **4.9.9** `error.cause` on `NxAiApiError`; **4.9.12** embedder retry docs; **4.9.13** `RunOptions.transportRetries` |
28
+ | **FR-GEN-3** | Output types drifted from runtime | **4.9.12** — `getFuncxOutputSchema` CI; **4.9.13** manifest `outputSchemaType: "string"` for checklist + merge |
29
+ | **FR-GEN-9** | No FuncX parity CI | **4.9.12+** — `sidekickPromptParity.test.ts`, `@x12i/funcx/fixtures` + `promptHash`, `normalizePromptForParity` / `hashSidekickPrompt` exports |
30
+ | **FR-GEN-11** | Thin merge prompt | **4.9.13** — `post-audit-merge` Catalox `prompt.md` includes `original_input`, rich `candidate_a/b` checks; golden envelope in fixtures |
31
+
32
+ ---
33
+
34
+ ## Consumer follow-up (mono-repo)
35
+
36
+ **Shipped @ 4.9.13 cutover (2026-06):**
37
+
38
+ | Task | Status |
39
+ |------|--------|
40
+ | `transportRetries: 2` in `invokeFuncxRun.ts` | **Done** |
41
+ | FR-GEN-9 parity CI (`sidekickFuncxPromptParity.unit.ts` vs `@x12i/funcx/content-seed`) | **Done** — wired in `xynthesis` `npm test` |
42
+ | FuncX-only sidekick / execution-strategy / audit (no `XYNTHESIS_FUNCX_SIDEKICK` flag) | **Done** |
43
+ | Structured-only PRE synthesis (no markdown path) | **Done** |
44
+ | Catalox seed from `@x12i/funcx/content-seed` | **Done** |
45
+ | Delete disk sidekick templates under `xynthesis/templates/` | **Done** (finalize retained) |
46
+ | Delete audit Handlebars templates (`system.md`, `user.txt`, `synthesis.md`) | **Done** (`feedback-injection.md` kept) |
47
+
48
+ **Out of scope here:** live golden e2e with OpenRouter (run `xynthesis` `test:integration` when key is available).
49
+
50
+ ---
51
+
52
+ ## Evidence snippets
53
+
54
+ **`transportRetries` (4.9.13 README):**
55
+
56
+ ```ts
57
+ await run("pre-synthesize", envelope, { client, transportRetries: 2 });
58
+ ```
59
+
60
+ **Rich merge fixture** — `@x12i/funcx/fixtures/sidekicks/post-audit-merge-envelope.json` includes `candidateA`/`candidateB` with `cycle`, `score`, `failedChecks[]`, `passedChecks[]`, `customSynthesisGuidelines`.
61
+
62
+ **Output types** — `postAuditChecklistOutput = string`, `postAuditMergeOutput = string` in `@x12i/funcx/functions` `.d.ts`.