@sensigo/realm 0.33.0 → 0.34.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/dist/engine/execution-loop.d.ts +22 -1
- package/dist/engine/execution-loop.d.ts.map +1 -1
- package/dist/engine/execution-loop.js +345 -6
- package/dist/engine/execution-loop.js.map +1 -1
- package/dist/engine/gate-timing.d.ts +17 -0
- package/dist/engine/gate-timing.d.ts.map +1 -0
- package/dist/engine/gate-timing.js +19 -0
- package/dist/engine/gate-timing.js.map +1 -0
- package/dist/engine/reclaim-step.d.ts +8 -0
- package/dist/engine/reclaim-step.d.ts.map +1 -1
- package/dist/engine/reclaim-step.js +48 -3
- package/dist/engine/reclaim-step.js.map +1 -1
- package/dist/engine/run-health.d.ts +1 -1
- package/dist/engine/run-health.d.ts.map +1 -1
- package/dist/engine/run-health.js +39 -2
- package/dist/engine/run-health.js.map +1 -1
- package/dist/engine/settlement.d.ts +52 -14
- package/dist/engine/settlement.d.ts.map +1 -1
- package/dist/engine/settlement.js +258 -16
- package/dist/engine/settlement.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/types/response-envelope.d.ts +16 -0
- package/dist/types/response-envelope.d.ts.map +1 -1
- package/dist/types/run-record.d.ts +106 -0
- package/dist/types/run-record.d.ts.map +1 -1
- package/dist/types/settlement.d.ts +31 -2
- package/dist/types/settlement.d.ts.map +1 -1
- package/dist/types/workflow-definition.d.ts +113 -32
- package/dist/types/workflow-definition.d.ts.map +1 -1
- package/dist/types/workflow-definition.js +20 -0
- package/dist/types/workflow-definition.js.map +1 -1
- package/dist/workflow/diagnostics.d.ts +1 -1
- package/dist/workflow/diagnostics.d.ts.map +1 -1
- package/dist/workflow/diagnostics.js +3 -0
- package/dist/workflow/diagnostics.js.map +1 -1
- package/dist/workflow/structured-output-eligibility.d.ts +81 -0
- package/dist/workflow/structured-output-eligibility.d.ts.map +1 -0
- package/dist/workflow/structured-output-eligibility.js +359 -0
- package/dist/workflow/structured-output-eligibility.js.map +1 -0
- package/dist/workflow/yaml-loader.d.ts.map +1 -1
- package/dist/workflow/yaml-loader.js +145 -2
- package/dist/workflow/yaml-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { JsonSchema, StepDefinition } from '../types/workflow-definition.js';
|
|
2
|
+
/** A single ineligibility reason. `remediation` is author-grade — it names the exact fix. */
|
|
3
|
+
export interface StructuredOutputReason {
|
|
4
|
+
code: 'no_schema' | 'missing_additional_properties' | 'unsupported_keyword' | 'too_many_optionals' | 'too_many_unions' | 'unsupported_context_tools';
|
|
5
|
+
/** Schema-relative path to the offending node (`''` = root; e.g. `properties.address`). */
|
|
6
|
+
path: string;
|
|
7
|
+
remediation: string;
|
|
8
|
+
}
|
|
9
|
+
/** A caveat: the schema is eligible, but this feature is enforced post-hoc by realm (Ajv), not
|
|
10
|
+
* by the grammar itself — silently ignored or rejected by the API either way. */
|
|
11
|
+
export interface StructuredOutputCaveat {
|
|
12
|
+
code: 'unenforced_keyword' | 'unenforced_format' | 'unenforced_pattern' | 'optional_emission';
|
|
13
|
+
path: string;
|
|
14
|
+
remediation: string;
|
|
15
|
+
}
|
|
16
|
+
export type StructuredOutputVerdict = {
|
|
17
|
+
verdict: 'eligible';
|
|
18
|
+
} | {
|
|
19
|
+
verdict: 'eligible_with_caveats';
|
|
20
|
+
caveats: StructuredOutputCaveat[];
|
|
21
|
+
} | {
|
|
22
|
+
verdict: 'ineligible';
|
|
23
|
+
reasons: StructuredOutputReason[];
|
|
24
|
+
caveats?: StructuredOutputCaveat[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Phase A entry: the step definition itself — the effective-schema collapse
|
|
28
|
+
* (`output_schema ?? input_schema`) happens INSIDE this function. Mirrors the two real runtime
|
|
29
|
+
* chains (`run-agent.ts:426-429`/`:556-558`, `execution-loop.ts`), which collapse to this same
|
|
30
|
+
* two-term formula statically. Gate-step `input_schema` (never sent to a provider) is out of
|
|
31
|
+
* population — callers only invoke Phase A for `execution: 'agent'` steps.
|
|
32
|
+
*/
|
|
33
|
+
type PhaseAInput = Pick<StepDefinition, 'output_schema' | 'input_schema' | 'tools'>;
|
|
34
|
+
/**
|
|
35
|
+
* Phase B entry: the RESOLVED schema value actually passed to the provider, plus the step's
|
|
36
|
+
* `tools` flag — never re-derived from a step definition (design §2, the Rv11 verdict-vs-wire
|
|
37
|
+
* rule: keeps the crack between "what was gated" and "what was sent" closed).
|
|
38
|
+
*/
|
|
39
|
+
interface PhaseBInput {
|
|
40
|
+
schema: unknown;
|
|
41
|
+
tools: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* G2 keyword allowlist — snapshot-dated 2026-08-05, CONTENTS transcribed verbatim from the
|
|
45
|
+
* "Supported features" accordion at `plans/issue-236/refs/structured-outputs.md:2822-2832`
|
|
46
|
+
* (that file is a frozen doc snapshot; re-verify against Anthropic's current docs before ever
|
|
47
|
+
* editing this list). `type`/`properties`/`items`/`description`/`title` are added as structural
|
|
48
|
+
* necessities never called out as unsupported anywhere in the source doc — everything else below
|
|
49
|
+
* this comment is a direct transcription:
|
|
50
|
+
* "All basic types: object, array, string, integer, number, boolean, null" (the `type` keyword)
|
|
51
|
+
* `enum` · `const` · `anyOf` and `allOf` · `$ref`, `$def`, and `definitions` · `default` ·
|
|
52
|
+
* `required` and `additionalProperties` · string `format` (10 values — gated separately, G4) ·
|
|
53
|
+
* array `minItems`.
|
|
54
|
+
* A keyword present on a schema node but absent from this set is NOT necessarily rejected by the
|
|
55
|
+
* API — G2's hard class (minimum/maximum/multipleOf, recursion, external $ref, complex enum
|
|
56
|
+
* members) is enumerated separately below; everything else off-allowlist degrades to a caveat
|
|
57
|
+
* ("silently ignored or rejected by the API — either way enforced post-hoc by realm").
|
|
58
|
+
*/
|
|
59
|
+
export declare const STRICT_SUPPORTED_KEYWORDS: Set<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Assesses whether a step's effective output schema is eligible for Anthropic strict/grammar-
|
|
62
|
+
* constrained tool use. Pure, synchronous, derive-always (never persisted). See the verdict table
|
|
63
|
+
* in `docs/reference/yaml-schema.md`'s `structured_output` section for the full G0–G7' rule set
|
|
64
|
+
* with citations; the summary:
|
|
65
|
+
* G0 no effective schema / non-object root ⇒ ineligible · G1 every object missing explicit
|
|
66
|
+
* `additionalProperties: false` ⇒ ineligible · G2 hard class (numeric constraints, recursion
|
|
67
|
+
* incl. root `$ref:'#'`, external `$ref`, complex enum members) ⇒ ineligible; any other
|
|
68
|
+
* off-allowlist keyword ⇒ caveat · G3 >24 optional properties / >16 union-typed ⇒ ineligible ·
|
|
69
|
+
* G4 unsupported `format` value ⇒ caveat · G5 `pattern` present ⇒ caveat · G6 `tools`-bearing
|
|
70
|
+
* step ⇒ ineligible (checked FIRST, short-circuits everything else) · G7' (Amendment 2) ANY
|
|
71
|
+
* optional properties on an otherwise-eligible schema ⇒ caveat `optional_emission` (strict
|
|
72
|
+
* measurably suppresses optional-field emission — see the benchmark cited in the docs section;
|
|
73
|
+
* the remedy is making consumer-load-bearing fields `required`).
|
|
74
|
+
*/
|
|
75
|
+
export declare function assessStructuredOutputEligibility(input: PhaseAInput | PhaseBInput): StructuredOutputVerdict;
|
|
76
|
+
/** Renders a step's structured_output declaration into a plain-English author message, combining
|
|
77
|
+
* every reason's own remediation (`; `-joined) — the shared formatter both the loader's typed
|
|
78
|
+
* error and create_workflow's PRE-register rejection use, so the two surfaces never drift. */
|
|
79
|
+
export declare function renderIneligibleMessage(reasons: StructuredOutputReason[]): string;
|
|
80
|
+
export type { JsonSchema };
|
|
81
|
+
//# sourceMappingURL=structured-output-eligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-output-eligibility.d.ts","sourceRoot":"","sources":["../../src/workflow/structured-output-eligibility.ts"],"names":[],"mappings":"AA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AAID,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
function isPhaseB(input) {
|
|
2
|
+
return 'schema' in input;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* G2 keyword allowlist — snapshot-dated 2026-08-05, CONTENTS transcribed verbatim from the
|
|
6
|
+
* "Supported features" accordion at `plans/issue-236/refs/structured-outputs.md:2822-2832`
|
|
7
|
+
* (that file is a frozen doc snapshot; re-verify against Anthropic's current docs before ever
|
|
8
|
+
* editing this list). `type`/`properties`/`items`/`description`/`title` are added as structural
|
|
9
|
+
* necessities never called out as unsupported anywhere in the source doc — everything else below
|
|
10
|
+
* this comment is a direct transcription:
|
|
11
|
+
* "All basic types: object, array, string, integer, number, boolean, null" (the `type` keyword)
|
|
12
|
+
* `enum` · `const` · `anyOf` and `allOf` · `$ref`, `$def`, and `definitions` · `default` ·
|
|
13
|
+
* `required` and `additionalProperties` · string `format` (10 values — gated separately, G4) ·
|
|
14
|
+
* array `minItems`.
|
|
15
|
+
* A keyword present on a schema node but absent from this set is NOT necessarily rejected by the
|
|
16
|
+
* API — G2's hard class (minimum/maximum/multipleOf, recursion, external $ref, complex enum
|
|
17
|
+
* members) is enumerated separately below; everything else off-allowlist degrades to a caveat
|
|
18
|
+
* ("silently ignored or rejected by the API — either way enforced post-hoc by realm").
|
|
19
|
+
*/
|
|
20
|
+
export const STRICT_SUPPORTED_KEYWORDS = new Set([
|
|
21
|
+
'type',
|
|
22
|
+
'properties',
|
|
23
|
+
'items',
|
|
24
|
+
'description',
|
|
25
|
+
'title',
|
|
26
|
+
'enum',
|
|
27
|
+
'const',
|
|
28
|
+
'anyOf',
|
|
29
|
+
'allOf',
|
|
30
|
+
'$ref',
|
|
31
|
+
'$def',
|
|
32
|
+
'definitions',
|
|
33
|
+
'default',
|
|
34
|
+
'required',
|
|
35
|
+
'additionalProperties',
|
|
36
|
+
'format',
|
|
37
|
+
'minItems',
|
|
38
|
+
]);
|
|
39
|
+
/** The 10 documented-supported `format` values (G4) — refs/structured-outputs.md:2830. */
|
|
40
|
+
const SUPPORTED_FORMATS = new Set([
|
|
41
|
+
'date-time',
|
|
42
|
+
'time',
|
|
43
|
+
'date',
|
|
44
|
+
'duration',
|
|
45
|
+
'email',
|
|
46
|
+
'hostname',
|
|
47
|
+
'uri',
|
|
48
|
+
'ipv4',
|
|
49
|
+
'ipv6',
|
|
50
|
+
'uuid',
|
|
51
|
+
]);
|
|
52
|
+
/** Keywords handled by their OWN dedicated verdict row — excluded from G2's generic off-allowlist
|
|
53
|
+
* walk so a `format`/`pattern` node is never ALSO flagged as a generic `unenforced_keyword`. */
|
|
54
|
+
const OWN_ROW_KEYWORDS = new Set(['format', 'pattern']);
|
|
55
|
+
/** Keys that are never schema keywords themselves — traversal structure, not gate subjects. */
|
|
56
|
+
const NON_KEYWORD_KEYS = new Set(['properties', 'items', '$defs', 'definitions']);
|
|
57
|
+
function isPlainObject(v) {
|
|
58
|
+
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
59
|
+
}
|
|
60
|
+
function joinPath(base, next) {
|
|
61
|
+
return base === '' ? next : `${base}.${next}`;
|
|
62
|
+
}
|
|
63
|
+
/** Detects a cycle among `$defs`/`definitions` entries via local-$ref adjacency + DFS coloring.
|
|
64
|
+
* Author-fixture-scale only (finite, hand-authored schemas) — not a general-purpose resolver. */
|
|
65
|
+
function hasDefsCycle(defs) {
|
|
66
|
+
const names = Object.keys(defs);
|
|
67
|
+
if (names.length === 0)
|
|
68
|
+
return false;
|
|
69
|
+
function localRefsFrom(node, acc) {
|
|
70
|
+
if (Array.isArray(node)) {
|
|
71
|
+
for (const item of node)
|
|
72
|
+
localRefsFrom(item, acc);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!isPlainObject(node))
|
|
76
|
+
return;
|
|
77
|
+
const ref = node['$ref'];
|
|
78
|
+
if (typeof ref === 'string') {
|
|
79
|
+
const m = /^#\/(?:\$defs|definitions)\/([^/]+)$/.exec(ref);
|
|
80
|
+
if (m)
|
|
81
|
+
acc.add(m[1]);
|
|
82
|
+
}
|
|
83
|
+
for (const v of Object.values(node))
|
|
84
|
+
localRefsFrom(v, acc);
|
|
85
|
+
}
|
|
86
|
+
const graph = new Map();
|
|
87
|
+
for (const name of names) {
|
|
88
|
+
const acc = new Set();
|
|
89
|
+
localRefsFrom(defs[name], acc);
|
|
90
|
+
graph.set(name, acc);
|
|
91
|
+
}
|
|
92
|
+
const WHITE = 0;
|
|
93
|
+
const GRAY = 1;
|
|
94
|
+
const BLACK = 2;
|
|
95
|
+
const color = new Map(names.map((n) => [n, WHITE]));
|
|
96
|
+
const dfs = (n) => {
|
|
97
|
+
color.set(n, GRAY);
|
|
98
|
+
for (const next of graph.get(n) ?? []) {
|
|
99
|
+
const c = color.get(next);
|
|
100
|
+
if (c === GRAY)
|
|
101
|
+
return true; // back-edge — a cycle
|
|
102
|
+
if (c === WHITE && dfs(next))
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
color.set(n, BLACK);
|
|
106
|
+
return false;
|
|
107
|
+
};
|
|
108
|
+
for (const name of names) {
|
|
109
|
+
if (color.get(name) === WHITE && dfs(name))
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
/** Recursively walks one schema node, mutating `ctx` with every G1/G2/G4/G5 finding + the G3
|
|
115
|
+
* optional/union counts. `path` is the schema-relative dotted path to THIS node. */
|
|
116
|
+
function walkNode(node, path, ctx) {
|
|
117
|
+
if (!isPlainObject(node))
|
|
118
|
+
return;
|
|
119
|
+
// G2-hard: root self-reference ('#') — the API neither enforces nor cleanly rejects this edge
|
|
120
|
+
// (premise-probe-raw.md §Live-probe: silent-prune when optional, a persistent 503 when
|
|
121
|
+
// required) — it must NEVER fall to the generic caveat class.
|
|
122
|
+
const ref = node['$ref'];
|
|
123
|
+
if (typeof ref === 'string') {
|
|
124
|
+
if (ref === '#') {
|
|
125
|
+
ctx.hardReasons.push({
|
|
126
|
+
code: 'unsupported_keyword',
|
|
127
|
+
path,
|
|
128
|
+
remediation: `recursive schema at '${path || '(root)'}' ($ref: '#') is not supported — remove the self-reference or restructure without recursion`,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
else if (!ref.startsWith('#')) {
|
|
132
|
+
ctx.hardReasons.push({
|
|
133
|
+
code: 'unsupported_keyword',
|
|
134
|
+
path,
|
|
135
|
+
remediation: `external $ref at '${path || '(root)'}' ('${ref}') is not supported — inline the referenced schema or use a local '#/$defs/...' reference`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// G2-hard: numeric constraints.
|
|
140
|
+
for (const kw of ['minimum', 'maximum', 'multipleOf']) {
|
|
141
|
+
if (kw in node) {
|
|
142
|
+
ctx.hardReasons.push({
|
|
143
|
+
code: 'unsupported_keyword',
|
|
144
|
+
path,
|
|
145
|
+
remediation: `'${kw}' at '${path || '(root)'}' is not supported by strict mode — remove it (Ajv still enforces it at submission time) or drop 'structured_output: strict' for this step`,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// G2-hard: complex enum members (object/array).
|
|
150
|
+
const enumVal = node['enum'];
|
|
151
|
+
if (Array.isArray(enumVal) && enumVal.some((m) => isPlainObject(m) || Array.isArray(m))) {
|
|
152
|
+
ctx.hardReasons.push({
|
|
153
|
+
code: 'unsupported_keyword',
|
|
154
|
+
path,
|
|
155
|
+
remediation: `'enum' at '${path || '(root)'}' contains a complex (object/array) member — strict mode only supports string/number/boolean/null enum members`,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// G4: format.
|
|
159
|
+
const format = node['format'];
|
|
160
|
+
if (typeof format === 'string' && !SUPPORTED_FORMATS.has(format)) {
|
|
161
|
+
ctx.caveats.push({
|
|
162
|
+
code: 'unenforced_format',
|
|
163
|
+
path,
|
|
164
|
+
remediation: `'format: ${format}' at '${path || '(root)'}' is silently ignored or rejected by the API — enforced post-hoc by realm's own validation only`,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
// G5: pattern — always a caveat when present, regardless of regex complexity.
|
|
168
|
+
if (typeof node['pattern'] === 'string') {
|
|
169
|
+
ctx.caveats.push({
|
|
170
|
+
code: 'unenforced_pattern',
|
|
171
|
+
path,
|
|
172
|
+
remediation: `'pattern' at '${path || '(root)'}' is silently ignored or rejected by the API — enforced post-hoc by realm's own validation only`,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
// G2 generic off-allowlist walk — every OTHER key on this node not itself a keyword we already
|
|
176
|
+
// handle above, not a pure traversal-structure key, and not in the allowlist ⇒ caveat.
|
|
177
|
+
for (const key of Object.keys(node)) {
|
|
178
|
+
if (NON_KEYWORD_KEYS.has(key) || OWN_ROW_KEYWORDS.has(key))
|
|
179
|
+
continue;
|
|
180
|
+
if (key === 'minimum' || key === 'maximum' || key === 'multipleOf' || key === 'enum')
|
|
181
|
+
continue; // already handled (hard or allowlisted)
|
|
182
|
+
if (STRICT_SUPPORTED_KEYWORDS.has(key))
|
|
183
|
+
continue;
|
|
184
|
+
if (ctx.seenUnenforcedKeywords.has(`${path}:${key}`))
|
|
185
|
+
continue;
|
|
186
|
+
ctx.seenUnenforcedKeywords.add(`${path}:${key}`);
|
|
187
|
+
ctx.caveats.push({
|
|
188
|
+
code: 'unenforced_keyword',
|
|
189
|
+
path,
|
|
190
|
+
remediation: `'${key}' at '${path || '(root)'}' is silently ignored or rejected by the API — either way enforced post-hoc by realm`,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
// G1: every object (root + nested) must carry explicit additionalProperties: false.
|
|
194
|
+
if (node['type'] === 'object' || node['properties'] !== undefined) {
|
|
195
|
+
if (node['additionalProperties'] !== false) {
|
|
196
|
+
ctx.hardReasons.push({
|
|
197
|
+
code: 'missing_additional_properties',
|
|
198
|
+
path,
|
|
199
|
+
remediation: `add 'additionalProperties: false' at '${path || 'the schema root'}'`,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// Recurse into properties (G3 optional/union counting happens per-property here) + items +
|
|
204
|
+
// anyOf/allOf branches + $defs/definitions bodies.
|
|
205
|
+
const properties = node['properties'];
|
|
206
|
+
if (isPlainObject(properties)) {
|
|
207
|
+
const required = Array.isArray(node['required'])
|
|
208
|
+
? new Set(node['required'])
|
|
209
|
+
: new Set();
|
|
210
|
+
for (const [propName, propSchema] of Object.entries(properties)) {
|
|
211
|
+
const propPath = joinPath(path, `properties.${propName}`);
|
|
212
|
+
if (!required.has(propName)) {
|
|
213
|
+
ctx.optionalCount += 1;
|
|
214
|
+
if (isPlainObject(propSchema) &&
|
|
215
|
+
(Array.isArray(propSchema['anyOf']) ||
|
|
216
|
+
(Array.isArray(propSchema['type']) && propSchema['type'].length > 1))) {
|
|
217
|
+
ctx.unionCount += 1;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
walkNode(propSchema, propPath, ctx);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const items = node['items'];
|
|
224
|
+
if (items !== undefined)
|
|
225
|
+
walkNode(items, joinPath(path, 'items'), ctx);
|
|
226
|
+
for (const branchKey of ['anyOf', 'allOf']) {
|
|
227
|
+
const branches = node[branchKey];
|
|
228
|
+
if (Array.isArray(branches)) {
|
|
229
|
+
branches.forEach((b, i) => walkNode(b, joinPath(path, `${branchKey}[${i}]`), ctx));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
for (const defsKey of ['$defs', 'definitions']) {
|
|
233
|
+
const defs = node[defsKey];
|
|
234
|
+
if (isPlainObject(defs)) {
|
|
235
|
+
if (hasDefsCycle(defs)) {
|
|
236
|
+
ctx.hardReasons.push({
|
|
237
|
+
code: 'unsupported_keyword',
|
|
238
|
+
path: joinPath(path, defsKey),
|
|
239
|
+
remediation: `a circular reference exists among '${defsKey}' entries at '${path || '(root)'}' — recursive schemas are not supported; restructure without the cycle`,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
for (const [name, defSchema] of Object.entries(defs)) {
|
|
243
|
+
walkNode(defSchema, joinPath(path, `${defsKey}.${name}`), ctx);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Assesses whether a step's effective output schema is eligible for Anthropic strict/grammar-
|
|
250
|
+
* constrained tool use. Pure, synchronous, derive-always (never persisted). See the verdict table
|
|
251
|
+
* in `docs/reference/yaml-schema.md`'s `structured_output` section for the full G0–G7' rule set
|
|
252
|
+
* with citations; the summary:
|
|
253
|
+
* G0 no effective schema / non-object root ⇒ ineligible · G1 every object missing explicit
|
|
254
|
+
* `additionalProperties: false` ⇒ ineligible · G2 hard class (numeric constraints, recursion
|
|
255
|
+
* incl. root `$ref:'#'`, external `$ref`, complex enum members) ⇒ ineligible; any other
|
|
256
|
+
* off-allowlist keyword ⇒ caveat · G3 >24 optional properties / >16 union-typed ⇒ ineligible ·
|
|
257
|
+
* G4 unsupported `format` value ⇒ caveat · G5 `pattern` present ⇒ caveat · G6 `tools`-bearing
|
|
258
|
+
* step ⇒ ineligible (checked FIRST, short-circuits everything else) · G7' (Amendment 2) ANY
|
|
259
|
+
* optional properties on an otherwise-eligible schema ⇒ caveat `optional_emission` (strict
|
|
260
|
+
* measurably suppresses optional-field emission — see the benchmark cited in the docs section;
|
|
261
|
+
* the remedy is making consumer-load-bearing fields `required`).
|
|
262
|
+
*/
|
|
263
|
+
export function assessStructuredOutputEligibility(input) {
|
|
264
|
+
const phaseB = isPhaseB(input);
|
|
265
|
+
const schema = phaseB ? input.schema : (input.output_schema ?? input.input_schema);
|
|
266
|
+
const toolsFlag = phaseB
|
|
267
|
+
? input.tools === true
|
|
268
|
+
: Array.isArray(input.tools) && input.tools.length > 0;
|
|
269
|
+
// G6 — checked FIRST; short-circuits every other row (fixture C8: "⇒ G6 exactly", no caveats).
|
|
270
|
+
if (toolsFlag) {
|
|
271
|
+
return {
|
|
272
|
+
verdict: 'ineligible',
|
|
273
|
+
reasons: [
|
|
274
|
+
{
|
|
275
|
+
code: 'unsupported_context_tools',
|
|
276
|
+
path: '',
|
|
277
|
+
remediation: 'this step declares tools — structured_output: strict is not supported on tools-bearing steps in v1; remove tools or drop structured_output',
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
// G0 — no effective schema, or a root that isn't type:'object'. Two distinct remediations.
|
|
283
|
+
if (schema === undefined) {
|
|
284
|
+
return {
|
|
285
|
+
verdict: 'ineligible',
|
|
286
|
+
reasons: [
|
|
287
|
+
{
|
|
288
|
+
code: 'no_schema',
|
|
289
|
+
path: '',
|
|
290
|
+
remediation: 'add output_schema (or input_schema) — structured_output: strict has no schema to constrain generation with',
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
if (!isPlainObject(schema) || schema['type'] !== 'object') {
|
|
296
|
+
return {
|
|
297
|
+
verdict: 'ineligible',
|
|
298
|
+
reasons: [
|
|
299
|
+
{
|
|
300
|
+
code: 'no_schema',
|
|
301
|
+
path: '',
|
|
302
|
+
remediation: "declare `type: 'object'` at the schema root — strict mode requires an object-rooted schema",
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const ctx = {
|
|
308
|
+
hardReasons: [],
|
|
309
|
+
caveats: [],
|
|
310
|
+
optionalCount: 0,
|
|
311
|
+
unionCount: 0,
|
|
312
|
+
seenUnenforcedKeywords: new Set(),
|
|
313
|
+
};
|
|
314
|
+
walkNode(schema, '', ctx);
|
|
315
|
+
if (ctx.optionalCount > 24) {
|
|
316
|
+
ctx.hardReasons.push({
|
|
317
|
+
code: 'too_many_optionals',
|
|
318
|
+
path: '',
|
|
319
|
+
remediation: `this schema has ${ctx.optionalCount} optional properties (limit: 24) — reduce the optional-property count or make more fields required`,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
if (ctx.unionCount > 16) {
|
|
323
|
+
ctx.hardReasons.push({
|
|
324
|
+
code: 'too_many_unions',
|
|
325
|
+
path: '',
|
|
326
|
+
remediation: `this schema has ${ctx.unionCount} union-typed properties (limit: 16) — reduce the anyOf/multi-type property count`,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (ctx.hardReasons.length > 0) {
|
|
330
|
+
return {
|
|
331
|
+
verdict: 'ineligible',
|
|
332
|
+
reasons: ctx.hardReasons,
|
|
333
|
+
...(ctx.caveats.length > 0 ? { caveats: ctx.caveats } : {}),
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
// G7' (Amendment 2): any optional property on an otherwise-eligible schema ⇒ caveat. Measured:
|
|
337
|
+
// strict emitted the optional reasoning field 4/24 vs baseline 24/24 on the current cs1 schema
|
|
338
|
+
// (benchmark-raw.md §Run 2) — emission propensity is schema-shape-dependent, so this is a
|
|
339
|
+
// general caveat, not a reasoning-specific rule. The nudge additionally names the
|
|
340
|
+
// reasoning-position instance as the sharpest example (validate.ts).
|
|
341
|
+
if (ctx.optionalCount > 0) {
|
|
342
|
+
ctx.caveats.push({
|
|
343
|
+
code: 'optional_emission',
|
|
344
|
+
path: '',
|
|
345
|
+
remediation: 'under strict, the model emitted an optional field in 4/24 runs vs 24/24 unconstrained on a measured schema (see docs) — make fields your consumers rely on `required`',
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
if (ctx.caveats.length > 0) {
|
|
349
|
+
return { verdict: 'eligible_with_caveats', caveats: ctx.caveats };
|
|
350
|
+
}
|
|
351
|
+
return { verdict: 'eligible' };
|
|
352
|
+
}
|
|
353
|
+
/** Renders a step's structured_output declaration into a plain-English author message, combining
|
|
354
|
+
* every reason's own remediation (`; `-joined) — the shared formatter both the loader's typed
|
|
355
|
+
* error and create_workflow's PRE-register rejection use, so the two surfaces never drift. */
|
|
356
|
+
export function renderIneligibleMessage(reasons) {
|
|
357
|
+
return reasons.map((r) => r.remediation).join('; ');
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=structured-output-eligibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-output-eligibility.js","sourceRoot":"","sources":["../../src/workflow/structured-output-eligibility.ts"],"names":[],"mappings":"AAuEA,SAAS,QAAQ,CAAC,KAAgC;IAChD,OAAO,QAAQ,IAAI,KAAK,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IAC/C,MAAM;IACN,YAAY;IACZ,OAAO;IACP,aAAa;IACb,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,aAAa;IACb,SAAS;IACT,UAAU;IACV,sBAAsB;IACtB,QAAQ;IACR,UAAU;CACX,CAAC,CAAC;AAEH,0FAA0F;AAC1F,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,WAAW;IACX,MAAM;IACN,MAAM;IACN,UAAU;IACV,OAAO;IACP,UAAU;IACV,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH;iGACiG;AACjG,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAExD,+FAA+F;AAC/F,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;AAUlF,SAAS,aAAa,CAAC,CAAU;IAC/B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC1C,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IA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,CAAC;SAC5D,CAAC;IACJ,CAAC;IAED,+FAA+F;IAC/F,+FAA+F;IAC/F,0FAA0F;IAC1F,kFAAkF;IAClF,qEAAqE;IACrE,IAAI,GAAG,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC;QAC1B,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,EAAE;YACR,WAAW,EACT,uKAAuK;SAC1K,CAAC,CAAC;IACL,CAAC;IAED,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACpE,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACjC,CAAC;AAED;;+FAE+F;AAC/F,MAAM,UAAU,uBAAuB,CAAC,OAAiC;IACvE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-loader.d.ts","sourceRoot":"","sources":["../../src/workflow/yaml-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"yaml-loader.d.ts","sourceRoot":"","sources":["../../src/workflow/yaml-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,iCAAiC,CAAC;AAQzC,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAyKnE,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAkFjD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUjD;AA4JD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,kBAAkB,CAIpB;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B;IAAE,UAAU,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,CAE/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,kBAAkB,CAMpB;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,GAC3B;IAAE,UAAU,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,CAE/D"}
|