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.
- package/CHANGELOG.md +44 -0
- package/README.md +6 -0
- package/bin/ark-mcp.mjs +282 -102
- package/bin/lib/agent-gates.mjs +152 -3
- package/bin/lib/architecture-scan.mjs +19 -0
- package/bin/lib/auto-patch.mjs +264 -0
- package/bin/lib/doctor-plan.mjs +54 -0
- package/bin/lib/port-proof.mjs +309 -0
- package/bin/lib/prepare-write.mjs +130 -0
- package/bin/lib/remediation.mjs +21 -0
- package/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.cjs +1 -1
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.js +1 -1
- package/dist/nestjs/index.js.map +1 -1
- package/dist/runtime/index.cjs +13 -4
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +13 -4
- package/dist/runtime/index.js.map +1 -1
- package/docs/agent-guide.md +14 -0
- package/docs/ai-gates.md +43 -3
- package/docs/enthusiast/how-to-agent-gates.md +8 -0
- package/docs/enthusiast/reference-commands.md +1 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/templates/skills/ark-explain.md +1 -1
- package/templates/skills/ark-loop.md +2 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -80,7 +80,7 @@ __export(runtime_exports, {
|
|
|
80
80
|
module.exports = __toCommonJS(runtime_exports);
|
|
81
81
|
|
|
82
82
|
// src/version.ts
|
|
83
|
-
var version = "2.
|
|
83
|
+
var version = "2.10.0";
|
|
84
84
|
|
|
85
85
|
// src/kernel/intent/IntentRegistry.ts
|
|
86
86
|
var IntentRegistry = class {
|
|
@@ -2255,7 +2255,9 @@ function extractModuleSpecifiers(source) {
|
|
|
2255
2255
|
let match;
|
|
2256
2256
|
while ((match = pattern.re.exec(source)) !== null) {
|
|
2257
2257
|
const index = match.index + match[0].indexOf(match[1]);
|
|
2258
|
-
|
|
2258
|
+
const raw = match[0];
|
|
2259
|
+
const typeOnly = pattern.kind === "import" && /\bimport\s+type\b/.test(raw) || pattern.kind === "export" && /\bexport\s+type\b/.test(raw);
|
|
2260
|
+
matches.push({ value: match[1], index, kind: pattern.kind, typeOnly });
|
|
2259
2261
|
}
|
|
2260
2262
|
}
|
|
2261
2263
|
return matches.sort((a, b) => a.index - b.index);
|
|
@@ -2495,6 +2497,9 @@ function createAICodeGate(options = {}) {
|
|
|
2495
2497
|
}
|
|
2496
2498
|
);
|
|
2497
2499
|
if (blocked) {
|
|
2500
|
+
if (specifier.typeOnly && !blocked.peerIsolation) {
|
|
2501
|
+
continue;
|
|
2502
|
+
}
|
|
2498
2503
|
const peer = Boolean(blocked.peerIsolation);
|
|
2499
2504
|
violations.push(
|
|
2500
2505
|
violation(
|
|
@@ -2508,7 +2513,11 @@ function createAICodeGate(options = {}) {
|
|
|
2508
2513
|
fromLayer: contextLayer,
|
|
2509
2514
|
toLayer: targetLayer,
|
|
2510
2515
|
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.",
|
|
2511
|
-
details: {
|
|
2516
|
+
details: {
|
|
2517
|
+
importKind: specifier.kind,
|
|
2518
|
+
peerIsolation: peer,
|
|
2519
|
+
...specifier.typeOnly ? { typeOnly: true } : {}
|
|
2520
|
+
}
|
|
2512
2521
|
}
|
|
2513
2522
|
)
|
|
2514
2523
|
);
|
|
@@ -2518,7 +2527,7 @@ function createAICodeGate(options = {}) {
|
|
|
2518
2527
|
continue;
|
|
2519
2528
|
}
|
|
2520
2529
|
}
|
|
2521
|
-
if (exemptFromInfraHeuristics) continue;
|
|
2530
|
+
if (exemptFromInfraHeuristics || specifier.typeOnly) continue;
|
|
2522
2531
|
if (!hasInfrastructureToken(specifier.value) && !isKnownInfrastructurePackage(specifier.value)) {
|
|
2523
2532
|
continue;
|
|
2524
2533
|
}
|