@uns-kit/assistant-workflow 2.0.72
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/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/clarification-policy.d.ts +64 -0
- package/dist/clarification-policy.d.ts.map +1 -0
- package/dist/clarification-policy.js +174 -0
- package/dist/clarification-policy.js.map +1 -0
- package/dist/decision.d.ts +37 -0
- package/dist/decision.d.ts.map +1 -0
- package/dist/decision.js +100 -0
- package/dist/decision.js.map +1 -0
- package/dist/definition-catalog-replay.d.ts +25 -0
- package/dist/definition-catalog-replay.d.ts.map +1 -0
- package/dist/definition-catalog-replay.js +54 -0
- package/dist/definition-catalog-replay.js.map +1 -0
- package/dist/definition-catalog.d.ts +45 -0
- package/dist/definition-catalog.d.ts.map +1 -0
- package/dist/definition-catalog.js +97 -0
- package/dist/definition-catalog.js.map +1 -0
- package/dist/definition-diagnostics.d.ts +17 -0
- package/dist/definition-diagnostics.d.ts.map +1 -0
- package/dist/definition-diagnostics.js +353 -0
- package/dist/definition-diagnostics.js.map +1 -0
- package/dist/definition-diff.d.ts +51 -0
- package/dist/definition-diff.d.ts.map +1 -0
- package/dist/definition-diff.js +172 -0
- package/dist/definition-diff.js.map +1 -0
- package/dist/definition-json.d.ts +53 -0
- package/dist/definition-json.d.ts.map +1 -0
- package/dist/definition-json.js +186 -0
- package/dist/definition-json.js.map +1 -0
- package/dist/definition-manifest.d.ts +41 -0
- package/dist/definition-manifest.d.ts.map +1 -0
- package/dist/definition-manifest.js +119 -0
- package/dist/definition-manifest.js.map +1 -0
- package/dist/definition-package-execution-json.d.ts +64 -0
- package/dist/definition-package-execution-json.d.ts.map +1 -0
- package/dist/definition-package-execution-json.js +245 -0
- package/dist/definition-package-execution-json.js.map +1 -0
- package/dist/definition-package-execution-replay.d.ts +14 -0
- package/dist/definition-package-execution-replay.d.ts.map +1 -0
- package/dist/definition-package-execution-replay.js +47 -0
- package/dist/definition-package-execution-replay.js.map +1 -0
- package/dist/definition-package-executor.d.ts +52 -0
- package/dist/definition-package-executor.d.ts.map +1 -0
- package/dist/definition-package-executor.js +70 -0
- package/dist/definition-package-executor.js.map +1 -0
- package/dist/definition-package-loader.d.ts +36 -0
- package/dist/definition-package-loader.d.ts.map +1 -0
- package/dist/definition-package-loader.js +56 -0
- package/dist/definition-package-loader.js.map +1 -0
- package/dist/definition-package-replay.d.ts +28 -0
- package/dist/definition-package-replay.d.ts.map +1 -0
- package/dist/definition-package-replay.js +74 -0
- package/dist/definition-package-replay.js.map +1 -0
- package/dist/definition-package-resolver.d.ts +31 -0
- package/dist/definition-package-resolver.d.ts.map +1 -0
- package/dist/definition-package-resolver.js +60 -0
- package/dist/definition-package-resolver.js.map +1 -0
- package/dist/definition-package-review.d.ts +29 -0
- package/dist/definition-package-review.d.ts.map +1 -0
- package/dist/definition-package-review.js +74 -0
- package/dist/definition-package-review.js.map +1 -0
- package/dist/definition-package-run-report.d.ts +25 -0
- package/dist/definition-package-run-report.d.ts.map +1 -0
- package/dist/definition-package-run-report.js +37 -0
- package/dist/definition-package-run-report.js.map +1 -0
- package/dist/definition-package-run.d.ts +20 -0
- package/dist/definition-package-run.d.ts.map +1 -0
- package/dist/definition-package-run.js +41 -0
- package/dist/definition-package-run.js.map +1 -0
- package/dist/definition-package-selection.d.ts +29 -0
- package/dist/definition-package-selection.d.ts.map +1 -0
- package/dist/definition-package-selection.js +68 -0
- package/dist/definition-package-selection.js.map +1 -0
- package/dist/definition-package-smoke.d.ts +74 -0
- package/dist/definition-package-smoke.d.ts.map +1 -0
- package/dist/definition-package-smoke.js +184 -0
- package/dist/definition-package-smoke.js.map +1 -0
- package/dist/definition-package.d.ts +36 -0
- package/dist/definition-package.d.ts.map +1 -0
- package/dist/definition-package.js +114 -0
- package/dist/definition-package.js.map +1 -0
- package/dist/definition-tuning-approval.d.ts +39 -0
- package/dist/definition-tuning-approval.d.ts.map +1 -0
- package/dist/definition-tuning-approval.js +207 -0
- package/dist/definition-tuning-approval.js.map +1 -0
- package/dist/definition-tuning-json.d.ts +58 -0
- package/dist/definition-tuning-json.d.ts.map +1 -0
- package/dist/definition-tuning-json.js +276 -0
- package/dist/definition-tuning-json.js.map +1 -0
- package/dist/definition-tuning-promotion.d.ts +120 -0
- package/dist/definition-tuning-promotion.d.ts.map +1 -0
- package/dist/definition-tuning-promotion.js +460 -0
- package/dist/definition-tuning-promotion.js.map +1 -0
- package/dist/definition-tuning-replay.d.ts +14 -0
- package/dist/definition-tuning-replay.d.ts.map +1 -0
- package/dist/definition-tuning-replay.js +50 -0
- package/dist/definition-tuning-replay.js.map +1 -0
- package/dist/definition-tuning-review-artifact.d.ts +56 -0
- package/dist/definition-tuning-review-artifact.d.ts.map +1 -0
- package/dist/definition-tuning-review-artifact.js +302 -0
- package/dist/definition-tuning-review-artifact.js.map +1 -0
- package/dist/definition-tuning-review.d.ts +59 -0
- package/dist/definition-tuning-review.d.ts.map +1 -0
- package/dist/definition-tuning-review.js +213 -0
- package/dist/definition-tuning-review.js.map +1 -0
- package/dist/definition-tuning-source-patch.d.ts +43 -0
- package/dist/definition-tuning-source-patch.d.ts.map +1 -0
- package/dist/definition-tuning-source-patch.js +214 -0
- package/dist/definition-tuning-source-patch.js.map +1 -0
- package/dist/definition-tuning.d.ts +73 -0
- package/dist/definition-tuning.d.ts.map +1 -0
- package/dist/definition-tuning.js +426 -0
- package/dist/definition-tuning.js.map +1 -0
- package/dist/definition.d.ts +189 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +494 -0
- package/dist/definition.js.map +1 -0
- package/dist/direct-route-invocation.d.ts +132 -0
- package/dist/direct-route-invocation.d.ts.map +1 -0
- package/dist/direct-route-invocation.js +325 -0
- package/dist/direct-route-invocation.js.map +1 -0
- package/dist/direct-route-policy.d.ts +25 -0
- package/dist/direct-route-policy.d.ts.map +1 -0
- package/dist/direct-route-policy.js +106 -0
- package/dist/direct-route-policy.js.map +1 -0
- package/dist/eval-case.d.ts +85 -0
- package/dist/eval-case.d.ts.map +1 -0
- package/dist/eval-case.js +366 -0
- package/dist/eval-case.js.map +1 -0
- package/dist/eval-replay.d.ts +18 -0
- package/dist/eval-replay.d.ts.map +1 -0
- package/dist/eval-replay.js +41 -0
- package/dist/eval-replay.js.map +1 -0
- package/dist/eval-result.d.ts +46 -0
- package/dist/eval-result.d.ts.map +1 -0
- package/dist/eval-result.js +183 -0
- package/dist/eval-result.js.map +1 -0
- package/dist/eval-runner.d.ts +30 -0
- package/dist/eval-runner.d.ts.map +1 -0
- package/dist/eval-runner.js +57 -0
- package/dist/eval-runner.js.map +1 -0
- package/dist/eval-suite.d.ts +43 -0
- package/dist/eval-suite.d.ts.map +1 -0
- package/dist/eval-suite.js +101 -0
- package/dist/eval-suite.js.map +1 -0
- package/dist/execution-plan.d.ts +43 -0
- package/dist/execution-plan.d.ts.map +1 -0
- package/dist/execution-plan.js +187 -0
- package/dist/execution-plan.js.map +1 -0
- package/dist/hosted-tool-policy.d.ts +70 -0
- package/dist/hosted-tool-policy.d.ts.map +1 -0
- package/dist/hosted-tool-policy.js +228 -0
- package/dist/hosted-tool-policy.js.map +1 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/memory-policy.d.ts +55 -0
- package/dist/memory-policy.d.ts.map +1 -0
- package/dist/memory-policy.js +187 -0
- package/dist/memory-policy.js.map +1 -0
- package/dist/memory-updates.d.ts +39 -0
- package/dist/memory-updates.d.ts.map +1 -0
- package/dist/memory-updates.js +110 -0
- package/dist/memory-updates.js.map +1 -0
- package/dist/outcome-trace.d.ts +79 -0
- package/dist/outcome-trace.d.ts.map +1 -0
- package/dist/outcome-trace.js +117 -0
- package/dist/outcome-trace.js.map +1 -0
- package/dist/outcome.d.ts +97 -0
- package/dist/outcome.d.ts.map +1 -0
- package/dist/outcome.js +160 -0
- package/dist/outcome.js.map +1 -0
- package/dist/planner-compiler.d.ts +14 -0
- package/dist/planner-compiler.d.ts.map +1 -0
- package/dist/planner-compiler.js +26 -0
- package/dist/planner-compiler.js.map +1 -0
- package/dist/planning.d.ts +36 -0
- package/dist/planning.d.ts.map +1 -0
- package/dist/planning.js +141 -0
- package/dist/planning.js.map +1 -0
- package/dist/policy-resolution.d.ts +10 -0
- package/dist/policy-resolution.d.ts.map +1 -0
- package/dist/policy-resolution.js +30 -0
- package/dist/policy-resolution.js.map +1 -0
- package/dist/run-evaluation.d.ts +29 -0
- package/dist/run-evaluation.d.ts.map +1 -0
- package/dist/run-evaluation.js +128 -0
- package/dist/run-evaluation.js.map +1 -0
- package/dist/run-parity.d.ts +24 -0
- package/dist/run-parity.d.ts.map +1 -0
- package/dist/run-parity.js +36 -0
- package/dist/run-parity.js.map +1 -0
- package/dist/run-report-batch.d.ts +150 -0
- package/dist/run-report-batch.d.ts.map +1 -0
- package/dist/run-report-batch.js +391 -0
- package/dist/run-report-batch.js.map +1 -0
- package/dist/run-report-json.d.ts +76 -0
- package/dist/run-report-json.d.ts.map +1 -0
- package/dist/run-report-json.js +451 -0
- package/dist/run-report-json.js.map +1 -0
- package/dist/run-report.d.ts +22 -0
- package/dist/run-report.d.ts.map +1 -0
- package/dist/run-report.js +46 -0
- package/dist/run-report.js.map +1 -0
- package/dist/run.d.ts +20 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +36 -0
- package/dist/run.js.map +1 -0
- package/dist/tool-bindings.d.ts +42 -0
- package/dist/tool-bindings.d.ts.map +1 -0
- package/dist/tool-bindings.js +124 -0
- package/dist/tool-bindings.js.map +1 -0
- package/dist/tool-capabilities.d.ts +37 -0
- package/dist/tool-capabilities.d.ts.map +1 -0
- package/dist/tool-capabilities.js +91 -0
- package/dist/tool-capabilities.js.map +1 -0
- package/dist/tool-executor.d.ts +63 -0
- package/dist/tool-executor.d.ts.map +1 -0
- package/dist/tool-executor.js +176 -0
- package/dist/tool-executor.js.map +1 -0
- package/dist/tool-fixtures.d.ts +18 -0
- package/dist/tool-fixtures.d.ts.map +1 -0
- package/dist/tool-fixtures.js +52 -0
- package/dist/tool-fixtures.js.map +1 -0
- package/dist/tool-invocations.d.ts +31 -0
- package/dist/tool-invocations.d.ts.map +1 -0
- package/dist/tool-invocations.js +79 -0
- package/dist/tool-invocations.js.map +1 -0
- package/dist/tool-provider-executors.d.ts +43 -0
- package/dist/tool-provider-executors.d.ts.map +1 -0
- package/dist/tool-provider-executors.js +59 -0
- package/dist/tool-provider-executors.js.map +1 -0
- package/dist/tool-result-cache.d.ts +37 -0
- package/dist/tool-result-cache.d.ts.map +1 -0
- package/dist/tool-result-cache.js +173 -0
- package/dist/tool-result-cache.js.map +1 -0
- package/dist/tool-results.d.ts +41 -0
- package/dist/tool-results.d.ts.map +1 -0
- package/dist/tool-results.js +137 -0
- package/dist/tool-results.js.map +1 -0
- package/dist/tool-runtime.d.ts +46 -0
- package/dist/tool-runtime.d.ts.map +1 -0
- package/dist/tool-runtime.js +163 -0
- package/dist/tool-runtime.js.map +1 -0
- package/dist/tool-selection-evaluation.d.ts +214 -0
- package/dist/tool-selection-evaluation.d.ts.map +1 -0
- package/dist/tool-selection-evaluation.js +773 -0
- package/dist/tool-selection-evaluation.js.map +1 -0
- package/dist/tool-selection-json.d.ts +71 -0
- package/dist/tool-selection-json.d.ts.map +1 -0
- package/dist/tool-selection-json.js +284 -0
- package/dist/tool-selection-json.js.map +1 -0
- package/dist/tool-selection-policy.d.ts +81 -0
- package/dist/tool-selection-policy.d.ts.map +1 -0
- package/dist/tool-selection-policy.js +376 -0
- package/dist/tool-selection-policy.js.map +1 -0
- package/dist/tool-selection-replay.d.ts +26 -0
- package/dist/tool-selection-replay.d.ts.map +1 -0
- package/dist/tool-selection-replay.js +88 -0
- package/dist/tool-selection-replay.js.map +1 -0
- package/dist/tool-selection-rules.d.ts +46 -0
- package/dist/tool-selection-rules.d.ts.map +1 -0
- package/dist/tool-selection-rules.js +183 -0
- package/dist/tool-selection-rules.js.map +1 -0
- package/dist/tool-selection-trace-export.d.ts +37 -0
- package/dist/tool-selection-trace-export.d.ts.map +1 -0
- package/dist/tool-selection-trace-export.js +324 -0
- package/dist/tool-selection-trace-export.js.map +1 -0
- package/dist/trace-events.d.ts +14 -0
- package/dist/trace-events.d.ts.map +1 -0
- package/dist/trace-events.js +65 -0
- package/dist/trace-events.js.map +1 -0
- package/dist/trace-payload.d.ts +24 -0
- package/dist/trace-payload.d.ts.map +1 -0
- package/dist/trace-payload.js +113 -0
- package/dist/trace-payload.js.map +1 -0
- package/dist/trace-replay.d.ts +276 -0
- package/dist/trace-replay.d.ts.map +1 -0
- package/dist/trace-replay.js +685 -0
- package/dist/trace-replay.js.map +1 -0
- package/dist/trace-report.d.ts +320 -0
- package/dist/trace-report.d.ts.map +1 -0
- package/dist/trace-report.js +1394 -0
- package/dist/trace-report.js.map +1 -0
- package/dist/trace-stages.d.ts +70 -0
- package/dist/trace-stages.d.ts.map +1 -0
- package/dist/trace-stages.js +103 -0
- package/dist/trace-stages.js.map +1 -0
- package/dist/value-readers.d.ts +20 -0
- package/dist/value-readers.d.ts.map +1 -0
- package/dist/value-readers.js +82 -0
- package/dist/value-readers.js.map +1 -0
- package/package.json +341 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export function buildAssistantWorkflowEvalSuite(results, options = {}) {
|
|
2
|
+
const allRows = results.map(toSuiteRow);
|
|
3
|
+
const rows = options.onlyFailures === true
|
|
4
|
+
? allRows.filter((row) => row.status === "fail")
|
|
5
|
+
: allRows;
|
|
6
|
+
const failedRows = rows.filter((row) => row.status === "fail");
|
|
7
|
+
const requiredFailedRows = failedRows.filter((row) => row.required);
|
|
8
|
+
const optionalFailedRows = failedRows.filter((row) => !row.required);
|
|
9
|
+
return {
|
|
10
|
+
generatedAt: new Date().toISOString(),
|
|
11
|
+
sourceResultCount: results.length,
|
|
12
|
+
resultCount: rows.length,
|
|
13
|
+
passCount: rows.filter((row) => row.status === "pass").length,
|
|
14
|
+
failCount: failedRows.length,
|
|
15
|
+
skippedCount: rows.filter((row) => row.status === "skipped").length,
|
|
16
|
+
requiredCount: rows.filter((row) => row.required).length,
|
|
17
|
+
requiredFailedCount: requiredFailedRows.length,
|
|
18
|
+
optionalFailedCount: optionalFailedRows.length,
|
|
19
|
+
requiredFailedCaseIds: requiredFailedRows.map((row) => row.caseId),
|
|
20
|
+
optionalFailedCaseIds: optionalFailedRows.map((row) => row.caseId),
|
|
21
|
+
statusCounts: buildStringCounts(rows.map((row) => row.status)),
|
|
22
|
+
checkCounts: buildCheckCounts(results, rows),
|
|
23
|
+
failedCheckCounts: buildStringCounts(rows.flatMap((row) => row.failedCheckNames)),
|
|
24
|
+
rows,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function buildAssistantWorkflowEvalSuiteTracePayload(suite) {
|
|
28
|
+
return {
|
|
29
|
+
generatedAt: suite.generatedAt,
|
|
30
|
+
sourceResultCount: suite.sourceResultCount,
|
|
31
|
+
resultCount: suite.resultCount,
|
|
32
|
+
passCount: suite.passCount,
|
|
33
|
+
failCount: suite.failCount,
|
|
34
|
+
skippedCount: suite.skippedCount,
|
|
35
|
+
requiredCount: suite.requiredCount,
|
|
36
|
+
requiredFailedCount: suite.requiredFailedCount,
|
|
37
|
+
optionalFailedCount: suite.optionalFailedCount,
|
|
38
|
+
requiredFailedCaseIds: suite.requiredFailedCaseIds,
|
|
39
|
+
optionalFailedCaseIds: suite.optionalFailedCaseIds,
|
|
40
|
+
statusCounts: suite.statusCounts,
|
|
41
|
+
checkCounts: suite.checkCounts,
|
|
42
|
+
failedCheckCounts: suite.failedCheckCounts,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function toSuiteRow(result) {
|
|
46
|
+
return {
|
|
47
|
+
caseId: result.caseId,
|
|
48
|
+
required: result.required,
|
|
49
|
+
status: result.status,
|
|
50
|
+
failedCheckNames: result.checks
|
|
51
|
+
.filter((check) => check.status === "fail")
|
|
52
|
+
.map((check) => check.name),
|
|
53
|
+
passedCount: result.passedCount,
|
|
54
|
+
failedCount: result.failedCount,
|
|
55
|
+
skippedCount: result.skippedCount,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function buildCheckCounts(results, selectedRows) {
|
|
59
|
+
const selectedIds = new Set(selectedRows.map((row) => row.caseId));
|
|
60
|
+
const counts = new Map();
|
|
61
|
+
for (const result of results) {
|
|
62
|
+
if (!selectedIds.has(result.caseId))
|
|
63
|
+
continue;
|
|
64
|
+
for (const check of result.checks) {
|
|
65
|
+
const key = `${check.name}:${check.status}`;
|
|
66
|
+
const current = counts.get(key);
|
|
67
|
+
if (current) {
|
|
68
|
+
current.count += 1;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
counts.set(key, {
|
|
72
|
+
name: check.name,
|
|
73
|
+
status: check.status,
|
|
74
|
+
count: 1,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return [...counts.values()].sort((left, right) => {
|
|
79
|
+
if (right.count !== left.count)
|
|
80
|
+
return right.count - left.count;
|
|
81
|
+
if (left.name !== right.name)
|
|
82
|
+
return left.name.localeCompare(right.name);
|
|
83
|
+
return left.status.localeCompare(right.status);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function buildStringCounts(values) {
|
|
87
|
+
const counts = new Map();
|
|
88
|
+
for (const value of values) {
|
|
89
|
+
if (!value.length)
|
|
90
|
+
continue;
|
|
91
|
+
counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
92
|
+
}
|
|
93
|
+
return [...counts.entries()]
|
|
94
|
+
.map(([key, count]) => ({ key, count }))
|
|
95
|
+
.sort((left, right) => {
|
|
96
|
+
if (right.count !== left.count)
|
|
97
|
+
return right.count - left.count;
|
|
98
|
+
return left.key.localeCompare(right.key);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=eval-suite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-suite.js","sourceRoot":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,CAAC;QAChE,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import type {\n AssistantWorkflowEvalCheckName,\n AssistantWorkflowEvalCheckStatus,\n AssistantWorkflowEvalResult,\n AssistantWorkflowEvalResultStatus,\n} from \"./eval-result.js\";\nimport type { AssistantWorkflowJsonValue } from \"./run-report-json.js\";\n\nexport type AssistantWorkflowEvalSuiteOptions = {\n onlyFailures?: boolean;\n};\n\nexport type AssistantWorkflowEvalSuiteCount = {\n key: string;\n count: number;\n};\n\nexport type AssistantWorkflowEvalSuiteCheckCount = {\n name: AssistantWorkflowEvalCheckName;\n status: AssistantWorkflowEvalCheckStatus;\n count: number;\n};\n\nexport type AssistantWorkflowEvalSuiteRow = {\n caseId: string;\n required: boolean;\n status: AssistantWorkflowEvalResultStatus;\n failedCheckNames: AssistantWorkflowEvalCheckName[];\n passedCount: number;\n failedCount: number;\n skippedCount: number;\n};\n\nexport type AssistantWorkflowEvalSuite = {\n generatedAt: string;\n sourceResultCount: number;\n resultCount: number;\n passCount: number;\n failCount: number;\n skippedCount: number;\n requiredCount: number;\n requiredFailedCount: number;\n optionalFailedCount: number;\n requiredFailedCaseIds: string[];\n optionalFailedCaseIds: string[];\n statusCounts: AssistantWorkflowEvalSuiteCount[];\n checkCounts: AssistantWorkflowEvalSuiteCheckCount[];\n failedCheckCounts: AssistantWorkflowEvalSuiteCount[];\n rows: AssistantWorkflowEvalSuiteRow[];\n};\n\nexport function buildAssistantWorkflowEvalSuite(\n results: readonly AssistantWorkflowEvalResult[],\n options: AssistantWorkflowEvalSuiteOptions = {},\n): AssistantWorkflowEvalSuite {\n const allRows = results.map(toSuiteRow);\n const rows = options.onlyFailures === true\n ? allRows.filter((row) => row.status === \"fail\")\n : allRows;\n const failedRows = rows.filter((row) => row.status === \"fail\");\n const requiredFailedRows = failedRows.filter((row) => row.required);\n const optionalFailedRows = failedRows.filter((row) => !row.required);\n\n return {\n generatedAt: new Date().toISOString(),\n sourceResultCount: results.length,\n resultCount: rows.length,\n passCount: rows.filter((row) => row.status === \"pass\").length,\n failCount: failedRows.length,\n skippedCount: rows.filter((row) => row.status === \"skipped\").length,\n requiredCount: rows.filter((row) => row.required).length,\n requiredFailedCount: requiredFailedRows.length,\n optionalFailedCount: optionalFailedRows.length,\n requiredFailedCaseIds: requiredFailedRows.map((row) => row.caseId),\n optionalFailedCaseIds: optionalFailedRows.map((row) => row.caseId),\n statusCounts: buildStringCounts(rows.map((row) => row.status)),\n checkCounts: buildCheckCounts(results, rows),\n failedCheckCounts: buildStringCounts(rows.flatMap((row) => row.failedCheckNames)),\n rows,\n };\n}\n\nexport function buildAssistantWorkflowEvalSuiteTracePayload(\n suite: AssistantWorkflowEvalSuite,\n): Record<string, AssistantWorkflowJsonValue> {\n return {\n generatedAt: suite.generatedAt,\n sourceResultCount: suite.sourceResultCount,\n resultCount: suite.resultCount,\n passCount: suite.passCount,\n failCount: suite.failCount,\n skippedCount: suite.skippedCount,\n requiredCount: suite.requiredCount,\n requiredFailedCount: suite.requiredFailedCount,\n optionalFailedCount: suite.optionalFailedCount,\n requiredFailedCaseIds: suite.requiredFailedCaseIds,\n optionalFailedCaseIds: suite.optionalFailedCaseIds,\n statusCounts: suite.statusCounts,\n checkCounts: suite.checkCounts,\n failedCheckCounts: suite.failedCheckCounts,\n };\n}\n\nfunction toSuiteRow(result: AssistantWorkflowEvalResult): AssistantWorkflowEvalSuiteRow {\n return {\n caseId: result.caseId,\n required: result.required,\n status: result.status,\n failedCheckNames: result.checks\n .filter((check) => check.status === \"fail\")\n .map((check) => check.name),\n passedCount: result.passedCount,\n failedCount: result.failedCount,\n skippedCount: result.skippedCount,\n };\n}\n\nfunction buildCheckCounts(\n results: readonly AssistantWorkflowEvalResult[],\n selectedRows: readonly AssistantWorkflowEvalSuiteRow[],\n): AssistantWorkflowEvalSuiteCheckCount[] {\n const selectedIds = new Set(selectedRows.map((row) => row.caseId));\n const counts = new Map<string, AssistantWorkflowEvalSuiteCheckCount>();\n for (const result of results) {\n if (!selectedIds.has(result.caseId)) continue;\n for (const check of result.checks) {\n const key = `${check.name}:${check.status}`;\n const current = counts.get(key);\n if (current) {\n current.count += 1;\n continue;\n }\n counts.set(key, {\n name: check.name,\n status: check.status,\n count: 1,\n });\n }\n }\n return [...counts.values()].sort((left, right) => {\n if (right.count !== left.count) return right.count - left.count;\n if (left.name !== right.name) return left.name.localeCompare(right.name);\n return left.status.localeCompare(right.status);\n });\n}\n\nfunction buildStringCounts(values: readonly string[]): AssistantWorkflowEvalSuiteCount[] {\n const counts = new Map<string, number>();\n for (const value of values) {\n if (!value.length) continue;\n counts.set(value, (counts.get(value) ?? 0) + 1);\n }\n return [...counts.entries()]\n .map(([key, count]) => ({ key, count }))\n .sort((left, right) => {\n if (right.count !== left.count) return right.count - left.count;\n return left.key.localeCompare(right.key);\n });\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AssistantWorkflowDecision } from "./decision.js";
|
|
2
|
+
import { type AssistantWorkflowDefinition, type AssistantWorkflowPlanningStepKind, type AssistantWorkflowToolContextRequirement } from "./definition.js";
|
|
3
|
+
export type AssistantWorkflowExecutionPlanStatus = "ready" | "needs-clarification" | "blocked" | "partial";
|
|
4
|
+
export type AssistantWorkflowExecutionStepStatus = "ready" | "blocked" | "optional-skipped" | "partial";
|
|
5
|
+
export type AssistantWorkflowExecutionStep = {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: AssistantWorkflowPlanningStepKind;
|
|
8
|
+
optional: boolean;
|
|
9
|
+
status: AssistantWorkflowExecutionStepStatus;
|
|
10
|
+
toolNames: string[];
|
|
11
|
+
requiredToolNames: string[];
|
|
12
|
+
readyToolNames: string[];
|
|
13
|
+
missingCapabilityNames: string[];
|
|
14
|
+
missingBindingNames: string[];
|
|
15
|
+
providerMismatchNames: string[];
|
|
16
|
+
requiredContext: AssistantWorkflowToolContextRequirement[];
|
|
17
|
+
missingContextRequirements: AssistantWorkflowToolContextRequirement[];
|
|
18
|
+
blockingReasons: string[];
|
|
19
|
+
warnings: string[];
|
|
20
|
+
};
|
|
21
|
+
export type AssistantWorkflowExecutionPlan = {
|
|
22
|
+
intent: string | null;
|
|
23
|
+
status: AssistantWorkflowExecutionPlanStatus;
|
|
24
|
+
steps: AssistantWorkflowExecutionStep[];
|
|
25
|
+
readyToolNames: string[];
|
|
26
|
+
requiredReadyToolNames: string[];
|
|
27
|
+
missingCapabilityNames: string[];
|
|
28
|
+
missingBindingNames: string[];
|
|
29
|
+
providerMismatchNames: string[];
|
|
30
|
+
requiredContext: AssistantWorkflowToolContextRequirement[];
|
|
31
|
+
missingContextRequirements: AssistantWorkflowToolContextRequirement[];
|
|
32
|
+
missingPlanningSteps: string[];
|
|
33
|
+
clarificationRuleIds: string[];
|
|
34
|
+
blockingReasons: string[];
|
|
35
|
+
warnings: string[];
|
|
36
|
+
executionHints: AssistantWorkflowDecision["plan"]["executionHints"];
|
|
37
|
+
};
|
|
38
|
+
export type AssistantWorkflowExecutionPlanOptions = {
|
|
39
|
+
availableContext?: readonly AssistantWorkflowToolContextRequirement[] | null;
|
|
40
|
+
};
|
|
41
|
+
export declare function buildAssistantWorkflowExecutionPlan(workflow: AssistantWorkflowDefinition<string, string, string, string>, decision: AssistantWorkflowDecision, options?: AssistantWorkflowExecutionPlanOptions): AssistantWorkflowExecutionPlan;
|
|
42
|
+
export declare function buildAssistantWorkflowExecutionPlanTracePayload(plan: AssistantWorkflowExecutionPlan): Record<string, unknown>;
|
|
43
|
+
//# sourceMappingURL=execution-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-plan.d.ts","sourceRoot":"","sources":["../src/execution-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iCA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IAC/B,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG;IAClD,gBAAgB,CAAC,EAAE,SAAS,uCAAuC,EAAE,GAAG,IAAI,CAAC;CAC9E,CAAC;AAEF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACrE,QAAQ,EAAE,yBAAyB,EACnC,OAAO,GAAE,qCAA0C,GAClD,8BAA8B,CAqHhC;AAED,wBAAgB,+CAA+C,CAC7D,IAAI,EAAE,8BAA8B,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBzB"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { resolveAssistantWorkflowTools, } from "./tool-bindings.js";
|
|
2
|
+
export function buildAssistantWorkflowExecutionPlan(workflow, decision, options = {}) {
|
|
3
|
+
const availableContext = options.availableContext ? new Set(options.availableContext) : null;
|
|
4
|
+
const steps = decision.plan.steps.map((step) => {
|
|
5
|
+
const requiredToolNames = uniqueStrings(step.requiredToolHints);
|
|
6
|
+
const optionalToolNames = uniqueStrings(step.toolHints).filter((tool) => !requiredToolNames.includes(tool));
|
|
7
|
+
const toolNames = uniqueStrings([...requiredToolNames, ...optionalToolNames]);
|
|
8
|
+
const requiredResolution = resolveAssistantWorkflowTools(workflow, requiredToolNames);
|
|
9
|
+
const optionalResolution = resolveAssistantWorkflowTools(workflow, optionalToolNames);
|
|
10
|
+
const allResolutions = [...requiredResolution.resolutions, ...optionalResolution.resolutions];
|
|
11
|
+
const requiredNonReady = requiredResolution.resolutions.filter((resolution) => resolution.status !== "ready");
|
|
12
|
+
const optionalNonReady = optionalResolution.resolutions.filter((resolution) => resolution.status !== "ready");
|
|
13
|
+
const requiredContextGaps = getContextGaps(requiredResolution.resolutions, availableContext);
|
|
14
|
+
const optionalContextGaps = getContextGaps(optionalResolution.resolutions, availableContext);
|
|
15
|
+
const contextBlockingReasons = step.optional
|
|
16
|
+
? []
|
|
17
|
+
: buildContextBlockingReasons(step.id, requiredContextGaps);
|
|
18
|
+
const blockingReasons = step.optional
|
|
19
|
+
? []
|
|
20
|
+
: [
|
|
21
|
+
...buildToolBlockingReasons(step.id, requiredNonReady),
|
|
22
|
+
...contextBlockingReasons,
|
|
23
|
+
];
|
|
24
|
+
const warnings = [
|
|
25
|
+
...buildToolWarnings(step.id, step.optional ? requiredNonReady : []),
|
|
26
|
+
...buildToolWarnings(step.id, optionalNonReady),
|
|
27
|
+
...buildContextWarnings(step.id, step.optional ? requiredContextGaps : []),
|
|
28
|
+
...buildContextWarnings(step.id, optionalContextGaps),
|
|
29
|
+
];
|
|
30
|
+
const status = step.optional && (requiredNonReady.length > 0 || requiredContextGaps.length > 0)
|
|
31
|
+
? "optional-skipped"
|
|
32
|
+
: blockingReasons.length > 0
|
|
33
|
+
? "blocked"
|
|
34
|
+
: optionalNonReady.length > 0 || optionalContextGaps.length > 0
|
|
35
|
+
? "partial"
|
|
36
|
+
: "ready";
|
|
37
|
+
const allContextGaps = [...requiredContextGaps, ...optionalContextGaps];
|
|
38
|
+
return {
|
|
39
|
+
id: step.id,
|
|
40
|
+
kind: step.kind,
|
|
41
|
+
optional: step.optional,
|
|
42
|
+
status,
|
|
43
|
+
toolNames,
|
|
44
|
+
requiredToolNames,
|
|
45
|
+
readyToolNames: uniqueStrings(allResolutions
|
|
46
|
+
.filter((resolution) => resolution.status === "ready" && getMissingContextRequirements(resolution, availableContext).length === 0)
|
|
47
|
+
.map((resolution) => resolution.toolName)),
|
|
48
|
+
missingCapabilityNames: getResolutionNames(allResolutions, "missing-capability"),
|
|
49
|
+
missingBindingNames: getResolutionNames(allResolutions, "missing-binding"),
|
|
50
|
+
providerMismatchNames: getResolutionNames(allResolutions, "provider-mismatch"),
|
|
51
|
+
requiredContext: uniqueContextRequirements(allResolutions.flatMap((resolution) => resolution.capability?.requiredContext ?? [])),
|
|
52
|
+
missingContextRequirements: uniqueContextRequirements(allContextGaps.flatMap((gap) => gap.missingContextRequirements)),
|
|
53
|
+
blockingReasons,
|
|
54
|
+
warnings,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const requiredResolution = resolveAssistantWorkflowTools(workflow, decision.requiredToolHints);
|
|
58
|
+
const requiredContextGaps = getContextGaps(requiredResolution.resolutions, availableContext);
|
|
59
|
+
const blockingReasons = [
|
|
60
|
+
...decision.clarificationPolicy.blockingRuleIds.map((ruleId) => `clarification required: ${ruleId}`),
|
|
61
|
+
...decision.plan.missingPlanningSteps.map((stepId) => `missing planning step: ${stepId}`),
|
|
62
|
+
...decision.missingRequiredToolHints.map((toolName) => `required tool is unavailable: ${toolName}`),
|
|
63
|
+
...buildToolBlockingReasons("workflow", requiredResolution.resolutions.filter((resolution) => resolution.status !== "ready")),
|
|
64
|
+
...buildContextBlockingReasons("workflow", requiredContextGaps),
|
|
65
|
+
...steps.flatMap((step) => step.blockingReasons),
|
|
66
|
+
];
|
|
67
|
+
const warnings = uniqueStrings([
|
|
68
|
+
...decision.missingToolHints.map((toolName) => `optional tool is unavailable: ${toolName}`),
|
|
69
|
+
...steps.flatMap((step) => step.warnings),
|
|
70
|
+
]);
|
|
71
|
+
const allStepTools = steps.flatMap((step) => step.toolNames);
|
|
72
|
+
const allResolution = resolveAssistantWorkflowTools(workflow, allStepTools);
|
|
73
|
+
const allContextGaps = getContextGaps(allResolution.resolutions, availableContext);
|
|
74
|
+
const status = decision.clarificationPolicy.needsClarification
|
|
75
|
+
? "needs-clarification"
|
|
76
|
+
: blockingReasons.length > 0
|
|
77
|
+
? "blocked"
|
|
78
|
+
: warnings.length > 0 || steps.some((step) => step.status === "partial" || step.status === "optional-skipped")
|
|
79
|
+
? "partial"
|
|
80
|
+
: "ready";
|
|
81
|
+
return {
|
|
82
|
+
intent: decision.intent,
|
|
83
|
+
status,
|
|
84
|
+
steps,
|
|
85
|
+
readyToolNames: uniqueStrings(allResolution.resolutions
|
|
86
|
+
.filter((resolution) => resolution.status === "ready" && getMissingContextRequirements(resolution, availableContext).length === 0)
|
|
87
|
+
.map((resolution) => resolution.toolName)),
|
|
88
|
+
requiredReadyToolNames: uniqueStrings(requiredResolution.resolutions
|
|
89
|
+
.filter((resolution) => resolution.status === "ready" && getMissingContextRequirements(resolution, availableContext).length === 0)
|
|
90
|
+
.map((resolution) => resolution.toolName)),
|
|
91
|
+
missingCapabilityNames: uniqueStrings([
|
|
92
|
+
...allResolution.missingCapabilityNames,
|
|
93
|
+
...requiredResolution.missingCapabilityNames,
|
|
94
|
+
]),
|
|
95
|
+
missingBindingNames: uniqueStrings([
|
|
96
|
+
...allResolution.missingBindingNames,
|
|
97
|
+
...requiredResolution.missingBindingNames,
|
|
98
|
+
]),
|
|
99
|
+
providerMismatchNames: uniqueStrings([
|
|
100
|
+
...allResolution.providerMismatchNames,
|
|
101
|
+
...requiredResolution.providerMismatchNames,
|
|
102
|
+
]),
|
|
103
|
+
requiredContext: uniqueContextRequirements(allResolution.resolutions.flatMap((resolution) => resolution.capability?.requiredContext ?? [])),
|
|
104
|
+
missingContextRequirements: uniqueContextRequirements([
|
|
105
|
+
...allContextGaps.flatMap((gap) => gap.missingContextRequirements),
|
|
106
|
+
...requiredContextGaps.flatMap((gap) => gap.missingContextRequirements),
|
|
107
|
+
]),
|
|
108
|
+
missingPlanningSteps: [...decision.plan.missingPlanningSteps],
|
|
109
|
+
clarificationRuleIds: [...decision.clarificationPolicy.blockingRuleIds],
|
|
110
|
+
blockingReasons: uniqueStrings(blockingReasons),
|
|
111
|
+
warnings,
|
|
112
|
+
executionHints: decision.plan.executionHints,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export function buildAssistantWorkflowExecutionPlanTracePayload(plan) {
|
|
116
|
+
return {
|
|
117
|
+
intent: plan.intent,
|
|
118
|
+
status: plan.status,
|
|
119
|
+
steps: plan.steps,
|
|
120
|
+
readyToolNames: plan.readyToolNames,
|
|
121
|
+
requiredReadyToolNames: plan.requiredReadyToolNames,
|
|
122
|
+
missingCapabilityNames: plan.missingCapabilityNames,
|
|
123
|
+
missingBindingNames: plan.missingBindingNames,
|
|
124
|
+
providerMismatchNames: plan.providerMismatchNames,
|
|
125
|
+
requiredContext: plan.requiredContext,
|
|
126
|
+
missingContextRequirements: plan.missingContextRequirements,
|
|
127
|
+
missingPlanningSteps: plan.missingPlanningSteps,
|
|
128
|
+
clarificationRuleIds: plan.clarificationRuleIds,
|
|
129
|
+
blockingReasons: plan.blockingReasons,
|
|
130
|
+
warnings: plan.warnings,
|
|
131
|
+
executionHints: plan.executionHints,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function buildToolBlockingReasons(stepId, resolutions) {
|
|
135
|
+
return resolutions.map((resolution) => `${stepId} required tool ${resolution.toolName} is ${resolution.status}`);
|
|
136
|
+
}
|
|
137
|
+
function buildToolWarnings(stepId, resolutions) {
|
|
138
|
+
return resolutions.map((resolution) => `${stepId} optional tool ${resolution.toolName} is ${resolution.status}`);
|
|
139
|
+
}
|
|
140
|
+
function getContextGaps(resolutions, availableContext) {
|
|
141
|
+
return resolutions
|
|
142
|
+
.map((resolution) => ({
|
|
143
|
+
toolName: resolution.toolName,
|
|
144
|
+
missingContextRequirements: getMissingContextRequirements(resolution, availableContext),
|
|
145
|
+
}))
|
|
146
|
+
.filter((gap) => gap.missingContextRequirements.length > 0);
|
|
147
|
+
}
|
|
148
|
+
function getMissingContextRequirements(resolution, availableContext) {
|
|
149
|
+
if (!availableContext || resolution.status !== "ready")
|
|
150
|
+
return [];
|
|
151
|
+
return uniqueContextRequirements(resolution.capability?.requiredContext ?? [])
|
|
152
|
+
.filter((requirement) => !availableContext.has(requirement));
|
|
153
|
+
}
|
|
154
|
+
function buildContextBlockingReasons(stepId, gaps) {
|
|
155
|
+
return gaps.map((gap) => `${stepId} required tool ${gap.toolName} missing context: ${gap.missingContextRequirements.join(", ")}`);
|
|
156
|
+
}
|
|
157
|
+
function buildContextWarnings(stepId, gaps) {
|
|
158
|
+
return gaps.map((gap) => `${stepId} optional tool ${gap.toolName} missing context: ${gap.missingContextRequirements.join(", ")}`);
|
|
159
|
+
}
|
|
160
|
+
function getResolutionNames(resolutions, status) {
|
|
161
|
+
return uniqueStrings(resolutions
|
|
162
|
+
.filter((resolution) => resolution.status === status)
|
|
163
|
+
.map((resolution) => resolution.toolName));
|
|
164
|
+
}
|
|
165
|
+
function uniqueStrings(values) {
|
|
166
|
+
const out = [];
|
|
167
|
+
const seen = new Set();
|
|
168
|
+
for (const value of values) {
|
|
169
|
+
if (seen.has(value))
|
|
170
|
+
continue;
|
|
171
|
+
seen.add(value);
|
|
172
|
+
out.push(value);
|
|
173
|
+
}
|
|
174
|
+
return out;
|
|
175
|
+
}
|
|
176
|
+
function uniqueContextRequirements(values) {
|
|
177
|
+
const out = [];
|
|
178
|
+
const seen = new Set();
|
|
179
|
+
for (const value of values) {
|
|
180
|
+
if (seen.has(value))
|
|
181
|
+
continue;
|
|
182
|
+
seen.add(value);
|
|
183
|
+
out.push(value);
|
|
184
|
+
}
|
|
185
|
+
return out;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=execution-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-plan.js","sourceRoot":"","sources":["../src/execution-plan.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,6BAA6B,GAE9B,MAAM,oBAAoB,CAAC;AAqD5B,MAAM,UAAU,mCAAmC,CACjD,QAAqE,EACrE,QAAmC,EACnC,UAAiD,EAAE;IAEnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IA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AG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type { AssistantWorkflowDecision } from \"./decision.js\";\nimport {\n type AssistantWorkflowDefinition,\n type AssistantWorkflowPlanningStepKind,\n type AssistantWorkflowToolContextRequirement,\n} from \"./definition.js\";\nimport {\n resolveAssistantWorkflowTools,\n type AssistantWorkflowToolResolution,\n} from \"./tool-bindings.js\";\n\nexport type AssistantWorkflowExecutionPlanStatus =\n | \"ready\"\n | \"needs-clarification\"\n | \"blocked\"\n | \"partial\";\n\nexport type AssistantWorkflowExecutionStepStatus =\n | \"ready\"\n | \"blocked\"\n | \"optional-skipped\"\n | \"partial\";\n\nexport type AssistantWorkflowExecutionStep = {\n id: string;\n kind: AssistantWorkflowPlanningStepKind;\n optional: boolean;\n status: AssistantWorkflowExecutionStepStatus;\n toolNames: string[];\n requiredToolNames: string[];\n readyToolNames: string[];\n missingCapabilityNames: string[];\n missingBindingNames: string[];\n providerMismatchNames: string[];\n requiredContext: AssistantWorkflowToolContextRequirement[];\n missingContextRequirements: AssistantWorkflowToolContextRequirement[];\n blockingReasons: string[];\n warnings: string[];\n};\n\nexport type AssistantWorkflowExecutionPlan = {\n intent: string | null;\n status: AssistantWorkflowExecutionPlanStatus;\n steps: AssistantWorkflowExecutionStep[];\n readyToolNames: string[];\n requiredReadyToolNames: string[];\n missingCapabilityNames: string[];\n missingBindingNames: string[];\n providerMismatchNames: string[];\n requiredContext: AssistantWorkflowToolContextRequirement[];\n missingContextRequirements: AssistantWorkflowToolContextRequirement[];\n missingPlanningSteps: string[];\n clarificationRuleIds: string[];\n blockingReasons: string[];\n warnings: string[];\n executionHints: AssistantWorkflowDecision[\"plan\"][\"executionHints\"];\n};\n\nexport type AssistantWorkflowExecutionPlanOptions = {\n availableContext?: readonly AssistantWorkflowToolContextRequirement[] | null;\n};\n\nexport function buildAssistantWorkflowExecutionPlan(\n workflow: AssistantWorkflowDefinition<string, string, string, string>,\n decision: AssistantWorkflowDecision,\n options: AssistantWorkflowExecutionPlanOptions = {},\n): AssistantWorkflowExecutionPlan {\n const availableContext = options.availableContext ? new Set(options.availableContext) : null;\n const steps = decision.plan.steps.map((step) => {\n const requiredToolNames = uniqueStrings(step.requiredToolHints);\n const optionalToolNames = uniqueStrings(step.toolHints).filter((tool) => !requiredToolNames.includes(tool));\n const toolNames = uniqueStrings([...requiredToolNames, ...optionalToolNames]);\n const requiredResolution = resolveAssistantWorkflowTools(workflow, requiredToolNames);\n const optionalResolution = resolveAssistantWorkflowTools(workflow, optionalToolNames);\n const allResolutions = [...requiredResolution.resolutions, ...optionalResolution.resolutions];\n const requiredNonReady = requiredResolution.resolutions.filter((resolution) => resolution.status !== \"ready\");\n const optionalNonReady = optionalResolution.resolutions.filter((resolution) => resolution.status !== \"ready\");\n const requiredContextGaps = getContextGaps(requiredResolution.resolutions, availableContext);\n const optionalContextGaps = getContextGaps(optionalResolution.resolutions, availableContext);\n const contextBlockingReasons = step.optional\n ? []\n : buildContextBlockingReasons(step.id, requiredContextGaps);\n const blockingReasons = step.optional\n ? []\n : [\n ...buildToolBlockingReasons(step.id, requiredNonReady),\n ...contextBlockingReasons,\n ];\n const warnings = [\n ...buildToolWarnings(step.id, step.optional ? requiredNonReady : []),\n ...buildToolWarnings(step.id, optionalNonReady),\n ...buildContextWarnings(step.id, step.optional ? requiredContextGaps : []),\n ...buildContextWarnings(step.id, optionalContextGaps),\n ];\n const status: AssistantWorkflowExecutionStepStatus =\n step.optional && (requiredNonReady.length > 0 || requiredContextGaps.length > 0)\n ? \"optional-skipped\"\n : blockingReasons.length > 0\n ? \"blocked\"\n : optionalNonReady.length > 0 || optionalContextGaps.length > 0\n ? \"partial\"\n : \"ready\";\n const allContextGaps = [...requiredContextGaps, ...optionalContextGaps];\n\n return {\n id: step.id,\n kind: step.kind,\n optional: step.optional,\n status,\n toolNames,\n requiredToolNames,\n readyToolNames: uniqueStrings(allResolutions\n .filter((resolution) => resolution.status === \"ready\" && getMissingContextRequirements(resolution, availableContext).length === 0)\n .map((resolution) => resolution.toolName)),\n missingCapabilityNames: getResolutionNames(allResolutions, \"missing-capability\"),\n missingBindingNames: getResolutionNames(allResolutions, \"missing-binding\"),\n providerMismatchNames: getResolutionNames(allResolutions, \"provider-mismatch\"),\n requiredContext: uniqueContextRequirements(allResolutions.flatMap((resolution) => resolution.capability?.requiredContext ?? [])),\n missingContextRequirements: uniqueContextRequirements(allContextGaps.flatMap((gap) => gap.missingContextRequirements)),\n blockingReasons,\n warnings,\n };\n });\n\n const requiredResolution = resolveAssistantWorkflowTools(workflow, decision.requiredToolHints);\n const requiredContextGaps = getContextGaps(requiredResolution.resolutions, availableContext);\n const blockingReasons = [\n ...decision.clarificationPolicy.blockingRuleIds.map((ruleId) => `clarification required: ${ruleId}`),\n ...decision.plan.missingPlanningSteps.map((stepId) => `missing planning step: ${stepId}`),\n ...decision.missingRequiredToolHints.map((toolName) => `required tool is unavailable: ${toolName}`),\n ...buildToolBlockingReasons(\"workflow\", requiredResolution.resolutions.filter((resolution) => resolution.status !== \"ready\")),\n ...buildContextBlockingReasons(\"workflow\", requiredContextGaps),\n ...steps.flatMap((step) => step.blockingReasons),\n ];\n const warnings = uniqueStrings([\n ...decision.missingToolHints.map((toolName) => `optional tool is unavailable: ${toolName}`),\n ...steps.flatMap((step) => step.warnings),\n ]);\n const allStepTools = steps.flatMap((step) => step.toolNames);\n const allResolution = resolveAssistantWorkflowTools(workflow, allStepTools);\n const allContextGaps = getContextGaps(allResolution.resolutions, availableContext);\n const status: AssistantWorkflowExecutionPlanStatus =\n decision.clarificationPolicy.needsClarification\n ? \"needs-clarification\"\n : blockingReasons.length > 0\n ? \"blocked\"\n : warnings.length > 0 || steps.some((step) => step.status === \"partial\" || step.status === \"optional-skipped\")\n ? \"partial\"\n : \"ready\";\n\n return {\n intent: decision.intent,\n status,\n steps,\n readyToolNames: uniqueStrings(allResolution.resolutions\n .filter((resolution) => resolution.status === \"ready\" && getMissingContextRequirements(resolution, availableContext).length === 0)\n .map((resolution) => resolution.toolName)),\n requiredReadyToolNames: uniqueStrings(requiredResolution.resolutions\n .filter((resolution) => resolution.status === \"ready\" && getMissingContextRequirements(resolution, availableContext).length === 0)\n .map((resolution) => resolution.toolName)),\n missingCapabilityNames: uniqueStrings([\n ...allResolution.missingCapabilityNames,\n ...requiredResolution.missingCapabilityNames,\n ]),\n missingBindingNames: uniqueStrings([\n ...allResolution.missingBindingNames,\n ...requiredResolution.missingBindingNames,\n ]),\n providerMismatchNames: uniqueStrings([\n ...allResolution.providerMismatchNames,\n ...requiredResolution.providerMismatchNames,\n ]),\n requiredContext: uniqueContextRequirements(allResolution.resolutions.flatMap((resolution) => resolution.capability?.requiredContext ?? [])),\n missingContextRequirements: uniqueContextRequirements([\n ...allContextGaps.flatMap((gap) => gap.missingContextRequirements),\n ...requiredContextGaps.flatMap((gap) => gap.missingContextRequirements),\n ]),\n missingPlanningSteps: [...decision.plan.missingPlanningSteps],\n clarificationRuleIds: [...decision.clarificationPolicy.blockingRuleIds],\n blockingReasons: uniqueStrings(blockingReasons),\n warnings,\n executionHints: decision.plan.executionHints,\n };\n}\n\nexport function buildAssistantWorkflowExecutionPlanTracePayload(\n plan: AssistantWorkflowExecutionPlan,\n): Record<string, unknown> {\n return {\n intent: plan.intent,\n status: plan.status,\n steps: plan.steps,\n readyToolNames: plan.readyToolNames,\n requiredReadyToolNames: plan.requiredReadyToolNames,\n missingCapabilityNames: plan.missingCapabilityNames,\n missingBindingNames: plan.missingBindingNames,\n providerMismatchNames: plan.providerMismatchNames,\n requiredContext: plan.requiredContext,\n missingContextRequirements: plan.missingContextRequirements,\n missingPlanningSteps: plan.missingPlanningSteps,\n clarificationRuleIds: plan.clarificationRuleIds,\n blockingReasons: plan.blockingReasons,\n warnings: plan.warnings,\n executionHints: plan.executionHints,\n };\n}\n\nfunction buildToolBlockingReasons(stepId: string, resolutions: readonly AssistantWorkflowToolResolution[]): string[] {\n return resolutions.map((resolution) => `${stepId} required tool ${resolution.toolName} is ${resolution.status}`);\n}\n\nfunction buildToolWarnings(stepId: string, resolutions: readonly AssistantWorkflowToolResolution[]): string[] {\n return resolutions.map((resolution) => `${stepId} optional tool ${resolution.toolName} is ${resolution.status}`);\n}\n\ntype ToolContextGap = {\n toolName: string;\n missingContextRequirements: AssistantWorkflowToolContextRequirement[];\n};\n\nfunction getContextGaps(\n resolutions: readonly AssistantWorkflowToolResolution[],\n availableContext: ReadonlySet<AssistantWorkflowToolContextRequirement> | null,\n): ToolContextGap[] {\n return resolutions\n .map((resolution) => ({\n toolName: resolution.toolName,\n missingContextRequirements: getMissingContextRequirements(resolution, availableContext),\n }))\n .filter((gap) => gap.missingContextRequirements.length > 0);\n}\n\nfunction getMissingContextRequirements(\n resolution: AssistantWorkflowToolResolution,\n availableContext: ReadonlySet<AssistantWorkflowToolContextRequirement> | null,\n): AssistantWorkflowToolContextRequirement[] {\n if (!availableContext || resolution.status !== \"ready\") return [];\n return uniqueContextRequirements(resolution.capability?.requiredContext ?? [])\n .filter((requirement) => !availableContext.has(requirement));\n}\n\nfunction buildContextBlockingReasons(stepId: string, gaps: readonly ToolContextGap[]): string[] {\n return gaps.map((gap) =>\n `${stepId} required tool ${gap.toolName} missing context: ${gap.missingContextRequirements.join(\", \")}`,\n );\n}\n\nfunction buildContextWarnings(stepId: string, gaps: readonly ToolContextGap[]): string[] {\n return gaps.map((gap) =>\n `${stepId} optional tool ${gap.toolName} missing context: ${gap.missingContextRequirements.join(\", \")}`,\n );\n}\n\nfunction getResolutionNames(\n resolutions: readonly AssistantWorkflowToolResolution[],\n status: AssistantWorkflowToolResolution[\"status\"],\n): string[] {\n return uniqueStrings(\n resolutions\n .filter((resolution) => resolution.status === status)\n .map((resolution) => resolution.toolName),\n );\n}\n\nfunction uniqueStrings(values: readonly string[]): string[] {\n const out: string[] = [];\n const seen = new Set<string>();\n for (const value of values) {\n if (seen.has(value)) continue;\n seen.add(value);\n out.push(value);\n }\n return out;\n}\n\nfunction uniqueContextRequirements(\n values: readonly AssistantWorkflowToolContextRequirement[],\n): AssistantWorkflowToolContextRequirement[] {\n const out: AssistantWorkflowToolContextRequirement[] = [];\n const seen = new Set<AssistantWorkflowToolContextRequirement>();\n for (const value of values) {\n if (seen.has(value)) continue;\n seen.add(value);\n out.push(value);\n }\n return out;\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type AssistantWorkflowHostedToolType = "web_search" | "file_search" | "mcp" | "tool_search";
|
|
2
|
+
export type AssistantWorkflowHostedToolDefinition = {
|
|
3
|
+
type: "web_search";
|
|
4
|
+
} | {
|
|
5
|
+
type: "file_search";
|
|
6
|
+
vector_store_ids: string[];
|
|
7
|
+
} | {
|
|
8
|
+
type: "mcp";
|
|
9
|
+
server_label: string;
|
|
10
|
+
server_url?: string;
|
|
11
|
+
connector_id?: string;
|
|
12
|
+
server_description?: string;
|
|
13
|
+
allowed_tools?: string[] | {
|
|
14
|
+
read_only?: boolean;
|
|
15
|
+
tool_names?: string[];
|
|
16
|
+
};
|
|
17
|
+
require_approval?: "always" | "never";
|
|
18
|
+
} | {
|
|
19
|
+
type: "tool_search";
|
|
20
|
+
};
|
|
21
|
+
export type AssistantWorkflowHostedToolAllowlistEntry<TLane extends string = string> = {
|
|
22
|
+
type: AssistantWorkflowHostedToolType;
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
lanes: TLane[];
|
|
25
|
+
externalOnly: boolean;
|
|
26
|
+
definition: AssistantWorkflowHostedToolDefinition;
|
|
27
|
+
};
|
|
28
|
+
export type AssistantWorkflowHostedToolPolicy<TLane extends string = string> = {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
allowlist: AssistantWorkflowHostedToolAllowlistEntry<TLane>[];
|
|
31
|
+
};
|
|
32
|
+
export type AssistantWorkflowHostedToolBlockedReason = "policy_disabled" | "entry_disabled" | "responses_transport_required" | "lane_not_allowed" | "external_intent_required" | "duplicate";
|
|
33
|
+
export type AssistantWorkflowHostedToolBlockedEntry = {
|
|
34
|
+
type: AssistantWorkflowHostedToolType;
|
|
35
|
+
reason: AssistantWorkflowHostedToolBlockedReason;
|
|
36
|
+
};
|
|
37
|
+
export type AssistantWorkflowHostedToolSelection = {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
configuredCount: number;
|
|
40
|
+
tools: AssistantWorkflowHostedToolDefinition[];
|
|
41
|
+
allowedTypes: AssistantWorkflowHostedToolType[];
|
|
42
|
+
blocked: AssistantWorkflowHostedToolBlockedEntry[];
|
|
43
|
+
};
|
|
44
|
+
export type AssistantWorkflowHostedToolDirective = {
|
|
45
|
+
localTools: "include" | "exclude";
|
|
46
|
+
toolChoice: "auto" | "required";
|
|
47
|
+
reason: string;
|
|
48
|
+
};
|
|
49
|
+
export type AssistantWorkflowHostedToolIntentClassification = {
|
|
50
|
+
intent?: string | null;
|
|
51
|
+
} | null | undefined;
|
|
52
|
+
export type AssistantWorkflowHostedToolPolicyParseOptions<TLane extends string = string> = {
|
|
53
|
+
normalizeLane?: (value: string) => TLane | null;
|
|
54
|
+
defaultLanes?: readonly TLane[];
|
|
55
|
+
};
|
|
56
|
+
export declare function parseAssistantWorkflowHostedToolPolicy<TLane extends string = string>(value: unknown, options?: AssistantWorkflowHostedToolPolicyParseOptions<TLane>): AssistantWorkflowHostedToolPolicy<TLane>;
|
|
57
|
+
export declare function selectAssistantWorkflowHostedToolsForRequest<TLane extends string = string>(policy: AssistantWorkflowHostedToolPolicy<TLane>, input: {
|
|
58
|
+
lane: TLane;
|
|
59
|
+
transport: string | null | undefined;
|
|
60
|
+
externalRequest?: boolean | null;
|
|
61
|
+
}): AssistantWorkflowHostedToolSelection;
|
|
62
|
+
export declare function isAssistantWorkflowExternalWebSearchClassification(classification: AssistantWorkflowHostedToolIntentClassification): boolean;
|
|
63
|
+
export declare function assistantWorkflowRequestHasHostedTool(tools: readonly AssistantWorkflowHostedToolDefinition[] | null | undefined, type: AssistantWorkflowHostedToolType): boolean;
|
|
64
|
+
export declare function buildAssistantWorkflowHostedToolDirectiveForRequest(input: {
|
|
65
|
+
externalWebSearchRequest: boolean;
|
|
66
|
+
hostedTools: readonly AssistantWorkflowHostedToolDefinition[] | null | undefined;
|
|
67
|
+
}): AssistantWorkflowHostedToolDirective | null;
|
|
68
|
+
export declare function normalizeAssistantWorkflowHostedToolType(value: unknown): AssistantWorkflowHostedToolType | null;
|
|
69
|
+
export declare function normalizeAssistantWorkflowHostedToolLane(value: string): string | null;
|
|
70
|
+
//# sourceMappingURL=hosted-tool-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-tool-policy.d.ts","sourceRoot":"","sources":["../src/hosted-tool-policy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+BAA+B,GAAG,YAAY,GAAG,aAAa,GAAG,KAAK,GAAG,aAAa,CAAC;AAEnG,MAAM,MAAM,qCAAqC,GAC7C;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,GACnD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1E,gBAAgB,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACvC,GACD;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE5B,MAAM,MAAM,yCAAyC,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI;IACrF,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;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