@exellix/ai-tasks 8.4.2 → 8.5.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/.docs/DOWNSTREAM_ENV.md +42 -0
- package/.docs/FEEDBACK_TO_CLIENT_DOWNSTREAM_FIXES.md +64 -0
- package/.docs/INTERMEDIATE_STEPS.md +82 -0
- package/.docs/activity-structure.md +31 -0
- package/.docs/ai-task-ai-scoping-spec.md +338 -0
- package/.docs/ai-tasks-model-profile-aliases-7x.md +74 -0
- package/.docs/blockers-and-issues.md +346 -0
- package/.docs/building-runTask-sdk.md +659 -0
- package/.docs/building-skill-execution-orchestrator.md +968 -0
- package/.docs/code-used-before/run-task.txt +39 -0
- package/.docs/code-used-before/task-executor.ts.old +57 -0
- package/.docs/code-used-before/test-run-task.ts.old +42 -0
- package/.docs/code-used-before/types.txt +23 -0
- package/.docs/env-ready-policy.md +40 -0
- package/.docs/flow-io/flow-README.md +76 -0
- package/.docs/flow-io/narrix.md +124 -0
- package/.docs/flow-io/web-scoping.md +135 -0
- package/.docs/flow-io/xynthesis-post.md +154 -0
- package/.docs/flow-io/xynthesis-pre.md +181 -0
- package/.docs/gap-analysis.md +201 -0
- package/.docs/integration-facts-ai-tasks.md +109 -0
- package/.docs/investigation/ai-skills.md +170 -0
- package/.docs/investigation/external-packages-assignments.md +66 -0
- package/.docs/investigation/integration-summary.md +20 -0
- package/.docs/investigation/narrix-catalox.md +29 -0
- package/.docs/investigation/workplan-close-graph-engine-gaps.md +101 -0
- package/.docs/logging-stack.md +30 -0
- package/.docs/memory-narrix-adapter-developer-guide.md +402 -0
- package/.docs/memory-narrix-adapter-requirements.md +112 -0
- package/.docs/narrix-context-consumption-gap.md +184 -0
- package/.docs/narrix-context-downstream-report.md +30 -0
- package/.docs/narrix-ingest-and-packs-library-spec.md +240 -0
- package/.docs/narrix-record-input-current-design.md +48 -0
- package/.docs/pacakge.md +48 -0
- package/.docs/possible-components/README.md +11 -0
- package/.docs/possible-components/integration/README.md +10 -0
- package/.docs/possible-components/integration/gaps-when-merging.md +16 -0
- package/.docs/possible-components/integration/platform.md +54 -0
- package/.docs/possible-components/integration/reintegrate-into-ai-tasks.md +26 -0
- package/.docs/possible-components/integration/roadmap-and-checklists.md +54 -0
- package/.docs/possible-components/post-component/README.md +18 -0
- package/.docs/possible-components/post-component/builder-guide.md +175 -0
- package/.docs/possible-components/post-component/gaps-and-artifacts.md +52 -0
- package/.docs/possible-components/post-component/handler-audit.md +47 -0
- package/.docs/possible-components/post-component/handler-polish.md +41 -0
- package/.docs/possible-components/post-component/unified-protocol.md +59 -0
- package/.docs/possible-components/pre-component/README.md +22 -0
- package/.docs/possible-components/pre-component/builder-guide.md +127 -0
- package/.docs/possible-components/pre-component/gaps-and-artifacts.md +35 -0
- package/.docs/possible-components/pre-component/handler-ai-scoping.md +45 -0
- package/.docs/possible-components/pre-component/handler-narrix-preprocessor.md +49 -0
- package/.docs/possible-components/pre-component/handler-narrix-system2.md +35 -0
- package/.docs/possible-components/pre-component/handler-synthesized-context.md +65 -0
- package/.docs/possible-components/pre-component/handler-web-scope.md +29 -0
- package/.docs/possible-components/pre-component/unified-protocol.md +89 -0
- package/.docs/prefer-openrouter-routing-policy.md +132 -0
- package/.docs/questions-for-ai-skills.md +123 -0
- package/.docs/realtime-narrixing-gap-analysis.md +40 -0
- package/.docs/realtime-narrixing.md +433 -0
- package/.docs/run-context-object.md +32 -0
- package/.docs/session-id-usage.md +26 -0
- package/.docs/skill-library-spec.md +249 -0
- package/.docs/synthesized-context-strategy-spec.md +906 -0
- package/.docs/upstream-issue/2026-03-21_woroces-ai-tasks_ISSUE-006_web-scope-question-from-cni-entity.md +46 -0
- package/.docs/web-scopper-embed.md +93 -0
- package/.docs/xynthesis-wiring-and-io.md +12 -0
- package/CHANGELOG.md +16 -0
- package/README.md +15 -13
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +40 -15
- package/dist/core/task-sdk.js.map +1 -1
- 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 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- 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 +8 -3
- package/dist/internal/runPostStepLlmCall.js.map +1 -1
- package/dist/invocation/resolveProfileInvocationRouting.js +2 -2
- package/dist/invocation/resolveProfileInvocationRouting.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 +109 -149
- package/dist/planWebScopeQuestions/index.js.map +1 -1
- 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/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/aiProfileModelFormat.d.ts +2 -2
- package/dist/utils/aiProfileModelFormat.js +2 -2
- package/dist/utils/aiProfilesCatalog.d.ts +16 -0
- package/dist/utils/aiProfilesCatalog.d.ts.map +1 -0
- package/dist/utils/aiProfilesCatalog.js +23 -0
- package/dist/utils/aiProfilesCatalog.js.map +1 -0
- package/dist/utils/resolveAiProfileModel.d.ts +2 -2
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/resolveAiProfileModel.js +5 -5
- package/dist/utils/resolveAiProfileModel.js.map +1 -1
- package/dist/utils/routeModelConfigSlots.d.ts +3 -1
- package/dist/utils/routeModelConfigSlots.d.ts.map +1 -1
- package/dist/utils/routeModelConfigSlots.js +2 -1
- package/dist/utils/routeModelConfigSlots.js.map +1 -1
- package/documenations/upstream-feature-requests/README.md +3 -2
- package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +5 -2
- package/documenations/upstream-feature-requests/xynthesis-execution-strategies-option-a.md +637 -0
- package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +2 -2
- package/package.json +3 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ISSUE-006 — Render web-scope search question from Narrix entity / CNI (CVE, vendor, label)
|
|
2
|
+
|
|
3
|
+
**Status:** Implemented in `@woroces/ai-tasks` (`src/narrix/buildWebScopeScopeInput.ts`, `narrix.*` config fields). See `documenations/web-scoping-in-ai-tasks.md` §3.2.1.
|
|
4
|
+
|
|
5
|
+
**Issue:** ISSUE-006
|
|
6
|
+
**Package to fix:** `@woroces/ai-tasks`
|
|
7
|
+
**Date:** 2026-03-21
|
|
8
|
+
**Type:** Feature request
|
|
9
|
+
**Related index:** [`2026-03-21_worox-graphs_ISSUE-000_gap-analysis-index.md`](./2026-03-21_worox-graphs_ISSUE-000_gap-analysis-index.md)
|
|
10
|
+
**Complements:** [`2026-03-21_worox-graphs_ISSUE-008_enrich-web-scope-question-from-execution-input.md`](./2026-03-21_worox-graphs_ISSUE-008_enrich-web-scope-question-from-execution-input.md) (same problem, fix in executor)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Problem
|
|
15
|
+
|
|
16
|
+
Web scoping uses a **generic** `inputs.question` (e.g. “What is the exploitability of this vulnerability?”) without embedding CVE id, vendor, or product from the current entity. Search queries stay broad; evidence is less targeted than it could be.
|
|
17
|
+
|
|
18
|
+
`@woroces/ai-tasks` (or NARRIX pre-processing inside it) often has access to **CNI / entity facts** after Narrix runs — ideal place to render `baseQuestion + entityArgs` before calling the scoper.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Desired behavior
|
|
23
|
+
|
|
24
|
+
1. Keep `questionId` / pack routing as today.
|
|
25
|
+
2. Before `scopeGeneric` / internal web scope, compute `webScopeQuestion = render(template, { cve, vendor, label, ... })`.
|
|
26
|
+
3. Pass that string into the scoper as the `question` argument.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Options (from prior design discussion)
|
|
31
|
+
|
|
32
|
+
- **Downstream-heavy:** `ai-tasks` renders from `narrixResult.entity` / CNI (this issue).
|
|
33
|
+
- **Executor-heavy:** `worox-graphs` enriches before scope (ISSUE-008). Both can coexist; prefer one owner to avoid double logic.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Acceptance criteria
|
|
38
|
+
|
|
39
|
+
1. For vuln-group–style jobs, logged or asserted `queriesUsed` contains vulnerability-specific tokens (e.g. CVE id) when entity provides them.
|
|
40
|
+
2. No regression when entity facts are missing (fallback to base question).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Longer design notes
|
|
45
|
+
|
|
46
|
+
See also `.docs/web-scoping/feature-request-narrix-web-scope-question-templating.md` (narrative duplicate; **this ISSUE file is the canonical tracker name** for `@woroces/ai-tasks`).
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Feature Request: NARRIX Web Scoper (question-driven web context)
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This feature request proposes adding support in `@woroces/ai-tasks` for **question-driven web context** when the NARRIX pre-processor runs. When a task request includes `narrix` and a question (or questionId), ai-tasks should optionally call **@narrices/narrix-web-scoper** to plan and fetch web context (via @narrices/search-adapter), merge it with narrative from memory, and pass the combined context to the task so that answers can use both data-scoped narrative and web search as needed.
|
|
6
|
+
|
|
7
|
+
**Depends on (or extends):** [ai-tasks-narrix-pre-processor-feature-request.md](ai-tasks-narrix-pre-processor-feature-request.md) — the NARRIX pre-processor must have built or received CNI before web-scoper can run.
|
|
8
|
+
|
|
9
|
+
## Background
|
|
10
|
+
|
|
11
|
+
- **Question-driven flow:** Graph nodes often carry a question (`inputs.question`) and/or `metadata.narrix.questionId`. Some questions are best answered from **narrative already in memory** (e.g. from NARRIX scoping/discovery on the record); others benefit from **web search** (e.g. public threat intel, vendor docs). The desired behavior is to support both in one flow: narrative on memory + search on the web as needed.
|
|
12
|
+
- **narrix-web-scoper:** The package `@narrices/narrix-web-scoper` is a CNI-aware web context planner and mapper. It uses `@narrices/narrix-cni` and `@narrices/search-adapter` to plan what to search for from the CNI (and optional question) and map retrieval results into a structured web context. It is designed to run where CNI is already available.
|
|
13
|
+
- **Where CNI lives:** In the intended architecture, when ai-tasks runs the NARRIX pre-processor (resolve input → CNI conversion → engine-enrich → inject context → run task), CNI exists internally after the CNI conversion step. That is the right place to optionally run web-scoper before or in tandem with engine-enrich, so the task receives both NARRIX narrative and web-derived context.
|
|
14
|
+
|
|
15
|
+
## Problem
|
|
16
|
+
|
|
17
|
+
- There is no way for the NARRIX pre-processor to extend scoped data with web search.
|
|
18
|
+
- Tasks that could benefit from both narrative (memory) and web context currently get only one or the other, or require a separate graph node for web search (which we want to avoid).
|
|
19
|
+
|
|
20
|
+
## Proposed contract
|
|
21
|
+
|
|
22
|
+
### 1. Opt-in on request
|
|
23
|
+
|
|
24
|
+
When `request.narrix` is present, support an optional flag to enable web context (so existing behavior is unchanged):
|
|
25
|
+
|
|
26
|
+
- **Option A (recommended):** Extend the `narrix` object with `enableWebScope?: boolean`. If `true`, the pre-processor runs web-scoper when it has CNI and question/questionId.
|
|
27
|
+
- **Option B:** A separate request-level field, e.g. `narrixWebScope?: boolean` or `request.options?.enableNarrixWebScope`. Document that it is only honored when `request.narrix` is set.
|
|
28
|
+
|
|
29
|
+
worox-graphs (or other callers) would set this from e.g. `node.metadata.narrix.enableWebScope` or a graph-level variable.
|
|
30
|
+
|
|
31
|
+
### 2. When to run web-scoper
|
|
32
|
+
|
|
33
|
+
- **Precondition:** NARRIX pre-processor has already built or obtained CNI (after “CNI conversion” in the pre-processor flow).
|
|
34
|
+
- **Precondition:** A question is available for the current task: either `request.narrix.questionId` or `request.inputs?.question` / `request.input?.question` (or the same from executionMemory/jobContext if that is where the pre-processor reads question from).
|
|
35
|
+
- **Precondition:** Web scope is enabled (e.g. `request.narrix.enableWebScope === true`).
|
|
36
|
+
- **Action:** Call `@narrices/narrix-web-scoper` with (CNI, datasetId, optional questionId/question, and any options the package exposes). Obtain the planned/mapped web context (exact API to be taken from the package’s public API).
|
|
37
|
+
|
|
38
|
+
### 3. Where to inject web context
|
|
39
|
+
|
|
40
|
+
Merge the web-scoper output into the context that the task receives, in a well-defined place, for example:
|
|
41
|
+
|
|
42
|
+
- **Option A:** Merge into the same structure used for NARRIX enrichment (e.g. `executionMemory.narrixEnriched.webContext` or `jobContext._narrix.webContext`), so the task sees one enriched object that includes both narrative and web context.
|
|
43
|
+
- **Option B:** A dedicated path such as `executionMemory.webContext` or `jobContext.webContext` that the task and templates can reference.
|
|
44
|
+
|
|
45
|
+
Document the chosen path so that worox-graphs and skill templates can rely on it.
|
|
46
|
+
|
|
47
|
+
### 4. Dependencies
|
|
48
|
+
|
|
49
|
+
- ai-tasks (or the module that implements the NARRIX pre-processor) should add:
|
|
50
|
+
- `@narrices/narrix-web-scoper` (and its peer/transitive dependencies, e.g. `@narrices/narrix-cni`, `@narrices/search-adapter` as required by the package).
|
|
51
|
+
|
|
52
|
+
No change required in worox-graphs for this feature beyond optionally setting `enableWebScope` when building the request (once ai-tasks supports it).
|
|
53
|
+
|
|
54
|
+
### 5. Failure and fallback
|
|
55
|
+
|
|
56
|
+
- If web-scoper fails (e.g. search-adapter timeout, API error), the pre-processor should either:
|
|
57
|
+
- **Strict:** Fail the task with a clear error, or
|
|
58
|
+
- **Lenient (recommended default):** Log the error, omit web context for this run, and continue with only NARRIX narrative. Document the behavior.
|
|
59
|
+
|
|
60
|
+
### 6. Question availability
|
|
61
|
+
|
|
62
|
+
The pre-processor already has access to:
|
|
63
|
+
|
|
64
|
+
- `request.narrix` (datasetId, questionId, etc.)
|
|
65
|
+
- `request.input` / `request.inputs` (e.g. question text)
|
|
66
|
+
- Possibly `executionMemory` / `jobContext` (if question is passed from the graph there)
|
|
67
|
+
|
|
68
|
+
Use the same resolution order as for other NARRIX inputs so that questionId and/or question text are available when invoking web-scoper.
|
|
69
|
+
|
|
70
|
+
## Expected behavior summary
|
|
71
|
+
|
|
72
|
+
| Scenario | Behavior |
|
|
73
|
+
|----------|----------|
|
|
74
|
+
| `request.narrix` absent | No change; no NARRIX pre-processing. |
|
|
75
|
+
| `request.narrix` present, `enableWebScope` absent or false | Pre-processor runs as today (CNI → engine-enrich → inject narrative). No web-scoper call. |
|
|
76
|
+
| `request.narrix` present, `enableWebScope` true, question/questionId available, CNI built | Run web-scoper with CNI + question; merge web context into the injected context; then run engine-enrich (if applicable) and task with combined narrative + web context. |
|
|
77
|
+
| Web-scoper fails (lenient) | Log error; inject only NARRIX narrative; task runs without web context. |
|
|
78
|
+
|
|
79
|
+
## Implementation notes (for ai-tasks)
|
|
80
|
+
|
|
81
|
+
- **Placement:** In the NARRIX pre-processor path, after CNI is built and before (or in parallel with) engine-enrich. If engine-enrich consumes `sourceMeta` or similar, extend it with the web context so the runner can use it if needed.
|
|
82
|
+
- **API:** Consult `@narrices/narrix-web-scoper`’s public API (e.g. a `planAndMap(cni, options)` or similar) and wire it with datasetId, questionId/question, and any required adapter config (e.g. search-adapter API keys from env).
|
|
83
|
+
- **Tests:** Add unit/integration tests that mock the search-adapter and assert that when `enableWebScope` is true and question is present, web context is merged into the context passed to the task (and that when web-scoper fails, the chosen fallback behavior is applied).
|
|
84
|
+
|
|
85
|
+
## worox-graphs changes (when feature exists)
|
|
86
|
+
|
|
87
|
+
- Optional: Extend graph node schema to allow `metadata.narrix.enableWebScope` (or read from variables) and pass it through to `RunTaskRequest.narrix.enableWebScope` so authors can enable question-driven web scope per node or per graph without code changes.
|
|
88
|
+
|
|
89
|
+
## References
|
|
90
|
+
|
|
91
|
+
- [ai-tasks-narrix-pre-processor-feature-request.md](ai-tasks-narrix-pre-processor-feature-request.md) — NARRIX as task-level pre-processor (input contract, CNI, engine-enrich, inject context).
|
|
92
|
+
- `@narrices/narrix-web-scoper` — CNI-aware web context planner; uses `@narrices/search-adapter` for retrieval.
|
|
93
|
+
- [question-questionId-first-class-experience.md](question-questionId-first-class-experience.md) — Question and questionId as first-class in worox-graphs (resolution, request build).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Moved
|
|
2
|
+
|
|
3
|
+
This document was split into focused pages. Start here:
|
|
4
|
+
|
|
5
|
+
**[flow-io/flow-README.md](./flow-io/flow-README.md)** — high-level blocks
|
|
6
|
+
|
|
7
|
+
| Topic | Doc |
|
|
8
|
+
|-------|-----|
|
|
9
|
+
| PRE — calling `@exellix/xynthesis` | [flow-io/xynthesis-pre.md](./flow-io/xynthesis-pre.md) |
|
|
10
|
+
| POST — calling `@exellix/xynthesis` | [flow-io/xynthesis-post.md](./flow-io/xynthesis-post.md) |
|
|
11
|
+
| NARRIX | [flow-io/narrix.md](./flow-io/narrix.md) |
|
|
12
|
+
| Web scoping | [flow-io/web-scoping.md](./flow-io/web-scoping.md) |
|
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
|
@@ -10,11 +10,11 @@ Private Git/npm package for executing **tasks** using the Woreces execution stac
|
|
|
10
10
|
|
|
11
11
|
| Package | Role in `runTask` | Minimum |
|
|
12
12
|
|---------|-------------------|---------|
|
|
13
|
-
| `@x12i/ai-profiles` | Profile/
|
|
14
|
-
| `@exellix/xynthesis` | PRE synthesis, POST audit/polish, scoping, utilities (`executeXynthesisAction`) | **≥ 4.3.1**
|
|
13
|
+
| `@x12i/ai-profiles` | Profile/choice → wire model (`catalogLane` required on resolve) | **2.1.0** |
|
|
14
|
+
| `@exellix/xynthesis` | PRE synthesis, POST audit/polish, scoping, utilities (`executeXynthesisAction`) | **≥ 4.3.1** |
|
|
15
15
|
| `@exellix/ai-skills` | MAIN `runSkill` (Optimixer caps, `ModelConfig.reasoningEffort`) | **6.0.0** |
|
|
16
16
|
|
|
17
|
-
Use explicit **ai-profiles** profile keys (`cheap`, `pro`,
|
|
17
|
+
Use explicit **ai-profiles** **`profile/choice`** keys (`cheap/default`, `pro/default`, …) or bare profile keys (`cheap`, `pro`) expanded at invoke — not legacy tier aliases or removed sync helpers.
|
|
18
18
|
|
|
19
19
|
**FuncX catalog / hosting:** Those function ids must exist in your FuncX content resolver for live **`run()`** calls — see [`documenations/funcx-catalog-hosting-checklist.md`](documenations/funcx-catalog-hosting-checklist.md).
|
|
20
20
|
|
|
@@ -1093,9 +1093,11 @@ Orchestrators send **model** + **sampling** + **`reasoningEffort`** + (for xynth
|
|
|
1093
1093
|
|
|
1094
1094
|
**Accepted alias shapes** (`@x12i/ai-profiles` v2.1+):
|
|
1095
1095
|
|
|
1096
|
-
- **Profile keys:** `cheap`, `
|
|
1097
|
-
- **
|
|
1098
|
-
- **Explicit
|
|
1096
|
+
- **Profile/choice keys:** `cheap/default`, `pro/default`, `cyber/default`, …
|
|
1097
|
+
- **Bare profile + implicit default choice:** `cheap`, `pro`, `cyber` (expanded to `profile/default` at invoke)
|
|
1098
|
+
- **Explicit `@` form:** `cheap@default`, `pro@fast`, …
|
|
1099
|
+
|
|
1100
|
+
**List available keys:** `listAiTasksProfileChoices()` / `listAiTasksProfileChoiceKeys()` (re-exported from `@x12i/ai-profiles` via `@exellix/ai-tasks`). Same registry as xynthesis (`listAIProfiles` / `listAIProfileChoices` on `@exellix/xynthesis`).
|
|
1099
1101
|
|
|
1100
1102
|
**Not accepted:** legacy graph tiers (`weak`, `strong`), deprecated `xynthesisModel`, or sync-only alias guessing removed in ai-profiles 2.1. Unknown keys fail at **`resolveAIProfile`** with a clear error.
|
|
1101
1103
|
|
|
@@ -1112,7 +1114,7 @@ await runTask({
|
|
|
1112
1114
|
modelConfig: {
|
|
1113
1115
|
preActionModel: "cheap", // PRE synthesis
|
|
1114
1116
|
postActionModel: "cheap", // POST audit/polish
|
|
1115
|
-
skillModel: "
|
|
1117
|
+
skillModel: "pro/default", // MAIN skill
|
|
1116
1118
|
},
|
|
1117
1119
|
});
|
|
1118
1120
|
```
|
|
@@ -1124,7 +1126,7 @@ Concrete ids (`openrouter/...`, `anthropic/claude-sonnet-4`, `openai/gpt-5`, …
|
|
|
1124
1126
|
- **No change** if you already send concrete provider model ids.
|
|
1125
1127
|
- **New:** you may send ai-profiles aliases on `modelConfig`, `llmCall.model`, and pipeline step configs — graph-engine no longer has to pre-resolve every alias before `runTask` (hosts that already resolve can keep doing so; double resolution is a no-op for concrete ids).
|
|
1126
1128
|
- **Validation:** alias tokens on `modelConfig` slots are accepted; unknown aliases fail at resolution with a clear error.
|
|
1127
|
-
- **Helpers:** `resolveModelReference`, `resolveRunTaskModelReferences`, `isResolvableModelAlias` (true only for **`profile/choice`** keys
|
|
1129
|
+
- **Helpers:** `resolveModelReference`, `resolveRunTaskModelReferences`, `isResolvableModelAlias` (true only for **`profile/choice`** keys — bare profile keys are resolved at invoke, not sync-listed).
|
|
1128
1130
|
|
|
1129
1131
|
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).
|
|
1130
1132
|
|
|
@@ -1278,9 +1280,9 @@ const result = await runTask({
|
|
|
1278
1280
|
taskTypeId: "security-task",
|
|
1279
1281
|
executionStrategies: [],
|
|
1280
1282
|
modelConfig: {
|
|
1281
|
-
preActionModel: "cheap",
|
|
1282
|
-
postActionModel: "cheap",
|
|
1283
|
-
skillModel: "
|
|
1283
|
+
preActionModel: "cheap/default",
|
|
1284
|
+
postActionModel: "cheap/default",
|
|
1285
|
+
skillModel: "pro/default",
|
|
1284
1286
|
},
|
|
1285
1287
|
input: { assetId: "a-123" },
|
|
1286
1288
|
executionMode: "trace",
|
|
@@ -2279,8 +2281,8 @@ const result = await tasks.runTask({
|
|
|
2279
2281
|
input: { assetId: "a-123" },
|
|
2280
2282
|
variables: { orgName: "MyOrganization" },
|
|
2281
2283
|
modelConfig: {
|
|
2282
|
-
preActionModel: "
|
|
2283
|
-
postActionModel: "
|
|
2284
|
+
preActionModel: "cheap/default",
|
|
2285
|
+
postActionModel: "cheap/default",
|
|
2284
2286
|
skillModel: "openai/gpt-5",
|
|
2285
2287
|
temperature: 0.7
|
|
2286
2288
|
}
|
|
@@ -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;AA2OxD,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;
|
|
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;AA2OxD,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";
|
|
@@ -718,33 +719,45 @@ export class WorexClientTasks {
|
|
|
718
719
|
coreSkillId: working.coreSkillId,
|
|
719
720
|
includeContextInPrompt: working.includeContextInPrompt,
|
|
720
721
|
});
|
|
721
|
-
const
|
|
722
|
-
const plannerOut = await
|
|
722
|
+
const catalogDefaultSidekickAction = resolveSafeExecutionStrategyCatalogDefaultSidekickAction(req.executionStrategyCatalogItems, spec);
|
|
723
|
+
const plannerOut = await runPlannerViaXynthesis({
|
|
723
724
|
args: spec.args,
|
|
724
725
|
requestPayload: payload,
|
|
725
|
-
|
|
726
|
+
modelConfig: req.modelConfig,
|
|
727
|
+
jobId: working.jobId,
|
|
728
|
+
taskId: working.taskId,
|
|
729
|
+
agentId: working.agentId,
|
|
730
|
+
workScopeIdentity: buildXynthesisWorkScopeIdentity({
|
|
731
|
+
jobId: working.jobId,
|
|
732
|
+
taskId: working.taskId,
|
|
733
|
+
agentId: working.agentId,
|
|
734
|
+
graphId: working.graphId,
|
|
735
|
+
nodeId: working.nodeId,
|
|
736
|
+
prevNodeId: working.prevNodeId,
|
|
737
|
+
coreSkillId: working.coreSkillId,
|
|
738
|
+
}),
|
|
726
739
|
});
|
|
727
740
|
working = applyPlannerOutputToRequest(working, plannerOut, pi);
|
|
728
741
|
prefixSteps.push({
|
|
729
742
|
step: prefixSteps.length + 1,
|
|
730
743
|
id: `executionStrategy.planner.${pi}`,
|
|
731
744
|
ok: true,
|
|
732
|
-
summary: "
|
|
745
|
+
summary: "xynthesis planner (execution-plan)",
|
|
733
746
|
outputExcerpt: {
|
|
734
747
|
hasInstructions: typeof plannerOut.instructions === "string",
|
|
735
748
|
hasPrompt: typeof plannerOut.prompt === "string",
|
|
736
749
|
variableKeys: plannerOut.variables ? Object.keys(plannerOut.variables).slice(0, 20) : [],
|
|
737
|
-
|
|
738
|
-
? "
|
|
739
|
-
:
|
|
740
|
-
? "
|
|
741
|
-
: "
|
|
750
|
+
sidekickActionSource: catalogDefaultSidekickAction
|
|
751
|
+
? "catalog"
|
|
752
|
+
: spec.strategyKey === "planner"
|
|
753
|
+
? "execution-plan"
|
|
754
|
+
: "execution-evaluate-result",
|
|
742
755
|
},
|
|
743
756
|
});
|
|
744
757
|
if (traceCollector) {
|
|
745
758
|
traceCollector.push({
|
|
746
759
|
taskType: "pre-execution",
|
|
747
|
-
details: "execution strategy planner (
|
|
760
|
+
details: "execution strategy planner (xynthesis)",
|
|
748
761
|
metadata: {
|
|
749
762
|
...baseTraceMeta(),
|
|
750
763
|
phase: "execution_strategy_planner",
|
|
@@ -776,9 +789,21 @@ export class WorexClientTasks {
|
|
|
776
789
|
skillKey: last.skillKey,
|
|
777
790
|
metadata: last.metadata ? summarizeForOuter(last.metadata, 6_000) : undefined,
|
|
778
791
|
};
|
|
779
|
-
const evalOut = await
|
|
792
|
+
const evalOut = await runOptimizerViaXynthesis({
|
|
780
793
|
args: primary.args,
|
|
781
|
-
|
|
794
|
+
modelConfig: req.modelConfig,
|
|
795
|
+
jobId: working.jobId,
|
|
796
|
+
taskId: working.taskId,
|
|
797
|
+
agentId: working.agentId,
|
|
798
|
+
workScopeIdentity: buildXynthesisWorkScopeIdentity({
|
|
799
|
+
jobId: working.jobId,
|
|
800
|
+
taskId: working.taskId,
|
|
801
|
+
agentId: working.agentId,
|
|
802
|
+
graphId: working.graphId,
|
|
803
|
+
nodeId: working.nodeId,
|
|
804
|
+
prevNodeId: working.prevNodeId,
|
|
805
|
+
coreSkillId: working.coreSkillId,
|
|
806
|
+
}),
|
|
782
807
|
requestPayload: buildExecutionStrategyRequestPayload({
|
|
783
808
|
skillKey: working.skillKey,
|
|
784
809
|
input: working.input,
|
|
@@ -802,7 +827,7 @@ export class WorexClientTasks {
|
|
|
802
827
|
if (traceCollector) {
|
|
803
828
|
traceCollector.push({
|
|
804
829
|
taskType: "ai-task",
|
|
805
|
-
details: "execution strategy optimizer (
|
|
830
|
+
details: "execution strategy optimizer (xynthesis)",
|
|
806
831
|
metadata: {
|
|
807
832
|
...baseTraceMeta(),
|
|
808
833
|
phase: "execution_strategy_optimizer",
|