@claudexor/schema 3.0.3 → 3.1.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.
Files changed (134) hide show
  1. package/LICENSE +1 -1
  2. package/dist/agent-capabilities.d.ts +37 -0
  3. package/dist/agent-capabilities.d.ts.map +1 -1
  4. package/dist/agent-capabilities.js +14 -0
  5. package/dist/agent-capabilities.js.map +1 -1
  6. package/dist/apply-eligibility.d.ts +384 -18
  7. package/dist/apply-eligibility.d.ts.map +1 -1
  8. package/dist/apply-eligibility.js +20 -1
  9. package/dist/apply-eligibility.js.map +1 -1
  10. package/dist/budget.d.ts +75 -0
  11. package/dist/budget.d.ts.map +1 -1
  12. package/dist/budget.js +46 -0
  13. package/dist/budget.js.map +1 -1
  14. package/dist/config.d.ts +41 -41
  15. package/dist/control-operation-responses.d.ts +287 -65
  16. package/dist/control-operation-responses.d.ts.map +1 -1
  17. package/dist/control-operation-responses.js +33 -3
  18. package/dist/control-operation-responses.js.map +1 -1
  19. package/dist/control-run-detail.d.ts +600 -150
  20. package/dist/control-run-detail.d.ts.map +1 -1
  21. package/dist/control-run-detail.js +28 -2
  22. package/dist/control-run-detail.js.map +1 -1
  23. package/dist/control-run-retry.d.ts +1 -1
  24. package/dist/control-run-scope.d.ts +1 -1
  25. package/dist/control-thread-apply.d.ts +10 -0
  26. package/dist/control-thread-apply.d.ts.map +1 -1
  27. package/dist/control.d.ts +664 -156
  28. package/dist/control.d.ts.map +1 -1
  29. package/dist/control.js +76 -2
  30. package/dist/control.js.map +1 -1
  31. package/dist/decision.d.ts +205 -9
  32. package/dist/decision.d.ts.map +1 -1
  33. package/dist/decision.js +69 -1
  34. package/dist/decision.js.map +1 -1
  35. package/dist/deep-scan.d.ts +27 -0
  36. package/dist/deep-scan.d.ts.map +1 -0
  37. package/dist/deep-scan.js +27 -0
  38. package/dist/deep-scan.js.map +1 -0
  39. package/dist/delivery.d.ts +13 -0
  40. package/dist/delivery.d.ts.map +1 -1
  41. package/dist/delivery.js +15 -0
  42. package/dist/delivery.js.map +1 -1
  43. package/dist/events.d.ts +59 -4
  44. package/dist/events.d.ts.map +1 -1
  45. package/dist/events.js +85 -0
  46. package/dist/events.js.map +1 -1
  47. package/dist/harness.d.ts +111 -3
  48. package/dist/harness.d.ts.map +1 -1
  49. package/dist/harness.js +77 -1
  50. package/dist/harness.js.map +1 -1
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/operation.d.ts +193 -10
  56. package/dist/operation.d.ts.map +1 -1
  57. package/dist/operation.js +45 -0
  58. package/dist/operation.js.map +1 -1
  59. package/dist/output-schema-dialect.d.ts +22 -0
  60. package/dist/output-schema-dialect.d.ts.map +1 -0
  61. package/dist/output-schema-dialect.js +37 -0
  62. package/dist/output-schema-dialect.js.map +1 -0
  63. package/dist/output-schema.d.ts +26 -2
  64. package/dist/output-schema.d.ts.map +1 -1
  65. package/dist/output-schema.js +313 -16
  66. package/dist/output-schema.js.map +1 -1
  67. package/dist/plan.d.ts +2 -2
  68. package/dist/problem.d.ts +3 -3
  69. package/dist/project.d.ts +47 -12
  70. package/dist/project.d.ts.map +1 -1
  71. package/dist/project.js +32 -0
  72. package/dist/project.js.map +1 -1
  73. package/dist/readiness.d.ts +14 -0
  74. package/dist/readiness.d.ts.map +1 -1
  75. package/dist/recovery.d.ts +14 -14
  76. package/dist/review.d.ts +7 -7
  77. package/dist/route.d.ts +2 -2
  78. package/dist/setup.d.ts +288 -94
  79. package/dist/setup.d.ts.map +1 -1
  80. package/dist/setup.js +90 -6
  81. package/dist/setup.js.map +1 -1
  82. package/dist/status-projection.d.ts +79 -4
  83. package/dist/status-projection.d.ts.map +1 -1
  84. package/dist/status-projection.js +161 -4
  85. package/dist/status-projection.js.map +1 -1
  86. package/dist/task.d.ts +14 -0
  87. package/dist/task.d.ts.map +1 -1
  88. package/dist/task.js +9 -0
  89. package/dist/task.js.map +1 -1
  90. package/dist/telemetry.d.ts +779 -16
  91. package/dist/telemetry.d.ts.map +1 -1
  92. package/dist/telemetry.js +177 -4
  93. package/dist/telemetry.js.map +1 -1
  94. package/dist/tool-ref.d.ts +14 -0
  95. package/dist/tool-ref.d.ts.map +1 -1
  96. package/dist/tool-ref.js +15 -0
  97. package/dist/tool-ref.js.map +1 -1
  98. package/dist/work-report.d.ts +131 -0
  99. package/dist/work-report.d.ts.map +1 -0
  100. package/dist/work-report.js +124 -0
  101. package/dist/work-report.js.map +1 -0
  102. package/dist/workspace.d.ts +2 -2
  103. package/generated/AgentCapabilityCatalog.schema.json +35 -0
  104. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  105. package/generated/ControlDeliveryResponse.schema.json +14 -0
  106. package/generated/ControlHarnessListResponse.schema.json +19 -0
  107. package/generated/ControlOperationCatalog.schema.json +74 -0
  108. package/generated/ControlOperationDescriptor.schema.json +74 -0
  109. package/generated/ControlOperationParameter.schema.json +75 -0
  110. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  111. package/generated/ControlRunAgainDraft.schema.json +11 -0
  112. package/generated/ControlRunDetail.schema.json +403 -9
  113. package/generated/ControlRunListResponse.schema.json +229 -3
  114. package/generated/ControlRunStartRequest.schema.json +11 -0
  115. package/generated/ControlRunSummary.schema.json +215 -2
  116. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  117. package/generated/ControlSetupJobEvent.schema.json +28 -0
  118. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  119. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  120. package/generated/ControlThreadDetail.schema.json +94 -1
  121. package/generated/ControlThreadTurnRequest.schema.json +11 -0
  122. package/generated/DecisionRecord.schema.json +178 -2
  123. package/generated/HarnessEvent.schema.json +79 -1
  124. package/generated/HarnessManifest.schema.json +19 -0
  125. package/generated/HarnessStatusDto.schema.json +19 -0
  126. package/generated/McpRunHandleResult.schema.json +286 -1
  127. package/generated/McpRunToolResult.schema.json +171 -1
  128. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  129. package/generated/RunEvent.schema.json +7 -1
  130. package/generated/RunFailure.schema.json +23 -1
  131. package/generated/RunTelemetry.schema.json +376 -1
  132. package/generated/StructuredOutputConformance.schema.json +83 -0
  133. package/generated/TaskContract.schema.json +16 -0
  134. package/package.json +2 -2
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ /** JSON Schema dialects the structured-output validator can compile. */
3
+ export declare const OutputSchemaDialect: z.ZodEnum<["draft-07", "draft-2020-12"]>;
4
+ export type OutputSchemaDialect = z.infer<typeof OutputSchemaDialect>;
5
+ export declare const DEFAULT_OUTPUT_SCHEMA_DIALECT: OutputSchemaDialect;
6
+ /**
7
+ * Canonical public identifiers for supported output-schema dialects. The
8
+ * capability catalog and validator both project this list; keep URI aliases
9
+ * private so machines receive one stable identifier per dialect.
10
+ */
11
+ export declare const OUTPUT_SCHEMA_DIALECTS: readonly [{
12
+ readonly dialect: "draft-07";
13
+ readonly uri: "http://json-schema.org/draft-07/schema#";
14
+ readonly defaultWhenOmitted: true;
15
+ }, {
16
+ readonly dialect: "draft-2020-12";
17
+ readonly uri: "https://json-schema.org/draft/2020-12/schema";
18
+ readonly defaultWhenOmitted: false;
19
+ }];
20
+ /** Resolve accepted http/https and trailing-# spellings to one dialect id. */
21
+ export declare function outputSchemaDialectFromUri(uri: string): OutputSchemaDialect | null;
22
+ //# sourceMappingURL=output-schema-dialect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-schema-dialect.d.ts","sourceRoot":"","sources":["../src/output-schema-dialect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,0CAE6C,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,6BAA6B,EAAE,mBAAgC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;EAehC,CAAC;AAEJ,8EAA8E;AAC9E,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAelF"}
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ /** JSON Schema dialects the structured-output validator can compile. */
3
+ export const OutputSchemaDialect = z
4
+ .enum(["draft-07", "draft-2020-12"])
5
+ .describe("JSON Schema dialect selected for structured-output validation.");
6
+ export const DEFAULT_OUTPUT_SCHEMA_DIALECT = "draft-07";
7
+ /**
8
+ * Canonical public identifiers for supported output-schema dialects. The
9
+ * capability catalog and validator both project this list; keep URI aliases
10
+ * private so machines receive one stable identifier per dialect.
11
+ */
12
+ export const OUTPUT_SCHEMA_DIALECTS = [
13
+ {
14
+ dialect: "draft-07",
15
+ uri: "http://json-schema.org/draft-07/schema#",
16
+ defaultWhenOmitted: true,
17
+ },
18
+ {
19
+ dialect: "draft-2020-12",
20
+ uri: "https://json-schema.org/draft/2020-12/schema",
21
+ defaultWhenOmitted: false,
22
+ },
23
+ ];
24
+ /** Resolve accepted http/https and trailing-# spellings to one dialect id. */
25
+ export function outputSchemaDialectFromUri(uri) {
26
+ const normalized = uri.replace(/#$/, "");
27
+ if (normalized === "http://json-schema.org/draft-07/schema" ||
28
+ normalized === "https://json-schema.org/draft-07/schema") {
29
+ return "draft-07";
30
+ }
31
+ if (normalized === "https://json-schema.org/draft/2020-12/schema" ||
32
+ normalized === "http://json-schema.org/draft/2020-12/schema") {
33
+ return "draft-2020-12";
34
+ }
35
+ return null;
36
+ }
37
+ //# sourceMappingURL=output-schema-dialect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-schema-dialect.js","sourceRoot":"","sources":["../src/output-schema-dialect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,IAAI,CAAC,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;KACnC,QAAQ,CAAC,gEAAgE,CAAC,CAAC;AAG9E,MAAM,CAAC,MAAM,6BAA6B,GAAwB,UAAU,CAAC;AAE7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC;QACE,OAAO,EAAE,UAAU;QACnB,GAAG,EAAE,yCAAyC;QAC9C,kBAAkB,EAAE,IAAI;KACzB;IACD;QACE,OAAO,EAAE,eAAe;QACxB,GAAG,EAAE,8CAA8C;QACnD,kBAAkB,EAAE,KAAK;KAC1B;CAKA,CAAC;AAEJ,8EAA8E;AAC9E,MAAM,UAAU,0BAA0B,CAAC,GAAW;IACpD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzC,IACE,UAAU,KAAK,wCAAwC;QACvD,UAAU,KAAK,yCAAyC,EACxD,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IACE,UAAU,KAAK,8CAA8C;QAC7D,UAAU,KAAK,6CAA6C,EAC5D,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -5,8 +5,31 @@
5
5
  * vendor transport gets a strict (all-required + additionalProperties:false)
6
6
  * form. Shared owner for both transforms, harness-agnostic.
7
7
  */
8
+ /**
9
+ * Compile the D-16 transport ENVELOPE that wraps a caller output schema (or a
10
+ * bare string, or nothing) with the WorkReport half. This is the schema that
11
+ * rides `HarnessRunSpec.output_schema` on a work_report-capable route; the
12
+ * caller's ORIGINAL schema stays the conformance authority for `output` after
13
+ * unwrap (grounding §5 — the contract keeps both, never overwriting the
14
+ * caller's copy). `output` controls the no-vs-with-caller shape:
15
+ * - a strictified caller schema → `{ work_report, output: <schema> }`
16
+ * - "string" → `{ work_report, output: {type:"string"} }`
17
+ * (codex/cursor final_message routes with no caller schema: the markdown
18
+ * deliverable rides the string so the constrained final message can carry it)
19
+ * - null → `{ work_report }` only
20
+ * (claude side_tool route with no caller schema: the WorkReport rides its
21
+ * StructuredOutput tool while the final message stays markdown = deliverable)
22
+ */
23
+ export declare function buildWorkReportEnvelope(output: Record<string, unknown> | "string" | null): Record<string, unknown>;
8
24
  /** A caller-supplied output schema the structured-output routes cannot carry. */
25
+ /** Every fail-closed shape refusal is caller-actionable: it must surface as
26
+ * the same typed `invalid_output_schema` contract the compile-failure path
27
+ * uses (W24 errorCode/errorStatus), never as an untyped 500. */
9
28
  export declare class UnsupportedOutputSchemaError extends Error {
29
+ readonly status = 400;
30
+ readonly code = "invalid_output_schema";
31
+ readonly retryable = false;
32
+ readonly requiredActions: string[];
10
33
  }
11
34
  /**
12
35
  * Validate a CALLER-supplied per-run output schema and return it UNCHANGED —
@@ -20,8 +43,9 @@ export declare class UnsupportedOutputSchemaError extends Error {
20
43
  * LIVE-VERIFIED to reject rather than let a vendor 400 surface mid-run: the
21
44
  * root must be an inline `type: "object"` (claude materializes --json-schema as
22
45
  * a StructuredOutput tool whose input_schema needs a top-level type; a
23
- * $ref-wrapped root 400s), `$ref` is refused anywhere, and `format` is refused
24
- * while the pinned claude (<2.1.205) silently drops a format-bearing schema.
46
+ * $ref-wrapped root 400s), references must be resolvable local JSON Pointers,
47
+ * and `format` is refused while the pinned claude (<2.1.205) silently drops a
48
+ * format-bearing schema. Local refs are inlined in the transport-only copy.
25
49
  */
26
50
  export declare function normalizeUserOutputSchema(schema: Record<string, unknown>): Record<string, unknown>;
27
51
  /** Vendor-strict transport form of a validated output schema (all keys
@@ -1 +1 @@
1
- {"version":3,"file":"output-schema.d.ts","sourceRoot":"","sources":["../src/output-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iFAAiF;AACjF,qBAAa,4BAA6B,SAAQ,KAAK;CAAG;AAE1D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,MAAM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nF"}
@@ -5,8 +5,40 @@
5
5
  * vendor transport gets a strict (all-required + additionalProperties:false)
6
6
  * form. Shared owner for both transforms, harness-agnostic.
7
7
  */
8
+ import { WORK_REPORT_TRANSPORT_SCHEMA } from "./work-report.js";
9
+ /**
10
+ * Compile the D-16 transport ENVELOPE that wraps a caller output schema (or a
11
+ * bare string, or nothing) with the WorkReport half. This is the schema that
12
+ * rides `HarnessRunSpec.output_schema` on a work_report-capable route; the
13
+ * caller's ORIGINAL schema stays the conformance authority for `output` after
14
+ * unwrap (grounding §5 — the contract keeps both, never overwriting the
15
+ * caller's copy). `output` controls the no-vs-with-caller shape:
16
+ * - a strictified caller schema → `{ work_report, output: <schema> }`
17
+ * - "string" → `{ work_report, output: {type:"string"} }`
18
+ * (codex/cursor final_message routes with no caller schema: the markdown
19
+ * deliverable rides the string so the constrained final message can carry it)
20
+ * - null → `{ work_report }` only
21
+ * (claude side_tool route with no caller schema: the WorkReport rides its
22
+ * StructuredOutput tool while the final message stays markdown = deliverable)
23
+ */
24
+ export function buildWorkReportEnvelope(output) {
25
+ const properties = { work_report: WORK_REPORT_TRANSPORT_SCHEMA };
26
+ const required = ["work_report"];
27
+ if (output !== null) {
28
+ properties["output"] = output === "string" ? { type: "string" } : output;
29
+ required.push("output");
30
+ }
31
+ return { type: "object", properties, required, additionalProperties: false };
32
+ }
8
33
  /** A caller-supplied output schema the structured-output routes cannot carry. */
34
+ /** Every fail-closed shape refusal is caller-actionable: it must surface as
35
+ * the same typed `invalid_output_schema` contract the compile-failure path
36
+ * uses (W24 errorCode/errorStatus), never as an untyped 500. */
9
37
  export class UnsupportedOutputSchemaError extends Error {
38
+ status = 400;
39
+ code = "invalid_output_schema";
40
+ retryable = false;
41
+ requiredActions = ["fix the output schema and retry the run"];
10
42
  }
11
43
  /**
12
44
  * Validate a CALLER-supplied per-run output schema and return it UNCHANGED —
@@ -20,26 +52,18 @@ export class UnsupportedOutputSchemaError extends Error {
20
52
  * LIVE-VERIFIED to reject rather than let a vendor 400 surface mid-run: the
21
53
  * root must be an inline `type: "object"` (claude materializes --json-schema as
22
54
  * a StructuredOutput tool whose input_schema needs a top-level type; a
23
- * $ref-wrapped root 400s), `$ref` is refused anywhere, and `format` is refused
24
- * while the pinned claude (<2.1.205) silently drops a format-bearing schema.
55
+ * $ref-wrapped root 400s), references must be resolvable local JSON Pointers,
56
+ * and `format` is refused while the pinned claude (<2.1.205) silently drops a
57
+ * format-bearing schema. Local refs are inlined in the transport-only copy.
25
58
  */
26
59
  export function normalizeUserOutputSchema(schema) {
27
60
  if (schema["type"] !== "object" || typeof schema["properties"] !== "object") {
28
61
  throw new UnsupportedOutputSchemaError('outputSchema root must be an inline object schema ({"type":"object","properties":{...}}); $ref-wrapped or non-object roots are rejected by the native structured-output routes');
29
62
  }
30
- const hasRef = (value) => {
31
- if (Array.isArray(value))
32
- return value.some(hasRef);
33
- if (!value || typeof value !== "object")
34
- return false;
35
- const obj = value;
36
- if ("$ref" in obj)
37
- return true;
38
- return Object.values(obj).some(hasRef);
39
- };
40
- if (hasRef(schema)) {
41
- throw new UnsupportedOutputSchemaError("outputSchema must not contain $ref (native structured-output routes do not resolve references); inline the referenced shapes");
42
- }
63
+ // Validate every local reference now, before the run is announced. The
64
+ // returned copy is intentionally discarded here: the original schema stays
65
+ // the conformance authority and is compiled by the dialect-aware validator.
66
+ dereferenceLocalOutputSchema(schema);
43
67
  const hasFormat = (value) => {
44
68
  if (Array.isArray(value))
45
69
  return value.some(hasFormat);
@@ -59,7 +83,280 @@ export function normalizeUserOutputSchema(schema) {
59
83
  * required, additionalProperties:false, optionals nullable). Used ONLY to
60
84
  * constrain the harness — NEVER to judge conformance (see normalizeUserOutputSchema). */
61
85
  export function strictifyOutputSchema(schema) {
62
- return strictifyForStructuredOutput(schema);
86
+ const transportSchema = strictifyForStructuredOutput(dereferenceLocalOutputSchema(schema));
87
+ // `$schema` chooses the engine-side conformance validator. Native provider
88
+ // transports accept a strict JSON Schema subset and do not need this
89
+ // meta-schema declaration; keep it only on the untouched caller authority.
90
+ delete transportSchema["$schema"];
91
+ return transportSchema;
92
+ }
93
+ function decodeJsonPointerToken(token) {
94
+ if (/~(?:[^01]|$)/.test(token)) {
95
+ throw new UnsupportedOutputSchemaError(`outputSchema contains an invalid local $ref JSON Pointer token: ${JSON.stringify(token)}`);
96
+ }
97
+ return token.replace(/~1/g, "/").replace(/~0/g, "~");
98
+ }
99
+ function localRefTokens(ref) {
100
+ if (!ref.startsWith("#")) {
101
+ throw new UnsupportedOutputSchemaError(`outputSchema $ref must be a local JSON Pointer fragment; external refs are unsupported: ${ref}`);
102
+ }
103
+ let pointer;
104
+ try {
105
+ // URI-fragment decoding precedes JSON Pointer tokenization (RFC 6901 §6).
106
+ // In particular, `%2F` is a pointer separator, not a slash inside one key.
107
+ pointer = decodeURIComponent(ref.slice(1));
108
+ }
109
+ catch {
110
+ throw new UnsupportedOutputSchemaError(`outputSchema contains an invalid percent-encoded local $ref: ${JSON.stringify(ref)}`);
111
+ }
112
+ if (!pointer.startsWith("/")) {
113
+ throw new UnsupportedOutputSchemaError(`outputSchema $ref must resolve from a local JSON Pointer beginning with '/'; anchors and root refs are unsupported: ${ref}`);
114
+ }
115
+ return pointer.slice(1).split("/").map(decodeJsonPointerToken);
116
+ }
117
+ function localRefTarget(root, ref) {
118
+ let current = root;
119
+ for (const token of localRefTokens(ref)) {
120
+ if (!current ||
121
+ typeof current !== "object" ||
122
+ !Object.prototype.hasOwnProperty.call(current, token)) {
123
+ throw new UnsupportedOutputSchemaError(`outputSchema $ref does not resolve: ${ref}`);
124
+ }
125
+ current = current[token];
126
+ }
127
+ return current;
128
+ }
129
+ const SCHEMA_MAP_KEYWORDS = new Set([
130
+ "properties",
131
+ "patternProperties",
132
+ "$defs",
133
+ "definitions",
134
+ "dependentSchemas",
135
+ ]);
136
+ const SCHEMA_ARRAY_KEYWORDS = new Set(["allOf", "anyOf", "oneOf", "prefixItems"]);
137
+ const SCHEMA_VALUE_KEYWORDS = new Set([
138
+ "additionalProperties",
139
+ "unevaluatedProperties",
140
+ "propertyNames",
141
+ "contains",
142
+ "not",
143
+ "if",
144
+ "then",
145
+ "else",
146
+ "additionalItems",
147
+ "unevaluatedItems",
148
+ "contentSchema",
149
+ ]);
150
+ const REF_ANNOTATION_KEYWORDS = new Set([
151
+ "title",
152
+ "description",
153
+ "$comment",
154
+ "default",
155
+ "examples",
156
+ "deprecated",
157
+ "readOnly",
158
+ "writeOnly",
159
+ ]);
160
+ /** Fail-closed ceiling for schema nesting: deeper documents would risk a raw
161
+ * RangeError (stack exhaustion) in the recursive walks instead of a typed
162
+ * refusal. No legitimate output contract nests anywhere near this. */
163
+ const MAX_SCHEMA_DEPTH = 256;
164
+ /**
165
+ * Generic deep scan of the WHOLE document — every object node, not just
166
+ * keyword-reachable schema positions. A $ref may point at any JSON Pointer
167
+ * (including subtrees under ad-hoc non-keyword keys), and unreferenced
168
+ * non-keyword subtrees are copied verbatim into the vendor transport, so
169
+ * dynamic/recursive/scoped semantics anywhere in the document must fail
170
+ * closed at preflight. Map-keyword containers skip the key check on the map
171
+ * itself (property NAMES may legitimately collide with keywords) but their
172
+ * values are scanned. Keyword-shaped keys inside data values (default,
173
+ * examples) are refused too — fail closed beats a mid-run vendor 400.
174
+ */
175
+ function assertSupportedReferenceScope(root) {
176
+ const scan = (value, depth) => {
177
+ if (typeof value === "boolean" || !value || typeof value !== "object")
178
+ return;
179
+ if (depth > MAX_SCHEMA_DEPTH) {
180
+ throw new UnsupportedOutputSchemaError(`outputSchema nesting exceeds ${MAX_SCHEMA_DEPTH} levels; flatten the schema`);
181
+ }
182
+ if (Array.isArray(value)) {
183
+ for (const item of value)
184
+ scan(item, depth + 1);
185
+ return;
186
+ }
187
+ const schema = value;
188
+ for (const keyword of ["$dynamicRef", "$recursiveRef", "$dynamicAnchor", "$recursiveAnchor"]) {
189
+ if (keyword in schema) {
190
+ throw new UnsupportedOutputSchemaError(`outputSchema ${keyword} is unsupported by native structured-output transport; use an inline local $ref without dynamic or recursive scope`);
191
+ }
192
+ }
193
+ if (depth > 0 && typeof schema["$id"] === "string") {
194
+ throw new UnsupportedOutputSchemaError("outputSchema cannot carry nested $id scopes for native transport; inline the scoped schema or remove the nested $id");
195
+ }
196
+ // $ref values are validated document-wide, not just in schema positions:
197
+ // an external ref anywhere would otherwise ride a verbatim-copied subtree
198
+ // into the vendor transport instead of failing closed here.
199
+ const refValue = schema["$ref"];
200
+ if (refValue !== undefined) {
201
+ if (typeof refValue !== "string") {
202
+ throw new UnsupportedOutputSchemaError("outputSchema $ref must be a string");
203
+ }
204
+ localRefTokens(refValue);
205
+ }
206
+ for (const [key, child] of Object.entries(schema)) {
207
+ if (SCHEMA_MAP_KEYWORDS.has(key) &&
208
+ child &&
209
+ typeof child === "object" &&
210
+ !Array.isArray(child)) {
211
+ for (const entry of Object.values(child))
212
+ scan(entry, depth + 2);
213
+ }
214
+ else {
215
+ scan(child, depth + 1);
216
+ }
217
+ }
218
+ };
219
+ scan(root, 0);
220
+ }
221
+ /** Fail-closed ceiling for transport dereference work: each $ref occurrence
222
+ * re-copies its target, so N doubling layers expand ~2^N nodes and an
223
+ * adversarial schema could exhaust the daemon during preflight. */
224
+ const MAX_DEREFERENCE_NODES = 10_000;
225
+ function containsRefDeep(value) {
226
+ if (!value || typeof value !== "object")
227
+ return false;
228
+ if (Array.isArray(value))
229
+ return value.some(containsRefDeep);
230
+ const obj = value;
231
+ if ("$ref" in obj)
232
+ return true;
233
+ return Object.values(obj).some(containsRefDeep);
234
+ }
235
+ /**
236
+ * Build the provider transport authority by inlining resolvable local refs.
237
+ * The caller's original schema remains untouched for Ajv conformance and
238
+ * hashing. Native transports never see `$ref`, `$defs`, or `definitions`.
239
+ */
240
+ function dereferenceLocalOutputSchema(root) {
241
+ assertSupportedReferenceScope(root);
242
+ let visitedNodes = 0;
243
+ const walkSchema = (value, resolving, depth) => {
244
+ if (typeof value === "boolean")
245
+ return value;
246
+ if (!value || typeof value !== "object" || Array.isArray(value))
247
+ return value;
248
+ if (++visitedNodes > MAX_DEREFERENCE_NODES) {
249
+ throw new UnsupportedOutputSchemaError("outputSchema local $ref expansion exceeds the transport budget; inline or simplify the shared definitions");
250
+ }
251
+ // The EXPANDED tree is capped too: a flat $defs chain of single-level
252
+ // refs keeps the source shallow while resolution recurses one frame per
253
+ // link — that must be a typed refusal, never stack exhaustion, and it
254
+ // also bounds every later walk over the transport copy (strictify).
255
+ if (depth > MAX_SCHEMA_DEPTH) {
256
+ throw new UnsupportedOutputSchemaError(`outputSchema local $ref expansion nests past ${MAX_SCHEMA_DEPTH} levels; flatten the reference chain`);
257
+ }
258
+ const source = value;
259
+ const refValue = source["$ref"];
260
+ if (refValue !== undefined) {
261
+ if (typeof refValue !== "string") {
262
+ throw new UnsupportedOutputSchemaError("outputSchema $ref must be a string");
263
+ }
264
+ if (resolving.includes(refValue)) {
265
+ throw new UnsupportedOutputSchemaError(`outputSchema contains a cyclic local $ref: ${[...resolving, refValue].join(" -> ")}`);
266
+ }
267
+ const unsupportedSiblings = Object.keys(source).filter((key) => key !== "$ref" && !REF_ANNOTATION_KEYWORDS.has(key));
268
+ if (unsupportedSiblings.length > 0) {
269
+ throw new UnsupportedOutputSchemaError(`outputSchema $ref siblings are unsupported for native transport (${unsupportedSiblings.join(", ")}); inline the combined constraints`);
270
+ }
271
+ const target = walkSchema(localRefTarget(root, refValue), [...resolving, refValue], depth + 1);
272
+ if (!target || typeof target !== "object" || Array.isArray(target)) {
273
+ throw new UnsupportedOutputSchemaError(`outputSchema local $ref must resolve to an object schema for native transport: ${refValue}`);
274
+ }
275
+ const annotations = Object.fromEntries(Object.entries(source).filter(([key]) => REF_ANNOTATION_KEYWORDS.has(key)));
276
+ return { ...target, ...annotations };
277
+ }
278
+ const output = {};
279
+ // defineProperty, not assignment: an own "__proto__" key from JSON.parse
280
+ // must round-trip as an own data property instead of hitting the
281
+ // Object.prototype setter (which would silently drop the key).
282
+ const setOwn = (key, val) => {
283
+ Object.defineProperty(output, key, {
284
+ value: val,
285
+ enumerable: true,
286
+ writable: true,
287
+ configurable: true,
288
+ });
289
+ };
290
+ for (const [key, child] of Object.entries(source)) {
291
+ // Definitions are source-only after all references have been inlined.
292
+ if (key === "$defs" || key === "definitions")
293
+ continue;
294
+ if (key === "unevaluatedProperties") {
295
+ const hasCrossSchemaApplicator = [
296
+ "allOf",
297
+ "anyOf",
298
+ "oneOf",
299
+ "if",
300
+ "then",
301
+ "else",
302
+ "dependentSchemas",
303
+ ].some((keyword) => keyword in source);
304
+ if (child !== false ||
305
+ source["type"] !== "object" ||
306
+ !source["properties"] ||
307
+ typeof source["properties"] !== "object" ||
308
+ Array.isArray(source["properties"]) ||
309
+ hasCrossSchemaApplicator) {
310
+ throw new UnsupportedOutputSchemaError("outputSchema unevaluatedProperties can be transported only when false on an inline object with local properties and no cross-schema applicators; otherwise inline the evaluated properties and use additionalProperties:false");
311
+ }
312
+ // strictifyForStructuredOutput adds additionalProperties:false to this
313
+ // same object, which is equivalent for the proven simple shape.
314
+ continue;
315
+ }
316
+ if (key === "unevaluatedItems") {
317
+ throw new UnsupportedOutputSchemaError("outputSchema unevaluatedItems is unsupported by native structured-output transport; express the item constraints inline");
318
+ }
319
+ if (SCHEMA_MAP_KEYWORDS.has(key) &&
320
+ child &&
321
+ typeof child === "object" &&
322
+ !Array.isArray(child)) {
323
+ setOwn(key, Object.fromEntries(Object.entries(child).map(([name, schema]) => [
324
+ name,
325
+ walkSchema(schema, resolving, depth + 2),
326
+ ])));
327
+ }
328
+ else if (SCHEMA_ARRAY_KEYWORDS.has(key) && Array.isArray(child)) {
329
+ setOwn(key, child.map((schema) => walkSchema(schema, resolving, depth + 2)));
330
+ }
331
+ else if (key === "items") {
332
+ setOwn(key, Array.isArray(child)
333
+ ? child.map((schema) => walkSchema(schema, resolving, depth + 2))
334
+ : walkSchema(child, resolving, depth + 1));
335
+ }
336
+ else if (key === "dependencies" &&
337
+ child &&
338
+ typeof child === "object" &&
339
+ !Array.isArray(child)) {
340
+ setOwn(key, Object.fromEntries(Object.entries(child).map(([name, dependency]) => [
341
+ name,
342
+ Array.isArray(dependency) ? dependency : walkSchema(dependency, resolving, depth + 2),
343
+ ])));
344
+ }
345
+ else if (SCHEMA_VALUE_KEYWORDS.has(key)) {
346
+ setOwn(key, walkSchema(child, resolving, depth + 1));
347
+ }
348
+ else {
349
+ // Verbatim-copied subtrees (unknown/non-schema keys) never get their
350
+ // refs resolved, and the native routes 400 on any $ref they see.
351
+ if (containsRefDeep(child)) {
352
+ throw new UnsupportedOutputSchemaError(`outputSchema $ref under non-schema key ${JSON.stringify(key)} cannot be resolved for native transport; move the reference under a schema keyword or inline it`);
353
+ }
354
+ setOwn(key, child);
355
+ }
356
+ }
357
+ return output;
358
+ };
359
+ return walkSchema(root, [], 0);
63
360
  }
64
361
  /**
65
362
  * Vendor STRICT structured-output mode (LIVE-VERIFIED against codex 0.137 /
@@ -1 +1 @@
1
- {"version":3,"file":"output-schema.js","sourceRoot":"","sources":["../src/output-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iFAAiF;AACjF,MAAM,OAAO,4BAA6B,SAAQ,KAAK;CAAG;AAE1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAA+B;IAE/B,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC5E,MAAM,IAAI,4BAA4B,CACpC,gLAAgL,CACjL,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,CAAC,KAAc,EAAW,EAAE;QACzC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACtD,MAAM,GAAG,GAAG,KAAgC,CAAC;QAC7C,IA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,GAAG,CAAC,GAAG,CAAC;oBAAE,SAAS;gBAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;gBACxB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7D,MAAM,CAAC,GAAG,IAA+B,CAAC;oBAC1C,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,EAAE,CAAC;wBAC1D,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;oBAClC,CAAC;yBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAE,CAAC,CAAC,MAAM,CAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;wBACjF,CAAC,CAAC,MAAM,CAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACxC,CAAC;gBACH,CAAC;YACH,CAAC;YACD,GAAG,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrC,GAAG,CAAC,sBAAsB,CAAC,GAAG,KAAK,CAAC;QACtC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,IAAI,CAAC,IAAI,CAA4B,CAAC;AAC/C,CAAC"}
package/dist/plan.d.ts CHANGED
@@ -123,10 +123,10 @@ export declare const PlanReadiness: z.ZodObject<{
123
123
  state: z.ZodEnum<["ready", "needs_answers", "unverified"]>;
124
124
  questionCount: z.ZodDefault<z.ZodNumber>;
125
125
  }, "strict", z.ZodTypeAny, {
126
- state: "ready" | "needs_answers" | "unverified";
126
+ state: "ready" | "unverified" | "needs_answers";
127
127
  questionCount: number;
128
128
  }, {
129
- state: "ready" | "needs_answers" | "unverified";
129
+ state: "ready" | "unverified" | "needs_answers";
130
130
  questionCount?: number | undefined;
131
131
  }>;
132
132
  export type PlanReadiness = z.infer<typeof PlanReadiness>;
package/dist/problem.d.ts CHANGED
@@ -12,18 +12,18 @@ export declare const ControlProblem: z.ZodObject<{
12
12
  code: string;
13
13
  message: string;
14
14
  evidenceRefs: string[];
15
- retryable: boolean;
16
15
  context: Record<string, unknown>;
17
- fieldErrors: Record<string, string[]>;
16
+ retryable: boolean;
18
17
  requiredActions: string[];
18
+ fieldErrors: Record<string, string[]>;
19
19
  }, {
20
20
  code: string;
21
21
  message: string;
22
22
  retryable: boolean;
23
23
  evidenceRefs?: string[] | undefined;
24
24
  context?: Record<string, unknown> | undefined;
25
- fieldErrors?: Record<string, string[]> | undefined;
26
25
  requiredActions?: string[] | undefined;
26
+ fieldErrors?: Record<string, string[]> | undefined;
27
27
  }>;
28
28
  export type ControlProblem = z.infer<typeof ControlProblem>;
29
29
  //# sourceMappingURL=problem.d.ts.map