@suss/ir-core 0.33.1 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  FunctionCallSemanticsSchema,
10
10
  GraphqlOperationSemanticsSchema,
11
11
  GraphqlResolverSemanticsSchema,
12
+ IoSemanticsSchema,
12
13
  MessageBusSemanticsSchema,
13
14
  MetricSemanticsSchema,
14
15
  RestSemanticsSchema,
@@ -32,6 +33,9 @@ import {
32
33
  formatChannel,
33
34
  gqlIdentityKey,
34
35
  hasNameHole,
36
+ hostCanBeOwn,
37
+ ioIdentityKey,
38
+ isModuleName,
35
39
  methodsAgree,
36
40
  metricIdentityKey,
37
41
  namePatternFromSub,
@@ -59,7 +63,7 @@ import {
59
63
  typeDefinitionKey,
60
64
  unitIdentityKey,
61
65
  withDefinitionsInlined
62
- } from "./chunk-N564FH5U.js";
66
+ } from "./chunk-A46EUIKC.js";
63
67
 
64
68
  // src/semconv.ts
65
69
  function semconvAttributes(binding) {
@@ -97,6 +101,13 @@ function withRewrittenPaths(binding, rewrite) {
97
101
  semantics: behavior.rewritePaths(binding.semantics, rewrite)
98
102
  };
99
103
  }
104
+ function withoutOwnHost(binding, ownHosts) {
105
+ const semantics = behaviorOf(binding.semantics).withoutOwnHost?.(
106
+ binding.semantics,
107
+ ownHosts
108
+ );
109
+ return semantics === void 0 || semantics === null ? binding : { ...binding, semantics };
110
+ }
100
111
  function groundedPairingKey(binding, deployment) {
101
112
  return pairingKey(groundBinding(binding, deployment));
102
113
  }
@@ -112,6 +123,10 @@ function pairingKey(binding) {
112
123
  const behavior = behaviorOf(binding.semantics);
113
124
  return (behavior.pairingKey ?? behavior.identityKey)(binding.semantics);
114
125
  }
126
+ function operationKey(binding) {
127
+ const behavior = behaviorOf(binding.semantics);
128
+ return (behavior.operationKey ?? behavior.identityKey)(binding.semantics);
129
+ }
115
130
  function semanticsAgree(a, b) {
116
131
  if (a.name !== b.name) {
117
132
  return false;
@@ -129,8 +144,12 @@ function bucketsMeet(a, b) {
129
144
  const meet = behaviorOf(a.semantics).bucketsMeet;
130
145
  return meet !== void 0 && meet(a.semantics, b.semantics);
131
146
  }
132
- function bucketRank(binding) {
133
- return behaviorOf(binding.semantics).bucketRank?.(binding.semantics) ?? [];
147
+ function pairRank(provider, consumer) {
148
+ if (provider.semantics.name !== consumer.semantics.name) {
149
+ return null;
150
+ }
151
+ const rank = behaviorOf(provider.semantics).pairRank;
152
+ return rank === void 0 ? [] : rank(provider.semantics, consumer.semantics);
134
153
  }
135
154
  function boundaryLabel(binding) {
136
155
  const behavior = behaviorOf(binding.semantics);
@@ -139,6 +158,9 @@ function boundaryLabel(binding) {
139
158
  function displayLabel(binding) {
140
159
  return boundaryLabel(binding) ?? `${binding.semantics.name}:${binding.recognition}`;
141
160
  }
161
+ function labelWithDetail(binding, detail) {
162
+ return `${boundaryLabel(binding) ?? binding.semantics.name} ${detail}`;
163
+ }
142
164
  function normalizeRuleBoundary(raw) {
143
165
  const trimmed = raw.trim();
144
166
  for (const behavior of allBehaviors()) {
@@ -319,39 +341,45 @@ var SuppressionSideSchema = z2.object({
319
341
  }).optional();
320
342
  var SuppressionRuleSchema = z2.object({
321
343
  /**
322
- * The finding kind to match, behavioural or intent. It is an open
323
- * string here because this package is below both IRs, and the loader
324
- * is what validates it against the published kind enums.
344
+ * The finding kind to match, behavioral or intent. The schema accepts
345
+ * any string because ir-core cannot import either IR's kind enum. The
346
+ * CLI's loader checks it against both.
325
347
  */
326
348
  kind: z2.string().optional(),
327
349
  /**
328
- * Boundary as a human-readable key, e.g. "GET /pet/{petId}" or
329
- * "fn:@acme/api::getUser". REST keys are normalized via the same
330
- * path normalizer the checkers use, so `:id` and `{id}` compare
331
- * equal.
350
+ * The boundary's human-readable key, such as "GET /pet/{petId}" or
351
+ * "fn:@acme/api::getUser". A REST key goes through the same path
352
+ * normalizer the checkers use, so `:id` and `{id}` compare equal.
332
353
  */
333
354
  boundary: z2.string().optional(),
334
355
  /**
335
- * Consumer-side discriminators, the narrowest useful match. These
336
- * mean something only for behavioural findings: a rule that
337
- * specifies `consumer` never matches an intent finding, because an
338
- * intent finding has no consumer side.
356
+ * Consumer-side discriminators, the narrowest useful match. They
357
+ * apply only to behavioral findings. A rule that sets `consumer`
358
+ * never matches an intent finding, because an intent finding has no
359
+ * consumer side.
339
360
  */
340
361
  consumer: SuppressionSideSchema,
341
362
  /**
342
- * Provider-side discriminators, the mirror of `consumer`. A finding
343
- * about a status the provider produces has its transition id on this
344
- * side, and that id is the only handle narrow enough to pick out
345
- * that one finding. As with `consumer`, a rule that specifies
346
- * `provider` never matches an intent finding.
363
+ * Provider-side discriminators, matching the same fields as
364
+ * `consumer`. A finding about a status the provider produces has its
365
+ * transition id on this side, and that id is the only value narrow
366
+ * enough to pick out that one finding. As with `consumer`, a rule
367
+ * that sets `provider` never matches an intent finding.
347
368
  */
348
369
  provider: SuppressionSideSchema,
349
370
  /**
350
- * "narrow", the default, requires kind plus one of boundary,
351
- * consumer.transitionId, or provider.transitionId, which is enough
352
- * to target a specific class of finding. "broad" opts in to
353
- * kind-only or boundary-only matches, which also silence future
354
- * regressions in that category.
371
+ * The title of one PRD scenario. A PRD finding's boundary is the
372
+ * whole PRD, so without this a rule accepts every scenario in it,
373
+ * including one added later. A rule that sets `scenario` matches
374
+ * only intent findings about a scenario with that title.
375
+ */
376
+ scenario: z2.string().optional(),
377
+ /**
378
+ * "narrow", the default, requires `kind` plus one of `boundary`,
379
+ * `scenario`, `consumer.transitionId` or `provider.transitionId`, so
380
+ * the rule targets a specific class of finding. "broad" allows a
381
+ * match on kind alone or boundary alone, and such a rule also
382
+ * silences future regressions in that category.
355
383
  */
356
384
  scope: z2.enum(["narrow", "broad"]).default("narrow"),
357
385
  /** Required human-written justification. */
@@ -365,18 +393,19 @@ var SuppressionFileSchema = z2.object({
365
393
  }).strict();
366
394
  function validateRule(rule) {
367
395
  if (rule.scope === "broad") {
368
- if (rule.kind === void 0 && rule.boundary === void 0 && rule.consumer === void 0 && rule.provider === void 0) {
369
- return "broad-scope rule must constrain at least one field (kind, boundary, consumer, or provider)";
396
+ if (rule.kind === void 0 && rule.boundary === void 0 && rule.scenario === void 0 && rule.consumer === void 0 && rule.provider === void 0) {
397
+ return "broad-scope rule must constrain at least one field (kind, boundary, scenario, consumer, or provider)";
370
398
  }
371
399
  return null;
372
400
  }
373
401
  const hasKind = rule.kind !== void 0;
374
402
  const hasBoundary = rule.boundary !== void 0;
403
+ const hasScenario = rule.scenario !== void 0;
375
404
  const hasTransition = rule.consumer?.transitionId !== void 0 || rule.provider?.transitionId !== void 0;
376
- if (hasKind && (hasBoundary || hasTransition)) {
405
+ if (hasKind && (hasBoundary || hasScenario || hasTransition)) {
377
406
  return null;
378
407
  }
379
- return "narrow-scope rule must specify kind AND (boundary OR consumer.transitionId OR provider.transitionId); set scope: 'broad' to silence wider categories";
408
+ return "narrow-scope rule must specify kind AND (boundary OR scenario OR consumer.transitionId OR provider.transitionId); set scope: 'broad' to silence wider categories";
380
409
  }
381
410
  function ruleBoundaryMatchesKey(ruleBoundary, key) {
382
411
  if (key === null) {
@@ -428,6 +457,12 @@ function countsForThreshold(finding) {
428
457
  return finding.suppressed.effect === "downgrade";
429
458
  }
430
459
 
460
+ // src/testName.ts
461
+ var TEST_TITLE_SEPARATOR = " > ";
462
+ function testUnitName(titles) {
463
+ return titles.join(TEST_TITLE_SEPARATOR);
464
+ }
465
+
431
466
  // src/typeShapeMatch.ts
432
467
  function bodyShapesMatch(actual, declared) {
433
468
  if (actual.type === "unknown" || declared.type === "unknown") {
@@ -589,7 +624,9 @@ function restBinding(opts) {
589
624
  name: "rest",
590
625
  method: method === null ? null : method.toUpperCase(),
591
626
  path: namedOrNull(opts.path, "rest path"),
592
- ...opts.declaredResponses !== void 0 ? { declaredResponses: opts.declaredResponses } : {}
627
+ ...opts.declaredResponses !== void 0 ? { declaredResponses: opts.declaredResponses } : {},
628
+ ...opts.host !== void 0 && opts.host !== "" ? { host: opts.host } : {},
629
+ ...opts.optionalFormat === true ? { optionalFormat: true } : {}
593
630
  },
594
631
  recognition: opts.recognition
595
632
  };
@@ -615,6 +652,14 @@ function packageExportBinding(opts) {
615
652
  exportPath: opts.exportPath
616
653
  });
617
654
  }
655
+ function moduleExportBinding(opts) {
656
+ return functionCallBinding({
657
+ transport: "in-process",
658
+ recognition: opts.recognition,
659
+ module: opts.module,
660
+ exportName: opts.exportName
661
+ });
662
+ }
618
663
  function graphqlResolverBinding(opts) {
619
664
  return {
620
665
  transport: opts.transport,
@@ -697,6 +742,13 @@ function metricBinding(opts) {
697
742
  recognition: opts.recognition
698
743
  };
699
744
  }
745
+ function ioBinding(opts) {
746
+ return {
747
+ transport: "in-process",
748
+ semantics: { name: "io", target: namedOrNull(opts.target, "io target") },
749
+ recognition: opts.recognition
750
+ };
751
+ }
700
752
  export {
701
753
  BoundaryBindingSchema,
702
754
  ConfidenceInfoSchema,
@@ -709,6 +761,7 @@ export {
709
761
  FunctionCallSemanticsSchema,
710
762
  GraphqlOperationSemanticsSchema,
711
763
  GraphqlResolverSemanticsSchema,
764
+ IoSemanticsSchema,
712
765
  MessageBusSemanticsSchema,
713
766
  MetricSemanticsSchema,
714
767
  NOTHING_DEPLOYED,
@@ -721,6 +774,7 @@ export {
721
774
  StorageSemanticsSchema,
722
775
  SuppressionFileSchema,
723
776
  SuppressionRuleSchema,
777
+ TEST_TITLE_SEPARATOR,
724
778
  TypeShapeSchema,
725
779
  UnitInvocationSemanticsSchema,
726
780
  applySuppressionsToFindings,
@@ -730,7 +784,6 @@ export {
730
784
  boundaryKey,
731
785
  boundaryLabel,
732
786
  boundaryNameString,
733
- bucketRank,
734
787
  bucketsMeet,
735
788
  busIdentityKey,
736
789
  busesAgree,
@@ -754,12 +807,18 @@ export {
754
807
  groundBinding,
755
808
  groundedPairingKey,
756
809
  hasNameHole,
810
+ hostCanBeOwn,
811
+ ioBinding,
812
+ ioIdentityKey,
757
813
  isGraphqlOperationBinding,
814
+ isModuleName,
815
+ labelWithDetail,
758
816
  leavesTheProcess,
759
817
  messageBusBinding,
760
818
  methodsAgree,
761
819
  metricBinding,
762
820
  metricIdentityKey,
821
+ moduleExportBinding,
763
822
  namePatternFromSub,
764
823
  namePatternKey,
765
824
  nameReference,
@@ -769,7 +828,9 @@ export {
769
828
  namesNothing,
770
829
  normalizePath,
771
830
  normalizeRuleBoundary,
831
+ operationKey,
772
832
  packageExportBinding,
833
+ pairRank,
773
834
  pairingKey,
774
835
  parseBoundaryName,
775
836
  parseChannel,
@@ -799,11 +860,13 @@ export {
799
860
  storageContainerLabel,
800
861
  storageLabel,
801
862
  storageSystemLabel,
863
+ testUnitName,
802
864
  typeDefinitionKey,
803
865
  unitIdentityKey,
804
866
  unitInvocationBinding,
805
867
  validateRule,
806
868
  withDefinitionsInlined,
807
869
  withRewrittenPaths,
808
- withinScope
870
+ withinScope,
871
+ withoutOwnHost
809
872
  };
@@ -40,6 +40,12 @@ declare const FunctionCallSemanticsSchema: z.ZodObject<{
40
40
  exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
41
  }, z.core.$strip>;
42
42
  type FunctionCallSemantics = z.infer<typeof FunctionCallSemanticsSchema>;
43
+ /**
44
+ * Whether `module` is the name a project gave one of its modules rather
45
+ * than a path. A path always has a separator in it, and a module name
46
+ * never does, so a rewrite that makes paths relative leaves a name alone.
47
+ */
48
+ declare function isModuleName(module: string): boolean;
43
49
 
44
50
  declare const GraphqlOperationSemanticsSchema: z.ZodObject<{
45
51
  name: z.ZodLiteral<"graphql-operation">;
@@ -80,20 +86,19 @@ declare const MessageBusSemanticsSchema: z.ZodObject<{
80
86
  }, z.core.$strip>;
81
87
  type MessageBusSemantics = z.infer<typeof MessageBusSemanticsSchema>;
82
88
  /**
83
- * The bus technologies the schema allows. It comes from the enum, so a
84
- * value added there cannot drift from a hand-written copy elsewhere.
89
+ * The bus technologies the schema allows. It is derived from the enum,
90
+ * so there is no hand-written copy to fall out of step.
85
91
  */
86
92
  type MessageBusTechnology = MessageBusSemantics["messageBus"];
87
93
 
88
94
  /**
89
- * Where the protocol modules come together.
95
+ * The list of protocol definitions, and the lookups built from it.
90
96
  *
91
- * Each protocol under this directory exports one
92
- * `BoundarySemanticsDefinition`. This file lists them twice, once for
93
- * the schema union and once for the behavior lookup, and the type check
94
- * at the bottom fails compilation if the two lists ever cover different
95
- * sets. Adding a protocol changes this file and no other, by one line in
96
- * each list.
97
+ * Each protocol module in this directory exports one
98
+ * `BoundarySemanticsDefinition`. They are listed twice, once for the
99
+ * schema union and once for the behavior lookup, and the type check at
100
+ * the bottom fails compilation if the two lists differ. Besides its own
101
+ * module, a new protocol needs one line in each list.
97
102
  */
98
103
 
99
104
  /**
@@ -105,6 +110,8 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
110
  method: z.ZodNullable<z.ZodString>;
106
111
  path: z.ZodNullable<z.ZodString>;
107
112
  declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
113
+ host: z.ZodOptional<z.ZodString>;
114
+ optionalFormat: z.ZodOptional<z.ZodBoolean>;
108
115
  }, z.core.$strip>, z.ZodObject<{
109
116
  name: z.ZodLiteral<"function-call">;
110
117
  module: z.ZodOptional<z.ZodString>;
@@ -171,6 +178,9 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
171
178
  }>;
172
179
  name: z.ZodLiteral<"unit-invocation">;
173
180
  instanceName: z.ZodNullable<z.ZodString>;
181
+ }, z.core.$strip>, z.ZodObject<{
182
+ name: z.ZodLiteral<"io">;
183
+ target: z.ZodNullable<z.ZodString>;
174
184
  }, z.core.$strip>], "name">;
175
185
  type Semantics = z.infer<typeof SemanticsSchema>;
176
186
 
@@ -179,6 +189,8 @@ declare const RestSemanticsSchema: z.ZodObject<{
179
189
  method: z.ZodNullable<z.ZodString>;
180
190
  path: z.ZodNullable<z.ZodString>;
181
191
  declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
192
+ host: z.ZodOptional<z.ZodString>;
193
+ optionalFormat: z.ZodOptional<z.ZodBoolean>;
182
194
  }, z.core.$strip>;
183
195
  type RestSemantics = z.infer<typeof RestSemanticsSchema>;
184
196
  /**
@@ -191,44 +203,43 @@ type RestSemantics = z.infer<typeof RestSemanticsSchema>;
191
203
  */
192
204
  declare function normalizePath(path: string): string;
193
205
  /**
194
- * A path with every parameter reduced to its position. `/users/{id}`
195
- * and `/users/:userId` both come out `/users/{}`, which is the set of
196
- * requests each one serves, and what deciding whether two sides
197
- * describe one endpoint rests on. The name a parameter is written
198
- * under is worth keeping in a report and worth nothing in a comparison.
199
- * A parameter's range stays, since `{tenant?}` serves a different set
200
- * of requests from `{tenant}`.
206
+ * A path with every parameter name removed, for comparing two paths.
207
+ * `/users/{id}` and `/users/:userId` both become `/users/{}`, since a
208
+ * parameter's name does not change which requests the path serves. A
209
+ * parameter's range stays, since `{tenant?}` serves a different set of
210
+ * requests from `{tenant}`.
201
211
  */
202
212
  declare function pathShape(path: string): string;
203
213
  /**
204
214
  * Whether two REST methods mean the same thing. Equal methods agree,
205
- * and `"*"` agrees with any stated method, because a handler that
206
- * responds to every method responds to this one. A null method was never
207
- * stated, so it agrees with nothing: there is no claim to agree with.
215
+ * and `"*"` agrees with any given method, because a handler that
216
+ * responds to every method responds to this one. A null method means
217
+ * the source never gave one, so it agrees with nothing.
208
218
  *
209
- * This is the counterpart of `busesAgree`. No list of methods appears
210
- * here, so a wildcard pairs with whatever methods consumers write.
219
+ * This is the REST counterpart of `busesAgree`. There is no list of
220
+ * known methods, so a wildcard pairs with whatever methods consumers
221
+ * write.
211
222
  */
212
223
  declare function methodsAgree(a: string | null, b: string | null): boolean;
213
224
  /**
214
225
  * Whether a declared route path admits a concrete request path. Both
215
- * sides compare on their normalized forms, and a hole in the request
216
- * is text like any other, so a route inside a mount pattern is admitted
217
- * by it and a wider route is not.
226
+ * are normalized first. A hole in the request path is compared as plain
227
+ * text, so a mount pattern admits a route inside it and rejects a wider
228
+ * route.
218
229
  */
219
230
  declare function routePathAdmits(declaredPath: string, requestPath: string): boolean;
220
231
  /** Whether two declared route paths serve at least one request in common. */
221
232
  declare function routePathsMeet(a: string, b: string): boolean;
222
233
 
223
234
  /**
224
- * The pairing key is `(deploymentTarget, instanceName)`, which is
225
- * exactly a deployable unit, so the two fields come from
226
- * `DeployableUnitSchema` instead of being written out a second time.
235
+ * The dedicated pass pairs on `(deploymentTarget, instanceName)`, which
236
+ * is a deployable unit, so the two fields come from
237
+ * `DeployableUnitSchema`.
227
238
  *
228
- * A provider states both. The reading side is the code, which knows it
229
- * reads its configuration and not which deployment will run it, so a
230
- * recognizer standing at a read leaves both off rather than guessing.
231
- * The pairing pass takes the deployment from the provider anyway.
239
+ * A provider sets both. The reading side is code, and code does not say
240
+ * which deployment will run it, so a recognizer at a read leaves both
241
+ * out and does not guess. The pairing pass takes the deployment from
242
+ * the provider.
232
243
  */
233
244
  declare const RuntimeConfigSemanticsSchema: z.ZodObject<{
234
245
  deploymentTarget: z.ZodOptional<z.ZodEnum<{
@@ -252,37 +263,36 @@ declare const StorageSemanticsSchema: z.ZodObject<{
252
263
  }, z.core.$strip>;
253
264
  type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
254
265
  /**
255
- * `postgresql:invoices`, `aws.dynamodb:editions#by-publication`. The
256
- * pairing pass has no key to fall back on here, so a reader who types
257
- * this back at `suss ask`, the pass that indexes accesses by it, and an
258
- * intent doc that says which store a write reaches all read this one.
266
+ * The store's label, such as `postgresql:invoices` or
267
+ * `aws.dynamodb:editions#by-publication`. Storage has no identity key,
268
+ * so `suss ask`, the pass that indexes accesses, and an intent doc all
269
+ * refer to a store by this label.
259
270
  */
260
271
  declare function storageLabel(semantics: StorageSemantics): string;
261
- /** The engine, or the words a report writes where nobody settled one. */
272
+ /** The storage system, or `<unknown engine>` when it is null. */
262
273
  declare function storageSystemLabel(semantics: StorageSemantics): string;
263
274
  /**
264
- * What an access writes for its columns when it asked for all of them,
265
- * which is a query with no explicit projection. It covers every column
266
- * rather than saying which one, so anything comparing column lists has
267
- * to tell it apart from a list of columns.
275
+ * The column list an access records when it reads every column, as a
276
+ * query without an explicit projection does. It means all columns and
277
+ * does not list any, so code comparing column lists has to handle it
278
+ * separately.
268
279
  */
269
280
  declare const EVERY_FIELD = "*";
270
- /** The store on its own, which a finding writes without the system. */
281
+ /** The store's label without the storage system, as a finding writes it. */
271
282
  declare function storageContainerLabel(semantics: StorageSemantics): string;
272
283
 
273
284
  /**
274
- * @suss/ir-core schemas: primitives shared by every suss IR.
285
+ * The zod schemas for the primitives every suss IR uses.
275
286
  *
276
- * These are the types that any IR built on suss references: the
277
- * structure of a value (`TypeShape`), the identity of a boundary
278
- * (`BoundaryBinding` and its `Semantics` variants), where something is
279
- * in the source (`SourceLocation`), and how much to trust a claim
280
- * (`Confidence`). Behavioural summaries, intent docs, and later on
281
- * observation records all speak in these terms, so they are defined
282
- * here, in one place none of those IRs needs another IR to reach.
287
+ * `TypeShape` is the structure of a value. `BoundaryBinding` and its
288
+ * `Semantics` variants identify a boundary. `SourceLocation` says where
289
+ * something is in the source, and `Confidence` says how much to trust a
290
+ * claim. Behavioral summaries and intent docs are both built from these,
291
+ * so they live in a package of their own and neither IR depends on the
292
+ * other.
283
293
  *
284
- * The schemas are the single source of truth, and the package's
285
- * `index.ts` derives the types from them with `z.infer`.
294
+ * The schemas are the source of truth. The package index derives the
295
+ * types from them with `z.infer`.
286
296
  */
287
297
 
288
298
  declare const ConfidenceSourceSchema: z.ZodEnum<{
@@ -297,17 +307,17 @@ declare const ConfidenceLevelSchema: z.ZodEnum<{
297
307
  low: "low";
298
308
  }>;
299
309
  /**
300
- * What came of corroborating a claim by running the code
301
- * (`suss corroborate`). Inputs that satisfy the claim's own conditions
302
- * are generated and run through the function, and the observation
303
- * either agreed every time (`observed`), disagreed at least once
304
- * (`refuted`, which is either an extractor bug or a surprise, and the
305
- * counterexample says which input), or never produced a verdict
306
- * (`untested`, meaning no satisfying input was found, or every
307
- * satisfying run hit a dependency the harness cannot supply).
310
+ * The result of checking a claim by running the code (`suss
311
+ * corroborate`). The harness generates inputs that satisfy the claim's
312
+ * own conditions and runs the function on them.
313
+ *
314
+ * - `observed`: every run agreed with the claim.
315
+ * - `refuted`: at least one run disagreed, which is either an extractor
316
+ * bug or a surprise. `counterexample` gives the input.
317
+ * - `untested`: no run produced a verdict. No satisfying input was
318
+ * found, or every run hit a dependency the harness cannot supply.
308
319
  *
309
- * Corroboration adds observations to a derivation. It is extra
310
- * evidence, and it never rewrites the derived claim.
320
+ * Corroboration adds evidence to a derived claim and never rewrites it.
311
321
  */
312
322
  declare const CorroborationSchema: z.ZodObject<{
313
323
  outcome: z.ZodEnum<{
@@ -354,6 +364,7 @@ declare const SourceLocationSchema: z.ZodObject<{
354
364
  }, z.core.$strip>>;
355
365
  exportName: z.ZodNullable<z.ZodString>;
356
366
  workspace: z.ZodOptional<z.ZodString>;
367
+ module: z.ZodOptional<z.ZodString>;
357
368
  }, z.core.$strip>;
358
369
  declare const BoundaryBindingSchema: z.ZodObject<{
359
370
  transport: z.ZodString;
@@ -362,6 +373,8 @@ declare const BoundaryBindingSchema: z.ZodObject<{
362
373
  method: z.ZodNullable<z.ZodString>;
363
374
  path: z.ZodNullable<z.ZodString>;
364
375
  declaredResponses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
376
+ host: z.ZodOptional<z.ZodString>;
377
+ optionalFormat: z.ZodOptional<z.ZodBoolean>;
365
378
  }, z.core.$strip>, z.ZodObject<{
366
379
  name: z.ZodLiteral<"function-call">;
367
380
  module: z.ZodOptional<z.ZodString>;
@@ -428,6 +441,9 @@ declare const BoundaryBindingSchema: z.ZodObject<{
428
441
  }>;
429
442
  name: z.ZodLiteral<"unit-invocation">;
430
443
  instanceName: z.ZodNullable<z.ZodString>;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ name: z.ZodLiteral<"io">;
446
+ target: z.ZodNullable<z.ZodString>;
431
447
  }, z.core.$strip>], "name">;
432
448
  recognition: z.ZodString;
433
449
  }, z.core.$strip>;
@@ -478,24 +494,22 @@ type TypeShape = {
478
494
  def?: string | undefined;
479
495
  /**
480
496
  * The file that declares this type, when the project declares it.
481
- * Absent for a name the language or a dependency owns, which means
482
- * the same thing everywhere.
497
+ * Absent for a name the language or a dependency defines, which
498
+ * means the same thing everywhere.
483
499
  *
484
- * A name on its own does not identify a type. Two modules each
485
- * declaring a `User` produce the same ref, and a checker comparing
486
- * them has nothing to go on. This is what tells them apart.
500
+ * A name on its own does not identify a type. Two modules that each
501
+ * declare a `User` produce the same ref, and `from` is the only
502
+ * field that tells them apart.
487
503
  */
488
504
  from?: string | undefined;
489
505
  } | {
490
506
  type: "unknown";
491
507
  };
492
508
  /**
493
- * The key a table of definitions uses for the type a ref points at.
494
- *
495
- * A ref has the name and the file that declares it, and that pair
496
- * already identifies the type, so a table keyed on it needs nothing new
497
- * on the ref. A name that the language or a dependency owns has no
498
- * file, and keys on the name alone.
509
+ * The key a table of definitions uses for the type a ref points at,
510
+ * which is the ref's `def`. Null for a ref without one, such as a name
511
+ * the language or a dependency defines, and such a ref is never looked
512
+ * up.
499
513
  */
500
514
  declare function typeDefinitionKey(ref: {
501
515
  def?: string | undefined;
@@ -505,16 +519,15 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
505
519
  * A shape with the definitions it refers to substituted back into it.
506
520
  *
507
521
  * Comparing two shapes means comparing their structure, and a ref has
508
- * none. Rather than teach every comparison to look in a table, the
509
- * definitions go back into the shape once and everything downstream
510
- * reads what it always read.
522
+ * none. Substituting the definitions once means no comparison has to
523
+ * look anything up in a table.
511
524
  *
512
- * Substituting a definition is not a level of nesting, so it does not
513
- * spend depth. Counting it meant a type six deep came back three deep,
514
- * and a consumer reading a field past that was told the provider did
515
- * not have it. A type that refers to itself is stopped by the names
516
- * already substituted on this path, the shape walk's own cycle guard.
525
+ * Substituting a definition does not count as a level of nesting. If it
526
+ * did, a type six levels deep would come back three deep, and a
527
+ * consumer reading a field past that would be told the provider lacks
528
+ * it. A type that refers to itself stops at a key already substituted
529
+ * on this path, the same cycle guard the shape walk uses.
517
530
  */
518
531
  declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
519
532
 
520
- export { storageSystemLabel as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, typeDefinitionKey as H, withDefinitionsInlined as I, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, methodsAgree as t, normalizePath as u, pathShape as v, routePathAdmits as w, routePathsMeet as x, storageContainerLabel as y, storageLabel as z };
533
+ export { storageLabel as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, storageSystemLabel as H, typeDefinitionKey as I, withDefinitionsInlined as J, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, isModuleName as t, methodsAgree as u, normalizePath as v, pathShape as w, routePathAdmits as x, routePathsMeet as y, storageContainerLabel as z };