@rayspec/spec 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +105 -0
- package/dist/brace-params.d.ts +32 -0
- package/dist/brace-params.d.ts.map +1 -0
- package/dist/brace-params.js +89 -0
- package/dist/brace-params.js.map +1 -0
- package/dist/detect.d.ts +44 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +72 -0
- package/dist/detect.js.map +1 -0
- package/dist/errors.d.ts +204 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +165 -0
- package/dist/errors.js.map +1 -0
- package/dist/export.d.ts +54 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +121 -0
- package/dist/export.js.map +1 -0
- package/dist/grammar.d.ts +569 -0
- package/dist/grammar.d.ts.map +1 -0
- package/dist/grammar.js +503 -0
- package/dist/grammar.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/lint.d.ts +79 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +823 -0
- package/dist/lint.js.map +1 -0
- package/dist/parse.d.ts +8 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +118 -0
- package/dist/parse.js.map +1 -0
- package/dist/product-events.d.ts +73 -0
- package/dist/product-events.d.ts.map +1 -0
- package/dist/product-events.js +42 -0
- package/dist/product-events.js.map +1 -0
- package/dist/product-grammar.d.ts +948 -0
- package/dist/product-grammar.d.ts.map +1 -0
- package/dist/product-grammar.js +581 -0
- package/dist/product-grammar.js.map +1 -0
- package/dist/product-lint.d.ts +74 -0
- package/dist/product-lint.d.ts.map +1 -0
- package/dist/product-lint.js +821 -0
- package/dist/product-lint.js.map +1 -0
- package/dist/product-parse.d.ts +8 -0
- package/dist/product-parse.d.ts.map +1 -0
- package/dist/product-parse.js +119 -0
- package/dist/product-parse.js.map +1 -0
- package/dist/product-scope.d.ts +53 -0
- package/dist/product-scope.d.ts.map +1 -0
- package/dist/product-scope.js +55 -0
- package/dist/product-scope.js.map +1 -0
- package/dist/product-views-lint.d.ts +14 -0
- package/dist/product-views-lint.d.ts.map +1 -0
- package/dist/product-views-lint.js +669 -0
- package/dist/product-views-lint.js.map +1 -0
- package/dist/product-views.d.ts +426 -0
- package/dist/product-views.d.ts.map +1 -0
- package/dist/product-views.js +317 -0
- package/dist/product-views.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,948 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Product-YAML grammar — `ProductSpec` and its sections.
|
|
3
|
+
*
|
|
4
|
+
* A Product-YAML document declares PRODUCT MEANING ONLY (Tier C — the Product-YAML
|
|
5
|
+
* program): product identity, required Tier-B capabilities, product-owned artifact kinds + response
|
|
6
|
+
* contracts, declarative TYPED PRODUCT STORES (data shape, never handlers/SQL),
|
|
7
|
+
* declarative agent EXTRACTION contracts, workflow COMPOSITION over Tier A/B primitives, grounding
|
|
8
|
+
* policy, and declarative view/read contracts. It is a DIFFERENT document family from `RaySpec`
|
|
9
|
+
* (grammar.ts): its `extractors` are extraction contracts (not backend/model/instructions wrappers),
|
|
10
|
+
* and it deliberately has NO `handlers`/`tooling`/`api` — the whole point is that NO product-owned backend
|
|
11
|
+
* code lives here (that belongs in Tier A/B). The minimal typed `stores` section below reuses the
|
|
12
|
+
* backend column vocabulary so the derived output stays a standard `StoreSpec`. The two
|
|
13
|
+
* profiles share ONE `version:'1.0'` key and are told apart by the presence of the `product:`
|
|
14
|
+
* section (the archetype discriminant) at the parse/deploy/CLI layer (`detect.ts`); the backend
|
|
15
|
+
* profile (`RaySpec`) IS the internal engine target and its shape stays byte-unchanged.
|
|
16
|
+
*
|
|
17
|
+
* ENFORCEMENT POINT: this module IS the real, fail-closed parser for the product profile — the closed
|
|
18
|
+
* grammar is enforced here (an unknown key is rejected — see below), not merely described. The product
|
|
19
|
+
* profile carries the unified production version literal `'1.0'` (the product profile of one language).
|
|
20
|
+
*
|
|
21
|
+
* FAIL-CLOSED BY CONSTRUCTION: every object level is `.strict()` (an unknown key is rejected — no
|
|
22
|
+
* silent passthrough, mirroring grammar.ts). The `contracts[]` values are INTENTIONALLY open
|
|
23
|
+
* records (they ARE JSON-Schema-like payloads) — their CLOSED vocabulary is enforced separately
|
|
24
|
+
* by `product-lint.ts`, exactly as `RaySpec` validates a tool's `parameters` via ajv in lint
|
|
25
|
+
* rather than by strict-key rejection.
|
|
26
|
+
*
|
|
27
|
+
* BRIDGE ALIGNMENT: the `workflows`/`extractors` shapes here are FIELD-COMPATIBLE
|
|
28
|
+
* with `ProductYamlBridgeInput` (`@rayspec/product-yaml-workflow-bridge`) — same key names (workflows:
|
|
29
|
+
* id/trigger{capability,event,scope}/steps[]{id,type,use,inputs,outputs,depends_on,on_error,retry}; and
|
|
30
|
+
* the extractor extraction contract) — so a validated `ProductSpec` feeds the real bridge compiler unchanged.
|
|
31
|
+
*
|
|
32
|
+
* REPRESENTABLE: only string/literal/enum/array/record/object/boolean/number types are used, so
|
|
33
|
+
* `z.toJSONSchema` (export.ts `exportProductJsonSchema`) exports it without throwing.
|
|
34
|
+
*/
|
|
35
|
+
import { z } from 'zod';
|
|
36
|
+
export declare const ProductIdentity: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
description: z.ZodOptional<z.ZodString>;
|
|
40
|
+
owners: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
export type ProductIdentity = z.infer<typeof ProductIdentity>;
|
|
44
|
+
export declare const RequiresSpec: z.ZodObject<{
|
|
45
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export type RequiresSpec = z.infer<typeof RequiresSpec>;
|
|
48
|
+
/** Reusable Tier B capability references are tier `B` (the draft's only allowed tier). */
|
|
49
|
+
export declare const CapabilityTier: z.ZodEnum<{
|
|
50
|
+
B: "B";
|
|
51
|
+
}>;
|
|
52
|
+
export type CapabilityTier = z.infer<typeof CapabilityTier>;
|
|
53
|
+
/**
|
|
54
|
+
* A capability's runtime availability. All three statuses are shape-valid: `available`
|
|
55
|
+
* declares the capability is runtime-backed; `reserved`/`not_yet_runtime` declare a future
|
|
56
|
+
* dependency. WIREDNESS is enforced at the deploy composition, not here — a MOUNT rejects any
|
|
57
|
+
* capability that is not `available` + actually runtime-backed (fail-closed, section named), while
|
|
58
|
+
* `doctor`/`plan` (validate-only) accept all three (the frozen legacy fixture stays valid).
|
|
59
|
+
*/
|
|
60
|
+
export declare const CapabilityStatus: z.ZodEnum<{
|
|
61
|
+
reserved: "reserved";
|
|
62
|
+
not_yet_runtime: "not_yet_runtime";
|
|
63
|
+
available: "available";
|
|
64
|
+
}>;
|
|
65
|
+
export type CapabilityStatus = z.infer<typeof CapabilityStatus>;
|
|
66
|
+
/**
|
|
67
|
+
* Narrow, DECLARATIVE provider policy (draft): provider/model SELECTION by policy — NOT a
|
|
68
|
+
* provider-native request/response blob. Allowed ONLY here (on a capability) and in
|
|
69
|
+
* `deployment_overrides`; product-lint rejects provider policy that leaks into `workflows`/`extractors`.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ProviderPolicy: z.ZodObject<{
|
|
72
|
+
default_provider: z.ZodOptional<z.ZodString>;
|
|
73
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
74
|
+
adapter_visibility: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
internal: "internal";
|
|
76
|
+
public: "public";
|
|
77
|
+
}>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type ProviderPolicy = z.infer<typeof ProviderPolicy>;
|
|
80
|
+
/**
|
|
81
|
+
* OPTIONAL declarative INPUT-NORMALIZE step for a submit-ingress capability (default OFF). When
|
|
82
|
+
* declared, a submitted record is transformed by the named agent AFTER shape-validation and BEFORE
|
|
83
|
+
* persist — the NORMALIZED value is what is re-validated, stored, and emitted. ABSENT ⇒ behaviour is
|
|
84
|
+
* byte-identical to today (a capability that does not declare it is completely unaffected). The agent
|
|
85
|
+
* runs through the platform's neutral agent-invocation path (the deployment wires a normalizer for the
|
|
86
|
+
* declared `agent` id — the config-side wiring precedent); the model output must conform to
|
|
87
|
+
* `output_contract`. Fail-closed: a normalize failure REJECTS the submit and persists nothing.
|
|
88
|
+
*/
|
|
89
|
+
export declare const CapabilityInputNormalize: z.ZodObject<{
|
|
90
|
+
agent: z.ZodString;
|
|
91
|
+
output_contract: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export type CapabilityInputNormalize = z.infer<typeof CapabilityInputNormalize>;
|
|
94
|
+
export declare const CapabilitySpec: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
tier: z.ZodEnum<{
|
|
97
|
+
B: "B";
|
|
98
|
+
}>;
|
|
99
|
+
status: z.ZodEnum<{
|
|
100
|
+
reserved: "reserved";
|
|
101
|
+
not_yet_runtime: "not_yet_runtime";
|
|
102
|
+
available: "available";
|
|
103
|
+
}>;
|
|
104
|
+
contracts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
105
|
+
provider_policy: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
default_provider: z.ZodOptional<z.ZodString>;
|
|
107
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
108
|
+
adapter_visibility: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
internal: "internal";
|
|
110
|
+
public: "public";
|
|
111
|
+
}>>;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
runtime_notes: z.ZodOptional<z.ZodString>;
|
|
114
|
+
input_normalize: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
agent: z.ZodString;
|
|
116
|
+
output_contract: z.ZodString;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export type CapabilitySpec = z.infer<typeof CapabilitySpec>;
|
|
120
|
+
export declare const ArtifactProvenance: z.ZodObject<{
|
|
121
|
+
source: z.ZodOptional<z.ZodString>;
|
|
122
|
+
evidence_field: z.ZodOptional<z.ZodString>;
|
|
123
|
+
quote_field: z.ZodOptional<z.ZodString>;
|
|
124
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
export type ArtifactProvenance = z.infer<typeof ArtifactProvenance>;
|
|
127
|
+
export declare const ArtifactLifecycle: z.ZodObject<{
|
|
128
|
+
persist: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
preserve_human_edits: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
reconcile_stale_rows: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
export type ArtifactLifecycle = z.infer<typeof ArtifactLifecycle>;
|
|
133
|
+
export declare const ArtifactSpec: z.ZodObject<{
|
|
134
|
+
kind: z.ZodString;
|
|
135
|
+
label: z.ZodOptional<z.ZodString>;
|
|
136
|
+
contract: z.ZodString;
|
|
137
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
138
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
139
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
source: z.ZodOptional<z.ZodString>;
|
|
141
|
+
evidence_field: z.ZodOptional<z.ZodString>;
|
|
142
|
+
quote_field: z.ZodOptional<z.ZodString>;
|
|
143
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
}, z.core.$strict>>;
|
|
145
|
+
lifecycle: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
persist: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
preserve_human_edits: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
reconcile_stale_rows: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
}, z.core.$strict>>;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
export type ArtifactSpec = z.infer<typeof ArtifactSpec>;
|
|
152
|
+
/**
|
|
153
|
+
* `contracts` maps a contract id to a JSON-Schema-like payload. INTENTIONALLY an OPEN record at the
|
|
154
|
+
* grammar level (like a `RaySpec` tool's `parameters` — a free-form schema slot): its CLOSED
|
|
155
|
+
* declarative vocabulary (allowed keys: type/description/properties/items/required/enum/
|
|
156
|
+
* additional_properties/nullable/ref; allowed types: object/array/string/number/integer/boolean/null;
|
|
157
|
+
* FORBIDDEN: functions/transforms/computed expressions/provider-native shapes) is enforced by
|
|
158
|
+
* `product-lint.ts` (`invalid_contract`), which walks each contract schema against the allowlist.
|
|
159
|
+
*/
|
|
160
|
+
export declare const ContractsSpec: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
161
|
+
export type ContractsSpec = z.infer<typeof ContractsSpec>;
|
|
162
|
+
export declare const AgentArtifactInput: z.ZodObject<{
|
|
163
|
+
name: z.ZodString;
|
|
164
|
+
ref: z.ZodString;
|
|
165
|
+
kind: z.ZodString;
|
|
166
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
source_step_id: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export type AgentArtifactInput = z.infer<typeof AgentArtifactInput>;
|
|
170
|
+
export declare const AgentArtifactOutput: z.ZodObject<{
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
ref: z.ZodString;
|
|
173
|
+
kind: z.ZodString;
|
|
174
|
+
schema_ref: z.ZodOptional<z.ZodString>;
|
|
175
|
+
materialization_target: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strict>;
|
|
177
|
+
export type AgentArtifactOutput = z.infer<typeof AgentArtifactOutput>;
|
|
178
|
+
export declare const RequiredOutputShape: z.ZodObject<{
|
|
179
|
+
schema_ref: z.ZodString;
|
|
180
|
+
required_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
+
additional_properties: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
export type RequiredOutputShape = z.infer<typeof RequiredOutputShape>;
|
|
184
|
+
export declare const AcceptanceBoundary: z.ZodObject<{
|
|
185
|
+
type: z.ZodLiteral<"validation_node">;
|
|
186
|
+
requires: z.ZodArray<z.ZodString>;
|
|
187
|
+
closed_source_artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
export type AcceptanceBoundary = z.infer<typeof AcceptanceBoundary>;
|
|
190
|
+
export declare const ArtifactMaterialization: z.ZodObject<{
|
|
191
|
+
target: z.ZodLiteral<"typed_artifact_ref">;
|
|
192
|
+
persist_via: z.ZodOptional<z.ZodString>;
|
|
193
|
+
handle_ref: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
export type ArtifactMaterialization = z.infer<typeof ArtifactMaterialization>;
|
|
196
|
+
export declare const AgentExtraction: z.ZodObject<{
|
|
197
|
+
intent: z.ZodString;
|
|
198
|
+
input_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
ref: z.ZodString;
|
|
201
|
+
kind: z.ZodString;
|
|
202
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
source_step_id: z.ZodOptional<z.ZodString>;
|
|
204
|
+
}, z.core.$strict>>>;
|
|
205
|
+
output_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
ref: z.ZodString;
|
|
208
|
+
kind: z.ZodString;
|
|
209
|
+
schema_ref: z.ZodOptional<z.ZodString>;
|
|
210
|
+
materialization_target: z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, z.core.$strict>>>;
|
|
212
|
+
required_output_shape: z.ZodObject<{
|
|
213
|
+
schema_ref: z.ZodString;
|
|
214
|
+
required_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
additional_properties: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
acceptance_boundary: z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"validation_node">;
|
|
219
|
+
requires: z.ZodArray<z.ZodString>;
|
|
220
|
+
closed_source_artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
materialization: z.ZodObject<{
|
|
223
|
+
target: z.ZodLiteral<"typed_artifact_ref">;
|
|
224
|
+
persist_via: z.ZodOptional<z.ZodString>;
|
|
225
|
+
handle_ref: z.ZodOptional<z.ZodString>;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
export type AgentExtraction = z.infer<typeof AgentExtraction>;
|
|
229
|
+
export declare const ExtractorSpec: z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
purpose: z.ZodString;
|
|
232
|
+
extraction: z.ZodObject<{
|
|
233
|
+
intent: z.ZodString;
|
|
234
|
+
input_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
ref: z.ZodString;
|
|
237
|
+
kind: z.ZodString;
|
|
238
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
source_step_id: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strict>>>;
|
|
241
|
+
output_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
ref: z.ZodString;
|
|
244
|
+
kind: z.ZodString;
|
|
245
|
+
schema_ref: z.ZodOptional<z.ZodString>;
|
|
246
|
+
materialization_target: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strict>>>;
|
|
248
|
+
required_output_shape: z.ZodObject<{
|
|
249
|
+
schema_ref: z.ZodString;
|
|
250
|
+
required_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
+
additional_properties: z.ZodOptional<z.ZodBoolean>;
|
|
252
|
+
}, z.core.$strict>;
|
|
253
|
+
acceptance_boundary: z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"validation_node">;
|
|
255
|
+
requires: z.ZodArray<z.ZodString>;
|
|
256
|
+
closed_source_artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
257
|
+
}, z.core.$strict>;
|
|
258
|
+
materialization: z.ZodObject<{
|
|
259
|
+
target: z.ZodLiteral<"typed_artifact_ref">;
|
|
260
|
+
persist_via: z.ZodOptional<z.ZodString>;
|
|
261
|
+
handle_ref: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
extraction_constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
265
|
+
}, z.core.$strict>;
|
|
266
|
+
export type ExtractorSpec = z.infer<typeof ExtractorSpec>;
|
|
267
|
+
/**
|
|
268
|
+
* A declared product store: the MINIMAL typed data declaration the store_read/store_write step
|
|
269
|
+
* runtime targets, and the backing for store-sourced views. DESIGN LAWS:
|
|
270
|
+
* - the columns are EXACTLY the backend `StoreColumn` vocabulary (imported from grammar.ts, which stays
|
|
271
|
+
* byte-stable), so the DERIVED output (`deriveProductStores`) is a standard `StoreSpec` and the
|
|
272
|
+
* whole existing store machinery — `generateProductSql` (tenancy/GDPR injection), `diffProductStores`,
|
|
273
|
+
* drift/classify, the update seam, `eraseTenant` — consumes declared stores UNCHANGED;
|
|
274
|
+
* - authors declare BUSINESS columns only; the tenancy/GDPR columns (`id`/`tenant_id`/`created_at`/
|
|
275
|
+
* `deleted_at`/`retention_days`/`region`) are INJECTED downstream exactly like collection stores get
|
|
276
|
+
* them (declaring one is rejected by lint, `reserved_column_name`);
|
|
277
|
+
* - `key` is the REQUIRED conflict/idempotency identity: the durable engine's at-least-once law
|
|
278
|
+
* re-executes a mid-crash node, so EVERY store_write is an UPSERT on this declared key (single-flight — never
|
|
279
|
+
* insert-and-recover; an in-tx unique-violation would poison the whole run transaction). It lives on
|
|
280
|
+
* the STORE (not the write step) because row identity is a property of the DATA — two write paths to
|
|
281
|
+
* one store must agree on one identity — and because the derivation must materialize the backing
|
|
282
|
+
* UNIQUE index (the key column derives `unique: true`). v1 admits EXACTLY ONE key column (the backend
|
|
283
|
+
* `StoreSpec` family has per-column uniques only — no composite/table-level unique vocabulary; a
|
|
284
|
+
* composite identity is composed into one column, the platform's `artifact_ref`/`track_ref` idiom);
|
|
285
|
+
* - deliberately NOT supported in v1 (honest scope): product-to-product foreign keys, composite keys,
|
|
286
|
+
* per-column defaults (the backend `StoreColumn` vocabulary carries none), non-tenant stores.
|
|
287
|
+
*/
|
|
288
|
+
export declare const ProductStoreSpec: z.ZodObject<{
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
description: z.ZodOptional<z.ZodString>;
|
|
291
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
type: z.ZodEnum<{
|
|
294
|
+
boolean: "boolean";
|
|
295
|
+
text: "text";
|
|
296
|
+
uuid: "uuid";
|
|
297
|
+
timestamp: "timestamp";
|
|
298
|
+
integer: "integer";
|
|
299
|
+
jsonb: "jsonb";
|
|
300
|
+
}>;
|
|
301
|
+
nullable: z.ZodDefault<z.ZodBoolean>;
|
|
302
|
+
unique: z.ZodDefault<z.ZodBoolean>;
|
|
303
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
}, z.core.$strict>>;
|
|
305
|
+
key: z.ZodArray<z.ZodString>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
export type ProductStoreSpec = z.infer<typeof ProductStoreSpec>;
|
|
308
|
+
/** A value read from the TRIGGER EVENT payload (`payload[<event>]` — a scalar, fail-closed at run). */
|
|
309
|
+
export declare const StoreEventValue: z.ZodObject<{
|
|
310
|
+
event: z.ZodString;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
export type StoreEventValue = z.infer<typeof StoreEventValue>;
|
|
313
|
+
/**
|
|
314
|
+
* A literal scalar. The FILTER variant excludes null (SQL equality on NULL never matches a row).
|
|
315
|
+
*
|
|
316
|
+
* ⚠ KNOWN LIMITATION (GLI-1 — INTENDED; do NOT "fix" by narrowing the guard): a `{const:}` literal
|
|
317
|
+
* lives inside the `workflows` graph subtree, so the graph NEUTRALITY guardrails
|
|
318
|
+
* (`scanProductGuardrails` — provider names, code-like tokens, handler/module paths,
|
|
319
|
+
* production-/prompt-execution claims) scan it like every other graph string. A BUSINESS constant
|
|
320
|
+
* that happens to contain such a token (e.g. a status text naming a provider, or `llm call`) is
|
|
321
|
+
* therefore OVER-REJECTED fail-closed. This is the deliberate posture: the guard is trust-boundary-adjacent
|
|
322
|
+
* and MUST NOT be weakened for literal convenience — rephrase the constant, or carry the value as
|
|
323
|
+
* DATA through an `{event:}` / `{artifact:}` source instead of YAML meaning. Pinned by a lint test
|
|
324
|
+
* (product-stores.test.ts GLI-1) so an accidental narrowing of the guard goes red.
|
|
325
|
+
*/
|
|
326
|
+
export declare const StoreFilterConstValue: z.ZodObject<{
|
|
327
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
328
|
+
}, z.core.$strict>;
|
|
329
|
+
export type StoreFilterConstValue = z.infer<typeof StoreFilterConstValue>;
|
|
330
|
+
/** The write-variant literal (incl. null). The GLI-1 over-rejection note above applies here too. */
|
|
331
|
+
export declare const StoreWriteConstValue: z.ZodObject<{
|
|
332
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
export type StoreWriteConstValue = z.infer<typeof StoreWriteConstValue>;
|
|
335
|
+
/**
|
|
336
|
+
* An UPSTREAM ARTIFACT value by its declared contract ref (last producer wins — the same resolution
|
|
337
|
+
* every other node uses). Write-values only: it feeds a step's produced data (e.g. a store_read's
|
|
338
|
+
* rows) into a written column; a whole artifact is not an equality-filter scalar.
|
|
339
|
+
*/
|
|
340
|
+
export declare const StoreArtifactValue: z.ZodObject<{
|
|
341
|
+
artifact: z.ZodString;
|
|
342
|
+
}, z.core.$strict>;
|
|
343
|
+
export type StoreArtifactValue = z.infer<typeof StoreArtifactValue>;
|
|
344
|
+
/** store_read filter sources: event payload key or a non-null literal (EQUALITY-ONLY, see below). */
|
|
345
|
+
export declare const StoreFilterValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
346
|
+
event: z.ZodString;
|
|
347
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
348
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
349
|
+
}, z.core.$strict>]>;
|
|
350
|
+
export type StoreFilterValue = z.infer<typeof StoreFilterValue>;
|
|
351
|
+
/** store_write value sources: event payload key, literal (incl. null), or an upstream artifact. */
|
|
352
|
+
export declare const StoreWriteValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
353
|
+
event: z.ZodString;
|
|
354
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
356
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
357
|
+
artifact: z.ZodString;
|
|
358
|
+
}, z.core.$strict>]>;
|
|
359
|
+
export type StoreWriteValue = z.infer<typeof StoreWriteValue>;
|
|
360
|
+
/**
|
|
361
|
+
* The store_read row cap: `limit` may not exceed this (shape-level), the node clamps to it
|
|
362
|
+
* (defense-in-depth), and an omitted limit defaults to `STORE_READ_DEFAULT_LIMIT`. A step read is a
|
|
363
|
+
* BOUNDED reference lookup feeding a workflow node — unbounded reads belong to paged views.
|
|
364
|
+
*/
|
|
365
|
+
export declare const STORE_READ_MAX_LIMIT = 1000;
|
|
366
|
+
export declare const STORE_READ_DEFAULT_LIMIT = 100;
|
|
367
|
+
/**
|
|
368
|
+
* The closed set of workflow step types. `capability`/`agent`/`validation`/`artifact_persist`/
|
|
369
|
+
* `artifact_read` are what the bridge compiles today; `store_read`/`store_write` are draft Tier-A
|
|
370
|
+
* node types (validated statically here, compiled by later stages). An unknown/typo'd `type` is
|
|
371
|
+
* fail-closed-rejected by this enum (the fail-open lesson: never silently drop a step; reject loudly).
|
|
372
|
+
*/
|
|
373
|
+
export declare const WorkflowStepType: z.ZodEnum<{
|
|
374
|
+
agent: "agent";
|
|
375
|
+
capability: "capability";
|
|
376
|
+
validation: "validation";
|
|
377
|
+
artifact_persist: "artifact_persist";
|
|
378
|
+
artifact_read: "artifact_read";
|
|
379
|
+
store_read: "store_read";
|
|
380
|
+
store_write: "store_write";
|
|
381
|
+
}>;
|
|
382
|
+
export type WorkflowStepType = z.infer<typeof WorkflowStepType>;
|
|
383
|
+
/** Bounded failure policy a step may select (Tier A runtime executes it). */
|
|
384
|
+
export declare const WorkflowOnError: z.ZodEnum<{
|
|
385
|
+
fail: "fail";
|
|
386
|
+
retry: "retry";
|
|
387
|
+
drop: "drop";
|
|
388
|
+
quarantine: "quarantine";
|
|
389
|
+
}>;
|
|
390
|
+
export type WorkflowOnError = z.infer<typeof WorkflowOnError>;
|
|
391
|
+
/** A BOUNDED retry policy — a positive attempt cap (no unbounded loops). */
|
|
392
|
+
export declare const WorkflowRetry: z.ZodObject<{
|
|
393
|
+
max_attempts: z.ZodNumber;
|
|
394
|
+
}, z.core.$strict>;
|
|
395
|
+
export type WorkflowRetry = z.infer<typeof WorkflowRetry>;
|
|
396
|
+
export declare const WorkflowStep: z.ZodObject<{
|
|
397
|
+
id: z.ZodString;
|
|
398
|
+
type: z.ZodEnum<{
|
|
399
|
+
agent: "agent";
|
|
400
|
+
capability: "capability";
|
|
401
|
+
validation: "validation";
|
|
402
|
+
artifact_persist: "artifact_persist";
|
|
403
|
+
artifact_read: "artifact_read";
|
|
404
|
+
store_read: "store_read";
|
|
405
|
+
store_write: "store_write";
|
|
406
|
+
}>;
|
|
407
|
+
use: z.ZodString;
|
|
408
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
409
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
410
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
|
+
on_error: z.ZodOptional<z.ZodEnum<{
|
|
412
|
+
fail: "fail";
|
|
413
|
+
retry: "retry";
|
|
414
|
+
drop: "drop";
|
|
415
|
+
quarantine: "quarantine";
|
|
416
|
+
}>>;
|
|
417
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
max_attempts: z.ZodNumber;
|
|
419
|
+
}, z.core.$strict>>;
|
|
420
|
+
store: z.ZodOptional<z.ZodString>;
|
|
421
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
422
|
+
event: z.ZodString;
|
|
423
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
424
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
425
|
+
}, z.core.$strict>]>>>;
|
|
426
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
428
|
+
event: z.ZodString;
|
|
429
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
430
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
431
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
432
|
+
artifact: z.ZodString;
|
|
433
|
+
}, z.core.$strict>]>>>;
|
|
434
|
+
}, z.core.$strict>;
|
|
435
|
+
export type WorkflowStep = z.infer<typeof WorkflowStep>;
|
|
436
|
+
export declare const WorkflowTrigger: z.ZodObject<{
|
|
437
|
+
capability: z.ZodString;
|
|
438
|
+
event: z.ZodString;
|
|
439
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
440
|
+
}, z.core.$strict>;
|
|
441
|
+
export type WorkflowTrigger = z.infer<typeof WorkflowTrigger>;
|
|
442
|
+
export declare const ProductWorkflowSpec: z.ZodObject<{
|
|
443
|
+
id: z.ZodString;
|
|
444
|
+
trigger: z.ZodObject<{
|
|
445
|
+
capability: z.ZodString;
|
|
446
|
+
event: z.ZodString;
|
|
447
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
448
|
+
}, z.core.$strict>;
|
|
449
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
450
|
+
id: z.ZodString;
|
|
451
|
+
type: z.ZodEnum<{
|
|
452
|
+
agent: "agent";
|
|
453
|
+
capability: "capability";
|
|
454
|
+
validation: "validation";
|
|
455
|
+
artifact_persist: "artifact_persist";
|
|
456
|
+
artifact_read: "artifact_read";
|
|
457
|
+
store_read: "store_read";
|
|
458
|
+
store_write: "store_write";
|
|
459
|
+
}>;
|
|
460
|
+
use: z.ZodString;
|
|
461
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
462
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
463
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
464
|
+
on_error: z.ZodOptional<z.ZodEnum<{
|
|
465
|
+
fail: "fail";
|
|
466
|
+
retry: "retry";
|
|
467
|
+
drop: "drop";
|
|
468
|
+
quarantine: "quarantine";
|
|
469
|
+
}>>;
|
|
470
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
471
|
+
max_attempts: z.ZodNumber;
|
|
472
|
+
}, z.core.$strict>>;
|
|
473
|
+
store: z.ZodOptional<z.ZodString>;
|
|
474
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
475
|
+
event: z.ZodString;
|
|
476
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
477
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
478
|
+
}, z.core.$strict>]>>>;
|
|
479
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
481
|
+
event: z.ZodString;
|
|
482
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
483
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
484
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
485
|
+
artifact: z.ZodString;
|
|
486
|
+
}, z.core.$strict>]>>>;
|
|
487
|
+
}, z.core.$strict>>;
|
|
488
|
+
}, z.core.$strict>;
|
|
489
|
+
export type ProductWorkflowSpec = z.infer<typeof ProductWorkflowSpec>;
|
|
490
|
+
export declare const AttributionPolicy: z.ZodObject<{
|
|
491
|
+
tracks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
492
|
+
}, z.core.$strict>;
|
|
493
|
+
export type AttributionPolicy = z.infer<typeof AttributionPolicy>;
|
|
494
|
+
export declare const GroundingSpec: z.ZodObject<{
|
|
495
|
+
require_source_spans: z.ZodOptional<z.ZodBoolean>;
|
|
496
|
+
source_span_contract: z.ZodOptional<z.ZodString>;
|
|
497
|
+
on_invalid_citation: z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
fail: "fail";
|
|
499
|
+
drop: "drop";
|
|
500
|
+
prune: "prune";
|
|
501
|
+
repair: "repair";
|
|
502
|
+
}>>;
|
|
503
|
+
on_empty_evidence: z.ZodOptional<z.ZodEnum<{
|
|
504
|
+
fail: "fail";
|
|
505
|
+
drop: "drop";
|
|
506
|
+
prune: "prune";
|
|
507
|
+
keep: "keep";
|
|
508
|
+
}>>;
|
|
509
|
+
on_unquoted_claim: z.ZodOptional<z.ZodEnum<{
|
|
510
|
+
fail: "fail";
|
|
511
|
+
drop: "drop";
|
|
512
|
+
prune: "prune";
|
|
513
|
+
ignore: "ignore";
|
|
514
|
+
}>>;
|
|
515
|
+
validation_capability: z.ZodOptional<z.ZodString>;
|
|
516
|
+
attribution_policy: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
tracks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
518
|
+
}, z.core.$strict>>;
|
|
519
|
+
}, z.core.$strict>;
|
|
520
|
+
export type GroundingSpec = z.infer<typeof GroundingSpec>;
|
|
521
|
+
/** Views are reads plus a playback-token command — GET/POST only (a mutating verb implies a handler). */
|
|
522
|
+
export declare const ViewMethod: z.ZodEnum<{
|
|
523
|
+
GET: "GET";
|
|
524
|
+
POST: "POST";
|
|
525
|
+
}>;
|
|
526
|
+
export type ViewMethod = z.infer<typeof ViewMethod>;
|
|
527
|
+
export declare const ViewRoute: z.ZodObject<{
|
|
528
|
+
method: z.ZodEnum<{
|
|
529
|
+
GET: "GET";
|
|
530
|
+
POST: "POST";
|
|
531
|
+
}>;
|
|
532
|
+
path: z.ZodString;
|
|
533
|
+
}, z.core.$strict>;
|
|
534
|
+
export type ViewRoute = z.infer<typeof ViewRoute>;
|
|
535
|
+
export declare const ViewSource: z.ZodObject<{
|
|
536
|
+
kind: z.ZodEnum<{
|
|
537
|
+
store: "store";
|
|
538
|
+
capability: "capability";
|
|
539
|
+
artifact_query: "artifact_query";
|
|
540
|
+
}>;
|
|
541
|
+
ref: z.ZodString;
|
|
542
|
+
}, z.core.$strict>;
|
|
543
|
+
export type ViewSource = z.infer<typeof ViewSource>;
|
|
544
|
+
export declare const ViewPagination: z.ZodObject<{
|
|
545
|
+
limit_param: z.ZodOptional<z.ZodString>;
|
|
546
|
+
offset_param: z.ZodOptional<z.ZodString>;
|
|
547
|
+
max_limit: z.ZodOptional<z.ZodNumber>;
|
|
548
|
+
default_limit: z.ZodOptional<z.ZodNumber>;
|
|
549
|
+
}, z.core.$strict>;
|
|
550
|
+
export type ViewPagination = z.infer<typeof ViewPagination>;
|
|
551
|
+
/**
|
|
552
|
+
* Response behavior for processing/absent data. The draft BANS `processing_200`; this enum omits it, so
|
|
553
|
+
* it is fail-closed-rejected by construction (a bad-enum `schema_violation`). `not_ready_409` preserves
|
|
554
|
+
* the playback-token readiness contract; `empty_200` is the empty-read-model shape.
|
|
555
|
+
*/
|
|
556
|
+
export declare const ViewAbsentState: z.ZodEnum<{
|
|
557
|
+
empty_200: "empty_200";
|
|
558
|
+
not_ready_409: "not_ready_409";
|
|
559
|
+
}>;
|
|
560
|
+
export type ViewAbsentState = z.infer<typeof ViewAbsentState>;
|
|
561
|
+
/**
|
|
562
|
+
* VERSION-DISCIPLINE NOTE: the view read+projection vocabulary below (`params`/`read`/
|
|
563
|
+
* `conditional_read` + `pagination.default_limit`) is a STRICTLY ADDITIVE, ALL-OPTIONAL extension of
|
|
564
|
+
* the product profile, so it needs no version bump: every previously-valid product document parses
|
|
565
|
+
* byte-identically (the `version` literal + `product:` discriminant select document PROFILES, not
|
|
566
|
+
* additive vocabulary), and `.strict()` still rejects unknown keys fail-closed. The committed
|
|
567
|
+
* schema and the fixtures are regenerated/updated DELIBERATELY with this change (never silently).
|
|
568
|
+
*
|
|
569
|
+
* SEMANTIC SPLIT: `source` (+ `read`) declare the BACKING DATA and are validated
|
|
570
|
+
* kind-aware (store name / declared artifact / capability contract — a contract id NEVER satisfies a
|
|
571
|
+
* source); `response_contract` (+ `read.shape`) declare the DTO and are validated by the separate
|
|
572
|
+
* shape⊆contract conformance pass. See product-views.ts + product-views-lint.ts.
|
|
573
|
+
*/
|
|
574
|
+
export declare const ProductViewSpec: z.ZodObject<{
|
|
575
|
+
id: z.ZodString;
|
|
576
|
+
route: z.ZodObject<{
|
|
577
|
+
method: z.ZodEnum<{
|
|
578
|
+
GET: "GET";
|
|
579
|
+
POST: "POST";
|
|
580
|
+
}>;
|
|
581
|
+
path: z.ZodString;
|
|
582
|
+
}, z.core.$strict>;
|
|
583
|
+
auth: z.ZodOptional<z.ZodString>;
|
|
584
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
585
|
+
in: z.ZodEnum<{
|
|
586
|
+
path: "path";
|
|
587
|
+
query: "query";
|
|
588
|
+
}>;
|
|
589
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
590
|
+
shape: z.ZodEnum<{
|
|
591
|
+
string: "string";
|
|
592
|
+
safe_id: "safe_id";
|
|
593
|
+
positive_int: "positive_int";
|
|
594
|
+
nonnegative_int: "nonnegative_int";
|
|
595
|
+
}>;
|
|
596
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
597
|
+
}, z.core.$strict>>>;
|
|
598
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
599
|
+
kind: z.ZodEnum<{
|
|
600
|
+
store: "store";
|
|
601
|
+
capability: "capability";
|
|
602
|
+
artifact_query: "artifact_query";
|
|
603
|
+
}>;
|
|
604
|
+
ref: z.ZodString;
|
|
605
|
+
}, z.core.$strict>>;
|
|
606
|
+
read: z.ZodOptional<z.ZodObject<{
|
|
607
|
+
mode: z.ZodEnum<{
|
|
608
|
+
list: "list";
|
|
609
|
+
single: "single";
|
|
610
|
+
collect: "collect";
|
|
611
|
+
}>;
|
|
612
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
613
|
+
param: z.ZodString;
|
|
614
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
615
|
+
const: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
616
|
+
}, z.core.$strict>]>>>;
|
|
617
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
618
|
+
column: z.ZodString;
|
|
619
|
+
equals: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>;
|
|
620
|
+
}, z.core.$strict>>>;
|
|
621
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
622
|
+
column: z.ZodString;
|
|
623
|
+
dir: z.ZodOptional<z.ZodEnum<{
|
|
624
|
+
asc: "asc";
|
|
625
|
+
desc: "desc";
|
|
626
|
+
}>>;
|
|
627
|
+
}, z.core.$strict>>>;
|
|
628
|
+
shape: z.ZodType<import("./product-views.js").ViewObjectShape, unknown, z.core.$ZodTypeInternals<import("./product-views.js").ViewObjectShape, unknown>>;
|
|
629
|
+
absent: z.ZodOptional<z.ZodObject<{
|
|
630
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
631
|
+
kind: z.ZodLiteral<"param">;
|
|
632
|
+
param: z.ZodString;
|
|
633
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
634
|
+
kind: z.ZodLiteral<"const">;
|
|
635
|
+
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
636
|
+
}, z.core.$strict>]>>;
|
|
637
|
+
}, z.core.$strict>>;
|
|
638
|
+
}, z.core.$strict>>;
|
|
639
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
640
|
+
limit_param: z.ZodOptional<z.ZodString>;
|
|
641
|
+
offset_param: z.ZodOptional<z.ZodString>;
|
|
642
|
+
max_limit: z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
default_limit: z.ZodOptional<z.ZodNumber>;
|
|
644
|
+
}, z.core.$strict>>;
|
|
645
|
+
absent_state: z.ZodOptional<z.ZodEnum<{
|
|
646
|
+
empty_200: "empty_200";
|
|
647
|
+
not_ready_409: "not_ready_409";
|
|
648
|
+
}>>;
|
|
649
|
+
conditional_read: z.ZodOptional<z.ZodEnum<{
|
|
650
|
+
etag: "etag";
|
|
651
|
+
}>>;
|
|
652
|
+
response_contract: z.ZodString;
|
|
653
|
+
}, z.core.$strict>;
|
|
654
|
+
export type ProductViewSpec = z.infer<typeof ProductViewSpec>;
|
|
655
|
+
export declare const ProviderOverride: z.ZodObject<{
|
|
656
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
657
|
+
}, z.core.$strict>;
|
|
658
|
+
export type ProviderOverride = z.infer<typeof ProviderOverride>;
|
|
659
|
+
export declare const DeploymentOverrides: z.ZodObject<{
|
|
660
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
661
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
662
|
+
}, z.core.$strict>>>;
|
|
663
|
+
}, z.core.$strict>;
|
|
664
|
+
export type DeploymentOverrides = z.infer<typeof DeploymentOverrides>;
|
|
665
|
+
/**
|
|
666
|
+
* The full Product-YAML document (the product profile of the unified `version:'1.0'` language). Its
|
|
667
|
+
* top-level key is `version` (`z.literal('1.0')`) — checked FIRST by the two-phase `parseProductSpec`
|
|
668
|
+
* (product-parse.ts) so an unsupported version yields a clean `unsupported_version` instead of a wall
|
|
669
|
+
* of strict errors. The required `product:` section is the archetype discriminant that tells this
|
|
670
|
+
* profile apart from the backend profile (which never carries `product:` — see detect.ts). `.strict()`
|
|
671
|
+
* rejects any unknown top-level section. Only `product` is required; every other section defaults
|
|
672
|
+
* ([]/{}), so a minimal doc (just `version` + `product`) is valid and a product need not declare every
|
|
673
|
+
* section. The grammar is a single `z.literal(SPEC_VERSION)` — the parse boundary (product-parse.ts)
|
|
674
|
+
* accepts exactly `version:'1.0'` and rejects any other version fail-closed.
|
|
675
|
+
*/
|
|
676
|
+
export declare const ProductSpec: z.ZodObject<{
|
|
677
|
+
version: z.ZodLiteral<"1.0">;
|
|
678
|
+
product: z.ZodObject<{
|
|
679
|
+
id: z.ZodString;
|
|
680
|
+
name: z.ZodString;
|
|
681
|
+
description: z.ZodOptional<z.ZodString>;
|
|
682
|
+
owners: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
683
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
684
|
+
}, z.core.$strict>;
|
|
685
|
+
requires: z.ZodDefault<z.ZodObject<{
|
|
686
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
687
|
+
}, z.core.$strict>>;
|
|
688
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
689
|
+
id: z.ZodString;
|
|
690
|
+
tier: z.ZodEnum<{
|
|
691
|
+
B: "B";
|
|
692
|
+
}>;
|
|
693
|
+
status: z.ZodEnum<{
|
|
694
|
+
reserved: "reserved";
|
|
695
|
+
not_yet_runtime: "not_yet_runtime";
|
|
696
|
+
available: "available";
|
|
697
|
+
}>;
|
|
698
|
+
contracts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
699
|
+
provider_policy: z.ZodOptional<z.ZodObject<{
|
|
700
|
+
default_provider: z.ZodOptional<z.ZodString>;
|
|
701
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
702
|
+
adapter_visibility: z.ZodOptional<z.ZodEnum<{
|
|
703
|
+
internal: "internal";
|
|
704
|
+
public: "public";
|
|
705
|
+
}>>;
|
|
706
|
+
}, z.core.$strict>>;
|
|
707
|
+
runtime_notes: z.ZodOptional<z.ZodString>;
|
|
708
|
+
input_normalize: z.ZodOptional<z.ZodObject<{
|
|
709
|
+
agent: z.ZodString;
|
|
710
|
+
output_contract: z.ZodString;
|
|
711
|
+
}, z.core.$strict>>;
|
|
712
|
+
}, z.core.$strict>>>;
|
|
713
|
+
artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
714
|
+
kind: z.ZodString;
|
|
715
|
+
label: z.ZodOptional<z.ZodString>;
|
|
716
|
+
contract: z.ZodString;
|
|
717
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
718
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
719
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
720
|
+
source: z.ZodOptional<z.ZodString>;
|
|
721
|
+
evidence_field: z.ZodOptional<z.ZodString>;
|
|
722
|
+
quote_field: z.ZodOptional<z.ZodString>;
|
|
723
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
724
|
+
}, z.core.$strict>>;
|
|
725
|
+
lifecycle: z.ZodOptional<z.ZodObject<{
|
|
726
|
+
persist: z.ZodOptional<z.ZodBoolean>;
|
|
727
|
+
preserve_human_edits: z.ZodOptional<z.ZodBoolean>;
|
|
728
|
+
reconcile_stale_rows: z.ZodOptional<z.ZodBoolean>;
|
|
729
|
+
}, z.core.$strict>>;
|
|
730
|
+
}, z.core.$strict>>>;
|
|
731
|
+
stores: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
732
|
+
name: z.ZodString;
|
|
733
|
+
description: z.ZodOptional<z.ZodString>;
|
|
734
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
735
|
+
name: z.ZodString;
|
|
736
|
+
type: z.ZodEnum<{
|
|
737
|
+
boolean: "boolean";
|
|
738
|
+
text: "text";
|
|
739
|
+
uuid: "uuid";
|
|
740
|
+
timestamp: "timestamp";
|
|
741
|
+
integer: "integer";
|
|
742
|
+
jsonb: "jsonb";
|
|
743
|
+
}>;
|
|
744
|
+
nullable: z.ZodDefault<z.ZodBoolean>;
|
|
745
|
+
unique: z.ZodDefault<z.ZodBoolean>;
|
|
746
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
747
|
+
}, z.core.$strict>>;
|
|
748
|
+
key: z.ZodArray<z.ZodString>;
|
|
749
|
+
}, z.core.$strict>>>;
|
|
750
|
+
contracts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
751
|
+
extractors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
752
|
+
id: z.ZodString;
|
|
753
|
+
purpose: z.ZodString;
|
|
754
|
+
extraction: z.ZodObject<{
|
|
755
|
+
intent: z.ZodString;
|
|
756
|
+
input_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
757
|
+
name: z.ZodString;
|
|
758
|
+
ref: z.ZodString;
|
|
759
|
+
kind: z.ZodString;
|
|
760
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
761
|
+
source_step_id: z.ZodOptional<z.ZodString>;
|
|
762
|
+
}, z.core.$strict>>>;
|
|
763
|
+
output_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
764
|
+
name: z.ZodString;
|
|
765
|
+
ref: z.ZodString;
|
|
766
|
+
kind: z.ZodString;
|
|
767
|
+
schema_ref: z.ZodOptional<z.ZodString>;
|
|
768
|
+
materialization_target: z.ZodOptional<z.ZodString>;
|
|
769
|
+
}, z.core.$strict>>>;
|
|
770
|
+
required_output_shape: z.ZodObject<{
|
|
771
|
+
schema_ref: z.ZodString;
|
|
772
|
+
required_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
773
|
+
additional_properties: z.ZodOptional<z.ZodBoolean>;
|
|
774
|
+
}, z.core.$strict>;
|
|
775
|
+
acceptance_boundary: z.ZodObject<{
|
|
776
|
+
type: z.ZodLiteral<"validation_node">;
|
|
777
|
+
requires: z.ZodArray<z.ZodString>;
|
|
778
|
+
closed_source_artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
779
|
+
}, z.core.$strict>;
|
|
780
|
+
materialization: z.ZodObject<{
|
|
781
|
+
target: z.ZodLiteral<"typed_artifact_ref">;
|
|
782
|
+
persist_via: z.ZodOptional<z.ZodString>;
|
|
783
|
+
handle_ref: z.ZodOptional<z.ZodString>;
|
|
784
|
+
}, z.core.$strict>;
|
|
785
|
+
}, z.core.$strict>;
|
|
786
|
+
extraction_constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
787
|
+
}, z.core.$strict>>>;
|
|
788
|
+
workflows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
789
|
+
id: z.ZodString;
|
|
790
|
+
trigger: z.ZodObject<{
|
|
791
|
+
capability: z.ZodString;
|
|
792
|
+
event: z.ZodString;
|
|
793
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
794
|
+
}, z.core.$strict>;
|
|
795
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
796
|
+
id: z.ZodString;
|
|
797
|
+
type: z.ZodEnum<{
|
|
798
|
+
agent: "agent";
|
|
799
|
+
capability: "capability";
|
|
800
|
+
validation: "validation";
|
|
801
|
+
artifact_persist: "artifact_persist";
|
|
802
|
+
artifact_read: "artifact_read";
|
|
803
|
+
store_read: "store_read";
|
|
804
|
+
store_write: "store_write";
|
|
805
|
+
}>;
|
|
806
|
+
use: z.ZodString;
|
|
807
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
808
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
809
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
810
|
+
on_error: z.ZodOptional<z.ZodEnum<{
|
|
811
|
+
fail: "fail";
|
|
812
|
+
retry: "retry";
|
|
813
|
+
drop: "drop";
|
|
814
|
+
quarantine: "quarantine";
|
|
815
|
+
}>>;
|
|
816
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
817
|
+
max_attempts: z.ZodNumber;
|
|
818
|
+
}, z.core.$strict>>;
|
|
819
|
+
store: z.ZodOptional<z.ZodString>;
|
|
820
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
821
|
+
event: z.ZodString;
|
|
822
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
823
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
824
|
+
}, z.core.$strict>]>>>;
|
|
825
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
826
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
827
|
+
event: z.ZodString;
|
|
828
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
829
|
+
const: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
830
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
831
|
+
artifact: z.ZodString;
|
|
832
|
+
}, z.core.$strict>]>>>;
|
|
833
|
+
}, z.core.$strict>>;
|
|
834
|
+
}, z.core.$strict>>>;
|
|
835
|
+
grounding: z.ZodOptional<z.ZodObject<{
|
|
836
|
+
require_source_spans: z.ZodOptional<z.ZodBoolean>;
|
|
837
|
+
source_span_contract: z.ZodOptional<z.ZodString>;
|
|
838
|
+
on_invalid_citation: z.ZodOptional<z.ZodEnum<{
|
|
839
|
+
fail: "fail";
|
|
840
|
+
drop: "drop";
|
|
841
|
+
prune: "prune";
|
|
842
|
+
repair: "repair";
|
|
843
|
+
}>>;
|
|
844
|
+
on_empty_evidence: z.ZodOptional<z.ZodEnum<{
|
|
845
|
+
fail: "fail";
|
|
846
|
+
drop: "drop";
|
|
847
|
+
prune: "prune";
|
|
848
|
+
keep: "keep";
|
|
849
|
+
}>>;
|
|
850
|
+
on_unquoted_claim: z.ZodOptional<z.ZodEnum<{
|
|
851
|
+
fail: "fail";
|
|
852
|
+
drop: "drop";
|
|
853
|
+
prune: "prune";
|
|
854
|
+
ignore: "ignore";
|
|
855
|
+
}>>;
|
|
856
|
+
validation_capability: z.ZodOptional<z.ZodString>;
|
|
857
|
+
attribution_policy: z.ZodOptional<z.ZodObject<{
|
|
858
|
+
tracks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
859
|
+
}, z.core.$strict>>;
|
|
860
|
+
}, z.core.$strict>>;
|
|
861
|
+
views: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
862
|
+
id: z.ZodString;
|
|
863
|
+
route: z.ZodObject<{
|
|
864
|
+
method: z.ZodEnum<{
|
|
865
|
+
GET: "GET";
|
|
866
|
+
POST: "POST";
|
|
867
|
+
}>;
|
|
868
|
+
path: z.ZodString;
|
|
869
|
+
}, z.core.$strict>;
|
|
870
|
+
auth: z.ZodOptional<z.ZodString>;
|
|
871
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
872
|
+
in: z.ZodEnum<{
|
|
873
|
+
path: "path";
|
|
874
|
+
query: "query";
|
|
875
|
+
}>;
|
|
876
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
877
|
+
shape: z.ZodEnum<{
|
|
878
|
+
string: "string";
|
|
879
|
+
safe_id: "safe_id";
|
|
880
|
+
positive_int: "positive_int";
|
|
881
|
+
nonnegative_int: "nonnegative_int";
|
|
882
|
+
}>;
|
|
883
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
884
|
+
}, z.core.$strict>>>;
|
|
885
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
886
|
+
kind: z.ZodEnum<{
|
|
887
|
+
store: "store";
|
|
888
|
+
capability: "capability";
|
|
889
|
+
artifact_query: "artifact_query";
|
|
890
|
+
}>;
|
|
891
|
+
ref: z.ZodString;
|
|
892
|
+
}, z.core.$strict>>;
|
|
893
|
+
read: z.ZodOptional<z.ZodObject<{
|
|
894
|
+
mode: z.ZodEnum<{
|
|
895
|
+
list: "list";
|
|
896
|
+
single: "single";
|
|
897
|
+
collect: "collect";
|
|
898
|
+
}>;
|
|
899
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
900
|
+
param: z.ZodString;
|
|
901
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
902
|
+
const: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
903
|
+
}, z.core.$strict>]>>>;
|
|
904
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
905
|
+
column: z.ZodString;
|
|
906
|
+
equals: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>;
|
|
907
|
+
}, z.core.$strict>>>;
|
|
908
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
909
|
+
column: z.ZodString;
|
|
910
|
+
dir: z.ZodOptional<z.ZodEnum<{
|
|
911
|
+
asc: "asc";
|
|
912
|
+
desc: "desc";
|
|
913
|
+
}>>;
|
|
914
|
+
}, z.core.$strict>>>;
|
|
915
|
+
shape: z.ZodType<import("./product-views.js").ViewObjectShape, unknown, z.core.$ZodTypeInternals<import("./product-views.js").ViewObjectShape, unknown>>;
|
|
916
|
+
absent: z.ZodOptional<z.ZodObject<{
|
|
917
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
918
|
+
kind: z.ZodLiteral<"param">;
|
|
919
|
+
param: z.ZodString;
|
|
920
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
921
|
+
kind: z.ZodLiteral<"const">;
|
|
922
|
+
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
923
|
+
}, z.core.$strict>]>>;
|
|
924
|
+
}, z.core.$strict>>;
|
|
925
|
+
}, z.core.$strict>>;
|
|
926
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
927
|
+
limit_param: z.ZodOptional<z.ZodString>;
|
|
928
|
+
offset_param: z.ZodOptional<z.ZodString>;
|
|
929
|
+
max_limit: z.ZodOptional<z.ZodNumber>;
|
|
930
|
+
default_limit: z.ZodOptional<z.ZodNumber>;
|
|
931
|
+
}, z.core.$strict>>;
|
|
932
|
+
absent_state: z.ZodOptional<z.ZodEnum<{
|
|
933
|
+
empty_200: "empty_200";
|
|
934
|
+
not_ready_409: "not_ready_409";
|
|
935
|
+
}>>;
|
|
936
|
+
conditional_read: z.ZodOptional<z.ZodEnum<{
|
|
937
|
+
etag: "etag";
|
|
938
|
+
}>>;
|
|
939
|
+
response_contract: z.ZodString;
|
|
940
|
+
}, z.core.$strict>>>;
|
|
941
|
+
deployment_overrides: z.ZodOptional<z.ZodObject<{
|
|
942
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
943
|
+
default_model: z.ZodOptional<z.ZodString>;
|
|
944
|
+
}, z.core.$strict>>>;
|
|
945
|
+
}, z.core.$strict>>;
|
|
946
|
+
}, z.core.$strict>;
|
|
947
|
+
export type ProductSpec = z.infer<typeof ProductSpec>;
|
|
948
|
+
//# sourceMappingURL=product-grammar.d.ts.map
|