@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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AI-driven planning of explicit web-scope questions (Studio → `narrix.webScopeQuestions`).
|
|
3
|
-
*
|
|
3
|
+
* Default path: xynthesis `plan-web-scope-questions` (≥ `@exellix/xynthesis` 4.4.0).
|
|
4
4
|
*/
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { runPlanWebScopeQuestionsAction, setPlanWebScopeQuestionsActionInvoker, resolveOutputExpectation, } from "@exellix/xynthesis";
|
|
7
|
+
import { buildResearchPlanQuestionsPayload } from "../execution-strategies/genericExecutionFuncxEnvelope.js";
|
|
8
|
+
import { resolveModelReferenceForXynthesis } from "../utils/resolveAiProfileModel.js";
|
|
9
|
+
export { setPlanWebScopeQuestionsActionInvoker };
|
|
9
10
|
/** Stable machine reason codes for `PlanWebScopeQuestionsOutput.reasonCodes`. */
|
|
10
11
|
export const PlanWebScopeQuestionsReasonCode = {
|
|
11
12
|
OUTPUT_INVALID: "OUTPUT_INVALID",
|
|
@@ -69,100 +70,56 @@ export function parseAndValidatePlanWebScopeQuestionsOutput(rawText, maxQuestion
|
|
|
69
70
|
return { ok: false, errors };
|
|
70
71
|
}
|
|
71
72
|
let confidence = 0;
|
|
72
|
-
const
|
|
73
|
-
if (typeof
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
else if (confidenceRaw < 0 || confidenceRaw > 1) {
|
|
77
|
-
errors.push("confidence must be between 0 and 1 inclusive");
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
confidence = confidenceRaw;
|
|
81
|
-
}
|
|
82
|
-
const questionsRaw = parsed.questions;
|
|
83
|
-
let questionsIn = [];
|
|
84
|
-
if (!Array.isArray(questionsRaw)) {
|
|
85
|
-
errors.push("questions must be an array");
|
|
86
|
-
}
|
|
87
|
-
else if (questionsRaw.length > maxQ) {
|
|
88
|
-
errors.push(`questions length ${questionsRaw.length} exceeds maxQuestions (${maxQ})`);
|
|
73
|
+
const c = parsed.confidence;
|
|
74
|
+
if (typeof c === "number" && Number.isFinite(c)) {
|
|
75
|
+
confidence = Math.min(1, Math.max(0, c));
|
|
89
76
|
}
|
|
90
77
|
else {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
errors.push(`questions[${i}].reason must be a non-empty string`);
|
|
103
|
-
}
|
|
104
|
-
if (q.source !== undefined && q.source !== "ai-driven") {
|
|
105
|
-
errors.push(`questions[${i}].source must be "ai-driven" when set`);
|
|
106
|
-
}
|
|
107
|
-
if (q.id !== undefined && typeof q.id !== "string") {
|
|
108
|
-
errors.push(`questions[${i}].id must be a string when set`);
|
|
109
|
-
}
|
|
78
|
+
errors.push("confidence must be a finite number in [0, 1]");
|
|
79
|
+
}
|
|
80
|
+
const questionsRaw = Array.isArray(parsed.questions) ? parsed.questions : [];
|
|
81
|
+
const questions = [];
|
|
82
|
+
for (const q of questionsRaw) {
|
|
83
|
+
if (!isRecord(q))
|
|
84
|
+
continue;
|
|
85
|
+
const question = typeof q.question === "string" ? q.question.trim() : "";
|
|
86
|
+
if (!question) {
|
|
87
|
+
errors.push("each question must have a non-empty question string");
|
|
88
|
+
continue;
|
|
110
89
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
errors.push(`reasonCodes[${i}] must be a string`);
|
|
121
|
-
}
|
|
90
|
+
const reason = typeof q.reason === "string" ? q.reason.trim() : "";
|
|
91
|
+
if (!reason) {
|
|
92
|
+
errors.push("each question must have a non-empty reason string");
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const source = q.source;
|
|
96
|
+
if (source !== undefined && source !== "ai-driven") {
|
|
97
|
+
errors.push('each question "source" must be "ai-driven" when set');
|
|
98
|
+
continue;
|
|
122
99
|
}
|
|
100
|
+
const id = typeof q.id === "string" && q.id.trim() ? q.id.trim() : randomUUID();
|
|
101
|
+
questions.push({ id, question, reason, source: "ai-driven" });
|
|
123
102
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
: randomUUID();
|
|
131
|
-
return {
|
|
132
|
-
id,
|
|
133
|
-
question: String(o.question).trim(),
|
|
134
|
-
reason: String(o.reason).trim(),
|
|
135
|
-
source: "ai-driven",
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
const reasonCodes = Array.isArray(reasonCodesRaw) && reasonCodesRaw.length
|
|
139
|
-
? reasonCodesRaw.map(String)
|
|
103
|
+
if (questions.length > maxQ) {
|
|
104
|
+
errors.push(`questions length must be <= ${maxQ}`);
|
|
105
|
+
}
|
|
106
|
+
const skipped = parsed.skipped === true;
|
|
107
|
+
const reasonCodes = Array.isArray(parsed.reasonCodes)
|
|
108
|
+
? parsed.reasonCodes.filter((x) => typeof x === "string")
|
|
140
109
|
: undefined;
|
|
110
|
+
if (errors.length) {
|
|
111
|
+
return { ok: false, errors };
|
|
112
|
+
}
|
|
141
113
|
return {
|
|
142
114
|
ok: true,
|
|
143
115
|
value: {
|
|
144
116
|
questions,
|
|
145
117
|
confidence,
|
|
146
118
|
...(skipped ? { skipped: true } : {}),
|
|
147
|
-
...(reasonCodes ? { reasonCodes } : {}),
|
|
119
|
+
...(reasonCodes?.length ? { reasonCodes } : {}),
|
|
148
120
|
},
|
|
149
121
|
};
|
|
150
122
|
}
|
|
151
|
-
const PLAN_WEB_SCOPE_SYSTEM = `You are a planning assistant for web evidence collection.
|
|
152
|
-
Return ONLY a single JSON object (no markdown fences, no prose) with this exact shape:
|
|
153
|
-
{
|
|
154
|
-
"questions": Array<{ "id"?: string, "question": string, "reason": string, "source": "ai-driven" }>,
|
|
155
|
-
"confidence": number,
|
|
156
|
-
"skipped"?: boolean,
|
|
157
|
-
"reasonCodes"?: string[]
|
|
158
|
-
}
|
|
159
|
-
Rules:
|
|
160
|
-
- "confidence" is a number from 0 to 1.
|
|
161
|
-
- Each "question" must be a concrete web search or research question (non-empty string).
|
|
162
|
-
- Each "reason" briefly explains why that question helps (non-empty string).
|
|
163
|
-
- "source" must be the literal string "ai-driven" for every question entry.
|
|
164
|
-
- Produce at most the requested maxQuestions items in "questions".
|
|
165
|
-
- If you cannot propose useful questions, set "skipped": true, "questions": [], "confidence" <= 0.5, and include "reasonCodes" such as ["INPUT_TOO_THIN"].`;
|
|
166
123
|
export function buildPlanWebScopeQuestionsUserPrompt(input) {
|
|
167
124
|
const maxQ = clampInt(input.maxQuestions, 1, 20);
|
|
168
125
|
const nq = typeof input.nodeQuestion === "string" ? input.nodeQuestion.trim() : "";
|
|
@@ -187,10 +144,10 @@ export function buildPlanWebScopeQuestionsUserPrompt(input) {
|
|
|
187
144
|
return lines.join("\n");
|
|
188
145
|
}
|
|
189
146
|
/**
|
|
190
|
-
* Plans web-scope questions via
|
|
147
|
+
* Plans web-scope questions via xynthesis `plan-web-scope-questions`.
|
|
191
148
|
*/
|
|
192
149
|
export async function runPlanWebScopeQuestions(params) {
|
|
193
|
-
const { input,
|
|
150
|
+
const { input, llmCall, jobId, taskId, agentId, observationSink } = params;
|
|
194
151
|
const nq = typeof input.nodeQuestion === "string" ? input.nodeQuestion.trim() : "";
|
|
195
152
|
const maxQ = clampInt(input.maxQuestions, 1, 20);
|
|
196
153
|
if (!nq) {
|
|
@@ -201,74 +158,77 @@ export async function runPlanWebScopeQuestions(params) {
|
|
|
201
158
|
reasonCodes: [PlanWebScopeQuestionsReasonCode.INPUT_TOO_THIN],
|
|
202
159
|
};
|
|
203
160
|
}
|
|
204
|
-
if (backend === "funcx") {
|
|
205
|
-
try {
|
|
206
|
-
const raw = await runResearchPlanQuestionsViaFuncx({
|
|
207
|
-
input: { ...input, nodeQuestion: nq, maxQuestions: maxQ },
|
|
208
|
-
jobId,
|
|
209
|
-
taskId,
|
|
210
|
-
agentId,
|
|
211
|
-
funcxFunctionId,
|
|
212
|
-
});
|
|
213
|
-
const adapted = adaptFuncxResearchPlanToOutput(raw);
|
|
214
|
-
const maxAllowed = maxQ;
|
|
215
|
-
if (adapted.questions.length > maxAllowed) {
|
|
216
|
-
return {
|
|
217
|
-
questions: [],
|
|
218
|
-
confidence: 0,
|
|
219
|
-
skipped: true,
|
|
220
|
-
reasonCodes: [PlanWebScopeQuestionsReasonCode.OUTPUT_INVALID],
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
if (adapted.questions.length === 0 && adapted.skipped !== true) {
|
|
224
|
-
return {
|
|
225
|
-
questions: [],
|
|
226
|
-
confidence: 0,
|
|
227
|
-
skipped: true,
|
|
228
|
-
reasonCodes: [PlanWebScopeQuestionsReasonCode.OUTPUT_INVALID],
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
questions: adapted.questions,
|
|
233
|
-
confidence: adapted.confidence,
|
|
234
|
-
...(adapted.skipped ? { skipped: true } : {}),
|
|
235
|
-
...(adapted.reasonCodes?.length ? { reasonCodes: adapted.reasonCodes } : {}),
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
catch {
|
|
239
|
-
return {
|
|
240
|
-
questions: [],
|
|
241
|
-
confidence: 0,
|
|
242
|
-
skipped: true,
|
|
243
|
-
reasonCodes: [PlanWebScopeQuestionsReasonCode.LLM_ERROR],
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
const userPrompt = buildPlanWebScopeQuestionsUserPrompt({ ...input, nodeQuestion: nq, maxQuestions: maxQ });
|
|
248
161
|
try {
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
llmCall,
|
|
253
|
-
stage: "plan-web-scope-questions",
|
|
254
|
-
structuredOutput: true,
|
|
255
|
-
jobId: jobId ?? "plan-web-scope-questions",
|
|
162
|
+
const envelope = buildResearchPlanQuestionsPayload({
|
|
163
|
+
input: { ...input, nodeQuestion: nq, maxQuestions: maxQ },
|
|
164
|
+
jobId,
|
|
256
165
|
taskId,
|
|
257
|
-
agentId
|
|
258
|
-
traceCollector,
|
|
259
|
-
traceTask,
|
|
260
|
-
observationSink,
|
|
166
|
+
agentId,
|
|
261
167
|
});
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
confidence: 0,
|
|
267
|
-
skipped: true,
|
|
268
|
-
reasonCodes: [PlanWebScopeQuestionsReasonCode.OUTPUT_INVALID],
|
|
269
|
-
};
|
|
168
|
+
const effectiveTaskId = taskId ?? randomUUID();
|
|
169
|
+
const modelAlias = llmCall?.model?.trim();
|
|
170
|
+
if (!modelAlias) {
|
|
171
|
+
throw new Error("plan-web-scope-questions requires llmCall.model (preActionModel alias from modelConfig).");
|
|
270
172
|
}
|
|
271
|
-
|
|
173
|
+
const model = await resolveModelReferenceForXynthesis(modelAlias);
|
|
174
|
+
const outputExpectation = llmCall?.outputExpectation ?? resolveOutputExpectation("plan-web-scope-questions");
|
|
175
|
+
const { result, invokeSummary } = await runPlanWebScopeQuestionsAction({
|
|
176
|
+
sidekickAction: "plan-web-scope-questions",
|
|
177
|
+
model,
|
|
178
|
+
outputExpectation,
|
|
179
|
+
goal: String(envelope.goal ?? nq),
|
|
180
|
+
input: (envelope.input ?? { nodeInput: null }),
|
|
181
|
+
context: envelope.context,
|
|
182
|
+
args: {
|
|
183
|
+
maxQuestions: maxQ,
|
|
184
|
+
sourceType: "web",
|
|
185
|
+
allowSkip: true,
|
|
186
|
+
includeReasons: true,
|
|
187
|
+
},
|
|
188
|
+
reasoningEffort: llmCall?.reasoningEffort,
|
|
189
|
+
topP: llmCall?.topP,
|
|
190
|
+
temperature: llmCall?.temperature,
|
|
191
|
+
timeoutMs: llmCall?.timeoutMs,
|
|
192
|
+
maxOutputLength: llmCall?.maxOutputLength,
|
|
193
|
+
gateway: {
|
|
194
|
+
aiRequestId: randomUUID(),
|
|
195
|
+
agentId: agentId ?? "plan-web-scope-questions",
|
|
196
|
+
sessionId: effectiveTaskId,
|
|
197
|
+
temperature: typeof llmCall?.temperature === "number" ? llmCall.temperature : 0.7,
|
|
198
|
+
},
|
|
199
|
+
workScope: {
|
|
200
|
+
jobId: jobId ?? "plan-web-scope-questions",
|
|
201
|
+
taskId: effectiveTaskId,
|
|
202
|
+
agentId,
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
if (observationSink) {
|
|
206
|
+
try {
|
|
207
|
+
observationSink({
|
|
208
|
+
source: "xynthesis",
|
|
209
|
+
stage: "plan-web-scope-questions",
|
|
210
|
+
request: { ...llmCall, model },
|
|
211
|
+
summary: invokeSummary,
|
|
212
|
+
durationMs: 0,
|
|
213
|
+
ok: true,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
/* sink must not break */
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const questions = result.questions.map((q) => ({
|
|
221
|
+
id: q.id ?? randomUUID(),
|
|
222
|
+
question: q.question,
|
|
223
|
+
reason: q.reason,
|
|
224
|
+
source: "ai-driven",
|
|
225
|
+
}));
|
|
226
|
+
return {
|
|
227
|
+
questions,
|
|
228
|
+
confidence: result.confidence,
|
|
229
|
+
...(result.skipped ? { skipped: true } : {}),
|
|
230
|
+
...(result.reasonCodes?.length ? { reasonCodes: result.reasonCodes } : {}),
|
|
231
|
+
};
|
|
272
232
|
}
|
|
273
233
|
catch {
|
|
274
234
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/planWebScopeQuestions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/planWebScopeQuestions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EACrC,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,iCAAiC,EAAE,MAAM,0DAA0D,CAAC;AAC7G,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAEtF,OAAO,EA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,CAAC,CAAmD,EAAE,EAAE,CAAC,CAAC;YAC/F,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,UAAU,EAAE;YACxB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,MAAM,EAAE,WAAoB;SAC7B,CAAC,CAAC,CAAC;QACJ,OAAO;YACL,SAAS;YACT,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3E,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,CAAC;YACb,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;SACzD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -28,7 +28,7 @@ export declare const CANONICAL_INPUT_STRATEGIES: readonly [{
|
|
|
28
28
|
}];
|
|
29
29
|
/**
|
|
30
30
|
* Task **execution** strategies: catalog metadata for MAIN wrappers (`RunTaskRequest.executionStrategies`).
|
|
31
|
-
* Runtime wrappers: `planner` (
|
|
31
|
+
* Runtime wrappers: `planner` (xynthesis before MAIN), `optimizer` (xynthesis after each MAIN attempt). `direct` describes plain MAIN when `executionStrategies` is `[]`.
|
|
32
32
|
* Keys match Catalox catalogs {@link AI_TASK_EXECUTION_STRATEGIES_CATALOG_ID} and {@link AI_TASK_MAIN_EXECUTION_WRAPPERS_CATALOG_ID} (same seeded rows).
|
|
33
33
|
*/
|
|
34
34
|
export declare const CANONICAL_EXECUTION_STRATEGIES: readonly [{
|
|
@@ -50,17 +50,17 @@ export declare const CANONICAL_EXECUTION_STRATEGIES: readonly [{
|
|
|
50
50
|
}, {
|
|
51
51
|
readonly strategyKey: "planner";
|
|
52
52
|
readonly title: "Planner";
|
|
53
|
-
readonly description: "
|
|
53
|
+
readonly description: "xynthesis `execution-plan` runs once before MAIN; merges instructions/prompt/variables into the task request.";
|
|
54
54
|
readonly domain: "execution";
|
|
55
55
|
readonly multiSelectable: true;
|
|
56
56
|
readonly appliesTo: ["pre-main-execution"];
|
|
57
|
-
readonly runtimeKind: "
|
|
57
|
+
readonly runtimeKind: "xynthesis-action";
|
|
58
58
|
readonly requestShape: "executionStrategies-row";
|
|
59
59
|
readonly phase: "before";
|
|
60
60
|
readonly selectableInExecutionStrategies: true;
|
|
61
|
-
readonly
|
|
61
|
+
readonly defaultSidekickAction: "execution-plan";
|
|
62
62
|
readonly functionEnvelope: "execution-strategy-generic-v1";
|
|
63
|
-
readonly safeRuntimeFields: ["
|
|
63
|
+
readonly safeRuntimeFields: ["defaultSidekickAction"];
|
|
64
64
|
readonly example: {
|
|
65
65
|
readonly executionStrategies: readonly [{
|
|
66
66
|
readonly strategyKey: "planner";
|
|
@@ -68,22 +68,22 @@ export declare const CANONICAL_EXECUTION_STRATEGIES: readonly [{
|
|
|
68
68
|
readonly priority: 10;
|
|
69
69
|
}];
|
|
70
70
|
};
|
|
71
|
-
readonly notes: ["Planner rows must use phase `before`.", "
|
|
71
|
+
readonly notes: ["Planner rows must use phase `before`.", "Uses `modelConfig.preActionModel` for the planner hop."];
|
|
72
72
|
}, {
|
|
73
73
|
readonly strategyKey: "optimizer";
|
|
74
74
|
readonly title: "Optimizer";
|
|
75
|
-
readonly description: "
|
|
75
|
+
readonly description: "xynthesis `execution-evaluate-result` after each MAIN attempt; may retry MAIN with feedback until satisfied or max iterations.";
|
|
76
76
|
readonly domain: "execution";
|
|
77
77
|
readonly multiSelectable: true;
|
|
78
78
|
readonly appliesTo: ["post-main-execution"];
|
|
79
|
-
readonly runtimeKind: "
|
|
79
|
+
readonly runtimeKind: "xynthesis-action";
|
|
80
80
|
readonly requestShape: "executionStrategies-row";
|
|
81
81
|
readonly phase: "after";
|
|
82
82
|
readonly selectableInExecutionStrategies: true;
|
|
83
|
-
readonly
|
|
83
|
+
readonly defaultSidekickAction: "execution-evaluate-result";
|
|
84
84
|
readonly functionEnvelope: "execution-strategy-generic-v1";
|
|
85
85
|
readonly retryBehavior: "Runs MAIN until satisfied or maxIterations is reached. Omitted maxIterations uses AI_TASKS_OPTIMIZER_MAX_ITERATIONS or 3.";
|
|
86
|
-
readonly safeRuntimeFields: ["
|
|
86
|
+
readonly safeRuntimeFields: ["defaultSidekickAction"];
|
|
87
87
|
readonly example: {
|
|
88
88
|
readonly executionStrategies: readonly [{
|
|
89
89
|
readonly strategyKey: "optimizer";
|
|
@@ -92,7 +92,7 @@ export declare const CANONICAL_EXECUTION_STRATEGIES: readonly [{
|
|
|
92
92
|
readonly maxIterations: 3;
|
|
93
93
|
}];
|
|
94
94
|
};
|
|
95
|
-
readonly notes: ["Optimizer rows must use phase `after`.", "Only the first optimizer after priority sorting drives the retry loop.", "
|
|
95
|
+
readonly notes: ["Optimizer rows must use phase `after`.", "Only the first optimizer after priority sorting drives the retry loop.", "Uses `modelConfig.postActionModel` for the optimizer hop."];
|
|
96
96
|
}];
|
|
97
97
|
/**
|
|
98
98
|
* Canonical rows for {@link AI_TASK_MAIN_EXECUTION_WRAPPERS_CATALOG_ID}; identical to {@link CANONICAL_EXECUTION_STRATEGIES}.
|
|
@@ -116,17 +116,17 @@ export declare const CANONICAL_MAIN_EXECUTION_WRAPPERS: readonly [{
|
|
|
116
116
|
}, {
|
|
117
117
|
readonly strategyKey: "planner";
|
|
118
118
|
readonly title: "Planner";
|
|
119
|
-
readonly description: "
|
|
119
|
+
readonly description: "xynthesis `execution-plan` runs once before MAIN; merges instructions/prompt/variables into the task request.";
|
|
120
120
|
readonly domain: "execution";
|
|
121
121
|
readonly multiSelectable: true;
|
|
122
122
|
readonly appliesTo: ["pre-main-execution"];
|
|
123
|
-
readonly runtimeKind: "
|
|
123
|
+
readonly runtimeKind: "xynthesis-action";
|
|
124
124
|
readonly requestShape: "executionStrategies-row";
|
|
125
125
|
readonly phase: "before";
|
|
126
126
|
readonly selectableInExecutionStrategies: true;
|
|
127
|
-
readonly
|
|
127
|
+
readonly defaultSidekickAction: "execution-plan";
|
|
128
128
|
readonly functionEnvelope: "execution-strategy-generic-v1";
|
|
129
|
-
readonly safeRuntimeFields: ["
|
|
129
|
+
readonly safeRuntimeFields: ["defaultSidekickAction"];
|
|
130
130
|
readonly example: {
|
|
131
131
|
readonly executionStrategies: readonly [{
|
|
132
132
|
readonly strategyKey: "planner";
|
|
@@ -134,22 +134,22 @@ export declare const CANONICAL_MAIN_EXECUTION_WRAPPERS: readonly [{
|
|
|
134
134
|
readonly priority: 10;
|
|
135
135
|
}];
|
|
136
136
|
};
|
|
137
|
-
readonly notes: ["Planner rows must use phase `before`.", "
|
|
137
|
+
readonly notes: ["Planner rows must use phase `before`.", "Uses `modelConfig.preActionModel` for the planner hop."];
|
|
138
138
|
}, {
|
|
139
139
|
readonly strategyKey: "optimizer";
|
|
140
140
|
readonly title: "Optimizer";
|
|
141
|
-
readonly description: "
|
|
141
|
+
readonly description: "xynthesis `execution-evaluate-result` after each MAIN attempt; may retry MAIN with feedback until satisfied or max iterations.";
|
|
142
142
|
readonly domain: "execution";
|
|
143
143
|
readonly multiSelectable: true;
|
|
144
144
|
readonly appliesTo: ["post-main-execution"];
|
|
145
|
-
readonly runtimeKind: "
|
|
145
|
+
readonly runtimeKind: "xynthesis-action";
|
|
146
146
|
readonly requestShape: "executionStrategies-row";
|
|
147
147
|
readonly phase: "after";
|
|
148
148
|
readonly selectableInExecutionStrategies: true;
|
|
149
|
-
readonly
|
|
149
|
+
readonly defaultSidekickAction: "execution-evaluate-result";
|
|
150
150
|
readonly functionEnvelope: "execution-strategy-generic-v1";
|
|
151
151
|
readonly retryBehavior: "Runs MAIN until satisfied or maxIterations is reached. Omitted maxIterations uses AI_TASKS_OPTIMIZER_MAX_ITERATIONS or 3.";
|
|
152
|
-
readonly safeRuntimeFields: ["
|
|
152
|
+
readonly safeRuntimeFields: ["defaultSidekickAction"];
|
|
153
153
|
readonly example: {
|
|
154
154
|
readonly executionStrategies: readonly [{
|
|
155
155
|
readonly strategyKey: "optimizer";
|
|
@@ -158,7 +158,7 @@ export declare const CANONICAL_MAIN_EXECUTION_WRAPPERS: readonly [{
|
|
|
158
158
|
readonly maxIterations: 3;
|
|
159
159
|
}];
|
|
160
160
|
};
|
|
161
|
-
readonly notes: ["Optimizer rows must use phase `after`.", "Only the first optimizer after priority sorting drives the retry loop.", "
|
|
161
|
+
readonly notes: ["Optimizer rows must use phase `after`.", "Only the first optimizer after priority sorting drives the retry loop.", "Uses `modelConfig.postActionModel` for the optimizer hop."];
|
|
162
162
|
}];
|
|
163
163
|
export type InputStrategyKey = (typeof CANONICAL_INPUT_STRATEGIES)[number]["strategyKey"];
|
|
164
164
|
export type ExecutionStrategyKey = (typeof CANONICAL_EXECUTION_STRATEGIES)[number]["strategyKey"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AI_TASK_EXECUTION_STRATEGIES_CATALOG_ID, AI_TASK_EXECUTION_STRATEGY_CATALOG_ID, AI_TASK_INPUT_STRATEGIES_CATALOG_ID, AI_TASKS_APP_ID, TASK_STRATEGY_APPLIES_TO_MAIN_EXECUTION, TASK_STRATEGY_APPLIES_TO_POST_MAIN_EXECUTION, TASK_STRATEGY_APPLIES_TO_PRE_MAIN_EXECUTION, TASK_STRATEGY_APPLIES_TO_TASK_INPUT, } from "./constants.js";
|
|
2
|
-
import { DEFAULT_OPTIMIZER_MAX_ITERATIONS, ENV_OPTIMIZER_MAX_ITERATIONS,
|
|
2
|
+
import { DEFAULT_OPTIMIZER_MAX_ITERATIONS, ENV_OPTIMIZER_MAX_ITERATIONS, XYNTHESIS_EXECUTION_EVALUATE_RESULT_ACTION, XYNTHESIS_EXECUTION_PLAN_ACTION, } from "../execution-strategies/constants.js";
|
|
3
3
|
/**
|
|
4
4
|
* Task **input** strategies: optional authoring / template hints for consoles and Xynthesis.
|
|
5
5
|
* They do **not** select Narrix invocation (use `narrixMode` on the request) and do **not** decide
|
|
@@ -34,7 +34,7 @@ export const CANONICAL_INPUT_STRATEGIES = [
|
|
|
34
34
|
];
|
|
35
35
|
/**
|
|
36
36
|
* Task **execution** strategies: catalog metadata for MAIN wrappers (`RunTaskRequest.executionStrategies`).
|
|
37
|
-
* Runtime wrappers: `planner` (
|
|
37
|
+
* Runtime wrappers: `planner` (xynthesis before MAIN), `optimizer` (xynthesis after each MAIN attempt). `direct` describes plain MAIN when `executionStrategies` is `[]`.
|
|
38
38
|
* Keys match Catalox catalogs {@link AI_TASK_EXECUTION_STRATEGIES_CATALOG_ID} and {@link AI_TASK_MAIN_EXECUTION_WRAPPERS_CATALOG_ID} (same seeded rows).
|
|
39
39
|
*/
|
|
40
40
|
export const CANONICAL_EXECUTION_STRATEGIES = [
|
|
@@ -60,47 +60,47 @@ export const CANONICAL_EXECUTION_STRATEGIES = [
|
|
|
60
60
|
{
|
|
61
61
|
strategyKey: "planner",
|
|
62
62
|
title: "Planner",
|
|
63
|
-
description: "
|
|
63
|
+
description: "xynthesis `execution-plan` runs once before MAIN; merges instructions/prompt/variables into the task request.",
|
|
64
64
|
domain: "execution",
|
|
65
65
|
multiSelectable: true,
|
|
66
66
|
appliesTo: [TASK_STRATEGY_APPLIES_TO_PRE_MAIN_EXECUTION],
|
|
67
|
-
runtimeKind: "
|
|
67
|
+
runtimeKind: "xynthesis-action",
|
|
68
68
|
requestShape: "executionStrategies-row",
|
|
69
69
|
phase: "before",
|
|
70
70
|
selectableInExecutionStrategies: true,
|
|
71
|
-
|
|
71
|
+
defaultSidekickAction: XYNTHESIS_EXECUTION_PLAN_ACTION,
|
|
72
72
|
functionEnvelope: "execution-strategy-generic-v1",
|
|
73
|
-
safeRuntimeFields: ["
|
|
73
|
+
safeRuntimeFields: ["defaultSidekickAction"],
|
|
74
74
|
example: {
|
|
75
75
|
executionStrategies: [{ strategyKey: "planner", phase: "before", priority: 10 }],
|
|
76
76
|
},
|
|
77
77
|
notes: [
|
|
78
78
|
"Planner rows must use phase `before`.",
|
|
79
|
-
"
|
|
79
|
+
"Uses `modelConfig.preActionModel` for the planner hop.",
|
|
80
80
|
],
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
strategyKey: "optimizer",
|
|
84
84
|
title: "Optimizer",
|
|
85
|
-
description: "
|
|
85
|
+
description: "xynthesis `execution-evaluate-result` after each MAIN attempt; may retry MAIN with feedback until satisfied or max iterations.",
|
|
86
86
|
domain: "execution",
|
|
87
87
|
multiSelectable: true,
|
|
88
88
|
appliesTo: [TASK_STRATEGY_APPLIES_TO_POST_MAIN_EXECUTION],
|
|
89
|
-
runtimeKind: "
|
|
89
|
+
runtimeKind: "xynthesis-action",
|
|
90
90
|
requestShape: "executionStrategies-row",
|
|
91
91
|
phase: "after",
|
|
92
92
|
selectableInExecutionStrategies: true,
|
|
93
|
-
|
|
93
|
+
defaultSidekickAction: XYNTHESIS_EXECUTION_EVALUATE_RESULT_ACTION,
|
|
94
94
|
functionEnvelope: "execution-strategy-generic-v1",
|
|
95
95
|
retryBehavior: `Runs MAIN until satisfied or maxIterations is reached. Omitted maxIterations uses ${ENV_OPTIMIZER_MAX_ITERATIONS} or ${DEFAULT_OPTIMIZER_MAX_ITERATIONS}.`,
|
|
96
|
-
safeRuntimeFields: ["
|
|
96
|
+
safeRuntimeFields: ["defaultSidekickAction"],
|
|
97
97
|
example: {
|
|
98
98
|
executionStrategies: [{ strategyKey: "optimizer", phase: "after", priority: 20, maxIterations: 3 }],
|
|
99
99
|
},
|
|
100
100
|
notes: [
|
|
101
101
|
"Optimizer rows must use phase `after`.",
|
|
102
102
|
"Only the first optimizer after priority sorting drives the retry loop.",
|
|
103
|
-
"
|
|
103
|
+
"Uses `modelConfig.postActionModel` for the optimizer hop.",
|
|
104
104
|
],
|
|
105
105
|
},
|
|
106
106
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalInputExecutionStrategies.js","sourceRoot":"","sources":["../../src/task-strategies/canonicalInputExecutionStrategies.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,EACvC,qCAAqC,EACrC,mCAAmC,EAEnC,eAAe,EACf,uCAAuC,EACvC,4CAA4C,EAC5C,2CAA2C,EAC3C,mCAAmC,GACpC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"canonicalInputExecutionStrategies.js","sourceRoot":"","sources":["../../src/task-strategies/canonicalInputExecutionStrategies.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,EACvC,qCAAqC,EACrC,mCAAmC,EAEnC,eAAe,EACf,uCAAuC,EACvC,4CAA4C,EAC5C,2CAA2C,EAC3C,mCAAmC,GACpC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC5B,0CAA0C,EAC1C,+BAA+B,GAChC,MAAM,sCAAsC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC;QACE,WAAW,EAAE,cAAc;QAC3B,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,qIAAqI;QACvI,MAAM,EAAE,OAAO;QACf,eAAe,EAAE,KAAK;QACtB,SAAS,EAAE,CAAC,mCAAmC,CAAC;KACjD;IACD;QACE,WAAW,EAAE,gBAAgB;QAC7B,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,0GAA0G;QAC5G,MAAM,EAAE,OAAO;QACf,eAAe,EAAE,KAAK;QACtB,SAAS,EAAE,CAAC,mCAAmC,CAAC;KACjD;IACD;QACE,WAAW,EAAE,wBAAwB;QACrC,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,8GAA8G;QAChH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AAS,EAAE,CAAC,4CAA4C,CAAC;QACzD,WAAW,EAAE,kBAAkB;QAC/B,YAAY,EAAE,yBAAyB;QACvC,KAAK,EAAE,OAAO;QACd,+BAA+B,EAAE,IAAI;QACrC,qBAAqB,EAAE,0CAA0C;QACjE,gBAAgB,EAAE,+BAA+B;QACjD,aAAa,EAAE,qFAAqF,4BAA4B,OAAO,gCAAgC,GAAG;QAC1K,iBAAiB,EAAE,CAAC,uBAAuB,CAAC;QAC5C,OAAO,EAAE;YACP,mBAAmB,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;SACpG;QACD,KAAK,EAAE;YACL,wCAAwC;YACxC,wEAAwE;YACxE,2DAA2D;SAC5D;KACF;CAC0D,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AAMhF,MAAM,CAAC,MAAM,6BAA6B,GACxC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,iCAAiC,GAC5C,8BAA8B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,gCAAgC,GAAG,mCAAmC,CAAC;AACpF,MAAM,CAAC,MAAM,oCAAoC,GAAG,uCAAuC,CAAC;AAC5F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AAExF,MAAM,CAAC,MAAM,iCAAiC,GAAG,eAAe,CAAC"}
|
|
@@ -10,14 +10,16 @@ export type TaskStrategyItemData = {
|
|
|
10
10
|
multiSelectable?: boolean;
|
|
11
11
|
appliesTo?: string[];
|
|
12
12
|
/** Runtime category for catalog metadata; runtime support is still code-gated. */
|
|
13
|
-
runtimeKind?: "direct" | "funcx-wrapper" | (string & {});
|
|
13
|
+
runtimeKind?: "direct" | "xynthesis-action" | "funcx-wrapper" | (string & {});
|
|
14
14
|
/** How this catalog item maps to `RunTaskRequest` authoring. */
|
|
15
15
|
requestShape?: "empty-execution-strategies" | "executionStrategies-row" | (string & {});
|
|
16
16
|
/** Runtime phase represented by this item. */
|
|
17
17
|
phase?: "main" | "before" | "after" | (string & {});
|
|
18
18
|
/** Whether this item is valid as a row inside `RunTaskRequest.executionStrategies`. */
|
|
19
19
|
selectableInExecutionStrategies?: boolean;
|
|
20
|
-
/** Safe default
|
|
20
|
+
/** Safe default xynthesis sidekick action for wrapper strategies (`execution-plan`, …). */
|
|
21
|
+
defaultSidekickAction?: string;
|
|
22
|
+
/** @deprecated Legacy FuncX function id — use {@link defaultSidekickAction}. */
|
|
21
23
|
defaultFunctionId?: string;
|
|
22
24
|
/** Expected callable envelope for `defaultFunctionId`; runtime consumes only known safe values. */
|
|
23
25
|
functionEnvelope?: "execution-strategy-generic-v1" | (string & {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/task-strategies/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,kFAAkF;IAClF,WAAW,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/task-strategies/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAA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
49
|
/**
|
|
50
50
|
* Stage tag used in observations so consumers can filter by where the call originated.
|
|
51
51
|
*/
|
|
52
|
-
export type LlmCallStage = "pre-synthesis-markdown" | "pre-synthesis-question" | "pre-synthesis-structured" | "main-skill" | "post-audit" | "post-audit-merge" | "post-polish" | "ai-scoping" | "plan-web-scope-questions" | "utility-finalize" | "structured-repair";
|
|
52
|
+
export type LlmCallStage = "pre-synthesis-markdown" | "pre-synthesis-question" | "pre-synthesis-structured" | "main-skill" | "post-audit" | "post-audit-merge" | "post-polish" | "ai-scoping" | "plan-web-scope-questions" | "execution-strategy-planner" | "execution-strategy-optimizer" | "utility-finalize" | "structured-repair";
|
|
53
53
|
/** Snapshot of the request as resolved on the ai-tasks side (tuning only — no token cap fields). */
|
|
54
54
|
export type LlmCallRequestSnapshot = LlmCallConfig;
|
|
55
55
|
/**
|