@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.
- package/CHANGELOG.md +34 -4
- package/README.md +2 -2
- package/RUNTASK_REQUEST.md +32 -17
- package/dist/builders/task-request-builder.d.ts.map +1 -1
- package/dist/builders/task-request-builder.js +2 -1
- package/dist/builders/task-request-builder.js.map +1 -1
- package/dist/compile/compileTaskConfiguration.d.ts.map +1 -1
- package/dist/compile/compileTaskConfiguration.js +3 -0
- package/dist/compile/compileTaskConfiguration.js.map +1 -1
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +148 -180
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
- package/dist/errors/runTaskExecutionError.js +0 -2
- package/dist/errors/runTaskExecutionError.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/invocation/types.d.ts +1 -1
- package/dist/narrix/applyWebScopeToRequest.d.ts +9 -0
- package/dist/narrix/applyWebScopeToRequest.d.ts.map +1 -0
- package/dist/narrix/applyWebScopeToRequest.js +156 -0
- package/dist/narrix/applyWebScopeToRequest.js.map +1 -0
- package/dist/narrix/narrixUnitExecution.d.ts.map +1 -1
- package/dist/narrix/narrixUnitExecution.js +8 -3
- package/dist/narrix/narrixUnitExecution.js.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.d.ts +6 -0
- package/dist/node-execution/buildRequestFromNodePlan.d.ts.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.js +4 -16
- package/dist/node-execution/buildRequestFromNodePlan.js.map +1 -1
- package/dist/node-execution/compileProfessionalAnswerRequest.d.ts +2 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.d.ts.map +1 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.js +4 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.js.map +1 -0
- package/dist/node-execution/createNodeExecutionHost.d.ts.map +1 -1
- package/dist/node-execution/createNodeExecutionHost.js +97 -26
- package/dist/node-execution/createNodeExecutionHost.js.map +1 -1
- package/dist/node-execution/dispatchExecutionUnit.d.ts.map +1 -1
- package/dist/node-execution/dispatchExecutionUnit.js +4 -2
- package/dist/node-execution/dispatchExecutionUnit.js.map +1 -1
- package/dist/node-execution/orchestration/runPostOrchestration.d.ts +11 -0
- package/dist/node-execution/orchestration/runPostOrchestration.d.ts.map +1 -0
- package/dist/node-execution/orchestration/runPostOrchestration.js +123 -0
- package/dist/node-execution/orchestration/runPostOrchestration.js.map +1 -0
- package/dist/node-execution/orchestration/runPreOrchestration.d.ts +3 -0
- package/dist/node-execution/orchestration/runPreOrchestration.d.ts.map +1 -0
- package/dist/node-execution/orchestration/runPreOrchestration.js +110 -0
- package/dist/node-execution/orchestration/runPreOrchestration.js.map +1 -0
- package/dist/node-execution/orchestration/shardContext.d.ts +12 -0
- package/dist/node-execution/orchestration/shardContext.d.ts.map +1 -0
- package/dist/node-execution/orchestration/shardContext.js +71 -0
- package/dist/node-execution/orchestration/shardContext.js.map +1 -0
- package/dist/node-execution/orchestration/types.d.ts +21 -0
- package/dist/node-execution/orchestration/types.d.ts.map +1 -0
- package/dist/node-execution/orchestration/types.js +2 -0
- package/dist/node-execution/orchestration/types.js.map +1 -0
- package/dist/node-execution/rejectForbiddenWireFields.d.ts +2 -0
- package/dist/node-execution/rejectForbiddenWireFields.d.ts.map +1 -1
- package/dist/node-execution/rejectForbiddenWireFields.js +42 -7
- package/dist/node-execution/rejectForbiddenWireFields.js.map +1 -1
- package/dist/observability/classifyRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/classifyRunTaskFailure.js +4 -3
- package/dist/observability/classifyRunTaskFailure.js.map +1 -1
- package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/logRunTaskFailure.js +0 -2
- package/dist/observability/logRunTaskFailure.js.map +1 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts +19 -3
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts.map +1 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js +7 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js.map +1 -1
- package/dist/post-steps/audit/loadAuditTemplates.d.ts +2 -55
- package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -1
- package/dist/post-steps/audit/loadAuditTemplates.js +3 -38
- package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -1
- package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts +8 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts.map +1 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.js +62 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.js.map +1 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts +2 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -1
- package/dist/post-steps/audit/parseAuditOutput.js +56 -0
- package/dist/post-steps/audit/parseAuditOutput.js.map +1 -1
- package/dist/post-steps/audit/runAudit.d.ts.map +1 -1
- package/dist/post-steps/audit/runAudit.js +53 -113
- package/dist/post-steps/audit/runAudit.js.map +1 -1
- package/dist/post-steps/audit/runAuditFuncxCall.d.ts +18 -0
- package/dist/post-steps/audit/runAuditFuncxCall.d.ts.map +1 -0
- package/dist/post-steps/audit/runAuditFuncxCall.js +59 -0
- package/dist/post-steps/audit/runAuditFuncxCall.js.map +1 -0
- package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -1
- package/dist/synthesis/resolveSourceMaterial.js +14 -0
- package/dist/synthesis/resolveSourceMaterial.js.map +1 -1
- package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -1
- package/dist/synthesis/runStructuredSynthesisRobust.js +24 -4
- package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -1
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +3 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -1
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +28 -4
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +4 -4
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.js +2 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -1
- package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts +42 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts.map +1 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.js +47 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.js.map +1 -0
- package/dist/task-strategies/canonicalTaskStrategies.d.ts +2 -1
- package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -1
- package/dist/task-strategies/canonicalTaskStrategies.js +2 -1
- package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -1
- package/dist/task-strategies/constants.d.ts +9 -1
- package/dist/task-strategies/constants.d.ts.map +1 -1
- package/dist/task-strategies/constants.js +9 -1
- package/dist/task-strategies/constants.js.map +1 -1
- package/dist/task-strategies/index.d.ts +5 -3
- package/dist/task-strategies/index.d.ts.map +1 -1
- package/dist/task-strategies/index.js +4 -3
- package/dist/task-strategies/index.js.map +1 -1
- package/dist/task-strategies/listAiTaskStrategies.d.ts +10 -1
- package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -1
- package/dist/task-strategies/listAiTaskStrategies.js +17 -2
- package/dist/task-strategies/listAiTaskStrategies.js.map +1 -1
- package/dist/types/task-types.d.ts +4 -11
- package/dist/types/task-types.d.ts.map +1 -1
- package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -1
- package/dist/utils/bridgeRunSkillGatewayMemory.js +1 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -1
- package/dist/utils/executionMemoryInputRecord.d.ts +12 -0
- package/dist/utils/executionMemoryInputRecord.d.ts.map +1 -0
- package/dist/utils/executionMemoryInputRecord.js +28 -0
- package/dist/utils/executionMemoryInputRecord.js.map +1 -0
- package/dist/utils/resolveAiProfileModel.d.ts +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.d.ts.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.js +0 -32
- package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
- package/dist/utils/runTaskRequestShape.d.ts.map +1 -1
- package/dist/utils/runTaskRequestShape.js +4 -26
- package/dist/utils/runTaskRequestShape.js.map +1 -1
- package/dist/utils/skillTemplateVariables.d.ts +3 -2
- package/dist/utils/skillTemplateVariables.d.ts.map +1 -1
- package/dist/utils/skillTemplateVariables.js +3 -2
- package/dist/utils/skillTemplateVariables.js.map +1 -1
- package/dist/validation/validateProfessionalAnswerContract.d.ts +8 -0
- package/dist/validation/validateProfessionalAnswerContract.d.ts.map +1 -0
- package/dist/validation/validateProfessionalAnswerContract.js +45 -0
- package/dist/validation/validateProfessionalAnswerContract.js.map +1 -0
- package/dist/validation/validateRunTaskConfig.d.ts.map +1 -1
- package/dist/validation/validateRunTaskConfig.js +3 -66
- package/dist/validation/validateRunTaskConfig.js.map +1 -1
- package/documenations/record-and-template-variables.md +21 -13
- package/documenations/run-task-execution-flow.md +1 -1
- package/documenations/skill-orchestration-strategy-cr-fr.md +147 -0
- package/documenations/upstream-feature-requests/README.md +9 -5
- package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +1 -1
- package/documenations/upstream-feature-requests/funcx-4.9.13-open-items.md +62 -0
- package/documenations/upstream-feature-requests/funcx-gap-analysis-cr-fr.md +401 -0
- package/documenations/upstream-feature-requests/funcx-pre-post-sidekick-actions.md +1 -0
- package/documenations/upstream-feature-requests/graph-engine-runtask-contract-alignment-investigation.md +370 -0
- package/documenations/upstream-feature-requests/xynthesis-ai-profiles-2.1-import-break.md +2 -2
- package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md +1 -1
- package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +1 -1
- package/package.json +10 -9
- package/.docs/DOWNSTREAM_ENV.md +0 -42
- package/.docs/FEEDBACK_TO_CLIENT_DOWNSTREAM_FIXES.md +0 -64
- package/.docs/INTERMEDIATE_STEPS.md +0 -82
- package/.docs/activity-structure.md +0 -31
- package/.docs/ai-task-ai-scoping-spec.md +0 -338
- package/.docs/ai-tasks-model-profile-aliases-7x.md +0 -96
- package/.docs/blockers-and-issues.md +0 -346
- package/.docs/building-runTask-sdk.md +0 -659
- package/.docs/building-skill-execution-orchestrator.md +0 -968
- package/.docs/code-used-before/run-task.txt +0 -39
- package/.docs/code-used-before/task-executor.ts.old +0 -57
- package/.docs/code-used-before/test-run-task.ts.old +0 -42
- package/.docs/code-used-before/types.txt +0 -23
- package/.docs/env-ready-policy.md +0 -40
- package/.docs/flow-io/flow-README.md +0 -76
- package/.docs/flow-io/narrix.md +0 -124
- package/.docs/flow-io/web-scoping.md +0 -135
- package/.docs/flow-io/xynthesis-post.md +0 -154
- package/.docs/flow-io/xynthesis-pre.md +0 -181
- package/.docs/gap-analysis.md +0 -201
- package/.docs/integration-facts-ai-tasks.md +0 -109
- package/.docs/investigation/ai-skills.md +0 -170
- package/.docs/investigation/external-packages-assignments.md +0 -66
- package/.docs/investigation/integration-summary.md +0 -20
- package/.docs/investigation/narrix-catalox.md +0 -29
- package/.docs/investigation/workplan-close-graph-engine-gaps.md +0 -101
- package/.docs/logging-stack.md +0 -30
- package/.docs/memory-narrix-adapter-developer-guide.md +0 -402
- package/.docs/memory-narrix-adapter-requirements.md +0 -112
- package/.docs/narrix-context-consumption-gap.md +0 -184
- package/.docs/narrix-context-downstream-report.md +0 -30
- package/.docs/narrix-ingest-and-packs-library-spec.md +0 -240
- package/.docs/narrix-record-input-current-design.md +0 -48
- package/.docs/pacakge.md +0 -48
- package/.docs/possible-components/README.md +0 -11
- package/.docs/possible-components/integration/README.md +0 -10
- package/.docs/possible-components/integration/gaps-when-merging.md +0 -16
- package/.docs/possible-components/integration/platform.md +0 -54
- package/.docs/possible-components/integration/reintegrate-into-ai-tasks.md +0 -26
- package/.docs/possible-components/integration/roadmap-and-checklists.md +0 -54
- package/.docs/possible-components/post-component/README.md +0 -18
- package/.docs/possible-components/post-component/builder-guide.md +0 -175
- package/.docs/possible-components/post-component/gaps-and-artifacts.md +0 -52
- package/.docs/possible-components/post-component/handler-audit.md +0 -47
- package/.docs/possible-components/post-component/handler-polish.md +0 -41
- package/.docs/possible-components/post-component/unified-protocol.md +0 -59
- package/.docs/possible-components/pre-component/README.md +0 -22
- package/.docs/possible-components/pre-component/builder-guide.md +0 -127
- package/.docs/possible-components/pre-component/gaps-and-artifacts.md +0 -35
- package/.docs/possible-components/pre-component/handler-ai-scoping.md +0 -45
- package/.docs/possible-components/pre-component/handler-narrix-preprocessor.md +0 -49
- package/.docs/possible-components/pre-component/handler-narrix-system2.md +0 -35
- package/.docs/possible-components/pre-component/handler-synthesized-context.md +0 -65
- package/.docs/possible-components/pre-component/handler-web-scope.md +0 -29
- package/.docs/possible-components/pre-component/unified-protocol.md +0 -89
- package/.docs/prefer-openrouter-routing-policy.md +0 -114
- package/.docs/questions-for-ai-skills.md +0 -123
- package/.docs/realtime-narrixing-gap-analysis.md +0 -40
- package/.docs/realtime-narrixing.md +0 -433
- package/.docs/run-context-object.md +0 -32
- package/.docs/session-id-usage.md +0 -26
- package/.docs/skill-library-spec.md +0 -249
- package/.docs/synthesized-context-strategy-spec.md +0 -906
- package/.docs/upstream-issue/2026-03-21_woroces-ai-tasks_ISSUE-006_web-scope-question-from-cni-entity.md +0 -46
- package/.docs/web-scopper-embed.md +0 -93
- package/.docs/xynthesis-wiring-and-io.md +0 -12
- package/documenations/activix-feature-request-identity.md +0 -123
- package/documenations/bug-report-xynthesis-and-synthesis-call.md +0 -217
- package/documenations/feature-request-ai-skills-raw-template-access.md +0 -82
- package/documenations/feature-request-athenix-core-directive.md +0 -145
- package/documenations/feature-request-athenix-token-extraction.md +0 -124
- package/documenations/funcx-upstream-github-issues-draft.md +0 -153
- package/documenations/identity-metadata-contract.md +0 -165
- package/documenations/run-task-single-run-checklist.md +0 -109
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-1-no-concrete-wire-in-graph-plans.md +0 -93
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-2-skillModel-profile-only-at-storage.md +0 -88
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-3-reject-concrete-models-in-catalog-rows.md +0 -76
- package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-1-suggested-profile-in-catalogs.md +0 -96
- package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-2-graph-engine-failure-phase-attribution.md +0 -92
- package/documenations/sessions/2026-06-08-subnets-model-resolution/INVESTIGATION-original-bug.md +0 -182
- package/documenations/sessions/2026-06-08-subnets-model-resolution/PROBLEM.md +0 -236
- package/documenations/sessions/2026-06-08-subnets-model-resolution/README.md +0 -11
- package/documenations/sessions/2026-06-08-subnets-model-resolution/funcx-test-resolveModel.cheapDefaultWireSlug.test.ts +0 -117
- package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +0 -129
- package/documenations/upstream-feedback-request-shape-clarification.md +0 -101
- package/documenations/web-context-precedence.md +0 -33
- package/documenations/xynthesis-activix-telemetry.md +0 -28
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
# Investigation: graph-engine `RunTaskRequest` alignment (taskVariables + flat `executionMemory.input`)
|
|
2
|
+
|
|
3
|
+
**Status:** Draft v2 — **awaiting approval** (revised after graph-engine 8.1.x source audit)
|
|
4
|
+
**Date:** 2026-06-12 (v2 same day)
|
|
5
|
+
**Owners:** `@exellix/graph-engine` (implementation), `@exellix/ai-tasks` (contract + fixtures)
|
|
6
|
+
**Consumers:** `@exellix/ai-skills` (`professional-answer`), `@exellix/ai-tasks` `runTask()`
|
|
7
|
+
**graph-engine source:** `c:\prometheus\exellix\graph-engine` (audited separately from this mono-repo)
|
|
8
|
+
**Related:** [RUNTASK_REQUEST.md](../../RUNTASK_REQUEST.md), [record-and-template-variables.md](../record-and-template-variables.md), [graph-engine-task-pre-synthesis-compile.md](../../../archived/ai-tasks/reports/graph-engine-task-pre-synthesis-compile.md)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Purpose
|
|
13
|
+
|
|
14
|
+
Subnet-style graphs (`graph-qcrbz6t`, web-scope variants) need a **shared target contract** between graph-engine, ai-tasks, and ai-skills — especially `taskVariables`, flat `executionMemory.input`, and PRE synthesis on the **nodePlan-only** wire (graph-engine **≥ 8.1**, ai-tasks **9.x**).
|
|
15
|
+
|
|
16
|
+
This report:
|
|
17
|
+
|
|
18
|
+
1. States the **normative target contract** (what we want on the wire).
|
|
19
|
+
2. Records **graph-engine 8.1.x ground truth** (what is already implemented vs still missing).
|
|
20
|
+
3. Proposes **remaining graph-engine changes** ranked P0–P2.
|
|
21
|
+
4. Defines **acceptance criteria** for graph-engine CI (full compiled plan path, not preflight-only).
|
|
22
|
+
|
|
23
|
+
**v1 correction:** The first draft read like a greenfield spec and recommended **`taskConfiguration` forward (P0-1)**. That is **wrong** for graph-engine **≥ 8.1** / ai-tasks **9** when `nodePlan` is present — PRE must be compiled into **`nodePlan.executionUnits`**, and `taskConfiguration` is **forbidden** on the outbound wire.
|
|
24
|
+
|
|
25
|
+
**No graph-engine code should change until this revised report is approved.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Scope
|
|
30
|
+
|
|
31
|
+
| In scope | Out of scope |
|
|
32
|
+
|----------|----------------|
|
|
33
|
+
| Compile path: graph node → `RunTaskRequest` | ai-skills FlexMD frame parsing |
|
|
34
|
+
| `executionMemory` seeding and per-node snapshots | FUNCX catalog hosting |
|
|
35
|
+
| `taskVariables` / `jobVariables` buckets | graph-engine failure-phase attribution (separate FR) |
|
|
36
|
+
| Flat `executionMemory.input` (MAIN record bucket) | Studio UX (P2 unless blocking) |
|
|
37
|
+
| `professional-answer` wire shape | Changing `executionMapping` apply location (stays in graph-engine) |
|
|
38
|
+
| PRE via **`nodePlan.executionUnits`** (not `taskConfiguration` on wire) | ai-tasks re-introducing legacy folding |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Evidence
|
|
43
|
+
|
|
44
|
+
| Artifact | Role |
|
|
45
|
+
|----------|------|
|
|
46
|
+
| [`test/fixtures/run-task/graph-engine-pre-synthesis.json`](../../test/fixtures/run-task/graph-engine-pre-synthesis.json) | **Target wire shape** (partially updated in ai-tasks mono-repo; still missing `nodePlan`, still includes transitional `taskConfiguration` — see §3.1) |
|
|
47
|
+
| [`test/fixtures/run-task/graph-engine-pre-synthesis-web-scope.json`](../../test/fixtures/run-task/graph-engine-pre-synthesis-web-scope.json) | Target + NARRIX/web-scope (ai-tasks mono-repo) |
|
|
48
|
+
| [`test/fixtures/graphs/graph-qcrbz6t-pre-synthesis.json`](../../test/fixtures/graphs/graph-qcrbz6t-pre-synthesis.json) | Fixed graph JSON (authoring shape) |
|
|
49
|
+
| [`test/fixtures/graphs/graph-qcrbz6t-format-2.1.0.json`](../../test/fixtures/graphs/graph-qcrbz6t-format-2.1.0.json) | Graphenix `formatVersion` 2.1.0 (studio) |
|
|
50
|
+
| graph-engine repo tests | `executeGraph` + `compileExellixExecutablePlan` path — **authoritative** for what graph-engine actually emits today |
|
|
51
|
+
| [`RUNTASK_REQUEST.md`](../../RUNTASK_REQUEST.md) | Normative field inventory (has known tension: §`taskConfiguration` lift vs graphenix v2.1 forbidden list) |
|
|
52
|
+
|
|
53
|
+
### 3.1 Fixture honesty (ai-tasks mono-repo)
|
|
54
|
+
|
|
55
|
+
The ai-tasks golden [`graph-engine-pre-synthesis.json`](../../test/fixtures/run-task/graph-engine-pre-synthesis.json) was updated toward the target (`taskVariables.question`, top-level `outputContract`, flat `executionMemory.input`) but is **not yet a complete graph-engine 8.1 wire exemplar**:
|
|
56
|
+
|
|
57
|
+
| Field | Target | Current fixture |
|
|
58
|
+
|-------|--------|-----------------|
|
|
59
|
+
| `executionMemory.taskVariables.question` | Required | **Present** |
|
|
60
|
+
| `outputContract` top-level | Required | **Present** |
|
|
61
|
+
| `input.question` / `input.outputContract` | Absent | **Absent** |
|
|
62
|
+
| `nodePlan` with PRE `executionUnits` | Required @ 8.1 | **Missing** |
|
|
63
|
+
| `taskConfiguration` on wire | **Forbidden** with `nodePlan` | **Still present** (transitional / pre-8.1) |
|
|
64
|
+
| `modelConfig` on wire | **Forbidden** with `nodePlan` (recipe in plan units) | **Still present** (transitional) |
|
|
65
|
+
|
|
66
|
+
graph-engine parity tests today assert a **subset** (flat input, no `.raw`, `taskConfiguration === undefined`, `nodePlan` present) — not the full §4 contract. CI must be tightened after fixtures align.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 4. Canonical contract (normative)
|
|
71
|
+
|
|
72
|
+
### 4.1 Variable scopes
|
|
73
|
+
|
|
74
|
+
| Scope | On `RunTaskRequest` | Template tokens |
|
|
75
|
+
|-------|---------------------|-----------------|
|
|
76
|
+
| Job / graph | `variables` **and** `executionMemory.jobVariables` (same bucket) | `{{jobVariables.*}}` |
|
|
77
|
+
| Node / task | **`executionMemory.taskVariables` only** (no top-level field) | `{{taskVariables.*}}` |
|
|
78
|
+
|
|
79
|
+
- **Invalid:** root `question`, `variables.question`, relying on `input.question` alone for `professional-answer`.
|
|
80
|
+
- **Valid:** `executionMemory.taskVariables.question` (Catalox prompt `{{taskVariables.question}}`).
|
|
81
|
+
|
|
82
|
+
### 4.2 MAIN input bucket
|
|
83
|
+
|
|
84
|
+
| Surface | Shape |
|
|
85
|
+
|---------|--------|
|
|
86
|
+
| `RunTaskRequest.input` | Flat task payload (`record`, `graphIntent`, …) — compiled from `inputsConfig` + `taskVariable` literals |
|
|
87
|
+
| `executionMemory.input` | **Same flat MAIN bucket** mirrored for PRE / NARRIX / synthesis — **not** nested under `input.raw` |
|
|
88
|
+
|
|
89
|
+
Legacy `executionMemory.input.raw` is **deprecated**. ai-tasks **still reads** nested `raw` as a fallback (G1 fix), but graph-engine must **not** treat it as canonical.
|
|
90
|
+
|
|
91
|
+
### 4.3 `professional-answer` specifics
|
|
92
|
+
|
|
93
|
+
| Field | Wire location |
|
|
94
|
+
|-------|----------------|
|
|
95
|
+
| `question` | `executionMemory.taskVariables.question` |
|
|
96
|
+
| `outputContract` | **Top-level** `RunTaskRequest.outputContract` |
|
|
97
|
+
| Domain record | `input.record` (and mirrored flat `executionMemory.input` when graph seeds memory) |
|
|
98
|
+
| `graphIntent` | `input.graphIntent` (or job-scope `jobVariables` when authored that way) |
|
|
99
|
+
|
|
100
|
+
### 4.4 Response consumption (graph-engine)
|
|
101
|
+
|
|
102
|
+
`executionMapping` must read structured skill output:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
"shortAnswer": "output.parsed.shortAnswer"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Not** `flexMd.*` — FlexMD is ai-skills-internal; FUNCX / graph-engine consume `response.parsed`.
|
|
109
|
+
|
|
110
|
+
### 4.5 PRE synthesis (graph-engine ≥ 8.1 / ai-tasks 9)
|
|
111
|
+
|
|
112
|
+
**Wire rule:** When `nodePlan` is present, these are **forbidden** on `RunTaskRequest`:
|
|
113
|
+
|
|
114
|
+
- `taskConfiguration`
|
|
115
|
+
- `executionPipeline`
|
|
116
|
+
- root `modelConfig` (recipe authority lives in plan units)
|
|
117
|
+
|
|
118
|
+
PRE synthesis must be compiled **before invoke** into frozen `nodePlan.executionUnits` — typically `externalPreUtility` or `pipelinePhase` units with correct `invokeContract` (strategy, memory reads, `includeContextInPrompt`). graph-engine passes the **compiled plan** from `compileExellixExecutablePlan` / `compileExecutablePlanV2` (`@x12i/graphenix-plan-compiler`).
|
|
119
|
+
|
|
120
|
+
ai-tasks executes PRE from plan units; it must **not** rely on a compile-time `taskConfiguration` blob on the wire.
|
|
121
|
+
|
|
122
|
+
**Legacy path (no compiled plan):** `buildTaskNodeRunTaskRequest` without a compiled plan may use `minimalNodePlanForSkillKey` (MAIN only, **no PRE**). Preflight tests on that path **cannot** validate PRE wiring.
|
|
123
|
+
|
|
124
|
+
### 4.6 Graphenix v2.1 strict path
|
|
125
|
+
|
|
126
|
+
When using frozen `nodePlan` (`graphenix.node-plan/v2.1`):
|
|
127
|
+
|
|
128
|
+
- `nodePlan.invokeContract.taskVariables` → must appear on wire as `executionMemory.taskVariables`.
|
|
129
|
+
- `nodePlan.invokeContract.taskVariable` → must **not** re-place `question` / `outputContract` into `input` at runtime (coordination gap — see **P0-7**).
|
|
130
|
+
- Forbidden on wire with `nodePlan`: `taskConfiguration`, `executionPipeline`, root `modelConfig`.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 5. Reference: correct outbound shape (excerpt)
|
|
135
|
+
|
|
136
|
+
From [`graph-engine-pre-synthesis.json`](../../test/fixtures/run-task/graph-engine-pre-synthesis.json):
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"skillKey": "professional-answer",
|
|
141
|
+
"outputContract": { "shortAnswer": "...", "fullAnswer": "..." },
|
|
142
|
+
"input": {
|
|
143
|
+
"graphIntent": "Understand the subnet role in the topology.",
|
|
144
|
+
"record": { "target_subnet_cidr": "192.168.10.0/24" }
|
|
145
|
+
},
|
|
146
|
+
"executionMemory": {
|
|
147
|
+
"taskVariables": {
|
|
148
|
+
"question": "What inbound routed-reachability candidates exist for this subnet?"
|
|
149
|
+
},
|
|
150
|
+
"input": {
|
|
151
|
+
"target_subnet_cidr": "192.168.10.0/24",
|
|
152
|
+
"topology": { }
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"nodePlan": {
|
|
156
|
+
"planVersion": "graphenix.node-plan/v2.1",
|
|
157
|
+
"executionUnits": [ "/* PRE synthesis unit(s) + MAIN */" ]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Note:** `executionMemory.input` mirrors the graph record fields **flat** — no `.raw` wrapper. `question` is **not** on `input` or root. **No** `taskConfiguration` / root `modelConfig` on this wire.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 6. graph-engine 8.1.x ground truth (audited)
|
|
167
|
+
|
|
168
|
+
| Report item | Status in graph-engine | Notes |
|
|
169
|
+
|-------------|------------------------|-------|
|
|
170
|
+
| **P0-2** flat `executionMemory.input` | **Done** | `normalizeRuntimeExecutionMemory` seeds flat input; tests assert no `.raw` |
|
|
171
|
+
| **P0-4** `inputsConfig.path: "input"` | **Done** | Graph fixture + tests |
|
|
172
|
+
| **P0-6** `output.parsed.*` mapping | **Done** | `graph-qcrbz6t-pre-synthesis.json` |
|
|
173
|
+
| Job vs task buckets | **Partial** | `jobVariables` / `taskVariables` exist; `node.variables` → `taskVariables` |
|
|
174
|
+
| **P0-1** PRE enablement | **Different mechanism** | PRE via compiled `nodePlan.executionUnits`, **not** `taskConfiguration` on wire |
|
|
175
|
+
| **P0-3 / P0-5** `taskVariable` → wire | **Gap** | `taskVariable` literals compile to **`input`**; `mirrorTaskVariablesOnExecution` copies **`node.variables` only**, not `taskVariable.question` |
|
|
176
|
+
| **P0-1′** PRE in plan units | **Verify** | Tests expect `synthesisEnabled` via plan units; confirm `compileExecutablePlanV2` for all graph shapes |
|
|
177
|
+
| Preflight without compiled plan | **Trap** | `minimalNodePlanForSkillKey` = MAIN only — cannot validate PRE |
|
|
178
|
+
|
|
179
|
+
### Remaining gap IDs (still accurate)
|
|
180
|
+
|
|
181
|
+
| ID | Behavior | Symptom |
|
|
182
|
+
|----|----------|---------|
|
|
183
|
+
| **GE-4** | `taskVariable.question` → `input.question` (not `taskVariables`) | Empty `{{taskVariables.question}}` / validation errors |
|
|
184
|
+
| **GE-5** | `outputContract` stays in `input` | Wrong gateway contract |
|
|
185
|
+
| **GE-6** | `node.taskVariables` / `taskVariable` not fully mirrored to `executionMemory.taskVariables` | Template scope wrong |
|
|
186
|
+
| **GE-7** | `flexMd` mapping (older graphs) | Empty mapping writes |
|
|
187
|
+
| **GE-8** | Stale `executionMemory` on parallel invokes | Downstream context wrong |
|
|
188
|
+
| **GE-9** | PRE hints only in `metadata.graphConcept` | No PRE units in compiled plan |
|
|
189
|
+
| ~~GE-1~~ | ~~Drops `taskConfiguration`~~ | **Not a bug @ 8.1** — forbidden by design |
|
|
190
|
+
| ~~GE-2~~ | ~~Only `input.raw`~~ | **Fixed** in graph-engine |
|
|
191
|
+
| ~~GE-3~~ | ~~`input.raw` path~~ | **Fixed** in fixtures |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 7. Proposed graph-engine changes (requires approval)
|
|
196
|
+
|
|
197
|
+
### P0 — Remaining work
|
|
198
|
+
|
|
199
|
+
| # | Change | Status | Notes |
|
|
200
|
+
|---|--------|--------|-------|
|
|
201
|
+
| **P0-1′** | Compile PRE into `nodePlan.executionUnits` + correct `invokeContract` (strategy, memory paths, `includeContextInPrompt`) | **Verify / complete** | Replaces v1 **P0-1** (`taskConfiguration` forward) — **do not** forward `taskConfiguration` on wire |
|
|
202
|
+
| **P0-2** | Flat `executionMemory.input` at graph run start | **Done** | Keep |
|
|
203
|
+
| **P0-3′** | Mirror **`taskVariable` prompt fields** (at least `question`) → `executionMemory.taskVariables`; keep `node.variables` merge | **Todo** | Extend `mirrorTaskVariablesOnExecution` or compile step |
|
|
204
|
+
| **P0-4** | `inputsConfig.path: "input"` | **Done** | Keep |
|
|
205
|
+
| **P0-5′** | Lift `outputContract` → top-level `RunTaskRequest.outputContract`; exclude `question` from `input` | **Todo** | `resolveTaskNodeInputsForRunTask` today merges full `taskVariable` into `input` |
|
|
206
|
+
| **P0-6** | `executionMapping` → `output.parsed.*` | **Done** in fixtures | Keep |
|
|
207
|
+
| **P0-7** | Align `nodePlan.invokeContract` with wire contract; stop double-merging `taskVariable` into `input` at ai-tasks boundary | **Coordination** | graph-engine compile + ai-tasks `buildRequestFromNodePlan` + graphenix compiler |
|
|
208
|
+
|
|
209
|
+
**P0-2 implementation sketch (approved direction):**
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
// At graph run init — flat MAIN bucket
|
|
213
|
+
runtime.executionMemory.input = {
|
|
214
|
+
...(runtime.executionMemory.input ?? {}),
|
|
215
|
+
...(runtime.input ?? graphInvokePayload ?? {}),
|
|
216
|
+
};
|
|
217
|
+
// Do NOT wrap in { raw: ... } for new graphs
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**P0-4 `inputsConfig` example (authoring):**
|
|
221
|
+
|
|
222
|
+
```json
|
|
223
|
+
"inputsConfig": {
|
|
224
|
+
"record": {
|
|
225
|
+
"type": "executionMemoryPath",
|
|
226
|
+
"path": "input"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### P1 — Correctness under parallelism + strict plans
|
|
232
|
+
|
|
233
|
+
| # | Change |
|
|
234
|
+
|---|--------|
|
|
235
|
+
| **P1-1** | Pass **current** shared `executionMemory` into every `runTask` invoke (parallel-safe) | GE-8 |
|
|
236
|
+
| **P1-2** | Emit `nodePlan` v2.1 with `invokeContract.taskVariables` populated from node authoring | GE-6 |
|
|
237
|
+
| **P1-3** | Lint: `pre: "synthesis"` requires resolvable `executionMemory.input` when record is required |
|
|
238
|
+
| **P1-4** | Reject / warn `INPUT_SYNTHESIS_PIPELINE_CONFLICT` per RUNTASK_REQUEST |
|
|
239
|
+
|
|
240
|
+
### P2 — Migration + studio
|
|
241
|
+
|
|
242
|
+
| # | Change |
|
|
243
|
+
|---|--------|
|
|
244
|
+
| **P2-1** | Studio fields for `taskVariables`, `preInputStrategy`, `inputsConfig.path: input` |
|
|
245
|
+
| **P2-2** | One-time migration: `input.raw` → flat `input`, `variables.question` → `taskVariables.question`, mapping paths → `output.parsed.*` |
|
|
246
|
+
| **P2-3** | Update graph-engine docs that still prescribe `executionMemory.input.raw` |
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 8. ai-tasks: published vs mono-repo source
|
|
251
|
+
|
|
252
|
+
| Behavior | `@exellix/ai-tasks` **9.1.0** (published) | **This mono-repo** (unreleased) |
|
|
253
|
+
|----------|-------------------------------------------|----------------------------------|
|
|
254
|
+
| Flat `executionMemory.input` for PRE record | Question-driven path still prefers **`input.raw`** | **`readExecutionMemoryInputRecord`** — flat first |
|
|
255
|
+
| NARRIX `preferPaths` | `input.raw` before `input` | `input` before `input.raw` |
|
|
256
|
+
| `professional-answer` overlay | `buildRequestFromNodePlan` merges `invokeContract.taskVariable` → **`input`** | **`compileProfessionalAnswerRequest`** lifts `question` → `taskVariables`, `outputContract` top-level |
|
|
257
|
+
| Validation `taskVariables.question` | Not in 9.1.0 | **`validateProfessionalAnswerContract`** |
|
|
258
|
+
| PRE from `nodePlan` units | Yes (graphenix v2.1) | Same |
|
|
259
|
+
| PRE from `taskConfiguration` on wire | Legacy compile path when no forbidden fields | Stripped when `nodePlan` set |
|
|
260
|
+
|
|
261
|
+
**Implication:** Approving §7 requires stating an **ai-tasks version pin** (e.g. next release containing G1–G4) before graph-engine can rely on flat-input PRE + strict `professional-answer` validation.
|
|
262
|
+
|
|
263
|
+
ai-tasks **forwards** `executionMemory` **without** folding scopes into `variables`. It will **not** add graph-engine shims (e.g. re-nesting flat input under `.raw`).
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 9. Verification plan (graph-engine CI)
|
|
268
|
+
|
|
269
|
+
### 9.1 Full plan compile test (required)
|
|
270
|
+
|
|
271
|
+
1. Load [`graph-qcrbz6t-pre-synthesis.json`](../../test/fixtures/graphs/graph-qcrbz6t-pre-synthesis.json).
|
|
272
|
+
2. Run **`compileExellixExecutablePlan`** (not preflight / `minimalNodePlanForSkillKey` only).
|
|
273
|
+
3. Build `RunTaskRequest` via **`executeGraph`** path for node `step-1`.
|
|
274
|
+
|
|
275
|
+
**Must hold:**
|
|
276
|
+
|
|
277
|
+
- `nodePlan` present; `planVersion` = `graphenix.node-plan/v2.1`.
|
|
278
|
+
- `nodePlan.executionUnits` contains PRE unit (`externalPreUtility` and/or `pipelinePhase`).
|
|
279
|
+
- `taskConfiguration === undefined`, `executionPipeline === undefined`, root `modelConfig === undefined`.
|
|
280
|
+
- `executionMemory.taskVariables.question` present and non-empty.
|
|
281
|
+
- `outputContract` top-level; **absent** from `input`.
|
|
282
|
+
- `input.question` and `input.outputContract` **absent**.
|
|
283
|
+
- `executionMemory.input` flat; `'raw' in executionMemory.input === false`.
|
|
284
|
+
|
|
285
|
+
Then diff against an updated golden fixture (target shape in §5).
|
|
286
|
+
|
|
287
|
+
### 9.2 PRE integration smoke
|
|
288
|
+
|
|
289
|
+
```ts
|
|
290
|
+
import { runTask } from "@exellix/ai-tasks";
|
|
291
|
+
|
|
292
|
+
// request must include compiled nodePlan from graph-engine — NOT taskConfiguration compile
|
|
293
|
+
const res = await runTask(request, { catalox });
|
|
294
|
+
assert(res.metadata?.synthesisEnabled === true);
|
|
295
|
+
assert(String(res.parsed?.shortAnswer ?? "").trim().length > 0);
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Use model triplet from plan units / fixture. Do **not** gate on `flexMd.frame`.
|
|
299
|
+
|
|
300
|
+
### 9.3 Mapping round-trip
|
|
301
|
+
|
|
302
|
+
After `runTask`, apply `executionMapping` and assert `executionMemory.answers.q1.shortAnswer` (or equivalent) is populated from `output.parsed`, not FlexMD.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 10. Risk if graph-engine is not updated
|
|
307
|
+
|
|
308
|
+
| Risk | Impact |
|
|
309
|
+
|------|--------|
|
|
310
|
+
| PRE enabled in graph JSON but never runs | Silent quality loss |
|
|
311
|
+
| `professional-answer` with `input.question` only | Validation failure (ai-tasks 9.x+) or empty prompt |
|
|
312
|
+
| Flat memory in studio / 2.1 graphs, engine still nests `.raw` | Duplicate or divergent record shapes |
|
|
313
|
+
| `flexMd` mapping | Empty graph answers despite LLM success |
|
|
314
|
+
| Parallel nodes | Stale memory → wrong downstream context |
|
|
315
|
+
|
|
316
|
+
Backward compatibility in ai-tasks for `input.raw` is **temporary tolerance**, not a contract rollback.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 11. Approval checklist
|
|
321
|
+
|
|
322
|
+
Before graph-engine implementation, confirm:
|
|
323
|
+
|
|
324
|
+
- [ ] **`nodePlan`-only wire** is canonical; **`taskConfiguration` forward is out of scope** for graph-engine ≥ 8.1 (P0-1′).
|
|
325
|
+
- [ ] **Flat `executionMemory.input`** is the canonical seed path (P0-2 — already done).
|
|
326
|
+
- [ ] **`taskVariable` → `taskVariables` / top-level `outputContract`** migration scoped across graph-engine compile, graphenix `invokeContract`, and ai-tasks `buildRequestFromNodePlan` (P0-3′, P0-5′, P0-7).
|
|
327
|
+
- [ ] **`output.parsed.*`** is the mapping source of truth (P0-6).
|
|
328
|
+
- [ ] Golden fixture updated to include `nodePlan` and **exclude** forbidden fields; §9.1 asserts **full** target shape.
|
|
329
|
+
- [ ] **ai-tasks version pin** stated (9.1.0 vs next release with flat-input PRE + `professional-answer` validation).
|
|
330
|
+
- [ ] P2 migration scope (auto-patch vs manual) is agreed with studio owners.
|
|
331
|
+
|
|
332
|
+
**Approved by:** _pending_
|
|
333
|
+
**graph-engine tracking issue:** _TBD_
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## 12. ai-tasks follow-ups (after graph-engine approval — separate PRs)
|
|
338
|
+
|
|
339
|
+
These are **not** graph-engine work; listed for coordination only:
|
|
340
|
+
|
|
341
|
+
1. Finish doc drift cleanup (`README.md` NARRIX path order, stale sections in `graph-engine-task-pre-synthesis-compile.md`).
|
|
342
|
+
2. Default `compileTaskConfiguration` `memoryPaths` to `executionMemory.input` instead of `.raw`.
|
|
343
|
+
3. Live smoke scripts: assert `response.parsed.*` instead of `flexMd.payloads`.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Appendix A — Authoring → wire mapping (`professional-answer` node)
|
|
348
|
+
|
|
349
|
+
| Graph node field | Compiled to |
|
|
350
|
+
|------------------|-------------|
|
|
351
|
+
| `taskVariables.question` | `executionMemory.taskVariables.question` |
|
|
352
|
+
| `taskVariable.outputContract` | `RunTaskRequest.outputContract` |
|
|
353
|
+
| `inputs.graphIntent` | `input.graphIntent` |
|
|
354
|
+
| `inputsConfig.record` → `path: "input"` | `input.record` from flat `executionMemory.input` |
|
|
355
|
+
| `taskConfiguration.aiTaskStrategies` | compiled into `nodePlan.executionUnits` (not on wire) |
|
|
356
|
+
| `executionMapping.map.*` | `output.parsed.*` paths |
|
|
357
|
+
|
|
358
|
+
## Appendix B — Deprecated patterns (do not emit from graph-engine)
|
|
359
|
+
|
|
360
|
+
| Deprecated | Replacement |
|
|
361
|
+
|------------|-------------|
|
|
362
|
+
| `executionMemory.input.raw` as canonical record | flat `executionMemory.input` |
|
|
363
|
+
| `inputsConfig.path: "input.raw"` | `path: "input"` |
|
|
364
|
+
| `input.question` / root `question` | `executionMemory.taskVariables.question` |
|
|
365
|
+
| `variables.question` (node scope) | `executionMemory.taskVariables.question` |
|
|
366
|
+
| `input.outputContract` | top-level `outputContract` |
|
|
367
|
+
| `executionMapping` → `flexMd.payloads.*` | `output.parsed.*` |
|
|
368
|
+
| `invokeContract.variables` (node plan) | `invokeContract.taskVariables` |
|
|
369
|
+
| `taskConfiguration` on wire with `nodePlan` | PRE units inside `nodePlan` only |
|
|
370
|
+
| root `modelConfig` with `nodePlan` | per-unit `modelSelection` in plan |
|
|
@@ -279,7 +279,7 @@ Run full suite with **`@x12i/ai-profiles@2.1.0`** installed (not 2.0.x).
|
|
|
279
279
|
2. `npm install && npm run test`
|
|
280
280
|
3. Patch release **8.4.x** updating README / BREAKING-CHANGES minimums
|
|
281
281
|
|
|
282
|
-
See [`ai-tasks-wrap-up-after-upstream.md`](
|
|
282
|
+
See [`ai-tasks-wrap-up-after-upstream.md`](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/ai-tasks-wrap-up-after-upstream.md).
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
@@ -319,6 +319,6 @@ See [`ai-tasks-wrap-up-after-upstream.md`](./ai-tasks-wrap-up-after-upstream.md)
|
|
|
319
319
|
## Related
|
|
320
320
|
|
|
321
321
|
- [`@exellix/ai-tasks` `src/utils/aiProfileModelFormat.ts`](../../src/utils/aiProfileModelFormat.ts) — reference implementation
|
|
322
|
-
- [`.docs/ai-tasks-model-profile-aliases-7x.md`](
|
|
322
|
+
- [`.docs/ai-tasks-model-profile-aliases-7x.md`](../../../archived/ai-tasks/.docs/ai-tasks-model-profile-aliases-7x.md) — wire shapes orchestrators send
|
|
323
323
|
- [`BREAKING-CHANGES.md`](../../BREAKING-CHANGES.md) — 8.4.x blocked subsection
|
|
324
324
|
- [`xynthesis-orchestrator-invoke-contract-4.2.md`](./xynthesis-orchestrator-invoke-contract-4.2.md) — invoke contract (reasoningEffort shipped; import fix is separate P0)
|
package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md
CHANGED
|
@@ -186,6 +186,6 @@ Skill phase (`phaseKind: "skill"`) should **keep** `openrouter/` gateway prefix
|
|
|
186
186
|
|
|
187
187
|
## Related
|
|
188
188
|
|
|
189
|
-
- [`.docs/prefer-openrouter-routing-policy.md`](
|
|
189
|
+
- [`.docs/prefer-openrouter-routing-policy.md`](../../../archived/ai-tasks/.docs/prefer-openrouter-routing-policy.md)
|
|
190
190
|
- [`funcx-openrouter-model-id-pass-through.md`](./funcx-openrouter-model-id-pass-through.md) — funcx is pass-through; no fix required there
|
|
191
191
|
- [`xynthesis-upstream-fixes-checklist.md`](../xynthesis-upstream-fixes-checklist.md)
|
package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md
CHANGED
|
@@ -179,7 +179,7 @@ ai-tasks will follow whichever contract is published; default integration is **n
|
|
|
179
179
|
|
|
180
180
|
## After this ships — ai-tasks follow-up
|
|
181
181
|
|
|
182
|
-
See [`ai-tasks-wrap-up-after-upstream.md`](
|
|
182
|
+
See [`ai-tasks-wrap-up-after-upstream.md`](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/ai-tasks-wrap-up-after-upstream.md):
|
|
183
183
|
|
|
184
184
|
- Remove `resolveMaxTokens` imports and `resolveLlmCallForXynthesis` token math.
|
|
185
185
|
- Pass `outputExpectation` + `temperature` + `topP` + `reasoningEffort` into every `executeXynthesisAction` call.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/ai-tasks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "Task orchestration for the Exellix stack: runTask() with local handlers or LLM-backed execution, task-scoped memory/context enrichment, and executor dispatch via @exellix/ai-skills. ERC-compliant.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"node": ">=20"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@exellix/ai-skills": "^6.
|
|
63
|
+
"@exellix/ai-skills": "^6.10.0",
|
|
64
64
|
"@exellix/memorix-narrix-adapter": "^2.0.0",
|
|
65
65
|
"@exellix/narrix-adapter-chat": "^2.0.0",
|
|
66
66
|
"@exellix/narrix-adapter-docs": "^2.0.0",
|
|
@@ -72,16 +72,17 @@
|
|
|
72
72
|
"@exellix/narrix-ingest": "^2.0.0",
|
|
73
73
|
"@exellix/narrix-runner": "^2.0.0",
|
|
74
74
|
"@exellix/narrix-web-scoper": "^2.0.0",
|
|
75
|
-
"@exellix/xynthesis": "^4.8.
|
|
75
|
+
"@exellix/xynthesis": "^4.8.2",
|
|
76
76
|
"@x12i/activix": "^8.6.3",
|
|
77
77
|
"@x12i/ai-profiles": "^3.4.0",
|
|
78
78
|
"@x12i/catalox": "^5.2.0",
|
|
79
79
|
"@x12i/env": "^4.0.1",
|
|
80
80
|
"@x12i/execution-memory-manager": "^1.2.0",
|
|
81
|
-
"@x12i/funcx": "^4.9.
|
|
82
|
-
"@x12i/graphenix-
|
|
83
|
-
"@x12i/graphenix-
|
|
84
|
-
"@x12i/graphenix-
|
|
81
|
+
"@x12i/funcx": "^4.9.13",
|
|
82
|
+
"@x12i/graphenix-core": "^2.0.1",
|
|
83
|
+
"@x12i/graphenix-executable-contracts": "^2.0.1",
|
|
84
|
+
"@x12i/graphenix-plan-format": "^2.0.1",
|
|
85
|
+
"@x12i/graphenix-trace-format": "^2.0.1",
|
|
85
86
|
"@x12i/logxer": "^4.6.0",
|
|
86
87
|
"@x12i/optimixer": "^3.5.2",
|
|
87
88
|
"@x12i/rendrix": "^4.3.0",
|
|
@@ -91,8 +92,8 @@
|
|
|
91
92
|
},
|
|
92
93
|
"devDependencies": {
|
|
93
94
|
"@types/node": "^18.0.0 || ^20.0.0",
|
|
94
|
-
"@x12i/graphenix-authoring-format": "^2.0.
|
|
95
|
-
"@x12i/graphenix-plan-compiler": "^2.0.
|
|
95
|
+
"@x12i/graphenix-authoring-format": "^2.0.1",
|
|
96
|
+
"@x12i/graphenix-plan-compiler": "^2.0.1",
|
|
96
97
|
"dotenv": "^16.0.0",
|
|
97
98
|
"ts-node": "^10.9.0",
|
|
98
99
|
"tsx": "^4.0.0",
|
package/.docs/DOWNSTREAM_ENV.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Downstream / upstream environment variables
|
|
2
|
-
|
|
3
|
-
This document lists which env vars **ai-tasks** uses itself and which are consumed **downstream** (by @woroces/ai-skills, @athenices/ai-gateway, @athenices/ai-provider-router, @athenices/ai-activities-tracking). ai-tasks does **not** read router or Mongo collection env vars; they are used by dependencies. For full reference, see each package’s docs.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Env vars used by ai-tasks
|
|
8
|
-
|
|
9
|
-
| Variable | Purpose | Default |
|
|
10
|
-
|----------|---------|--------|
|
|
11
|
-
| `MONGO_LOGS_DB` | Default database name for activity logs; passed as `bindingDefaultsDb` to the skills client and used downstream for routing. | `logs-db` |
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Env vars consumed downstream (when using ai-tasks)
|
|
16
|
-
|
|
17
|
-
These affect behavior when you run LLM-backed tasks or activity tracking but are **not** read by ai-tasks. They are used by ai-skills → ai-gateway → ai-provider-router and ai-activities-tracking.
|
|
18
|
-
|
|
19
|
-
### Provider / router (ai-gateway, ai-provider-router)
|
|
20
|
-
|
|
21
|
-
| Variable | Purpose |
|
|
22
|
-
|----------|--------|
|
|
23
|
-
| `OPEN_ROUTER_KEY` or `OPENROUTER_API_KEY` | Use OpenRouter for LLM calls; no need to register providers when set. |
|
|
24
|
-
| `PREFER_OPENROUTER` | Prefer OpenRouter routing when an OpenRouter API key is present. |
|
|
25
|
-
|
|
26
|
-
Other provider keys (e.g. `OPENAI_API_KEY`, `GROK_API_KEY`) are validated by **ai-skills** at init; for OpenRouter-only setups, ai-skills must accept `OPEN_ROUTER_KEY` / `OPENROUTER_API_KEY` in its provider check.
|
|
27
|
-
|
|
28
|
-
### Activity tracking (ai-gateway → ai-activities-tracking)
|
|
29
|
-
|
|
30
|
-
| Variable | Purpose | Default (in ai-activities-tracking) |
|
|
31
|
-
|----------|---------|-------------------------------------|
|
|
32
|
-
| `MONGO_LOGS_COLLECTION` | Main activities collection name. | `cognitive-activities` |
|
|
33
|
-
| `MONGO_BAD_REQUESTS_COLLECTION` | Bad/validation-failure requests collection name. | `ai-bad-requests` |
|
|
34
|
-
|
|
35
|
-
Both are **optional**; safe to leave unset. If unset or unresolved, ai-activities-tracking uses the defaults above and never uses the env var name as the collection name.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Summary
|
|
40
|
-
|
|
41
|
-
- **ai-tasks** only reads `MONGO_LOGS_DB` (for `bindingDefaultsDb`). All other Mongo and router env vars are used by downstream packages.
|
|
42
|
-
- For “No provider specified and no providers registered” and collection-name issues, fixes live in ai-provider-router, ai-gateway, and ai-activities-tracking. Ensure you use versions of `@athenices/ai-gateway` (and thus ai-activities-tracking) that include those fixes.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Feedback to client (worox-graphs): downstream fixes for the two reported issues
|
|
2
|
-
|
|
3
|
-
**Audience:** Consumer of `@woroces/ai-tasks` (e.g. `@woroces/worox-graph`) who reported the router and Mongo collection-name issues.
|
|
4
|
-
**From:** ai-tasks maintainers
|
|
5
|
-
**Date:** 2026-02-23
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Summary
|
|
10
|
-
|
|
11
|
-
Both issues you reported were **downstream** of ai-tasks (in ai-provider-router, ai-gateway, and ai-activities-tracking). They are fixed in those packages. **No change is required in your application (worox-graphs).** After upgrading to versions that include the fixes, the problems should be resolved.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. “No provider specified and no providers registered”
|
|
16
|
-
|
|
17
|
-
**What you saw:** The router threw this error even when `OPEN_ROUTER_KEY` was set; your app only calls `ai-tasks.runTask()` and does not register any provider.
|
|
18
|
-
|
|
19
|
-
**Where it was fixed:** In `@athenices/ai-provider-router` and/or `@athenices/ai-gateway`:
|
|
20
|
-
|
|
21
|
-
- OpenRouter is now considered (and can be used) **before** the “no providers registered” check, so when `OPEN_ROUTER_KEY` (or `OPENROUTER_API_KEY`) is set, the router can resolve a provider without your app registering anything.
|
|
22
|
-
- Error messaging was improved to point to setting `OPEN_ROUTER_KEY` or registering a provider when no provider can be used.
|
|
23
|
-
|
|
24
|
-
**What you should do:**
|
|
25
|
-
|
|
26
|
-
- **Upgrade** so your resolved dependency stack includes the **fixed ai-gateway** (and thus the fixed ai-provider-router). That usually means upgrading `@woroces/ai-tasks` to a version that depends on the fixed ai-gateway (e.g. ai-tasks 2.8.x with ai-gateway ^7.3.1 or the version that includes the router fix), then run `npm install`.
|
|
27
|
-
- Ensure **`OPEN_ROUTER_KEY`** (or `OPENROUTER_API_KEY`, depending on what the gateway reads) is set in your environment when you want to use OpenRouter. Load `.env` before the process starts (e.g. via dotenv/dotenvx) as you already do.
|
|
28
|
-
- You do **not** need to create or configure the router or register any provider in your app.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 2. Mongo collection names (ENV.MONGO_BAD_REQUESTS_COLLECTION etc.)
|
|
33
|
-
|
|
34
|
-
**What you saw:** When `MONGO_LOGS_COLLECTION` / `MONGO_BAD_REQUESTS_COLLECTION` were unset, the app used the env var name (or an `ENV.*` token) as the MongoDB collection name, creating collections like `ENV.MONGO_BAD_REQUESTS_COLLECTION`.
|
|
35
|
-
|
|
36
|
-
**Where it was fixed:** In `@athenices/ai-activities-tracking`:
|
|
37
|
-
|
|
38
|
-
- Defaults were added: **`cognitive-activities`** for the main logs collection and **`ai-bad-requests`** for the bad-requests collection.
|
|
39
|
-
- Collection names are normalized so that unset or unresolved `ENV.*` tokens are never used as collection names; the default is used instead.
|
|
40
|
-
|
|
41
|
-
**What you should do:**
|
|
42
|
-
|
|
43
|
-
- **Upgrade** so your resolved stack includes the **fixed ai-activities-tracking** (typically by depending on a version of ai-gateway that depends on the fixed ai-activities-tracking). Upgrading ai-tasks (and ensuring ai-gateway is updated) will pull in the fixed version.
|
|
44
|
-
- You **do not** need to set `MONGO_LOGS_COLLECTION` or `MONGO_BAD_REQUESTS_COLLECTION` unless you want to override the defaults. If they are unset or unresolved, the packages now use `cognitive-activities` and `ai-bad-requests` and never the env var name.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## No changes required in your repo
|
|
49
|
-
|
|
50
|
-
- **worox-graphs** does not need to create or configure the AI router, register providers, or read Mongo collection env vars. The fixes are entirely in the packages that implement that behavior (ai-provider-router, ai-gateway, ai-activities-tracking).
|
|
51
|
-
- Your only required action is to **upgrade** to versions that include these fixes (via `@woroces/ai-tasks` and its dependency tree). Optional: ensure `OPEN_ROUTER_KEY` (or `OPENROUTER_API_KEY`) is set when using OpenRouter.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Upgrade checklist
|
|
56
|
-
|
|
57
|
-
| Step | Action |
|
|
58
|
-
|------|--------|
|
|
59
|
-
| 1 | Upgrade `@woroces/ai-tasks` to a version that depends on the fixed ai-gateway (e.g. ^2.8.x with ai-gateway that includes the router fix). |
|
|
60
|
-
| 2 | Run `npm install` (or your package manager’s equivalent) so the lockfile resolves to the fixed ai-gateway and its transitive deps (ai-provider-router, ai-activities-tracking). |
|
|
61
|
-
| 3 | Ensure `.env` is loaded before the process starts and contains `OPEN_ROUTER_KEY` (or `OPENROUTER_API_KEY`) when using OpenRouter. |
|
|
62
|
-
| 4 | Optionally leave `MONGO_LOGS_COLLECTION` and `MONGO_BAD_REQUESTS_COLLECTION` unset; they now default to `cognitive-activities` and `ai-bad-requests`. |
|
|
63
|
-
|
|
64
|
-
If you still see “No provider specified and no providers registered” after upgrading, confirm that the resolved `@athenices/ai-gateway` (and `@athenices/ai-provider-router`) in your lockfile are the versions that include the OpenRouter fix, and that your env key (`OPEN_ROUTER_KEY` or `OPENROUTER_API_KEY`) is set before any gateway call.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Structured intermediate results for combined / multi-step tasks
|
|
2
|
-
|
|
3
|
-
When a task (or skill) runs multiple logical steps in one invocation (e.g. “to-cni + enrich + triage”), the response can include structured data for each sub-step so consumers can inspect and report what happened “in between” without extra round-trips.
|
|
4
|
-
|
|
5
|
-
## Response shape
|
|
6
|
-
|
|
7
|
-
Task responses may include an optional top-level **`intermediateSteps`** array. When present, it describes each step performed in order.
|
|
8
|
-
|
|
9
|
-
### Type: `IntermediateStep`
|
|
10
|
-
|
|
11
|
-
| Field | Type | Required | Description |
|
|
12
|
-
|-------|------|----------|-------------|
|
|
13
|
-
| `step` | number | yes | 1-based order in the execution chain |
|
|
14
|
-
| `id` | string | yes | Stable identifier (e.g. `"to-cni"`, `"engine-enrich"`, `"triage-q1-q6"`) |
|
|
15
|
-
| `ok` | boolean | yes | Whether this step completed successfully |
|
|
16
|
-
| `summary` | string | no | Short summary (e.g. `"cni built"`, `"enriched"`) |
|
|
17
|
-
| `error` | string | no | Error message when `ok` is false |
|
|
18
|
-
| `inputSummary` | object \| string | no | Summary input (e.g. keys/ids) for reporting |
|
|
19
|
-
| `outputExcerpt` | object | no | Small excerpt of step output for debugging; keep small to avoid payload bloat |
|
|
20
|
-
|
|
21
|
-
### Example response
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"success": true,
|
|
26
|
-
"output": { "answers": {}, "decision": {} },
|
|
27
|
-
"intermediateSteps": [
|
|
28
|
-
{ "step": 1, "id": "to-cni", "summary": "cni built", "ok": true },
|
|
29
|
-
{ "step": 2, "id": "engine-enrich", "summary": "enriched", "ok": true },
|
|
30
|
-
{ "step": 3, "id": "triage-q1-q6", "summary": "answers Q1,Q6", "ok": true }
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
With optional excerpts for debugging:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"intermediateSteps": [
|
|
40
|
-
{ "step": 1, "id": "to-cni", "ok": true, "outputExcerpt": { "cni": { "subject": {} } } },
|
|
41
|
-
{ "step": 2, "id": "engine-enrich", "ok": true, "outputExcerpt": { "record": {} } },
|
|
42
|
-
{ "step": 3, "id": "triage-q1-q6", "ok": true }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## How it works in ai-tasks
|
|
48
|
-
|
|
49
|
-
- **Skills/tasks** that perform multiple logical steps may return `intermediateSteps` either:
|
|
50
|
-
- **Top-level** on the response (if the executor passes it through), or
|
|
51
|
-
- **Inside `parsed`** as `parsed.intermediateSteps`.
|
|
52
|
-
- **Task SDK** normalizes so that the **top-level** `response.intermediateSteps` is the canonical place:
|
|
53
|
-
- For **local tasks**: if the handler returns an object with `intermediateSteps`, they are lifted to the response and omitted from `parsed`.
|
|
54
|
-
- For **executor (DIRECT)** results: if `result.parsed.intermediateSteps` is present, it is lifted to `result.intermediateSteps` and removed from `parsed`.
|
|
55
|
-
- **NARRIX_THEN_DIRECT**: the runtime prepends a step `{ step: 1, id: "narrix", ok: true, summary: "narrix run completed" }` and renumbers any steps from the direct phase (step 2, 3, …).
|
|
56
|
-
|
|
57
|
-
## Consumer usage
|
|
58
|
-
|
|
59
|
-
Consumers (e.g. worox-graphs playground reporter) can:
|
|
60
|
-
|
|
61
|
-
1. **Persist or display** the chain (e.g. “Step 1: to-cni → Step 2: engine-enrich → Step 3: triage-q1-q6”).
|
|
62
|
-
2. **Optionally link to or embed** excerpts of intermediate payloads when `outputExcerpt` is present.
|
|
63
|
-
3. Use the list to get visibility equivalent to per-node request/response files, without requiring separate graph nodes for each step.
|
|
64
|
-
|
|
65
|
-
## TypeScript
|
|
66
|
-
|
|
67
|
-
```ts
|
|
68
|
-
import type { RunTaskResponseWithSteps, IntermediateStep, IntermediateSteps } from "@woroces/ai-tasks";
|
|
69
|
-
|
|
70
|
-
const res: RunTaskResponseWithSteps<MyOutput> = await runTask(request);
|
|
71
|
-
if (res.intermediateSteps) {
|
|
72
|
-
for (const s of res.intermediateSteps) {
|
|
73
|
-
console.log(`Step ${s.step}: ${s.id} ${s.ok ? "ok" : s.error}`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Acceptance criteria (reference)
|
|
79
|
-
|
|
80
|
-
- A combined task can return an optional list of intermediate steps in execution order.
|
|
81
|
-
- Each step has a stable identifier and success flag; optional summary or excerpt is supported.
|
|
82
|
-
- Consumers can use this list to render a “chain” view (e.g. in reports or playground) equivalent to the current per-node visibility, without requiring separate graph nodes for each step.
|