@exellix/ai-tasks 8.4.3 → 8.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/ai-tasks-model-profile-aliases-7x.md +27 -5
- package/CHANGELOG.md +16 -0
- package/README.md +5 -4
- package/RUNTASK_REQUEST.md +1 -1
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +56 -29
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/errors/runTaskExecutionError.d.ts +1 -1
- package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
- package/dist/errors/runTaskExecutionError.js +4 -1
- package/dist/errors/runTaskExecutionError.js.map +1 -1
- package/dist/errors/runTaskModelResolutionError.d.ts +39 -0
- package/dist/errors/runTaskModelResolutionError.d.ts.map +1 -0
- package/dist/errors/runTaskModelResolutionError.js +92 -0
- package/dist/errors/runTaskModelResolutionError.js.map +1 -0
- package/dist/execution-strategies/constants.d.ts +11 -4
- package/dist/execution-strategies/constants.d.ts.map +1 -1
- package/dist/execution-strategies/constants.js +11 -4
- package/dist/execution-strategies/constants.js.map +1 -1
- package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts +6 -3
- package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts.map +1 -1
- package/dist/execution-strategies/executionStrategyCatalogMetadata.js +36 -5
- package/dist/execution-strategies/executionStrategyCatalogMetadata.js.map +1 -1
- package/dist/execution-strategies/executionStrategyRequestPayload.d.ts +19 -0
- package/dist/execution-strategies/executionStrategyRequestPayload.d.ts.map +1 -0
- package/dist/execution-strategies/executionStrategyRequestPayload.js +21 -0
- package/dist/execution-strategies/executionStrategyRequestPayload.js.map +1 -0
- package/dist/execution-strategies/runExecutionStrategyViaXynthesis.d.ts +35 -0
- package/dist/execution-strategies/runExecutionStrategyViaXynthesis.d.ts.map +1 -0
- package/dist/execution-strategies/runExecutionStrategyViaXynthesis.js +129 -0
- package/dist/execution-strategies/runExecutionStrategyViaXynthesis.js.map +1 -0
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/resolveLlmCallForXynthesis.d.ts.map +1 -1
- package/dist/internal/resolveLlmCallForXynthesis.js +6 -0
- package/dist/internal/resolveLlmCallForXynthesis.js.map +1 -1
- package/dist/internal/runPostStepLlmCall.d.ts.map +1 -1
- package/dist/internal/runPostStepLlmCall.js +4 -1
- package/dist/internal/runPostStepLlmCall.js.map +1 -1
- package/dist/logxer/aiTasksDiagnosticCodes.d.ts +3 -0
- package/dist/logxer/aiTasksDiagnosticCodes.d.ts.map +1 -1
- package/dist/logxer/aiTasksDiagnosticCodes.js +3 -0
- package/dist/logxer/aiTasksDiagnosticCodes.js.map +1 -1
- package/dist/observability/classifyRunTaskFailure.d.ts +1 -1
- package/dist/observability/classifyRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/classifyRunTaskFailure.js +12 -0
- package/dist/observability/classifyRunTaskFailure.js.map +1 -1
- package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/logRunTaskFailure.js +26 -8
- package/dist/observability/logRunTaskFailure.js.map +1 -1
- package/dist/planWebScopeQuestions/index.d.ts +4 -8
- package/dist/planWebScopeQuestions/index.d.ts.map +1 -1
- package/dist/planWebScopeQuestions/index.js +114 -149
- package/dist/planWebScopeQuestions/index.js.map +1 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts +57 -0
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts.map +1 -0
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js +80 -0
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js.map +1 -0
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +21 -21
- package/dist/task-strategies/canonicalInputExecutionStrategies.js +12 -12
- package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -1
- package/dist/task-strategies/normalize.d.ts.map +1 -1
- package/dist/task-strategies/normalize.js +3 -0
- package/dist/task-strategies/normalize.js.map +1 -1
- package/dist/task-strategies/types.d.ts +4 -2
- package/dist/task-strategies/types.d.ts.map +1 -1
- package/dist/types/llmCall.d.ts +1 -1
- package/dist/types/llmCall.d.ts.map +1 -1
- package/dist/types/llmCall.js.map +1 -1
- package/dist/utils/concreteModelId.d.ts.map +1 -1
- package/dist/utils/concreteModelId.js +4 -1
- package/dist/utils/concreteModelId.js.map +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts +6 -1
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/resolveAiProfileModel.js +11 -2
- package/dist/utils/resolveAiProfileModel.js.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.d.ts.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.js +93 -30
- package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
- package/dist/validation/helpers.js +1 -1
- package/dist/validation/helpers.js.map +1 -1
- package/documenations/funcx-catalog-hosting-checklist.md +2 -2
- package/documenations/funcx-scoping-integration-gaps.md +8 -6
- package/documenations/upstream-feature-requests/README.md +10 -0
- package/documenations/upstream-feature-requests/funcx-generic-xynthesis-hosting.md +294 -0
- package/documenations/upstream-feature-requests/funcx-pre-post-sidekick-actions.md +301 -0
- package/documenations/upstream-feature-requests/xynthesis-execution-strategies-option-a.md +637 -0
- package/package.json +2 -10
|
@@ -41,18 +41,39 @@ Unknown profile keys fail at **`resolveAIProfile`** with a clear error.
|
|
|
41
41
|
|
|
42
42
|
## Resolution boundaries
|
|
43
43
|
|
|
44
|
-
| Path | Fields |
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
| ai-skills
|
|
44
|
+
| Path | Fields at ingress (before `resolveRunTaskModelReferences`) | Internal transform |
|
|
45
|
+
|------|----------------------------------------------------------|--------------------|
|
|
46
|
+
| **PRE / POST (xynthesis)** | `preActionModel`, `postActionModel`, step `llmCall.model` — **ai-profiles alias required** | `resolveModelReferenceForXynthesis` → `profile/choice` keys only |
|
|
47
|
+
| **MAIN (ai-skills)** | `skillModel`, root `llmCall.model` — alias **or** concrete provider id | `resolveModelReference` → concrete `provider/model` for gateway |
|
|
48
48
|
|
|
49
49
|
Concrete ids (`openrouter/...`, `anthropic/claude-...`, `openai/gpt-5`) pass through on **`skillModel`** only. PRE/POST must stay ai-profiles aliases under `@exellix/xynthesis` ≥ 4.3.1.
|
|
50
50
|
|
|
51
|
+
### Ingress rule for hosts (graph-engine, studio BFF)
|
|
52
|
+
|
|
53
|
+
> **Do not** pre-resolve `preActionModel` or `postActionModel` to OpenRouter/OpenAI model ids. Pass through profile keys, `profile/choice`, or shortcut keys (e.g. `cheap`, `cheap/default`).
|
|
54
|
+
|
|
55
|
+
> **`skillModel`** may still be a concrete provider id at ingress.
|
|
56
|
+
|
|
57
|
+
### Internal rule (ai-tasks)
|
|
58
|
+
|
|
59
|
+
> `resolveRunTaskModelReferences` is the **only** place that transforms aliases on xynthesis paths at `runTask` entry. If a concrete id is detected on a xynthesis slot, ai-tasks fails with stable code **`XYNTHESIS_CONCRETE_MODEL_REJECTED`** (typed `RunTaskModelResolutionError`, not a generic wrapper).
|
|
60
|
+
|
|
61
|
+
### Stable pre-MAIN error codes
|
|
62
|
+
|
|
63
|
+
| Condition | `error.code` |
|
|
64
|
+
|-----------|--------------|
|
|
65
|
+
| Concrete id on xynthesis slot | `XYNTHESIS_CONCRETE_MODEL_REJECTED` |
|
|
66
|
+
| Unknown / unresolvable alias | `XYNTHESIS_ALIAS_RESOLUTION_FAILED` |
|
|
67
|
+
| PRE synthesis enabled but required paths empty | `SYNTHESIS_INPUT_EMPTY` |
|
|
68
|
+
|
|
69
|
+
Failures emit logxer diagnostics with `failureClassification.role: "cause"` and event ids such as `xynthesis_concrete_model_rejected`. Hosts (graph-engine CR-7) should preserve `error.code` and `failureClassification` on attempt records instead of collapsing to `TASK_RUN_FAILED` / `classification: other`.
|
|
70
|
+
|
|
51
71
|
## graph-engine guidance
|
|
52
72
|
|
|
53
73
|
- Send the triplet on every node/task compile — no env defaults, no `"balanced"` fallback.
|
|
54
74
|
- Prefer explicit **`profile/choice`** keys in compiled payloads; bare profile keys are OK (ai-tasks normalizes before xynthesis).
|
|
55
|
-
-
|
|
75
|
+
- **Do not** pre-resolve `preActionModel` / `postActionModel` to concrete provider ids — pass aliases and let ai-tasks normalize at `runTask` entry (see ingress rule above).
|
|
76
|
+
- Optional: pre-resolve **`skillModel`** aliases for diagnostics; ai-tasks re-resolves at invoke (idempotent for concrete ids).
|
|
56
77
|
- Do **not** npm-override `@x12i/ai-profiles` or pin `<2.1`.
|
|
57
78
|
|
|
58
79
|
## Stack minimums
|
|
@@ -69,6 +90,7 @@ Concrete ids (`openrouter/...`, `anthropic/claude-...`, `openai/gpt-5`) pass thr
|
|
|
69
90
|
- `toStrictAiProfileResolveInput` — bare profile → `profile/default`
|
|
70
91
|
- `resolveModelReference` / `resolveModelReferenceForXynthesis`
|
|
71
92
|
- `isResolvableModelAlias` — true for known **`profile/choice`** keys only
|
|
93
|
+
- `RunTaskModelResolutionError`, `isRunTaskModelResolutionError` — stable pre-MAIN model slot failures
|
|
72
94
|
- `listAiTasksProfileChoices`, `listAiTasksProfiles`, `listAiTasksProfileChoiceKeys`
|
|
73
95
|
|
|
74
96
|
See [README — Model profile aliases](../README.md#model-profile-aliases-x12iai-profiles).
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to `@exellix/ai-tasks` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The published **npm version** always matches **`version`** in [`package.json`](package.json). If this file skips a semver, treat [`BREAKING-CHANGES.md`](BREAKING-CHANGES.md) and [`RUNTASK_REQUEST.md`](RUNTASK_REQUEST.md) as the source of truth for cross-version upgrades.
|
|
6
6
|
|
|
7
|
+
## [8.5.0] - 2026-06-03
|
|
8
|
+
|
|
9
|
+
### Changed (breaking)
|
|
10
|
+
|
|
11
|
+
- **Execution strategies:** planner/optimizer invoke **`@exellix/xynthesis` ≥ 4.4.0** (`execution-plan`, `execution-evaluate-result`) with `modelConfig.preActionModel` / `postActionModel`. Removed direct `@x12i/funcx` `run()` from ai-tasks.
|
|
12
|
+
- **`runPlanWebScopeQuestions`:** xynthesis `plan-web-scope-questions` only; removed `backend: "funcx"`.
|
|
13
|
+
- **Catalog:** `runtimeKind: "xynthesis-action"`, `defaultSidekickAction` on planner/optimizer rows.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `runPlannerViaXynthesis`, `runOptimizerViaXynthesis`, `setExecutionStrategyActionInvoker`, `setPlanWebScopeQuestionsActionInvoker`, `resolveSafeExecutionStrategyCatalogDefaultSidekickAction`.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- `setFuncxExecutionStrategyInvoker`, `setResearchPlanQuestionsFuncxInvoker`, direct `@x12i/funcx` dependency.
|
|
22
|
+
|
|
7
23
|
## [Unreleased]
|
|
8
24
|
|
|
9
25
|
### Changed (breaking)
|
package/README.md
CHANGED
|
@@ -1123,10 +1123,11 @@ Concrete ids (`openrouter/...`, `anthropic/claude-sonnet-4`, `openai/gpt-5`, …
|
|
|
1123
1123
|
|
|
1124
1124
|
**Client impact:**
|
|
1125
1125
|
|
|
1126
|
-
-
|
|
1127
|
-
-
|
|
1128
|
-
- **
|
|
1129
|
-
- **
|
|
1126
|
+
- **`skillModel` / MAIN `llmCall.model`:** concrete provider ids pass through unchanged (alias or concrete accepted).
|
|
1127
|
+
- **`preActionModel` / `postActionModel`:** must be ai-profiles aliases — **do not** send concrete OpenRouter/OpenAI ids (rejected with `XYNTHESIS_CONCRETE_MODEL_REJECTED`).
|
|
1128
|
+
- **New:** you may send ai-profiles aliases on `modelConfig`, `llmCall.model`, and pipeline step configs — graph-engine must not pre-resolve xynthesis slots to concrete ids.
|
|
1129
|
+
- **Validation:** alias tokens on `modelConfig` slots are accepted; unknown aliases fail at resolution with `XYNTHESIS_ALIAS_RESOLUTION_FAILED`.
|
|
1130
|
+
- **Helpers:** `resolveModelReference`, `resolveRunTaskModelReferences`, `isRunTaskModelResolutionError`, `isResolvableModelAlias` (true only for **`profile/choice`** keys — bare profile keys are resolved at invoke, not sync-listed).
|
|
1130
1131
|
|
|
1131
1132
|
Resolution uses the ai-profiles registry (`auto`: remote refresh with bundled fallback). See [`.docs/ai-tasks-model-profile-aliases-7x.md`](.docs/ai-tasks-model-profile-aliases-7x.md).
|
|
1132
1133
|
|
package/RUNTASK_REQUEST.md
CHANGED
|
@@ -95,7 +95,7 @@ Properties are classified for **default MAIN path** unless noted. Inherited **`R
|
|
|
95
95
|
| `inputs` | Optional plural task payload (`string` or object). Dual-root parity with `input`; smart-input **`inputs.*`** resolves here (not `executionMemory.inputs`). |
|
|
96
96
|
| `variables` | Job/graph template bucket; forwarded as-is on MAIN (see [Canonical input bucket](#canonical-input-bucket)). |
|
|
97
97
|
| `jobMemory`, `taskMemory` | Enriched and forwarded; see executor payload. |
|
|
98
|
-
| `modelConfig` | **Canonical slots:** `preActionModel` + `skillModel` + `postActionModel`. **Aliases accepted on wire** (ai-profiles names + legacy tiers); resolved inside `runTask()` via [`resolveRunTaskModelReferences`](src/utils/resolveRunTaskModelReferences.ts). **`skillModel`** → concrete id for ai-skills MAIN; **`preActionModel`** / **`postActionModel`** → **alias only** for xynthesis PRE/POST (concrete ids rejected under `@exellix/xynthesis` ≥4). Legacy `model` and **`xynthesisModel`** rejected. |
|
|
98
|
+
| `modelConfig` | **Canonical slots:** `preActionModel` + `skillModel` + `postActionModel`. **Aliases accepted on wire** (ai-profiles names + legacy tiers); resolved inside `runTask()` via [`resolveRunTaskModelReferences`](src/utils/resolveRunTaskModelReferences.ts). **`skillModel`** → concrete id for ai-skills MAIN; **`preActionModel`** / **`postActionModel`** → **alias only** for xynthesis PRE/POST (concrete ids rejected under `@exellix/xynthesis` ≥4 with code **`XYNTHESIS_CONCRETE_MODEL_REJECTED`**). Legacy `model` and **`xynthesisModel`** rejected. See [`.docs/ai-tasks-model-profile-aliases-7x.md`](.docs/ai-tasks-model-profile-aliases-7x.md). |
|
|
99
99
|
| `llmCall` | **MAIN override only** at root (`llmCall.model` wins over `skillModel` unless it duplicates `preActionModel` while `skillModel` differs — see collision guard). Not copied into PRE synthesis compile; use `preActionModel` or `executionPipeline[pre].config.llmCall` for PRE. Merged into ai-skills `modelConfig` at MAIN execution boundary. |
|
|
100
100
|
| `timeoutMs` | Forwarded when set (also overlaid from `llmCall.timeoutMs`). |
|
|
101
101
|
| `coreSkillId` | Maps to `skillId` on `RunSkillRequest` for gateway. |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-sdk.d.ts","sourceRoot":"","sources":["../../src/core/task-sdk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAazD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AA2BzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"task-sdk.d.ts","sourceRoot":"","sources":["../../src/core/task-sdk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAazD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AA2BzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA4OxD,KAAK,iBAAiB,GAAG,mBAAmB,CAAC;AA0S7C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,+FAA+F;IAC/F,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAAC;AAEF,qBAAa,gBAAgB;IAIzB,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,iBAAiB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;gBAGjC,YAAY,EAAE,iBAAiB,EACjC,QAAQ,EAAE;QACzB,OAAO,CAAC,OAAO,GAAG,GAAG,EACnB,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GACzC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;KACtC,EACD,OAAO,CAAC,EAAE,uBAAuB;IAQ7B,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAkmDtF;;OAEG;YACW,6BAA6B;IAshB3C;;;;;OAKG;YACW,cAAc;CAyR7B"}
|
package/dist/core/task-sdk.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { randomUUID } from "crypto";
|
|
3
3
|
import { resolveRunTaskRuntimeKnobs, } from "../internal/resolveRunTaskRuntimeKnobs.js";
|
|
4
4
|
import { applyOptimizerFeedbackToRequest, applyPlannerOutputToRequest } from "../execution-strategies/applyExecutionStrategyOutputs.js";
|
|
5
|
-
import { buildExecutionStrategyRequestPayload
|
|
6
|
-
import {
|
|
5
|
+
import { buildExecutionStrategyRequestPayload } from "../execution-strategies/executionStrategyRequestPayload.js";
|
|
6
|
+
import { runOptimizerViaXynthesis, runPlannerViaXynthesis, } from "../execution-strategies/runExecutionStrategyViaXynthesis.js";
|
|
7
|
+
import { resolveSafeExecutionStrategyCatalogDefaultSidekickAction } from "../execution-strategies/executionStrategyCatalogMetadata.js";
|
|
7
8
|
import { SYNTHESIZED_CONTEXT } from "../types/index.js";
|
|
8
9
|
import { runAuditPostStep } from "../post-steps/audit/runAudit.js";
|
|
9
10
|
import { buildRunTaskResultMetaFromModelId } from "../invocation/buildRunTaskResultMeta.js";
|
|
@@ -46,6 +47,7 @@ import { llmCallEnvPrefix, resolveLlmCall } from "../post-steps/resolvePostStepC
|
|
|
46
47
|
import { buildXynthesisWorkScopeIdentity } from "../internal/buildXynthesisWorkScopeIdentity.js";
|
|
47
48
|
import { getPostActionModelFromSlots, resolvePreActionModel } from "../utils/routeModelConfigSlots.js";
|
|
48
49
|
import { assertPhaseModelAlias } from "../errors/modelConfigRequiredError.js";
|
|
50
|
+
import { isRunTaskModelResolutionError } from "../errors/runTaskModelResolutionError.js";
|
|
49
51
|
import { resolveRunTaskModelReferences } from "../utils/resolveRunTaskModelReferences.js";
|
|
50
52
|
import { runPostStepLlmCall } from "../internal/runPostStepLlmCall.js";
|
|
51
53
|
registerBuiltInLocalTasks();
|
|
@@ -438,11 +440,6 @@ export class WorexClientTasks {
|
|
|
438
440
|
}
|
|
439
441
|
}
|
|
440
442
|
async runTask(input) {
|
|
441
|
-
const compiled = compileTaskConfigurationOnRunTaskRequest(input);
|
|
442
|
-
input = await resolveRunTaskModelReferences(compiled.request);
|
|
443
|
-
emitRunTaskRequestWarnings(input);
|
|
444
|
-
assertRequiredRunSkillCorrelation(input);
|
|
445
|
-
assertValidSmartInputConfig(input.smartInput, input.skillKey);
|
|
446
443
|
const traceCollector = input.executionMode === "trace" ? createDebugTraceCollector() : null;
|
|
447
444
|
const withTrace = (result) => {
|
|
448
445
|
if (!traceCollector)
|
|
@@ -453,16 +450,21 @@ export class WorexClientTasks {
|
|
|
453
450
|
};
|
|
454
451
|
};
|
|
455
452
|
return runAiTasksWithObservabilityContext({ logging: this.stackLogging }, async () => {
|
|
456
|
-
const failContext = () => ({
|
|
457
|
-
skillKey:
|
|
458
|
-
jobId:
|
|
459
|
-
taskId:
|
|
460
|
-
graphId:
|
|
461
|
-
nodeId:
|
|
462
|
-
agentId:
|
|
463
|
-
modelConfig:
|
|
453
|
+
const failContext = (req) => ({
|
|
454
|
+
skillKey: req.skillKey,
|
|
455
|
+
jobId: req.jobId,
|
|
456
|
+
taskId: req.taskId,
|
|
457
|
+
graphId: req.graphId,
|
|
458
|
+
nodeId: req.nodeId,
|
|
459
|
+
agentId: req.agentId,
|
|
460
|
+
modelConfig: req.modelConfig,
|
|
464
461
|
});
|
|
465
462
|
try {
|
|
463
|
+
const compiled = compileTaskConfigurationOnRunTaskRequest(input);
|
|
464
|
+
input = await resolveRunTaskModelReferences(compiled.request);
|
|
465
|
+
emitRunTaskRequestWarnings(input);
|
|
466
|
+
assertRequiredRunSkillCorrelation(input);
|
|
467
|
+
assertValidSmartInputConfig(input.smartInput, input.skillKey);
|
|
466
468
|
// `@exellix/ai-skills` requires stable ids on each gateway request; callers may omit for simple runs.
|
|
467
469
|
const taskId = input.taskId?.trim() ? input.taskId : randomUUID();
|
|
468
470
|
const jobId = input.jobId?.trim() ? input.jobId : randomUUID();
|
|
@@ -718,33 +720,45 @@ export class WorexClientTasks {
|
|
|
718
720
|
coreSkillId: working.coreSkillId,
|
|
719
721
|
includeContextInPrompt: working.includeContextInPrompt,
|
|
720
722
|
});
|
|
721
|
-
const
|
|
722
|
-
const plannerOut = await
|
|
723
|
+
const catalogDefaultSidekickAction = resolveSafeExecutionStrategyCatalogDefaultSidekickAction(req.executionStrategyCatalogItems, spec);
|
|
724
|
+
const plannerOut = await runPlannerViaXynthesis({
|
|
723
725
|
args: spec.args,
|
|
724
726
|
requestPayload: payload,
|
|
725
|
-
|
|
727
|
+
modelConfig: req.modelConfig,
|
|
728
|
+
jobId: working.jobId,
|
|
729
|
+
taskId: working.taskId,
|
|
730
|
+
agentId: working.agentId,
|
|
731
|
+
workScopeIdentity: buildXynthesisWorkScopeIdentity({
|
|
732
|
+
jobId: working.jobId,
|
|
733
|
+
taskId: working.taskId,
|
|
734
|
+
agentId: working.agentId,
|
|
735
|
+
graphId: working.graphId,
|
|
736
|
+
nodeId: working.nodeId,
|
|
737
|
+
prevNodeId: working.prevNodeId,
|
|
738
|
+
coreSkillId: working.coreSkillId,
|
|
739
|
+
}),
|
|
726
740
|
});
|
|
727
741
|
working = applyPlannerOutputToRequest(working, plannerOut, pi);
|
|
728
742
|
prefixSteps.push({
|
|
729
743
|
step: prefixSteps.length + 1,
|
|
730
744
|
id: `executionStrategy.planner.${pi}`,
|
|
731
745
|
ok: true,
|
|
732
|
-
summary: "
|
|
746
|
+
summary: "xynthesis planner (execution-plan)",
|
|
733
747
|
outputExcerpt: {
|
|
734
748
|
hasInstructions: typeof plannerOut.instructions === "string",
|
|
735
749
|
hasPrompt: typeof plannerOut.prompt === "string",
|
|
736
750
|
variableKeys: plannerOut.variables ? Object.keys(plannerOut.variables).slice(0, 20) : [],
|
|
737
|
-
|
|
738
|
-
? "
|
|
739
|
-
:
|
|
740
|
-
? "
|
|
741
|
-
: "
|
|
751
|
+
sidekickActionSource: catalogDefaultSidekickAction
|
|
752
|
+
? "catalog"
|
|
753
|
+
: spec.strategyKey === "planner"
|
|
754
|
+
? "execution-plan"
|
|
755
|
+
: "execution-evaluate-result",
|
|
742
756
|
},
|
|
743
757
|
});
|
|
744
758
|
if (traceCollector) {
|
|
745
759
|
traceCollector.push({
|
|
746
760
|
taskType: "pre-execution",
|
|
747
|
-
details: "execution strategy planner (
|
|
761
|
+
details: "execution strategy planner (xynthesis)",
|
|
748
762
|
metadata: {
|
|
749
763
|
...baseTraceMeta(),
|
|
750
764
|
phase: "execution_strategy_planner",
|
|
@@ -776,9 +790,21 @@ export class WorexClientTasks {
|
|
|
776
790
|
skillKey: last.skillKey,
|
|
777
791
|
metadata: last.metadata ? summarizeForOuter(last.metadata, 6_000) : undefined,
|
|
778
792
|
};
|
|
779
|
-
const evalOut = await
|
|
793
|
+
const evalOut = await runOptimizerViaXynthesis({
|
|
780
794
|
args: primary.args,
|
|
781
|
-
|
|
795
|
+
modelConfig: req.modelConfig,
|
|
796
|
+
jobId: working.jobId,
|
|
797
|
+
taskId: working.taskId,
|
|
798
|
+
agentId: working.agentId,
|
|
799
|
+
workScopeIdentity: buildXynthesisWorkScopeIdentity({
|
|
800
|
+
jobId: working.jobId,
|
|
801
|
+
taskId: working.taskId,
|
|
802
|
+
agentId: working.agentId,
|
|
803
|
+
graphId: working.graphId,
|
|
804
|
+
nodeId: working.nodeId,
|
|
805
|
+
prevNodeId: working.prevNodeId,
|
|
806
|
+
coreSkillId: working.coreSkillId,
|
|
807
|
+
}),
|
|
782
808
|
requestPayload: buildExecutionStrategyRequestPayload({
|
|
783
809
|
skillKey: working.skillKey,
|
|
784
810
|
input: working.input,
|
|
@@ -802,7 +828,7 @@ export class WorexClientTasks {
|
|
|
802
828
|
if (traceCollector) {
|
|
803
829
|
traceCollector.push({
|
|
804
830
|
taskType: "ai-task",
|
|
805
|
-
details: "execution strategy optimizer (
|
|
831
|
+
details: "execution strategy optimizer (xynthesis)",
|
|
806
832
|
metadata: {
|
|
807
833
|
...baseTraceMeta(),
|
|
808
834
|
phase: "execution_strategy_optimizer",
|
|
@@ -1776,7 +1802,8 @@ export class WorexClientTasks {
|
|
|
1776
1802
|
catch (error) {
|
|
1777
1803
|
throw logAndEnrichRunTaskFailure({
|
|
1778
1804
|
cause: error,
|
|
1779
|
-
...
|
|
1805
|
+
...(isRunTaskModelResolutionError(error) ? { phase: "model-resolution" } : {}),
|
|
1806
|
+
...failContext(input),
|
|
1780
1807
|
});
|
|
1781
1808
|
}
|
|
1782
1809
|
});
|