arkgate 2.9.2 → 2.10.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.
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "2.9.2";
2
+ var version = "2.10.0";
3
3
 
4
4
  // src/kernel/intent/IntentRegistry.ts
5
5
  var IntentRegistry = class {
@@ -2174,7 +2174,9 @@ function extractModuleSpecifiers(source) {
2174
2174
  let match;
2175
2175
  while ((match = pattern.re.exec(source)) !== null) {
2176
2176
  const index = match.index + match[0].indexOf(match[1]);
2177
- matches.push({ value: match[1], index, kind: pattern.kind });
2177
+ const raw = match[0];
2178
+ const typeOnly = pattern.kind === "import" && /\bimport\s+type\b/.test(raw) || pattern.kind === "export" && /\bexport\s+type\b/.test(raw);
2179
+ matches.push({ value: match[1], index, kind: pattern.kind, typeOnly });
2178
2180
  }
2179
2181
  }
2180
2182
  return matches.sort((a, b) => a.index - b.index);
@@ -2414,6 +2416,9 @@ function createAICodeGate(options = {}) {
2414
2416
  }
2415
2417
  );
2416
2418
  if (blocked) {
2419
+ if (specifier.typeOnly && !blocked.peerIsolation) {
2420
+ continue;
2421
+ }
2417
2422
  const peer = Boolean(blocked.peerIsolation);
2418
2423
  violations.push(
2419
2424
  violation(
@@ -2427,7 +2432,11 @@ function createAICodeGate(options = {}) {
2427
2432
  fromLayer: contextLayer,
2428
2433
  toLayer: targetLayer,
2429
2434
  suggestion: peer ? "Extract shared code to a shared layer, or coordinate slices via events/ports \u2014 do not import across feature/context slices." : "Depend on a port/interface owned by an inner layer instead, or move this code to a layer allowed to make this import.",
2430
- details: { importKind: specifier.kind, peerIsolation: peer }
2435
+ details: {
2436
+ importKind: specifier.kind,
2437
+ peerIsolation: peer,
2438
+ ...specifier.typeOnly ? { typeOnly: true } : {}
2439
+ }
2431
2440
  }
2432
2441
  )
2433
2442
  );
@@ -2437,7 +2446,7 @@ function createAICodeGate(options = {}) {
2437
2446
  continue;
2438
2447
  }
2439
2448
  }
2440
- if (exemptFromInfraHeuristics) continue;
2449
+ if (exemptFromInfraHeuristics || specifier.typeOnly) continue;
2441
2450
  if (!hasInfrastructureToken(specifier.value) && !isKnownInfrastructurePackage(specifier.value)) {
2442
2451
  continue;
2443
2452
  }