@inerrata-corporation/errata 2.0.17-dev.3501 → 2.0.17-dev.3527

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.
@@ -828,6 +828,11 @@ function genericCanonicalId(prefix, content) {
828
828
  function languageCanonicalId(name) {
829
829
  return genericCanonicalId("Language", { name: name.trim().toLowerCase() });
830
830
  }
831
+ function packageCanonicalId(p) {
832
+ const eco = p.ecosystem.toLowerCase();
833
+ const name = eco === "npm" ? p.name.toLowerCase() : p.name;
834
+ return `pkg:${eco}/${name}${p.version ? `@${p.version}` : ""}`;
835
+ }
831
836
  var DESIGN_PROBLEM_PREFIX, DESIGN_PROBLEM_ID_LENGTH, DIAGNOSTIC_PROBLEM_PREFIX, DIAGNOSTIC_HASH_LENGTH, TRIAGE_PREFIX, TRIAGE_ID_LENGTH;
832
837
  var init_identity = __esm({
833
838
  "../../packages/shared/src/identity.ts"() {
@@ -1949,10 +1954,10 @@ var init_regexes = __esm({
1949
1954
  duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
1950
1955
  extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
1951
1956
  guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
1952
- uuid = (version2) => {
1953
- if (!version2)
1957
+ uuid = (version3) => {
1958
+ if (!version3)
1954
1959
  return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
1955
- return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1960
+ return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1956
1961
  };
1957
1962
  uuid4 = /* @__PURE__ */ uuid(4);
1958
1963
  uuid6 = /* @__PURE__ */ uuid(6);
@@ -14761,10 +14766,10 @@ function fromJSONSchema(schema, params) {
14761
14766
  if (typeof schema === "boolean") {
14762
14767
  return schema ? z.any() : z.never();
14763
14768
  }
14764
- const version2 = detectVersion(schema, params?.defaultTarget);
14769
+ const version3 = detectVersion(schema, params?.defaultTarget);
14765
14770
  const defs = schema.$defs || schema.definitions || {};
14766
14771
  const ctx = {
14767
- version: version2,
14772
+ version: version3,
14768
14773
  defs,
14769
14774
  refs: /* @__PURE__ */ new Map(),
14770
14775
  processing: /* @__PURE__ */ new Set(),
@@ -15236,6 +15241,40 @@ var init_history_evidence = __esm({
15236
15241
  }
15237
15242
  });
15238
15243
 
15244
+ // ../../packages/shared/src/history-dependencies.ts
15245
+ var version2, HistoryDependencySchema, HistoryDependencyContextSchema;
15246
+ var init_history_dependencies = __esm({
15247
+ "../../packages/shared/src/history-dependencies.ts"() {
15248
+ "use strict";
15249
+ init_zod();
15250
+ init_hash();
15251
+ init_identity();
15252
+ version2 = external_exports.string().max(160).nullable();
15253
+ HistoryDependencySchema = external_exports.object({
15254
+ packageId: external_exports.string().startsWith("pkg:").max(300),
15255
+ ecosystem: external_exports.string().min(1).max(20),
15256
+ name: external_exports.string().min(1).max(200),
15257
+ kind: external_exports.enum(["package", "sdk", "engine", "runtime", "image"]),
15258
+ manifestId: external_exports.string().regex(/^hmanifest_[a-f0-9]{32}$/),
15259
+ sourceCommit: external_exports.string().regex(/^[a-f0-9]{7,64}$/),
15260
+ side: external_exports.enum(["before", "after"]),
15261
+ /** Environment-only entries constrain applicability but never mint a package edge. */
15262
+ binding: external_exports.enum(["named", "import", "environment"]).optional(),
15263
+ declaredRange: version2,
15264
+ resolvedVersion: version2,
15265
+ pathTokens: external_exports.array(external_exports.string().regex(/^p\d+$/)).max(500),
15266
+ importTokens: external_exports.array(external_exports.string().regex(/^p\d+$/)).max(500)
15267
+ }).refine((d) => d.packageId === packageCanonicalId({ ecosystem: d.ecosystem, name: d.name }), "package identity must match its evidence");
15268
+ HistoryDependencyContextSchema = external_exports.object({
15269
+ schemaVersion: external_exports.literal("history-deps-1"),
15270
+ complete: external_exports.boolean(),
15271
+ dependencies: external_exports.array(HistoryDependencySchema).max(256),
15272
+ statedVersions: external_exports.array(external_exports.object({ packageId: external_exports.string().max(300), version: external_exports.string().max(80) })).max(64).optional(),
15273
+ conflict: external_exports.boolean().optional()
15274
+ });
15275
+ }
15276
+ });
15277
+
15239
15278
  // ../../packages/shared/src/edge-rules.ts
15240
15279
  function isValidEdge(from, type, to) {
15241
15280
  const rule = EDGE_RULES[type];
@@ -15442,6 +15481,7 @@ var init_wire = __esm({
15442
15481
  "use strict";
15443
15482
  init_zod();
15444
15483
  init_history_evidence();
15484
+ init_history_dependencies();
15445
15485
  init_castalia();
15446
15486
  init_edge_rules();
15447
15487
  init_symbol_intent();
@@ -15566,6 +15606,7 @@ var init_wire = __esm({
15566
15606
  extractedBy: external_exports.enum(INGEST_EXTRACTION_SOURCES).optional(),
15567
15607
  sourceSupport: external_exports.literal("supported").optional(),
15568
15608
  historicalAnchors: external_exports.array(HistoryAnchorSourceSchema).max(160).optional(),
15609
+ dependencyEvidence: external_exports.array(HistoryDependencySchema).max(256).optional(),
15569
15610
  evidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15570
15611
  verificationEvidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15571
15612
  verifierBuild: external_exports.string().max(80).optional(),
@@ -15688,6 +15729,7 @@ var init_history_quality = __esm({
15688
15729
  var init_history_read = __esm({
15689
15730
  "../../packages/shared/src/history-read.ts"() {
15690
15731
  "use strict";
15732
+ init_history_dependencies();
15691
15733
  }
15692
15734
  });
15693
15735
 
@@ -15706,6 +15748,7 @@ var init_history_revision = __esm({
15706
15748
  init_zod();
15707
15749
  init_hash();
15708
15750
  init_history_evidence();
15751
+ init_history_dependencies();
15709
15752
  Sha = external_exports.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/);
15710
15753
  HistoryRevisionRequestSchema = external_exports.strictObject({
15711
15754
  atCommit: Sha,
@@ -15714,7 +15757,8 @@ var init_history_revision = __esm({
15714
15757
  occurrenceId: external_exports.string().min(1).max(100),
15715
15758
  symbols: external_exports.array(external_exports.strictObject({ symbolId: external_exports.string().regex(/^sym_[a-f0-9]{8,64}$/), bodyHash: external_exports.string().regex(/^[a-f0-9]{8,64}$/) })).max(32),
15716
15759
  /** Scrubbed, tokenized net change from this occurrence's source to atCommit. */
15717
- diff: external_exports.string().max(16e3).optional()
15760
+ diff: external_exports.string().max(16e3).optional(),
15761
+ dependencyContext: HistoryDependencyContextSchema.optional()
15718
15762
  })).max(50)
15719
15763
  });
15720
15764
  }
@@ -15771,6 +15815,7 @@ var init_src = __esm({
15771
15815
  init_history_temporal();
15772
15816
  init_history_revision();
15773
15817
  init_history_evidence();
15818
+ init_history_dependencies();
15774
15819
  init_hash();
15775
15820
  init_error_signature();
15776
15821
  init_canonicalize();
@@ -17422,8 +17467,8 @@ var SqliteGraphStore = class {
17422
17467
  freezeNode(liveId, t) {
17423
17468
  const live = this.getNode(liveId);
17424
17469
  if (!live) return null;
17425
- const version2 = live.version ?? 1;
17426
- const frozenId = `${liveId}@v${version2}`;
17470
+ const version3 = live.version ?? 1;
17471
+ const frozenId = `${liveId}@v${version3}`;
17427
17472
  if (this.getNode(frozenId)) {
17428
17473
  this.stmts.advanceLive.run({ live_id: liveId, t });
17429
17474
  return frozenId;