@suss/ir-core 0.3.1 → 0.4.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/README.md +12 -4
- package/dist/chunk-5KE7OWN3.js +597 -0
- package/dist/index.cjs +575 -220
- package/dist/index.d.cts +251 -123
- package/dist/index.d.ts +251 -123
- package/dist/index.js +85 -81
- package/dist/schemas-BWvfkxSH.d.cts +432 -0
- package/dist/schemas-BWvfkxSH.d.ts +432 -0
- package/dist/schemas.cjs +458 -127
- package/dist/schemas.d.cts +2 -374
- package/dist/schemas.d.ts +2 -374
- package/dist/schemas.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-L4XGOS3I.js +0 -237
package/dist/schemas.d.cts
CHANGED
|
@@ -1,374 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const ConfidenceSourceSchema: z.ZodEnum<{
|
|
4
|
-
inferred_static: "inferred_static";
|
|
5
|
-
inferred_ai: "inferred_ai";
|
|
6
|
-
declared: "declared";
|
|
7
|
-
derived: "derived";
|
|
8
|
-
}>;
|
|
9
|
-
declare const ConfidenceLevelSchema: z.ZodEnum<{
|
|
10
|
-
high: "high";
|
|
11
|
-
medium: "medium";
|
|
12
|
-
low: "low";
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* The result of corroborating a claim against real execution
|
|
16
|
-
* (`suss corroborate`): generated inputs satisfying the claim's own
|
|
17
|
-
* conditions were run through the actual function and the observation
|
|
18
|
-
* either agreed every time (`observed`), disagreed at least once
|
|
19
|
-
* (`refuted` — an extractor bug or a genuine surprise; the
|
|
20
|
-
* counterexample says which input), or never produced a verdict
|
|
21
|
-
* (`untested` — no satisfying input was found, or every satisfying
|
|
22
|
-
* run hit a dependency the harness cannot supply).
|
|
23
|
-
*
|
|
24
|
-
* Corroboration upgrades a *derivation* with *observations*; it is
|
|
25
|
-
* additive evidence, never a rewrite of the derived claim.
|
|
26
|
-
*/
|
|
27
|
-
declare const CorroborationSchema: z.ZodObject<{
|
|
28
|
-
outcome: z.ZodEnum<{
|
|
29
|
-
observed: "observed";
|
|
30
|
-
refuted: "refuted";
|
|
31
|
-
untested: "untested";
|
|
32
|
-
}>;
|
|
33
|
-
runs: z.ZodNumber;
|
|
34
|
-
counterexample: z.ZodOptional<z.ZodUnknown>;
|
|
35
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
36
|
-
}, z.core.$strip>;
|
|
37
|
-
declare const ConfidenceInfoSchema: z.ZodObject<{
|
|
38
|
-
source: z.ZodEnum<{
|
|
39
|
-
inferred_static: "inferred_static";
|
|
40
|
-
inferred_ai: "inferred_ai";
|
|
41
|
-
declared: "declared";
|
|
42
|
-
derived: "derived";
|
|
43
|
-
}>;
|
|
44
|
-
level: z.ZodEnum<{
|
|
45
|
-
high: "high";
|
|
46
|
-
medium: "medium";
|
|
47
|
-
low: "low";
|
|
48
|
-
}>;
|
|
49
|
-
corroboration: z.ZodOptional<z.ZodObject<{
|
|
50
|
-
outcome: z.ZodEnum<{
|
|
51
|
-
observed: "observed";
|
|
52
|
-
refuted: "refuted";
|
|
53
|
-
untested: "untested";
|
|
54
|
-
}>;
|
|
55
|
-
runs: z.ZodNumber;
|
|
56
|
-
counterexample: z.ZodOptional<z.ZodUnknown>;
|
|
57
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
declare const SourceLocationSchema: z.ZodObject<{
|
|
61
|
-
file: z.ZodString;
|
|
62
|
-
range: z.ZodObject<{
|
|
63
|
-
start: z.ZodNumber;
|
|
64
|
-
end: z.ZodNumber;
|
|
65
|
-
}, z.core.$strip>;
|
|
66
|
-
exportName: z.ZodNullable<z.ZodString>;
|
|
67
|
-
workspace: z.ZodOptional<z.ZodString>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
declare const RestSemanticsSchema: z.ZodObject<{
|
|
70
|
-
name: z.ZodLiteral<"rest">;
|
|
71
|
-
method: z.ZodString;
|
|
72
|
-
path: z.ZodString;
|
|
73
|
-
declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
declare const FunctionCallSemanticsSchema: z.ZodObject<{
|
|
76
|
-
name: z.ZodLiteral<"function-call">;
|
|
77
|
-
module: z.ZodOptional<z.ZodString>;
|
|
78
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
79
|
-
package: z.ZodOptional<z.ZodString>;
|
|
80
|
-
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
/**
|
|
83
|
-
* Provider-side GraphQL resolver. One resolver binds one
|
|
84
|
-
* (typeName, fieldName) pair. Pairing key: `${typeName}.${fieldName}`.
|
|
85
|
-
*/
|
|
86
|
-
declare const GraphqlResolverSemanticsSchema: z.ZodObject<{
|
|
87
|
-
name: z.ZodLiteral<"graphql-resolver">;
|
|
88
|
-
typeName: z.ZodString;
|
|
89
|
-
fieldName: z.ZodString;
|
|
90
|
-
}, z.core.$strip>;
|
|
91
|
-
/**
|
|
92
|
-
* Consumer-side GraphQL operation — a document sent from client to
|
|
93
|
-
* server. Binds by operation name + type.
|
|
94
|
-
*/
|
|
95
|
-
declare const GraphqlOperationSemanticsSchema: z.ZodObject<{
|
|
96
|
-
name: z.ZodLiteral<"graphql-operation">;
|
|
97
|
-
operationName: z.ZodOptional<z.ZodString>;
|
|
98
|
-
operationType: z.ZodEnum<{
|
|
99
|
-
query: "query";
|
|
100
|
-
mutation: "mutation";
|
|
101
|
-
subscription: "subscription";
|
|
102
|
-
}>;
|
|
103
|
-
}, z.core.$strip>;
|
|
104
|
-
/**
|
|
105
|
-
* One thing that gets deployed and runs on its own: a Lambda
|
|
106
|
-
* function, an ECS task's container, a plain container, a k8s
|
|
107
|
-
* deployment.
|
|
108
|
-
*
|
|
109
|
-
* `instanceName` is the stable identifier the deployment medium uses:
|
|
110
|
-
* the CFN logical resource id for Lambda and ECS, the deployment name
|
|
111
|
-
* for k8s, the container name for a plain container.
|
|
112
|
-
*/
|
|
113
|
-
declare const DeployableUnitSchema: z.ZodObject<{
|
|
114
|
-
deploymentTarget: z.ZodEnum<{
|
|
115
|
-
lambda: "lambda";
|
|
116
|
-
"ecs-task": "ecs-task";
|
|
117
|
-
container: "container";
|
|
118
|
-
"k8s-deployment": "k8s-deployment";
|
|
119
|
-
}>;
|
|
120
|
-
instanceName: z.ZodString;
|
|
121
|
-
}, z.core.$strip>;
|
|
122
|
-
/**
|
|
123
|
-
* Provider-side runtime configuration channel: env vars and their
|
|
124
|
-
* declared values on a deployable unit. The channel is the boundary;
|
|
125
|
-
* env var names are FIELDS on its contract. Pairing key:
|
|
126
|
-
* `(deploymentTarget, instanceName)`, which is exactly a deployable
|
|
127
|
-
* unit, so the two fields come from `DeployableUnitSchema` rather
|
|
128
|
-
* than being spelled a second time.
|
|
129
|
-
*/
|
|
130
|
-
declare const RuntimeConfigSemanticsSchema: z.ZodObject<{
|
|
131
|
-
deploymentTarget: z.ZodEnum<{
|
|
132
|
-
lambda: "lambda";
|
|
133
|
-
"ecs-task": "ecs-task";
|
|
134
|
-
container: "container";
|
|
135
|
-
"k8s-deployment": "k8s-deployment";
|
|
136
|
-
}>;
|
|
137
|
-
instanceName: z.ZodString;
|
|
138
|
-
name: z.ZodLiteral<"runtime-config">;
|
|
139
|
-
}, z.core.$strip>;
|
|
140
|
-
/**
|
|
141
|
-
* Provider-side relational storage table. Columns are FIELDS on the
|
|
142
|
-
* table's contract. Pairing key: `(storageSystem, scope, table)`.
|
|
143
|
-
*/
|
|
144
|
-
declare const StorageRelationalSemanticsSchema: z.ZodObject<{
|
|
145
|
-
name: z.ZodLiteral<"storage-relational">;
|
|
146
|
-
storageSystem: z.ZodEnum<{
|
|
147
|
-
postgres: "postgres";
|
|
148
|
-
mysql: "mysql";
|
|
149
|
-
sqlite: "sqlite";
|
|
150
|
-
}>;
|
|
151
|
-
scope: z.ZodString;
|
|
152
|
-
table: z.ZodString;
|
|
153
|
-
}, z.core.$strip>;
|
|
154
|
-
/**
|
|
155
|
-
* Provider-side message-bus boundary — SQS / EventBridge / BullMQ /
|
|
156
|
-
* Kafka / NATS. Producer `interaction(class: "message-send")` effects
|
|
157
|
-
* pair against these via `(messageBus, channel)`.
|
|
158
|
-
*
|
|
159
|
-
* The `channel` string is per-bus. SQS keys it on the single queue
|
|
160
|
-
* identity (CFN logical id / env-var name). EventBridge carries a
|
|
161
|
-
* two-part identity — the event bus AND the DetailType a rule matches —
|
|
162
|
-
* encoded as `"<bus>#<detailType>"`, because one bus multiplexes many
|
|
163
|
-
* event types and a rule subscribes to a subset. See
|
|
164
|
-
* `@suss/framework-aws-eventbridge` for the producer-side scheme and
|
|
165
|
-
* `@suss/contract-cloudformation`'s messageBus reader for the
|
|
166
|
-
* consumer/provider-side scheme.
|
|
167
|
-
*/
|
|
168
|
-
declare const MessageBusSemanticsSchema: z.ZodObject<{
|
|
169
|
-
name: z.ZodLiteral<"message-bus">;
|
|
170
|
-
messageBus: z.ZodEnum<{
|
|
171
|
-
sqs: "sqs";
|
|
172
|
-
eventbridge: "eventbridge";
|
|
173
|
-
bullmq: "bullmq";
|
|
174
|
-
kafka: "kafka";
|
|
175
|
-
nats: "nats";
|
|
176
|
-
}>;
|
|
177
|
-
channel: z.ZodString;
|
|
178
|
-
}, z.core.$strip>;
|
|
179
|
-
declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
180
|
-
name: z.ZodLiteral<"rest">;
|
|
181
|
-
method: z.ZodString;
|
|
182
|
-
path: z.ZodString;
|
|
183
|
-
declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
184
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
-
name: z.ZodLiteral<"function-call">;
|
|
186
|
-
module: z.ZodOptional<z.ZodString>;
|
|
187
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
188
|
-
package: z.ZodOptional<z.ZodString>;
|
|
189
|
-
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
-
name: z.ZodLiteral<"graphql-resolver">;
|
|
192
|
-
typeName: z.ZodString;
|
|
193
|
-
fieldName: z.ZodString;
|
|
194
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
-
name: z.ZodLiteral<"graphql-operation">;
|
|
196
|
-
operationName: z.ZodOptional<z.ZodString>;
|
|
197
|
-
operationType: z.ZodEnum<{
|
|
198
|
-
query: "query";
|
|
199
|
-
mutation: "mutation";
|
|
200
|
-
subscription: "subscription";
|
|
201
|
-
}>;
|
|
202
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
-
deploymentTarget: z.ZodEnum<{
|
|
204
|
-
lambda: "lambda";
|
|
205
|
-
"ecs-task": "ecs-task";
|
|
206
|
-
container: "container";
|
|
207
|
-
"k8s-deployment": "k8s-deployment";
|
|
208
|
-
}>;
|
|
209
|
-
instanceName: z.ZodString;
|
|
210
|
-
name: z.ZodLiteral<"runtime-config">;
|
|
211
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
212
|
-
name: z.ZodLiteral<"storage-relational">;
|
|
213
|
-
storageSystem: z.ZodEnum<{
|
|
214
|
-
postgres: "postgres";
|
|
215
|
-
mysql: "mysql";
|
|
216
|
-
sqlite: "sqlite";
|
|
217
|
-
}>;
|
|
218
|
-
scope: z.ZodString;
|
|
219
|
-
table: z.ZodString;
|
|
220
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
221
|
-
name: z.ZodLiteral<"message-bus">;
|
|
222
|
-
messageBus: z.ZodEnum<{
|
|
223
|
-
sqs: "sqs";
|
|
224
|
-
eventbridge: "eventbridge";
|
|
225
|
-
bullmq: "bullmq";
|
|
226
|
-
kafka: "kafka";
|
|
227
|
-
nats: "nats";
|
|
228
|
-
}>;
|
|
229
|
-
channel: z.ZodString;
|
|
230
|
-
}, z.core.$strip>], "name">;
|
|
231
|
-
declare const BoundaryBindingSchema: z.ZodObject<{
|
|
232
|
-
transport: z.ZodString;
|
|
233
|
-
semantics: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
234
|
-
name: z.ZodLiteral<"rest">;
|
|
235
|
-
method: z.ZodString;
|
|
236
|
-
path: z.ZodString;
|
|
237
|
-
declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
238
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
-
name: z.ZodLiteral<"function-call">;
|
|
240
|
-
module: z.ZodOptional<z.ZodString>;
|
|
241
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
242
|
-
package: z.ZodOptional<z.ZodString>;
|
|
243
|
-
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
244
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
245
|
-
name: z.ZodLiteral<"graphql-resolver">;
|
|
246
|
-
typeName: z.ZodString;
|
|
247
|
-
fieldName: z.ZodString;
|
|
248
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
-
name: z.ZodLiteral<"graphql-operation">;
|
|
250
|
-
operationName: z.ZodOptional<z.ZodString>;
|
|
251
|
-
operationType: z.ZodEnum<{
|
|
252
|
-
query: "query";
|
|
253
|
-
mutation: "mutation";
|
|
254
|
-
subscription: "subscription";
|
|
255
|
-
}>;
|
|
256
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
-
deploymentTarget: z.ZodEnum<{
|
|
258
|
-
lambda: "lambda";
|
|
259
|
-
"ecs-task": "ecs-task";
|
|
260
|
-
container: "container";
|
|
261
|
-
"k8s-deployment": "k8s-deployment";
|
|
262
|
-
}>;
|
|
263
|
-
instanceName: z.ZodString;
|
|
264
|
-
name: z.ZodLiteral<"runtime-config">;
|
|
265
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
-
name: z.ZodLiteral<"storage-relational">;
|
|
267
|
-
storageSystem: z.ZodEnum<{
|
|
268
|
-
postgres: "postgres";
|
|
269
|
-
mysql: "mysql";
|
|
270
|
-
sqlite: "sqlite";
|
|
271
|
-
}>;
|
|
272
|
-
scope: z.ZodString;
|
|
273
|
-
table: z.ZodString;
|
|
274
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
-
name: z.ZodLiteral<"message-bus">;
|
|
276
|
-
messageBus: z.ZodEnum<{
|
|
277
|
-
sqs: "sqs";
|
|
278
|
-
eventbridge: "eventbridge";
|
|
279
|
-
bullmq: "bullmq";
|
|
280
|
-
kafka: "kafka";
|
|
281
|
-
nats: "nats";
|
|
282
|
-
}>;
|
|
283
|
-
channel: z.ZodString;
|
|
284
|
-
}, z.core.$strip>], "name">;
|
|
285
|
-
recognition: z.ZodString;
|
|
286
|
-
}, z.core.$strip>;
|
|
287
|
-
type TypeShape = {
|
|
288
|
-
type: "record";
|
|
289
|
-
properties: Record<string, TypeShape>;
|
|
290
|
-
spreads?: Array<{
|
|
291
|
-
sourceText: string;
|
|
292
|
-
}> | undefined;
|
|
293
|
-
} | {
|
|
294
|
-
type: "dictionary";
|
|
295
|
-
values: TypeShape;
|
|
296
|
-
} | {
|
|
297
|
-
type: "array";
|
|
298
|
-
items: TypeShape;
|
|
299
|
-
} | {
|
|
300
|
-
type: "literal";
|
|
301
|
-
value: string | number | boolean;
|
|
302
|
-
raw?: string | undefined;
|
|
303
|
-
} | {
|
|
304
|
-
type: "text";
|
|
305
|
-
} | {
|
|
306
|
-
type: "integer";
|
|
307
|
-
} | {
|
|
308
|
-
type: "number";
|
|
309
|
-
} | {
|
|
310
|
-
type: "boolean";
|
|
311
|
-
} | {
|
|
312
|
-
type: "null";
|
|
313
|
-
} | {
|
|
314
|
-
type: "undefined";
|
|
315
|
-
} | {
|
|
316
|
-
type: "union";
|
|
317
|
-
variants: TypeShape[];
|
|
318
|
-
} | {
|
|
319
|
-
type: "ref";
|
|
320
|
-
name: string;
|
|
321
|
-
/**
|
|
322
|
-
* Where this type is written down, when it is. The key into the
|
|
323
|
-
* summary's table of definitions.
|
|
324
|
-
*
|
|
325
|
-
* A name does not identify a type. Every instantiation of one
|
|
326
|
-
* generic reports the generic's own name and file, so `Omit<User,
|
|
327
|
-
* "secret">` and `Omit<Order, "total">` are both `Omit`, and a
|
|
328
|
-
* table keyed on that hands the second one the first one's
|
|
329
|
-
* fields. This is built from what the type actually is.
|
|
330
|
-
*/
|
|
331
|
-
def?: string | undefined;
|
|
332
|
-
/**
|
|
333
|
-
* The file that declares this type, when the project declares it.
|
|
334
|
-
* Absent for a name the language or a dependency owns, which means
|
|
335
|
-
* the same thing everywhere.
|
|
336
|
-
*
|
|
337
|
-
* A name on its own does not identify a type. Two modules each
|
|
338
|
-
* declaring a `User` produce the same ref, and a checker comparing
|
|
339
|
-
* them has nothing to go on. This is what tells them apart.
|
|
340
|
-
*/
|
|
341
|
-
from?: string | undefined;
|
|
342
|
-
} | {
|
|
343
|
-
type: "unknown";
|
|
344
|
-
};
|
|
345
|
-
/**
|
|
346
|
-
* How a table of definitions names the type a ref points at.
|
|
347
|
-
*
|
|
348
|
-
* A ref carries the name and the file that declares it, and that pair
|
|
349
|
-
* already identifies the type, so a table keyed on it needs nothing new
|
|
350
|
-
* on the ref. A name the language or a dependency owns has no file and
|
|
351
|
-
* keys on the name alone.
|
|
352
|
-
*/
|
|
353
|
-
declare function typeDefinitionKey(ref: {
|
|
354
|
-
def?: string | undefined;
|
|
355
|
-
}): string | null;
|
|
356
|
-
declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
357
|
-
/**
|
|
358
|
-
* A shape with the definitions it names put back into it.
|
|
359
|
-
*
|
|
360
|
-
* Comparing two shapes means comparing their structure, and a ref has
|
|
361
|
-
* none. Rather than teach every comparison to look in a table, the
|
|
362
|
-
* table goes back into the shape once, and everything downstream reads
|
|
363
|
-
* what it always read.
|
|
364
|
-
*
|
|
365
|
-
* Putting a definition back is a substitution rather than a level of
|
|
366
|
-
* nesting, so it does not spend depth. Counting it did: a type six
|
|
367
|
-
* deep came back three deep, and a consumer reading a field past that
|
|
368
|
-
* point was told the provider did not have it. What stops a type that
|
|
369
|
-
* names itself is the set of names already being put back on this
|
|
370
|
-
* path, which is how the shape walk guards its own cycles.
|
|
371
|
-
*/
|
|
372
|
-
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
373
|
-
|
|
374
|
-
export { BoundaryBindingSchema, ConfidenceInfoSchema, ConfidenceLevelSchema, ConfidenceSourceSchema, CorroborationSchema, DeployableUnitSchema, FunctionCallSemanticsSchema, GraphqlOperationSemanticsSchema, GraphqlResolverSemanticsSchema, MessageBusSemanticsSchema, RestSemanticsSchema, RuntimeConfigSemanticsSchema, SemanticsSchema, SourceLocationSchema, StorageRelationalSemanticsSchema, type TypeShape, TypeShapeSchema, typeDefinitionKey, withDefinitionsInlined };
|
|
1
|
+
import 'zod';
|
|
2
|
+
export { B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, e as DeployableUnitSchema, f as FunctionCallSemanticsSchema, g as GraphqlOperationSemanticsSchema, i as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, l as RestSemanticsSchema, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, d as SourceLocationSchema, q as StorageRelationalSemanticsSchema, T as TypeShape, r as TypeShapeSchema, w as typeDefinitionKey, x as withDefinitionsInlined } from './schemas-BWvfkxSH.cjs';
|