@exellix/ai-tasks 8.2.5 → 8.4.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 +28 -0
- package/README.md +17 -13
- package/RUNTASK_REQUEST.md +3 -3
- package/dist/aiSkillsUpstreamExports.d.ts +1 -1
- package/dist/aiSkillsUpstreamExports.d.ts.map +1 -1
- package/dist/aiSkillsUpstreamExports.js +1 -1
- package/dist/aiSkillsUpstreamExports.js.map +1 -1
- package/dist/analysis/analyzeRunTaskRequest.d.ts +2 -2
- package/dist/analysis/analyzeRunTaskRequest.d.ts.map +1 -1
- package/dist/analysis/analyzeRunTaskRequest.js +11 -4
- package/dist/analysis/analyzeRunTaskRequest.js.map +1 -1
- package/dist/builders/task-request-builder.d.ts +9 -12
- package/dist/builders/task-request-builder.d.ts.map +1 -1
- package/dist/builders/task-request-builder.js +22 -15
- package/dist/builders/task-request-builder.js.map +1 -1
- package/dist/compile/compileTaskConfiguration.d.ts.map +1 -1
- package/dist/compile/compileTaskConfiguration.js +4 -3
- package/dist/compile/compileTaskConfiguration.js.map +1 -1
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +10 -11
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/errors/modelConfigRequiredError.d.ts +9 -0
- package/dist/errors/modelConfigRequiredError.d.ts.map +1 -0
- package/dist/errors/modelConfigRequiredError.js +20 -0
- package/dist/errors/modelConfigRequiredError.js.map +1 -0
- package/dist/errors/runTaskExecutionError.d.ts +2 -1
- package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
- package/dist/errors/runTaskExecutionError.js +1 -1
- package/dist/errors/runTaskExecutionError.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/resolveLlmCallForXynthesis.d.ts +17 -40
- package/dist/internal/resolveLlmCallForXynthesis.d.ts.map +1 -1
- package/dist/internal/resolveLlmCallForXynthesis.js +15 -55
- package/dist/internal/resolveLlmCallForXynthesis.js.map +1 -1
- package/dist/internal/runPostStepLlmCall.d.ts +3 -17
- package/dist/internal/runPostStepLlmCall.d.ts.map +1 -1
- package/dist/internal/runPostStepLlmCall.js +31 -30
- package/dist/internal/runPostStepLlmCall.js.map +1 -1
- package/dist/invocation/defaultAiProfilesResolveOptions.d.ts +27 -0
- package/dist/invocation/defaultAiProfilesResolveOptions.d.ts.map +1 -0
- package/dist/invocation/defaultAiProfilesResolveOptions.js +43 -0
- package/dist/invocation/defaultAiProfilesResolveOptions.js.map +1 -0
- package/dist/invocation/resolveProfileInvocationRouting.d.ts +5 -3
- package/dist/invocation/resolveProfileInvocationRouting.d.ts.map +1 -1
- package/dist/invocation/resolveProfileInvocationRouting.js +30 -19
- package/dist/invocation/resolveProfileInvocationRouting.js.map +1 -1
- package/dist/logxer/packageLogxers.d.ts +0 -1
- package/dist/logxer/packageLogxers.d.ts.map +1 -1
- package/dist/observability/classifyRunTaskFailure.js +2 -2
- package/dist/observability/classifyRunTaskFailure.js.map +1 -1
- package/dist/observability/logLlmProviderInvocation.d.ts +1 -2
- package/dist/observability/logLlmProviderInvocation.d.ts.map +1 -1
- package/dist/observability/logLlmProviderInvocation.js +3 -3
- package/dist/observability/logLlmProviderInvocation.js.map +1 -1
- package/dist/packaged-tasks-client.js +1 -1
- package/dist/packaged-tasks-client.js.map +1 -1
- package/dist/post-steps/audit/runAudit.d.ts.map +1 -1
- package/dist/post-steps/audit/runAudit.js +6 -16
- package/dist/post-steps/audit/runAudit.js.map +1 -1
- package/dist/post-steps/polish/runPolish.d.ts +2 -0
- package/dist/post-steps/polish/runPolish.d.ts.map +1 -1
- package/dist/post-steps/polish/runPolish.js +5 -9
- package/dist/post-steps/polish/runPolish.js.map +1 -1
- package/dist/post-steps/resolvePostStepConfig.d.ts +4 -35
- package/dist/post-steps/resolvePostStepConfig.d.ts.map +1 -1
- package/dist/post-steps/resolvePostStepConfig.js +9 -36
- package/dist/post-steps/resolvePostStepConfig.js.map +1 -1
- package/dist/strategies/direct-execution-strategy.d.ts.map +1 -1
- package/dist/strategies/direct-execution-strategy.js +6 -3
- package/dist/strategies/direct-execution-strategy.js.map +1 -1
- package/dist/synthesis/runStructuredSynthesisRobust.d.ts +0 -1
- package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -1
- package/dist/synthesis/runStructuredSynthesisRobust.js +20 -58
- package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llmCall.d.ts +18 -47
- package/dist/types/llmCall.d.ts.map +1 -1
- package/dist/types/llmCall.js +1 -10
- package/dist/types/llmCall.js.map +1 -1
- package/dist/types/model-config.d.ts +22 -9
- package/dist/types/model-config.d.ts.map +1 -1
- package/dist/types/model-config.js +62 -13
- package/dist/types/model-config.js.map +1 -1
- package/dist/types/task-types.d.ts +16 -12
- package/dist/types/task-types.d.ts.map +1 -1
- package/dist/types/task-types.js.map +1 -1
- package/dist/utilities/runUtility.d.ts.map +1 -1
- package/dist/utilities/runUtility.js +8 -11
- package/dist/utilities/runUtility.js.map +1 -1
- package/dist/utils/aiProfileModelFormat.d.ts.map +1 -1
- package/dist/utils/aiProfileModelFormat.js +8 -65
- package/dist/utils/aiProfileModelFormat.js.map +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts +5 -2
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/resolveAiProfileModel.js +3 -1
- package/dist/utils/resolveAiProfileModel.js.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.d.ts +1 -1
- package/dist/utils/resolveRunTaskModelReferences.d.ts.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.js +8 -3
- package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
- package/dist/utils/routeModelConfigSlots.d.ts +1 -1
- package/dist/utils/routeModelConfigSlots.d.ts.map +1 -1
- package/dist/utils/routeModelConfigSlots.js +1 -1
- package/dist/utils/routeModelConfigSlots.js.map +1 -1
- package/dist/validation/helpers.d.ts +5 -2
- package/dist/validation/helpers.d.ts.map +1 -1
- package/dist/validation/helpers.js +65 -22
- package/dist/validation/helpers.js.map +1 -1
- package/dist/validation/types.d.ts +1 -1
- package/dist/validation/types.d.ts.map +1 -1
- package/dist/validation/validateRunTaskConfig.d.ts.map +1 -1
- package/dist/validation/validateRunTaskConfig.js +2 -1
- package/dist/validation/validateRunTaskConfig.js.map +1 -1
- package/documenations/upstream-feature-requests/README.md +21 -0
- package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +151 -0
- package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +126 -0
- package/documenations/upstream-feature-requests/funcx-openrouter-model-id-pass-through.md +105 -0
- package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md +191 -0
- package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +175 -0
- package/package.json +6 -5
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# `@exellix/xynthesis` — orchestrator invoke contract fixes (≥ 4.2)
|
|
2
|
+
|
|
3
|
+
Status: **open** — blocks clean `@exellix/ai-tasks` 8.4+ integration
|
|
4
|
+
Owner: `@exellix/xynthesis`
|
|
5
|
+
Filed by: `@exellix/ai-tasks`
|
|
6
|
+
Consumer: `@exellix/ai-tasks` 8.4.0 (PRE / POST / scoping / utilities / structured synthesis)
|
|
7
|
+
Pinned in ai-tasks today: `@exellix/xynthesis@4.2.2`
|
|
8
|
+
|
|
9
|
+
Related (older, partially superseded): [`xynthesis-llm-observability.md`](./xynthesis-llm-observability.md)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Summary
|
|
14
|
+
|
|
15
|
+
Xynthesis **4.2** moved token budgeting **inside** the package (`executeXynthesisAction` → `resolveEffectiveMaxTokens` + Optimixer). That is the right design.
|
|
16
|
+
|
|
17
|
+
Remaining gaps for orchestrators (`@exellix/ai-tasks`, graph-engine):
|
|
18
|
+
|
|
19
|
+
| Orchestrator sends | Package owns internally |
|
|
20
|
+
|--------------------|-------------------------|
|
|
21
|
+
| Wire **model** | — |
|
|
22
|
+
| **outputExpectation** (sizing / density intent for Optimixer) | — |
|
|
23
|
+
| **temperature**, **topP** | — |
|
|
24
|
+
| **reasoningEffort** | — |
|
|
25
|
+
| — | **max completion tokens** (Optimixer) |
|
|
26
|
+
|
|
27
|
+
**Do not** require hosts to call removed exports (`resolveMaxTokens` from `@exellix/xynthesis/ai-actions`). Hosts must not pre-compute token counts.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Already correct in 4.2.2 (no change needed)
|
|
32
|
+
|
|
33
|
+
### 1. Token resolution inside `executeXynthesisAction`
|
|
34
|
+
|
|
35
|
+
- Requires `outputExpectation` on every hop (throws if missing).
|
|
36
|
+
- Calls `resolveEffectiveMaxTokens` (async, Optimixer) with `templateId` derived from `sidekickAction` / `activixActionType` / `trace.kind`.
|
|
37
|
+
- Optional `maxTokens` on the request is only a **ceiling** (`callerMaxTokens`), not the primary API.
|
|
38
|
+
|
|
39
|
+
### 2. Public export surface
|
|
40
|
+
|
|
41
|
+
- `@exellix/xynthesis/ai-actions` exports `resolveEffectiveMaxTokens`, `completeOptimixerMaxTokensPrediction`.
|
|
42
|
+
- Sync `resolveMaxTokens` is **not** exported from `ai-actions` (internal legacy paths may still use it).
|
|
43
|
+
|
|
44
|
+
### 3. Structured gateway
|
|
45
|
+
|
|
46
|
+
- `runStructuredSynthesisGatewayCall` accepts `outputExpectation` and forwards to sidekick / execute path.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Required fixes
|
|
51
|
+
|
|
52
|
+
### 1. Accept `reasoningEffort` on all host-facing hop APIs
|
|
53
|
+
|
|
54
|
+
#### Today
|
|
55
|
+
|
|
56
|
+
- `reasoningEffort` exists only on **`EffectiveMaxTokensResolutionInput`** (internal to `resolveEffectiveMaxTokens`).
|
|
57
|
+
- **`ExecuteXynthesisActionRequest` has no `reasoningEffort` field.**
|
|
58
|
+
- `executeXynthesisAction` calls Optimixer with `reasoningEffort: input.reasoningEffort ?? "not-applicable"` — hosts cannot override per call.
|
|
59
|
+
|
|
60
|
+
#### Why it hurts
|
|
61
|
+
|
|
62
|
+
`@exellix/ai-tasks` unifies tuning in `LlmCallConfig` for every stage. MAIN gets `reasoningEffort` from ai-skills catalog (once fixed); PRE/POST/scoping must be able to send the same knob into xynthesis without forking Catalox-only configuration.
|
|
63
|
+
|
|
64
|
+
#### Asked behavior
|
|
65
|
+
|
|
66
|
+
Add optional `reasoningEffort?: OptimixerReasoningEffort` to:
|
|
67
|
+
|
|
68
|
+
- `ExecuteXynthesisActionRequest`
|
|
69
|
+
- `RunStructuredSynthesisParams` (and `RunSidekickExecConfig` / gateway exec config if separate)
|
|
70
|
+
- `RunXynthesisFinalizeExecConfig`
|
|
71
|
+
- `RunXynthesisAiActionRequest` / config slice if applicable
|
|
72
|
+
|
|
73
|
+
Forward into `resolveEffectiveMaxTokens({ …, reasoningEffort })`.
|
|
74
|
+
|
|
75
|
+
**Resolution order:**
|
|
76
|
+
|
|
77
|
+
1. Request field
|
|
78
|
+
2. Catalox sidekick / action catalog default (if loaded for that template)
|
|
79
|
+
3. `"not-applicable"`
|
|
80
|
+
|
|
81
|
+
#### Acceptance
|
|
82
|
+
|
|
83
|
+
- `executeXynthesisAction({ …, reasoningEffort: "high", outputExpectation: { … } })` passes `"high"` to Optimixer predict.
|
|
84
|
+
- `invokeSummary` / `tokenResolution` diagnostics echo effective reasoning effort when available.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 2. Accept and forward `temperature` + `topP` on every public hop (audit)
|
|
89
|
+
|
|
90
|
+
#### Today
|
|
91
|
+
|
|
92
|
+
- `ExecuteXynthesisActionRequest` includes `topP`; temperature is often set on `gateway` only.
|
|
93
|
+
- `@exellix/ai-tasks` `runPostStepLlmCall` sets `gateway.temperature` but **does not pass `topP`** today.
|
|
94
|
+
- Older FR in [`xynthesis-llm-observability.md` §1](./xynthesis-llm-observability.md) may be partially addressed — **verify end-to-end** on:
|
|
95
|
+
- `executeXynthesisAction`
|
|
96
|
+
- `runStructuredSynthesisGatewayCall` / `runSidekickGatewayCall`
|
|
97
|
+
- `runXynthesisFinalize`
|
|
98
|
+
|
|
99
|
+
#### Asked behavior
|
|
100
|
+
|
|
101
|
+
- Document where `temperature` lives (`gateway` vs top-level) and support **one** canonical shape (or accept both with merge rules).
|
|
102
|
+
- Ensure `topP` is forwarded to Funcx / gateway invoker on **all** paths above.
|
|
103
|
+
- Echo applied values in `invokeSummary.executionMetadata`.
|
|
104
|
+
|
|
105
|
+
#### Acceptance
|
|
106
|
+
|
|
107
|
+
- Integration test: `executeXynthesisAction({ topP: 0.8, gateway: { temperature: 0.2, … }, … })` → provider request includes both.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### 3. Orchestrator documentation: do not pre-resolve `maxTokens`
|
|
112
|
+
|
|
113
|
+
#### Today
|
|
114
|
+
|
|
115
|
+
- Integrators (including ai-tasks 8.4) still import `resolveMaxTokens` from `@exellix/xynthesis/ai-actions` — **removed**, causes runtime `SyntaxError`.
|
|
116
|
+
- README / ai-actions example should steer hosts to:
|
|
117
|
+
- Pass **`outputExpectation`** (required)
|
|
118
|
+
- Optionally pass **`maxTokens` only as a rare ceiling** if product keeps that knob
|
|
119
|
+
- Let **`executeXynthesisAction`** run Optimixer
|
|
120
|
+
|
|
121
|
+
#### Asked behavior
|
|
122
|
+
|
|
123
|
+
- **BREAKING / CHANGELOG** entry: `resolveMaxTokens` removed from `ai-actions`; use `executeXynthesisAction` or `resolveEffectiveMaxTokens` for advanced callers.
|
|
124
|
+
- **ai-actions** module doc example updated (already mentions `resolveEffectiveMaxTokens` — expand with `reasoningEffort` once §1 ships).
|
|
125
|
+
|
|
126
|
+
#### Acceptance
|
|
127
|
+
|
|
128
|
+
- `import { resolveMaxTokens } from "@exellix/xynthesis/ai-actions"` fails at build time with a clear migration note.
|
|
129
|
+
- Document that **`outputExpectation` is not a token count** — it is Optimixer input; the numeric cap is internal.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### 4. Clarify or remove host `maxTokens` on `ExecuteXynthesisActionRequest`
|
|
134
|
+
|
|
135
|
+
#### Today
|
|
136
|
+
|
|
137
|
+
- `maxTokens?: number` acts as `callerMaxTokens` ceiling on Optimixer result.
|
|
138
|
+
|
|
139
|
+
#### Product decision (pick one and document)
|
|
140
|
+
|
|
141
|
+
**A (recommended for graph-engine parity):** Deprecate host `maxTokens`; ceiling only via catalog / Optimixer constraints. Orchestrators send `outputExpectation` + `reasoningEffort` only.
|
|
142
|
+
|
|
143
|
+
**B:** Keep `maxTokens` as **optional hard ceiling** for cost guardrails; rename in docs to `maxTokensCeiling` in a future major to avoid confusion.
|
|
144
|
+
|
|
145
|
+
ai-tasks will follow whichever contract is published; default integration is **no host cap**.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Stale items in `xynthesis-llm-observability.md`
|
|
150
|
+
|
|
151
|
+
| Old § | Status in 4.2.2 |
|
|
152
|
+
|-------|------------------|
|
|
153
|
+
| §1 temperature / topP | Re-verify all paths; close or narrow if only sidekick gaps remain |
|
|
154
|
+
| §2 `outputExpectation` on `runSynthesisCall` | Superseded by `executeXynthesisAction` requiring `outputExpectation` |
|
|
155
|
+
| § resolveMaxTokens on ai-actions | **Removed** — replace with this doc |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Verification checklist (for xynthesis PR)
|
|
160
|
+
|
|
161
|
+
- [ ] `ExecuteXynthesisActionRequest.reasoningEffort` (and gateway wrappers).
|
|
162
|
+
- [ ] Optimixer predict receives resolved `reasoningEffort`.
|
|
163
|
+
- [ ] `temperature` + `topP` integration tests on `executeXynthesisAction` + structured gateway.
|
|
164
|
+
- [ ] CHANGELOG: `resolveMaxTokens` not in `ai-actions` exports; migration path documented.
|
|
165
|
+
- [ ] Public contract: hosts send `outputExpectation`, not precomputed `maxTokens`.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## After this ships — ai-tasks follow-up
|
|
170
|
+
|
|
171
|
+
See [`ai-tasks-wrap-up-after-upstream.md`](./ai-tasks-wrap-up-after-upstream.md):
|
|
172
|
+
|
|
173
|
+
- Remove `resolveMaxTokens` imports and `resolveLlmCallForXynthesis` token math.
|
|
174
|
+
- Pass `outputExpectation` + `temperature` + `topP` + `reasoningEffort` into every `executeXynthesisAction` call.
|
|
175
|
+
- Do not forward `maxTokens` / `maxTokensCap` from `RunTaskRequest`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/ai-tasks",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.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,12 +60,13 @@
|
|
|
60
60
|
},
|
|
61
61
|
"overrides": {
|
|
62
62
|
"@x12i/activix": "$@x12i/activix",
|
|
63
|
+
"@x12i/ai-profiles": "$@x12i/ai-profiles",
|
|
63
64
|
"@x12i/catalox": "$@x12i/catalox",
|
|
64
65
|
"@x12i/funcx": "$@x12i/funcx",
|
|
65
66
|
"@x12i/logxer": "$@x12i/logxer"
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
68
|
-
"@exellix/ai-skills": "^5.9.
|
|
69
|
+
"@exellix/ai-skills": "^5.9.12",
|
|
69
70
|
"@exellix/memorix-narrix-adapter": "^2.0.0",
|
|
70
71
|
"@exellix/narrix-adapter-chat": "^2.0.0",
|
|
71
72
|
"@exellix/narrix-adapter-docs": "^2.0.0",
|
|
@@ -77,13 +78,13 @@
|
|
|
77
78
|
"@exellix/narrix-ingest": "^2.0.0",
|
|
78
79
|
"@exellix/narrix-runner": "^2.0.0",
|
|
79
80
|
"@exellix/narrix-web-scoper": "^2.0.0",
|
|
80
|
-
"@exellix/xynthesis": "^4.
|
|
81
|
+
"@exellix/xynthesis": "^4.3.0",
|
|
81
82
|
"@x12i/activix": "^8.5.0",
|
|
82
|
-
"@x12i/ai-profiles": "^
|
|
83
|
+
"@x12i/ai-profiles": "^2.0.1",
|
|
83
84
|
"@x12i/catalox": "^5.1.3",
|
|
84
85
|
"@x12i/env": "^4.0.1",
|
|
85
86
|
"@x12i/execution-memory-manager": "^1.2.0",
|
|
86
|
-
"@x12i/funcx": "^4.3.
|
|
87
|
+
"@x12i/funcx": "^4.3.2",
|
|
87
88
|
"@x12i/logxer": "^4.6.0",
|
|
88
89
|
"@x12i/rendrix": "^4.3.0",
|
|
89
90
|
"@x12i/search-adapter": "^1.5.1",
|