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/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as In
|
|
|
2
2
|
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-D6Q8WHes.cjs';
|
|
3
3
|
|
|
4
4
|
/** ArkGate library version — single source of truth. */
|
|
5
|
-
declare const version = "2.
|
|
5
|
+
declare const version = "2.10.0";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* defineIntent
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as In
|
|
|
2
2
|
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-D6Q8WHes.js';
|
|
3
3
|
|
|
4
4
|
/** ArkGate library version — single source of truth. */
|
|
5
|
-
declare const version = "2.
|
|
5
|
+
declare const version = "2.10.0";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* defineIntent
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
|
-
var version = "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
|
-
|
|
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: {
|
|
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
|
}
|