arkgate 4.8.24 → 4.8.26
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 +95 -0
- package/README.md +2 -2
- package/bin/ark-check-runtime.mjs +17 -14
- package/bin/ark-layer-match.mjs +115 -13
- package/bin/ark-mcp-runtime.mjs +36 -31
- package/bin/ark-shared.mjs +4 -23
- package/bin/lib/adoption-stance.mjs +2 -2
- package/bin/lib/adr-path.mjs +3 -3
- package/bin/lib/agent-gates.mjs +0 -61
- package/bin/lib/agent-homes.mjs +12 -21
- package/bin/lib/agent-projection-command.mjs +4 -4
- package/bin/lib/ambient-state.mjs +9 -30
- package/bin/lib/analysis-engine.mjs +14 -14
- package/bin/lib/architecture-scan.mjs +11 -9
- package/bin/lib/ark-order-doctor.mjs +3 -28
- package/bin/lib/ark-order-facts.mjs +6 -99
- package/bin/lib/ark-order-types.mjs +1 -2
- package/bin/lib/ark-run-doctor.mjs +3 -28
- package/bin/lib/ark-run-facts.mjs +30 -40
- package/bin/lib/ark-run-sensors.mjs +1 -1
- package/bin/lib/arkrule-file-hints.mjs +2 -47
- package/bin/lib/arkrules-contract.mjs +124 -133
- package/bin/lib/arkrules-sensors.mjs +7 -5
- package/bin/lib/check-args.mjs +63 -1
- package/bin/lib/ci-and-commands.mjs +8 -72
- package/bin/lib/ci-merge-boundary.mjs +1 -1
- package/bin/lib/class-source-scan.mjs +5 -5
- package/bin/lib/clone-detection.mjs +474 -0
- package/bin/lib/codex-home.mjs +1 -1
- package/bin/lib/config-contract-slices.mjs +44 -6
- package/bin/lib/config-contract.mjs +40 -117
- package/bin/lib/config-extras.mjs +16 -22
- package/bin/lib/contract-smells.mjs +33 -15
- package/bin/lib/core-ratchet.mjs +0 -2
- package/bin/lib/dashboard-cli.mjs +2 -2
- package/bin/lib/deep-module-coach.mjs +2 -4
- package/bin/lib/deploy-path.mjs +13 -38
- package/bin/lib/design-smells.mjs +2 -2
- package/bin/lib/diagnostic-catalog.mjs +8 -1
- package/bin/lib/doctor-advisories.mjs +55 -9
- package/bin/lib/doctor-green-cite.mjs +1 -1
- package/bin/lib/doctor-human.mjs +1 -1
- package/bin/lib/doctor-next-actions.mjs +2 -2
- package/bin/lib/doctor-plan.mjs +4 -6
- package/bin/lib/duplication-io.mjs +572 -0
- package/bin/lib/effective-contract-load.mjs +181 -44
- package/bin/lib/entry-points-io.mjs +424 -0
- package/bin/lib/extra-merge-teeth.mjs +36 -0
- package/bin/lib/field-install.mjs +38 -14
- package/bin/lib/first-run-help.mjs +7 -3
- package/bin/lib/flat-parent-importers.mjs +5 -3
- package/bin/lib/gate-files.mjs +30 -89
- package/bin/lib/github-enforcement.mjs +165 -28
- package/bin/lib/golden-pattern.mjs +1 -1
- package/bin/lib/hook-templates.mjs +16 -16
- package/bin/lib/html-report-advisories.mjs +4 -0
- package/bin/lib/html-report-depth.mjs +2 -2
- package/bin/lib/html-report.mjs +2 -2
- package/bin/lib/import-graph-projection.mjs +112 -0
- package/bin/lib/improvement-compass-doctor.mjs +1 -24
- package/bin/lib/invariant-coverage-io.mjs +4 -3
- package/bin/lib/invariant-coverage.mjs +26 -0
- package/bin/lib/invariant-probe-cli.mjs +347 -0
- package/bin/lib/invariant-probe-io.mjs +165 -0
- package/bin/lib/invariant-probe-runner.mjs +268 -0
- package/bin/lib/invariant-probe-sites.mjs +174 -0
- package/bin/lib/invariant-probe-workspace.mjs +183 -0
- package/bin/lib/invariant-probe.mjs +461 -0
- package/bin/lib/invariant-tests-path.mjs +16 -22
- package/bin/lib/literal-path-drift.mjs +4 -2
- package/bin/lib/managed-upgrade.mjs +2 -8
- package/bin/lib/mcp-adoption.mjs +4 -5
- package/bin/lib/mcp-hook-payload.mjs +4 -4
- package/bin/lib/orphan-modules-io.mjs +458 -0
- package/bin/lib/orphan-modules.mjs +251 -0
- package/bin/lib/outside-importers.mjs +197 -0
- package/bin/lib/package-manager.mjs +3 -3
- package/bin/lib/parse-health.mjs +1 -1
- package/bin/lib/persistence-write-hint.mjs +33 -8
- package/bin/lib/pin-dependent-gates.mjs +2 -2
- package/bin/lib/policy-delta-io.mjs +60 -12
- package/bin/lib/post-green-path.mjs +1 -1
- package/bin/lib/prepare-change.mjs +3 -9
- package/bin/lib/prepare-write.mjs +1 -2
- package/bin/lib/presets.mjs +56 -68
- package/bin/lib/product-copy.mjs +1 -6
- package/bin/lib/project-root.mjs +43 -85
- package/bin/lib/resolved-candidate-facts.mjs +90 -62
- package/bin/lib/rules-under-contract.mjs +72 -8
- package/bin/lib/scan-files.mjs +4 -4
- package/bin/lib/schema-validation.mjs +130 -0
- package/bin/lib/sensor-promote-cli.mjs +2 -11
- package/bin/lib/sensor-promote-io.mjs +33 -22
- package/bin/lib/sensor-promotion.mjs +1 -1
- package/bin/lib/skill-catalog-apply.mjs +1 -1
- package/bin/lib/skill-install.mjs +42 -38
- package/bin/lib/snippet-analysis.mjs +1 -1
- package/bin/lib/start-install-recovery.mjs +1 -1
- package/bin/lib/start-preview.mjs +1 -1
- package/bin/lib/states-transitions-presence.mjs +3 -3
- package/bin/lib/status-command.mjs +2 -18
- package/bin/lib/status-manifest.mjs +18 -26
- package/bin/lib/status-transition-catalog.mjs +0 -6
- package/bin/lib/suggestions.mjs +3 -3
- package/bin/lib/team-parliament-io.mjs +3 -17
- package/bin/lib/team-parliament.mjs +15 -9
- package/bin/lib/upgrade-behavior-changes.mjs +2 -2
- package/bin/lib/upgrade-command.mjs +2 -24
- package/bin/lib/upgrade-outcome.mjs +1 -1
- package/bin/lib/upstream-report.mjs +21 -10
- package/bin/lib/violations.mjs +10 -9
- package/bin/lib/weakest-link.mjs +13 -0
- package/bin/lib/write-path-capabilities.mjs +2 -2
- package/dist/chunk-G3JRBJGH.js +16 -0
- package/dist/chunk-R3AJ5RSZ.cjs +16 -0
- package/dist/{configTypes-BJbaeoj4.d.cts → configTypes-GPvvdleM.d.cts} +12 -1
- package/dist/{configTypes-BJbaeoj4.d.ts → configTypes-GPvvdleM.d.ts} +12 -1
- package/dist/eslint/index.cjs +11 -11
- package/dist/eslint/index.d.cts +10 -1
- package/dist/eslint/index.d.ts +10 -1
- package/dist/eslint/index.js +11 -11
- package/dist/index.cjs +34 -34
- package/dist/index.d.cts +587 -515
- package/dist/index.d.ts +587 -515
- package/dist/index.js +34 -34
- package/dist/nestjs/index.cjs +1 -1
- package/dist/nestjs/index.d.cts +1 -1
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +1 -1
- package/dist/order/index.cjs +1 -1
- package/dist/order/index.js +1 -1
- package/dist/runtime/index.cjs +12 -12
- package/dist/runtime/index.d.cts +174 -136
- package/dist/runtime/index.d.ts +174 -136
- package/dist/runtime/index.js +12 -12
- package/dist/{types-DRinG-vT.d.cts → types-CnauMQQL.d.cts} +33 -25
- package/dist/{types-DRinG-vT.d.ts → types-CnauMQQL.d.ts} +33 -25
- package/docs/README.md +3 -1
- package/docs/agent-guide.md +140 -6
- package/docs/ai-gates.md +15 -1
- package/docs/configuration.md +40 -11
- package/docs/diagnostics.md +119 -3
- package/docs/package-surface.md +4 -1
- package/docs/product-voice.md +7 -1
- package/package.json +11 -2
- package/schemas/ark.config.schema.json +31 -3
- package/schemas/ark.invariant-probe.schema.json +368 -0
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +1 -0
- package/templates/agent-skills/ark-contract/SKILL.md +17 -0
- package/templates/agent-skills/ark-coverage/SKILL.md +2 -0
- package/templates/agent-skills/ark-explore/SKILL.md +7 -0
- package/templates/agent-skills/ark-fix/SKILL.md +20 -0
- package/templates/agent-skills/ark-place/SKILL.md +8 -0
- package/templates/skills/ark-adopt.md +1 -0
- package/templates/skills/ark-contract.md +17 -0
- package/templates/skills/ark-coverage.md +2 -0
- package/templates/skills/ark-explore.md +7 -0
- package/templates/skills/ark-fix.md +20 -0
- package/templates/skills/ark-place.md +8 -0
- package/bin/lib/ark-order-error.mjs +0 -18
- package/bin/lib/ark-order-invariants.mjs +0 -388
- package/bin/lib/stable-hash.mjs +0 -90
- package/dist/chunk-MBXCFLO4.js +0 -16
- package/dist/chunk-RNQHRDCQ.cjs +0 -16
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ArkConfigRule, b as ArkConfigSchemaVersion, c as ArkConfigLoadResult, d as ArkConfigLayer, A as ArkConfig, e as ArkConfigIssue, f as ArkConfigArkRun, g as ArkConfigArkOrder } from './configTypes-
|
|
1
|
+
import { a as ArkConfigRule, b as ArkConfigSchemaVersion, c as ArkConfigLoadResult, d as ArkConfigLayer, A as ArkConfig, e as ArkConfigIssue, f as ArkConfigArkRun, g as ArkConfigArkOrder } from './configTypes-GPvvdleM.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Canonical, pure contract for ark.config.json.
|
|
@@ -104,12 +104,23 @@ declare const ARK_CONFIG_SCHEMA: {
|
|
|
104
104
|
readonly coverage: {
|
|
105
105
|
readonly $ref: "#/$defs/coverage";
|
|
106
106
|
};
|
|
107
|
-
/** ADR 0012 — layer name →
|
|
107
|
+
/** ADR 0012 — layer name → one path, or a list of paths merged into that layer. */
|
|
108
108
|
readonly arkRules: {
|
|
109
109
|
readonly type: "object";
|
|
110
110
|
readonly additionalProperties: {
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
111
|
+
readonly description: "A project-relative ArkRules path, or a list of paths merged into one catalog for this layer. A string keeps today's behaviour. An older build that types this value as a string rejects an array at config load.";
|
|
112
|
+
readonly oneOf: readonly [{
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly minLength: 1;
|
|
115
|
+
}, {
|
|
116
|
+
readonly type: "array";
|
|
117
|
+
readonly minItems: 1;
|
|
118
|
+
readonly uniqueItems: true;
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly minLength: 1;
|
|
122
|
+
};
|
|
123
|
+
}];
|
|
113
124
|
};
|
|
114
125
|
readonly default: {};
|
|
115
126
|
};
|
|
@@ -385,10 +396,15 @@ declare const ARK_CONFIG_SCHEMA: {
|
|
|
385
396
|
readonly minLength: 1;
|
|
386
397
|
readonly description: "Text for inner-wall findings (CROSS_SIBLING_SLICE and universe common importing a child). The rule message stays the universe-wall text (CROSS_PARENT_SLICE and fail-closed denies). Absent: ArkGate default text, never the rule message. arkgate 4.8.23 and older reject this field (unknown field).";
|
|
387
398
|
};
|
|
399
|
+
readonly arkRulesFile: {
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
readonly minLength: 1;
|
|
402
|
+
readonly description: "Filename read at each child slice root this wall already resolved. The only token is <Layer>, replaced with a declared layer name (arkrules.<Layer>.json). No slash and no wildcard. A discovered file that omits appliesTo is scoped to that slice directory. Explicit appliesTo outside the slice fails config load (ARKRULE_SCOPE_ESCAPES_SLICE). The effective id is <childId>#<localId>. A build that rejects unknown childSlices fields fails at config load (unknown field).";
|
|
403
|
+
};
|
|
388
404
|
readonly sliceAliases: {
|
|
389
405
|
readonly type: "array";
|
|
390
406
|
readonly minItems: 1;
|
|
391
|
-
readonly description: "Maps a source path glob onto a child slice id (universe id plus one child segment) so files outside the slice trees take that universe and child for both walls. A path without a wildcard also covers everything under it, as sharedRoots does. A bare name, a universe id alone, a target outside every universe shape, and a wildcard in to are rejected. Under stars identity a target written against the 4.8.23 stars id (star bindings before the last literal dropped, e.g. api/v1/x for modules/*/api/*) still loads when it maps to one universe shape, and ark-check warns CONFIG_SLICE_LEGACY_STARS_ID with the new id; it is rejected only when it maps to more than one shape. Config load checks only the shape; doctor reports a target universe no file belongs to. The glob may not overlap a slice folder, and two aliases may not match the same file. Doctor lists each alias as an owed move. A build that rejects unknown childSlices fields fails at config load (unknown field). arkgate 4.8.22 and older reject childSlices.";
|
|
407
|
+
readonly description: "Maps a source path glob onto a child slice id (universe id plus one child segment) so files outside the slice trees take that universe and child for both walls. A path without a wildcard also covers everything under it, as sharedRoots does. A bare name, a universe id alone, a target outside every universe shape, and a wildcard in to are rejected. Under stars identity a target written against the 4.8.23 stars id (star bindings before the last literal dropped, e.g. api/v1/x for modules/*/api/*) still loads when it maps to one universe shape, and ark-check warns CONFIG_SLICE_LEGACY_STARS_ID with the new id; it is rejected only when it maps to more than one shape. Config load checks only the shape; doctor reports a target universe no file belongs to. The glob may not overlap a slice folder, and two aliases may not match the same file. Doctor lists each unpinned alias as an owed move. pinned true lists the alias separately and does not count it as debt. reason is a doctor label and does not pin by itself. A build that rejects unknown childSlices fields fails at config load (unknown field). arkgate 4.8.22 and older reject childSlices.";
|
|
392
408
|
readonly items: {
|
|
393
409
|
readonly type: "object";
|
|
394
410
|
readonly additionalProperties: false;
|
|
@@ -402,6 +418,15 @@ declare const ARK_CONFIG_SCHEMA: {
|
|
|
402
418
|
readonly type: "string";
|
|
403
419
|
readonly minLength: 1;
|
|
404
420
|
};
|
|
421
|
+
readonly pinned: {
|
|
422
|
+
readonly type: "boolean";
|
|
423
|
+
readonly description: "True when a framework forces the path to stay. The alias is not an owed move and does not clear other honesty debt.";
|
|
424
|
+
};
|
|
425
|
+
readonly reason: {
|
|
426
|
+
readonly type: "string";
|
|
427
|
+
readonly minLength: 1;
|
|
428
|
+
readonly description: "Doctor label, such as framework-route. A label alone does not pin.";
|
|
429
|
+
};
|
|
405
430
|
};
|
|
406
431
|
};
|
|
407
432
|
};
|
|
@@ -625,6 +650,8 @@ type ArkRuleProvenance = {
|
|
|
625
650
|
sourceFile: string;
|
|
626
651
|
ruleId: string;
|
|
627
652
|
layer: string;
|
|
653
|
+
/** Set when the rule was read from a child-slice file. Absent on central files. */
|
|
654
|
+
childId?: string;
|
|
628
655
|
};
|
|
629
656
|
type EffectiveStructureRule = ArkRuleStructureEntry & {
|
|
630
657
|
mode: ArkRuleMode;
|
|
@@ -638,6 +665,8 @@ type EffectiveArkRules = {
|
|
|
638
665
|
schemaVersion: '1.0';
|
|
639
666
|
byLayer: Record<string, {
|
|
640
667
|
sourceFile: string;
|
|
668
|
+
/** Every file merged into this layer, central paths first. Absent on older catalogs. */
|
|
669
|
+
sourceFiles?: string[];
|
|
641
670
|
structure: EffectiveStructureRule[];
|
|
642
671
|
invariants: EffectiveInvariantRule[];
|
|
643
672
|
}>;
|
|
@@ -789,15 +818,20 @@ declare function loadArkRulesContract(input: unknown, source?: string, expectedL
|
|
|
789
818
|
declare function parseArkRulesJson(json: string, source?: string, expectedLayer?: string): {
|
|
790
819
|
config: ArkRulesFile;
|
|
791
820
|
};
|
|
792
|
-
|
|
793
|
-
* Build the Effective Contract from already-validated ArkRules files.
|
|
794
|
-
* Callers supply `{ layer → { sourceFile, file } }` after resolving references.
|
|
795
|
-
*/
|
|
796
|
-
declare function buildEffectiveArkRules(parts: ReadonlyArray<{
|
|
821
|
+
type ArkRulesBuildPart = {
|
|
797
822
|
layer: string;
|
|
798
823
|
sourceFile: string;
|
|
799
824
|
file: ArkRulesFile;
|
|
800
|
-
|
|
825
|
+
/** Child slice that owns this file. Central files omit it, and their ids stay bare. */
|
|
826
|
+
childId?: string;
|
|
827
|
+
/** Used when a discovered file omits appliesTo. The first entry's directory is the slice root. */
|
|
828
|
+
defaultAppliesTo?: readonly string[];
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* Build the Effective Contract from already-validated ArkRules files.
|
|
832
|
+
* Same-layer parts merge. A child id namespaces the effective id and does not rewrite the file.
|
|
833
|
+
*/
|
|
834
|
+
declare function buildEffectiveArkRules(parts: readonly ArkRulesBuildPart[]): EffectiveArkRules;
|
|
801
835
|
/** Empty Effective Contract used when `arkRules` is absent (byte-for-byte verdict parity). */
|
|
802
836
|
declare function emptyEffectiveArkRules(): EffectiveArkRules;
|
|
803
837
|
|
|
@@ -1234,181 +1268,64 @@ declare function createAdapterResult(input: {
|
|
|
1234
1268
|
}): CurrentAdapterResult;
|
|
1235
1269
|
|
|
1236
1270
|
/** ArkGate library version — single source of truth. */
|
|
1237
|
-
declare const version = "4.8.
|
|
1271
|
+
declare const version = "4.8.26";
|
|
1238
1272
|
|
|
1239
1273
|
/**
|
|
1240
|
-
*
|
|
1274
|
+
* Architecture layer profiles.
|
|
1241
1275
|
*
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1244
|
-
* every MCP surface speaks the same identity/binding language.
|
|
1276
|
+
* A profile turns semantic names such as `Domain.Order.Placed` into governed
|
|
1277
|
+
* layer names and dependency rules.
|
|
1245
1278
|
*/
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1283
|
-
readonly description: "Project id previously returned by ark_identity or ark_manifest.";
|
|
1284
|
-
};
|
|
1285
|
-
};
|
|
1286
|
-
};
|
|
1287
|
-
declare const PROJECT_BINDING_SCHEMA: {
|
|
1288
|
-
readonly type: "object";
|
|
1289
|
-
readonly additionalProperties: false;
|
|
1290
|
-
readonly required: readonly ["status", "authoritative"];
|
|
1291
|
-
readonly properties: {
|
|
1292
|
-
readonly status: {
|
|
1293
|
-
readonly enum: readonly ["matched", "unverified", "mismatch"];
|
|
1294
|
-
};
|
|
1295
|
-
readonly authoritative: {
|
|
1296
|
-
readonly type: "boolean";
|
|
1297
|
-
};
|
|
1298
|
-
readonly expectedRoot: {
|
|
1299
|
-
readonly type: "string";
|
|
1300
|
-
readonly minLength: 1;
|
|
1301
|
-
};
|
|
1302
|
-
readonly expectedProjectId: {
|
|
1303
|
-
readonly type: "string";
|
|
1304
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1305
|
-
};
|
|
1306
|
-
readonly code: {
|
|
1307
|
-
readonly enum: readonly ["PROJECT_ROOT_MISMATCH", "PROJECT_ID_MISMATCH", "INVALID_PROJECT_EXPECTATION"];
|
|
1308
|
-
};
|
|
1309
|
-
readonly message: {
|
|
1310
|
-
readonly type: "string";
|
|
1311
|
-
readonly minLength: 1;
|
|
1312
|
-
};
|
|
1313
|
-
};
|
|
1314
|
-
};
|
|
1315
|
-
declare const ARK_PROJECT_IDENTITY_SCHEMA: {
|
|
1316
|
-
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1317
|
-
readonly $id: "https://unpkg.com/arkgate@4/schemas/ark.project-identity.schema.json";
|
|
1318
|
-
readonly title: "ArkGate MCP project identity";
|
|
1319
|
-
readonly description: "Stable project binding plus separate runtime and architecture-contract evidence.";
|
|
1320
|
-
readonly type: "object";
|
|
1321
|
-
readonly additionalProperties: false;
|
|
1322
|
-
readonly required: readonly ["schemaVersion", "projectId", "resolvedRoot", "resolvedConfigPath", "arkgateVersion", "contractHash", "contractSource", "runtimeId", "processStartedAt"];
|
|
1323
|
-
readonly properties: {
|
|
1324
|
-
readonly schemaVersion: {
|
|
1325
|
-
readonly const: "1.0";
|
|
1326
|
-
};
|
|
1327
|
-
readonly projectId: {
|
|
1328
|
-
readonly type: "string";
|
|
1329
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1330
|
-
};
|
|
1331
|
-
readonly resolvedRoot: {
|
|
1332
|
-
readonly type: "string";
|
|
1333
|
-
readonly minLength: 1;
|
|
1334
|
-
};
|
|
1335
|
-
readonly resolvedConfigPath: {
|
|
1336
|
-
readonly type: "string";
|
|
1337
|
-
readonly minLength: 1;
|
|
1338
|
-
};
|
|
1339
|
-
readonly arkgateVersion: {
|
|
1340
|
-
readonly type: "string";
|
|
1341
|
-
readonly minLength: 1;
|
|
1342
|
-
};
|
|
1343
|
-
readonly contractHash: {
|
|
1344
|
-
readonly type: "string";
|
|
1345
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1346
|
-
};
|
|
1347
|
-
readonly contractSource: {
|
|
1348
|
-
readonly enum: readonly ["project", "default-profile", "manifest"];
|
|
1349
|
-
};
|
|
1350
|
-
readonly runtimeId: {
|
|
1351
|
-
readonly type: "string";
|
|
1352
|
-
readonly minLength: 1;
|
|
1353
|
-
};
|
|
1354
|
-
readonly processStartedAt: {
|
|
1355
|
-
readonly type: "string";
|
|
1356
|
-
readonly format: "date-time";
|
|
1357
|
-
};
|
|
1358
|
-
};
|
|
1359
|
-
readonly $defs: {
|
|
1360
|
-
readonly expectation: {
|
|
1361
|
-
readonly type: "object";
|
|
1362
|
-
readonly additionalProperties: false;
|
|
1363
|
-
readonly properties: {
|
|
1364
|
-
readonly expectedRoot: {
|
|
1365
|
-
readonly type: "string";
|
|
1366
|
-
readonly minLength: 1;
|
|
1367
|
-
readonly description: string;
|
|
1368
|
-
};
|
|
1369
|
-
readonly expectedProjectId: {
|
|
1370
|
-
readonly type: "string";
|
|
1371
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1372
|
-
readonly description: "Project id previously returned by ark_identity or ark_manifest.";
|
|
1373
|
-
};
|
|
1374
|
-
};
|
|
1375
|
-
};
|
|
1376
|
-
readonly binding: {
|
|
1377
|
-
readonly type: "object";
|
|
1378
|
-
readonly additionalProperties: false;
|
|
1379
|
-
readonly required: readonly ["status", "authoritative"];
|
|
1380
|
-
readonly properties: {
|
|
1381
|
-
readonly status: {
|
|
1382
|
-
readonly enum: readonly ["matched", "unverified", "mismatch"];
|
|
1383
|
-
};
|
|
1384
|
-
readonly authoritative: {
|
|
1385
|
-
readonly type: "boolean";
|
|
1386
|
-
};
|
|
1387
|
-
readonly expectedRoot: {
|
|
1388
|
-
readonly type: "string";
|
|
1389
|
-
readonly minLength: 1;
|
|
1390
|
-
};
|
|
1391
|
-
readonly expectedProjectId: {
|
|
1392
|
-
readonly type: "string";
|
|
1393
|
-
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
1394
|
-
};
|
|
1395
|
-
readonly code: {
|
|
1396
|
-
readonly enum: readonly ["PROJECT_ROOT_MISMATCH", "PROJECT_ID_MISMATCH", "INVALID_PROJECT_EXPECTATION"];
|
|
1397
|
-
};
|
|
1398
|
-
readonly message: {
|
|
1399
|
-
readonly type: "string";
|
|
1400
|
-
readonly minLength: 1;
|
|
1401
|
-
};
|
|
1402
|
-
};
|
|
1403
|
-
};
|
|
1404
|
-
};
|
|
1279
|
+
|
|
1280
|
+
interface ArchitectureLayer {
|
|
1281
|
+
name: string;
|
|
1282
|
+
prefixes: string[];
|
|
1283
|
+
/**
|
|
1284
|
+
* Custom matcher for teams whose intent names don't follow prefix conventions.
|
|
1285
|
+
* Checked before any prefix matching, in layer declaration order. A layer may
|
|
1286
|
+
* use `match` alone (with `prefixes: []`), prefixes alone, or both.
|
|
1287
|
+
*/
|
|
1288
|
+
match?: (name: string) => boolean;
|
|
1289
|
+
description?: string;
|
|
1290
|
+
trustBoundary?: 'public' | 'auth' | 'admin' | 'internal';
|
|
1291
|
+
owners?: string[];
|
|
1292
|
+
order?: number;
|
|
1293
|
+
}
|
|
1294
|
+
type ArchitectureRule = ArkConfigRule;
|
|
1295
|
+
interface ArchitectureProfile {
|
|
1296
|
+
name: string;
|
|
1297
|
+
layers: ArchitectureLayer[];
|
|
1298
|
+
rules: ArchitectureRule[];
|
|
1299
|
+
resolveLayer(name: string): string | undefined;
|
|
1300
|
+
}
|
|
1301
|
+
interface CreateArchitectureProfileOptions {
|
|
1302
|
+
name: string;
|
|
1303
|
+
layers: ArchitectureLayer[];
|
|
1304
|
+
rules?: ArchitectureRule[];
|
|
1305
|
+
}
|
|
1306
|
+
interface CreateArchitectureProfileFromArkConfigOptions {
|
|
1307
|
+
/** Runtime profile name. Default: config.name or "ark.config.json". */
|
|
1308
|
+
name?: string;
|
|
1309
|
+
}
|
|
1310
|
+
type ArchitectureLayerConfig = ArkConfigLayer;
|
|
1311
|
+
type ArkCheckConfig = Omit<ArkConfig, '$schema' | 'schemaVersion' | 'rules'> & {
|
|
1312
|
+
$schema?: string;
|
|
1313
|
+
schemaVersion?: ArkConfig['schemaVersion'];
|
|
1314
|
+
rules?: ArchitectureRule[];
|
|
1405
1315
|
};
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
*/
|
|
1410
|
-
|
|
1411
|
-
|
|
1316
|
+
interface CreateElevenLayerArkConfigOptions {
|
|
1317
|
+
/** Source root used in generated file patterns. Default: "src". */
|
|
1318
|
+
rootDir?: string;
|
|
1319
|
+
/** Include entries for ark-check. Default: [rootDir]. */
|
|
1320
|
+
include?: string[];
|
|
1321
|
+
/** Mark generated layers optional. Default: true. */
|
|
1322
|
+
optionalLayers?: boolean;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
declare function createArchitectureProfile(options: CreateArchitectureProfileOptions): ArchitectureProfile;
|
|
1326
|
+
declare function createArchitectureProfileFromArkConfig(config: ArkCheckConfig, options?: CreateArchitectureProfileFromArkConfigOptions): ArchitectureProfile;
|
|
1327
|
+
declare const elevenLayerProfile: ArchitectureProfile;
|
|
1328
|
+
declare function createElevenLayerArkConfig(options?: CreateElevenLayerArkConfigOptions): ArkCheckConfig;
|
|
1412
1329
|
|
|
1413
1330
|
/**
|
|
1414
1331
|
* AI Code Gate (basic).
|
|
@@ -1585,68 +1502,11 @@ interface IntentCreator<Name extends IntentName, Payload = unknown> {
|
|
|
1585
1502
|
}
|
|
1586
1503
|
|
|
1587
1504
|
/**
|
|
1588
|
-
*
|
|
1505
|
+
* Basic AI Code Gate implementation.
|
|
1589
1506
|
*
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
interface ArchitectureLayer {
|
|
1595
|
-
name: string;
|
|
1596
|
-
prefixes: string[];
|
|
1597
|
-
/**
|
|
1598
|
-
* Custom matcher for teams whose intent names don't follow prefix conventions.
|
|
1599
|
-
* Checked before any prefix matching, in layer declaration order. A layer may
|
|
1600
|
-
* use `match` alone (with `prefixes: []`), prefixes alone, or both.
|
|
1601
|
-
*/
|
|
1602
|
-
match?: (name: string) => boolean;
|
|
1603
|
-
description?: string;
|
|
1604
|
-
trustBoundary?: 'public' | 'auth' | 'admin' | 'internal';
|
|
1605
|
-
owners?: string[];
|
|
1606
|
-
order?: number;
|
|
1607
|
-
}
|
|
1608
|
-
type ArchitectureRule = ArkConfigRule;
|
|
1609
|
-
interface ArchitectureProfile {
|
|
1610
|
-
name: string;
|
|
1611
|
-
layers: ArchitectureLayer[];
|
|
1612
|
-
rules: ArchitectureRule[];
|
|
1613
|
-
resolveLayer(name: string): string | undefined;
|
|
1614
|
-
}
|
|
1615
|
-
interface CreateArchitectureProfileOptions {
|
|
1616
|
-
name: string;
|
|
1617
|
-
layers: ArchitectureLayer[];
|
|
1618
|
-
rules?: ArchitectureRule[];
|
|
1619
|
-
}
|
|
1620
|
-
interface CreateArchitectureProfileFromArkConfigOptions {
|
|
1621
|
-
/** Runtime profile name. Default: config.name or "ark.config.json". */
|
|
1622
|
-
name?: string;
|
|
1623
|
-
}
|
|
1624
|
-
type ArchitectureLayerConfig = ArkConfigLayer;
|
|
1625
|
-
type ArkCheckConfig = Omit<ArkConfig, '$schema' | 'schemaVersion' | 'rules'> & {
|
|
1626
|
-
$schema?: string;
|
|
1627
|
-
schemaVersion?: ArkConfig['schemaVersion'];
|
|
1628
|
-
rules?: ArchitectureRule[];
|
|
1629
|
-
};
|
|
1630
|
-
interface CreateElevenLayerArkConfigOptions {
|
|
1631
|
-
/** Source root used in generated file patterns. Default: "src". */
|
|
1632
|
-
rootDir?: string;
|
|
1633
|
-
/** Include entries for ark-check. Default: [rootDir]. */
|
|
1634
|
-
include?: string[];
|
|
1635
|
-
/** Mark generated layers optional. Default: true. */
|
|
1636
|
-
optionalLayers?: boolean;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
declare function createArchitectureProfile(options: CreateArchitectureProfileOptions): ArchitectureProfile;
|
|
1640
|
-
declare function createArchitectureProfileFromArkConfig(config: ArkCheckConfig, options?: CreateArchitectureProfileFromArkConfigOptions): ArchitectureProfile;
|
|
1641
|
-
declare const elevenLayerProfile: ArchitectureProfile;
|
|
1642
|
-
declare function createElevenLayerArkConfig(options?: CreateElevenLayerArkConfigOptions): ArkCheckConfig;
|
|
1643
|
-
|
|
1644
|
-
/**
|
|
1645
|
-
* Basic AI Code Gate implementation.
|
|
1646
|
-
*
|
|
1647
|
-
* Uses simple string heuristics + registered intent names to detect obvious
|
|
1648
|
-
* architectural violations in generated code (e.g. direct infra imports from domain).
|
|
1649
|
-
* Not a full static analyzer — documented limitation.
|
|
1507
|
+
* Uses simple string heuristics + registered intent names to detect obvious
|
|
1508
|
+
* architectural violations in generated code (e.g. direct infra imports from domain).
|
|
1509
|
+
* Not a full static analyzer — documented limitation.
|
|
1650
1510
|
*/
|
|
1651
1511
|
|
|
1652
1512
|
interface AICodeGatePolicyContext<Context = AICodeGateContext> {
|
|
@@ -2939,6 +2799,30 @@ type LayerFlowConfigShape = {
|
|
|
2939
2799
|
}[];
|
|
2940
2800
|
};
|
|
2941
2801
|
|
|
2802
|
+
/** Priority order: guard-family operators first, constants last. */
|
|
2803
|
+
declare const INVARIANT_PROBE_OPERATORS: readonly ["negate-guard", "drop-throw", "flip-comparison", "boundary-shift", "const-shift"];
|
|
2804
|
+
type ProbeOperator = (typeof INVARIANT_PROBE_OPERATORS)[number];
|
|
2805
|
+
declare const INVARIANT_PROBE_VERDICTS: readonly ["killed", "survived", "not-reached", "inconclusive", "unprobeable"];
|
|
2806
|
+
type ProbeVerdict = (typeof INVARIANT_PROBE_VERDICTS)[number];
|
|
2807
|
+
declare const INVARIANT_PROBE_REASONS: readonly ["all-killed", "mutant-survived", "reach-canary-survived", "baseline-red", "baseline-timeout", "runner-error", "file-not-loaded", "mutant-runtime-error", "no-symbol", "declaration-only", "symbol-not-found", "no-covering-test", "no-site"];
|
|
2808
|
+
type ProbeReason = (typeof INVARIANT_PROBE_REASONS)[number];
|
|
2809
|
+
/** What promotion and status read from one row. */
|
|
2810
|
+
type InvariantProbeSummary = {
|
|
2811
|
+
verdict: ProbeVerdict;
|
|
2812
|
+
reason: ProbeReason;
|
|
2813
|
+
/** False when a hashed input changed since the run; a stale row changes nothing. */
|
|
2814
|
+
fresh: boolean;
|
|
2815
|
+
survivors: Array<{
|
|
2816
|
+
operator: ProbeOperator;
|
|
2817
|
+
line: number;
|
|
2818
|
+
original: string;
|
|
2819
|
+
replacement: string;
|
|
2820
|
+
}>;
|
|
2821
|
+
staleBecause?: string[];
|
|
2822
|
+
symbolFile?: string;
|
|
2823
|
+
probedOn?: string;
|
|
2824
|
+
};
|
|
2825
|
+
|
|
2942
2826
|
/**
|
|
2943
2827
|
* Pure invariant coverage evidence (ADR 0014 / AR09–AR10).
|
|
2944
2828
|
*
|
|
@@ -3038,6 +2922,13 @@ type InvariantCoverageEvidence = {
|
|
|
3038
2922
|
* so existing promote fixtures stay valid; the evaluator always sets it.
|
|
3039
2923
|
*/
|
|
3040
2924
|
coverageRootsDeclared?: boolean;
|
|
2925
|
+
/**
|
|
2926
|
+
* Committed mutation-probe evidence for this invariant (ADR 0039), attached
|
|
2927
|
+
* by Tooling when `.ark/invariant-probe.json` has a row. Additive: absent on
|
|
2928
|
+
* every evaluation that has no artifact. Only a fresh `survived` /
|
|
2929
|
+
* `not-reached` changes promotion; every other state changes nothing.
|
|
2930
|
+
*/
|
|
2931
|
+
probe?: InvariantProbeSummary;
|
|
3041
2932
|
};
|
|
3042
2933
|
type InvariantUncoveredKind = 'never-had-tests' | 'tests-disappeared';
|
|
3043
2934
|
type InvariantCoverageRuleId = 'INVARIANT_UNCOVERED' | 'INVARIANT_COVERAGE_OUTSIDE_ROOTS';
|
|
@@ -3145,6 +3036,7 @@ declare function evaluateInvariantCoverage(input: EvaluateInvariantCoverageInput
|
|
|
3145
3036
|
declare function canPromoteInvariant(coverage: InvariantCoverageEvidence | undefined): {
|
|
3146
3037
|
ok: boolean;
|
|
3147
3038
|
reason: string;
|
|
3039
|
+
blocker?: 'probe-survived';
|
|
3148
3040
|
};
|
|
3149
3041
|
|
|
3150
3042
|
/**
|
|
@@ -3674,120 +3566,472 @@ declare function preflightResolvedChange(input: PreflightResolvedChangeInput): R
|
|
|
3674
3566
|
declare function collectAnalysisConfigWarnings(input: CollectAnalysisConfigWarningsInput): ArchitectureEngineViolation[];
|
|
3675
3567
|
|
|
3676
3568
|
/**
|
|
3677
|
-
*
|
|
3569
|
+
* Public diagnostic code catalog (ACS02).
|
|
3678
3570
|
*
|
|
3679
|
-
*
|
|
3680
|
-
*
|
|
3681
|
-
*
|
|
3571
|
+
* Closed vocabulary of stable `ruleId` values emitted by ArkGate adapters with
|
|
3572
|
+
* human/agent `why` / `fix` anchors and docs fragment ids. Cataloguing only —
|
|
3573
|
+
* no new rule semantics, no LLM verdict, no enforcement from prose.
|
|
3574
|
+
*
|
|
3575
|
+
* **Canonical** for docs, agent projection (ACS04), and finding refs (ACS06).
|
|
3576
|
+
* Runtime remediation remains in `remediation.ts`; parity tests bind the two.
|
|
3577
|
+
*
|
|
3578
|
+
* Zero Node I/O. Optional CLI surface: generated `bin/lib/diagnostic-catalog.mjs`.
|
|
3579
|
+
*
|
|
3580
|
+
* @see docs/diagnostics.md
|
|
3581
|
+
* @see docs/plans/agent-contract-surface-4.3/README.md
|
|
3682
3582
|
*/
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
type ResolveEffectiveContractInput = {
|
|
3696
|
-
config: ArkConfig;
|
|
3583
|
+
/** Product-relative docs path (shipped in the npm tarball when listed in package files). */
|
|
3584
|
+
declare const DIAGNOSTIC_DOCS_RELATIVE_PATH: "docs/diagnostics.md";
|
|
3585
|
+
/** Schema id for serializing the catalog snapshot (agents / install projection). */
|
|
3586
|
+
declare const DIAGNOSTIC_CATALOG_SCHEMA_VERSION: "1.0";
|
|
3587
|
+
type DiagnosticCategory = 'layer' | 'capability' | 'publish' | 'safety' | 'arkrules' | 'arkrun' | 'arkorder' | 'preflight' | 'analysis' | 'drift' | 'snippet-policy' | 'config' | 'adapter' | 'meta';
|
|
3588
|
+
type DiagnosticCatalogEntry = {
|
|
3589
|
+
/** Stable public violation / diagnostic id. */
|
|
3590
|
+
ruleId: string;
|
|
3591
|
+
/** Short title for indexes and agent projection. */
|
|
3592
|
+
title: string;
|
|
3593
|
+
/** Why this finding exists (contract intent). */
|
|
3594
|
+
why: string;
|
|
3697
3595
|
/**
|
|
3698
|
-
*
|
|
3699
|
-
*
|
|
3596
|
+
* Canonical fix guidance (agent + human). Contextual nextAction on live
|
|
3597
|
+
* findings may specialize this (e.g. type-only vs value layer import).
|
|
3700
3598
|
*/
|
|
3701
|
-
|
|
3599
|
+
fix: string;
|
|
3600
|
+
/** Markdown fragment id for docs/diagnostics.md (without leading #). */
|
|
3601
|
+
docsAnchor: string;
|
|
3602
|
+
category: DiagnosticCategory;
|
|
3702
3603
|
/**
|
|
3703
|
-
*
|
|
3704
|
-
*
|
|
3604
|
+
* When true, finding is commonly advisory / non-blocking in default profiles
|
|
3605
|
+
* (doctor/config warnings, type-only placement debt, empty ArkRule scope).
|
|
3606
|
+
* Not a severity bit for the engine — documentation only.
|
|
3705
3607
|
*/
|
|
3706
|
-
|
|
3608
|
+
oftenAdvisory?: boolean;
|
|
3707
3609
|
};
|
|
3708
|
-
declare class EffectiveContractError extends Error {
|
|
3709
|
-
readonly issues: ArkConfigIssue[];
|
|
3710
|
-
readonly source: string;
|
|
3711
|
-
constructor(source: string, issues: ArkConfigIssue[]);
|
|
3712
|
-
}
|
|
3713
3610
|
/**
|
|
3714
|
-
*
|
|
3715
|
-
*
|
|
3611
|
+
* Closed public catalog. Order is stable (category groups, then ruleId) for
|
|
3612
|
+
* deterministic serialization and docs generation.
|
|
3613
|
+
*
|
|
3614
|
+
* Every production-emitted `ruleId` must appear here. Remediation switch cases
|
|
3615
|
+
* and adapter nextAction branches are parity-tested against this list.
|
|
3716
3616
|
*/
|
|
3717
|
-
declare
|
|
3617
|
+
declare const DIAGNOSTIC_CATALOG: readonly DiagnosticCatalogEntry[];
|
|
3618
|
+
/** All public ruleIds in catalog order. */
|
|
3619
|
+
declare const DIAGNOSTIC_RULE_IDS: readonly string[];
|
|
3620
|
+
declare function isKnownDiagnosticCode(ruleId: string | null | undefined): boolean;
|
|
3718
3621
|
/**
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
3722
|
-
* `layers[].owners` are metadata — not import-rule teeth.
|
|
3723
|
-
* `requireLayerOwners` stays in the hash (it is the require switch).
|
|
3622
|
+
* True when the code is catalogued or is an ArkRule-family id handled by the
|
|
3623
|
+
* ARKRULE_* prefix fallback in remediation (structure sensors may add members later
|
|
3624
|
+
* only via catalog + ROADMAP — prefix alone is not a license for free-form ids).
|
|
3724
3625
|
*/
|
|
3725
|
-
declare function
|
|
3726
|
-
|
|
3626
|
+
declare function isCataloguedOrArkRuleFamily(ruleId: string | null | undefined): boolean;
|
|
3627
|
+
declare function getDiagnosticCatalogEntry(ruleId: string | null | undefined): DiagnosticCatalogEntry | undefined;
|
|
3628
|
+
/** Fragment for docs links, e.g. `#LAYER_IMPORT_VIOLATION`. */
|
|
3629
|
+
declare function diagnosticDocsFragment(ruleId: string): string;
|
|
3727
3630
|
/**
|
|
3728
|
-
*
|
|
3729
|
-
*
|
|
3730
|
-
* Syntax evidence only — no verdicts, scores, or sensors. Tooling may replace
|
|
3731
|
-
* this lexical pass with TypeScript-API facts of the same shape.
|
|
3631
|
+
* Repo-relative docs path with fragment (for agents and JSON).
|
|
3632
|
+
* Package consumers resolve against the installed package root or GitHub tree.
|
|
3732
3633
|
*/
|
|
3733
|
-
|
|
3734
|
-
/**
|
|
3735
|
-
declare
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3634
|
+
declare function diagnosticDocsPath(ruleId: string): string;
|
|
3635
|
+
/** Catalog snapshot for JSON export / agent projection (stable field order). */
|
|
3636
|
+
declare function serializeDiagnosticCatalog(): {
|
|
3637
|
+
schemaVersion: typeof DIAGNOSTIC_CATALOG_SCHEMA_VERSION;
|
|
3638
|
+
docsPath: typeof DIAGNOSTIC_DOCS_RELATIVE_PATH;
|
|
3639
|
+
codes: readonly DiagnosticCatalogEntry[];
|
|
3640
|
+
};
|
|
3739
3641
|
/**
|
|
3740
|
-
*
|
|
3741
|
-
*
|
|
3642
|
+
* Static catalog fix for a ruleId when no live violation context is available.
|
|
3643
|
+
* Live adapters should still use deterministicNextAction for specialized edges.
|
|
3742
3644
|
*/
|
|
3743
|
-
declare
|
|
3744
|
-
declare function isArkRunTransportBypassSpecifier(specifier: string): boolean;
|
|
3745
|
-
declare function arkRunKernelCallKind(callee: string): ResolvedArkRunKernelCallKind | undefined;
|
|
3645
|
+
declare function catalogFixForRuleId(ruleId: string | null | undefined): string | undefined;
|
|
3746
3646
|
/**
|
|
3747
|
-
*
|
|
3748
|
-
* editor / snippet envelope. Resolution stays unresolved-external — sensors
|
|
3749
|
-
* only need the specifier and from-file.
|
|
3647
|
+
* Static catalog why for a ruleId (agent “why” surface).
|
|
3750
3648
|
*/
|
|
3751
|
-
declare function
|
|
3752
|
-
/** PascalCase named bindings from value import clauses (snippet admitted constructors). */
|
|
3753
|
-
declare function extractArkRunImportedConstructorNamesFromSource(content: string): string[];
|
|
3754
|
-
type ExtractArkRunKernelCallsOptions = {
|
|
3755
|
-
/**
|
|
3756
|
-
* Relative specifiers that resolve to a kernel/composition root module
|
|
3757
|
-
* (see {@link createArkRunKernelRootSpecifierMatcher}); identifiers imported
|
|
3758
|
-
* from them are traced as kernel receivers.
|
|
3759
|
-
*/
|
|
3760
|
-
isKernelRootSpecifier?: (specifier: string) => boolean;
|
|
3761
|
-
/**
|
|
3762
|
-
* The project's effective intent prefixes (configured `layers[].intentPrefixes`
|
|
3763
|
-
* plus the canonical defaults — {@link arkRunEffectiveIntentPrefixes}). An
|
|
3764
|
-
* untraced receiver counts as a kernel call when its name literal carries one.
|
|
3765
|
-
* Omitted: only the canonical prefixes count.
|
|
3766
|
-
*/
|
|
3767
|
-
intentPrefixes?: readonly string[];
|
|
3768
|
-
};
|
|
3769
|
-
declare function extractArkRunKernelCallsFromSource(file: string, content: string, options?: ExtractArkRunKernelCallsOptions): ResolvedArkRunKernelCallFact[];
|
|
3770
|
-
declare function extractArkRunManagedNewsFromSource(file: string, content: string, admittedTypeNames: ReadonlySet<string>): ResolvedArkRunManagedNewFact[];
|
|
3771
|
-
/** File-scoped `uses` / `reactsTo` / `raises` / `sends` string-literal lists (ADR 0023). */
|
|
3772
|
-
declare function extractArkRunDeclarationsFromSource(file: string, content: string): ResolvedArkRunDeclarationFact[];
|
|
3649
|
+
declare function catalogWhyForRuleId(ruleId: string | null | undefined): string | undefined;
|
|
3773
3650
|
|
|
3651
|
+
/** Public, evidence-backed enforcement state shared by doctor adapters. */
|
|
3652
|
+
declare const ARK_ENFORCEMENT_STATE_SCHEMA_VERSION: "1.1";
|
|
3653
|
+
type EnforcementVerification = boolean | 'unverified';
|
|
3654
|
+
type EnforcementEvidenceField = 'configured' | 'installed' | 'active' | 'runtimeObserved' | 'operationCoverage' | 'bypassable' | 'required' | 'hard';
|
|
3655
|
+
type EnforcementEvidence = {
|
|
3656
|
+
field: 'configured' | 'installed' | 'runtimeObserved' | 'hard';
|
|
3657
|
+
source: string;
|
|
3658
|
+
value: boolean;
|
|
3659
|
+
} | {
|
|
3660
|
+
field: 'active' | 'operationCoverage' | 'bypassable' | 'required';
|
|
3661
|
+
source: string;
|
|
3662
|
+
value: EnforcementVerification;
|
|
3663
|
+
};
|
|
3774
3664
|
/**
|
|
3775
|
-
*
|
|
3665
|
+
* State for one enforcement boundary.
|
|
3776
3666
|
*
|
|
3777
|
-
*
|
|
3778
|
-
*
|
|
3667
|
+
* `configured` records valid wiring, while `installed` requires the referenced
|
|
3668
|
+
* package or executable to resolve. Runtime/provider facts remain
|
|
3669
|
+
* `unverified` until observed; local files never prove `required: true`.
|
|
3779
3670
|
*/
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3671
|
+
type EnforcementBoundaryState = {
|
|
3672
|
+
supported: boolean;
|
|
3673
|
+
analyzed: boolean;
|
|
3674
|
+
configured: boolean;
|
|
3675
|
+
installed: boolean;
|
|
3676
|
+
active: EnforcementVerification;
|
|
3677
|
+
runtimeObserved: boolean;
|
|
3678
|
+
operation: string | null;
|
|
3679
|
+
operationCoverage: EnforcementVerification;
|
|
3680
|
+
bypassable: EnforcementVerification;
|
|
3681
|
+
required: EnforcementVerification;
|
|
3682
|
+
hard: boolean;
|
|
3683
|
+
evidence: readonly EnforcementEvidence[];
|
|
3784
3684
|
};
|
|
3785
|
-
type
|
|
3786
|
-
|
|
3685
|
+
type ArkEnforcementHost = 'claude' | 'grok' | 'cursor' | 'codex' | 'unknown';
|
|
3686
|
+
type ArkEnforcementState = {
|
|
3687
|
+
schemaVersion: typeof ARK_ENFORCEMENT_STATE_SCHEMA_VERSION;
|
|
3688
|
+
activeHost: ArkEnforcementHost;
|
|
3689
|
+
localWrite: EnforcementBoundaryState;
|
|
3690
|
+
advisoryMcp: EnforcementBoundaryState;
|
|
3691
|
+
ciMerge: EnforcementBoundaryState;
|
|
3787
3692
|
};
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
declare
|
|
3693
|
+
|
|
3694
|
+
/** Public neutral contract for the opt-in new-code design-fitness ratchet. */
|
|
3695
|
+
declare const ARK_DESIGN_DELTA_SCHEMA_VERSION: "1.0";
|
|
3696
|
+
type DesignSmellId = 'io-under-application' | 'handler-in-persistence' | 'god-module' | 'domain-logic-in-ui' | 'facade-sql-in-routes' | 'mixed-pattern-cluster' | 'soft-contract';
|
|
3697
|
+
type DesignDeltaIdentity = {
|
|
3698
|
+
kind: 'git-tree' | 'candidate-tree';
|
|
3699
|
+
value: string;
|
|
3700
|
+
commit?: string;
|
|
3701
|
+
};
|
|
3702
|
+
type DesignSmellEvidence = {
|
|
3703
|
+
kind: string;
|
|
3704
|
+
path: string;
|
|
3705
|
+
line?: number;
|
|
3706
|
+
symbol?: string;
|
|
3707
|
+
detail?: string;
|
|
3708
|
+
magnitude: number;
|
|
3709
|
+
};
|
|
3710
|
+
type DesignSmellFinding = {
|
|
3711
|
+
smellId: DesignSmellId;
|
|
3712
|
+
fingerprint: string;
|
|
3713
|
+
identity: string;
|
|
3714
|
+
evidence: DesignSmellEvidence;
|
|
3715
|
+
repairHint: string;
|
|
3716
|
+
};
|
|
3717
|
+
type DesignDeltaChange = DesignSmellFinding & {
|
|
3718
|
+
classification: 'new' | 'worsened';
|
|
3719
|
+
baseMagnitude: number;
|
|
3720
|
+
candidateMagnitude: number;
|
|
3721
|
+
};
|
|
3722
|
+
/** Created-path merge vs full new+worsened ratchet (Z10). Omitted on older producers. */
|
|
3723
|
+
type DesignDeltaEnforcementScope = 'created-paths' | 'touched-new-or-worsened';
|
|
3724
|
+
type ArkDesignDeltaResult = {
|
|
3725
|
+
schemaVersion: typeof ARK_DESIGN_DELTA_SCHEMA_VERSION;
|
|
3726
|
+
mode: 'git-base' | 'write-candidate';
|
|
3727
|
+
complete: boolean;
|
|
3728
|
+
valid: boolean;
|
|
3729
|
+
base: DesignDeltaIdentity;
|
|
3730
|
+
candidate: DesignDeltaIdentity;
|
|
3731
|
+
supportedSmellIds: readonly DesignSmellId[];
|
|
3732
|
+
touchedPaths: readonly string[];
|
|
3733
|
+
changes: readonly DesignDeltaChange[];
|
|
3734
|
+
baseFindingCount: number;
|
|
3735
|
+
candidateFindingCount: number;
|
|
3736
|
+
historicalResidualCount: number;
|
|
3737
|
+
enforcementScope?: DesignDeltaEnforcementScope;
|
|
3738
|
+
error?: string;
|
|
3739
|
+
};
|
|
3740
|
+
|
|
3741
|
+
/**
|
|
3742
|
+
* Canonical, pure contract for ArkGate MCP project identity.
|
|
3743
|
+
*
|
|
3744
|
+
* Filesystem canonicalization, hashing, clocks, and runtime ids belong to the
|
|
3745
|
+
* Tooling adapter. This module owns the stable payload and published schemas so
|
|
3746
|
+
* every MCP surface speaks the same identity/binding language.
|
|
3747
|
+
*/
|
|
3748
|
+
declare const ARK_PROJECT_IDENTITY_SCHEMA_VERSION: "1.0";
|
|
3749
|
+
declare const ARK_PROJECT_IDENTITY_SCHEMA_URL = "https://unpkg.com/arkgate@4/schemas/ark.project-identity.schema.json";
|
|
3750
|
+
type ProjectIdentity = {
|
|
3751
|
+
schemaVersion: typeof ARK_PROJECT_IDENTITY_SCHEMA_VERSION;
|
|
3752
|
+
projectId: string;
|
|
3753
|
+
resolvedRoot: string;
|
|
3754
|
+
resolvedConfigPath: string;
|
|
3755
|
+
arkgateVersion: string;
|
|
3756
|
+
contractHash: string;
|
|
3757
|
+
contractSource: 'project' | 'default-profile' | 'manifest';
|
|
3758
|
+
runtimeId: string;
|
|
3759
|
+
processStartedAt: string;
|
|
3760
|
+
};
|
|
3761
|
+
type ProjectExpectation = {
|
|
3762
|
+
expectedRoot?: string;
|
|
3763
|
+
expectedProjectId?: string;
|
|
3764
|
+
};
|
|
3765
|
+
type ProjectBinding = {
|
|
3766
|
+
status: 'matched' | 'unverified' | 'mismatch';
|
|
3767
|
+
authoritative: boolean;
|
|
3768
|
+
expectedRoot?: string;
|
|
3769
|
+
expectedProjectId?: string;
|
|
3770
|
+
code?: 'PROJECT_ROOT_MISMATCH' | 'PROJECT_ID_MISMATCH' | 'INVALID_PROJECT_EXPECTATION';
|
|
3771
|
+
message?: string;
|
|
3772
|
+
};
|
|
3773
|
+
declare const PROJECT_EXPECTATION_SCHEMA: {
|
|
3774
|
+
readonly type: "object";
|
|
3775
|
+
readonly additionalProperties: false;
|
|
3776
|
+
readonly properties: {
|
|
3777
|
+
readonly expectedRoot: {
|
|
3778
|
+
readonly type: "string";
|
|
3779
|
+
readonly minLength: 1;
|
|
3780
|
+
readonly description: string;
|
|
3781
|
+
};
|
|
3782
|
+
readonly expectedProjectId: {
|
|
3783
|
+
readonly type: "string";
|
|
3784
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3785
|
+
readonly description: "Project id previously returned by ark_identity or ark_manifest.";
|
|
3786
|
+
};
|
|
3787
|
+
};
|
|
3788
|
+
};
|
|
3789
|
+
declare const PROJECT_BINDING_SCHEMA: {
|
|
3790
|
+
readonly type: "object";
|
|
3791
|
+
readonly additionalProperties: false;
|
|
3792
|
+
readonly required: readonly ["status", "authoritative"];
|
|
3793
|
+
readonly properties: {
|
|
3794
|
+
readonly status: {
|
|
3795
|
+
readonly enum: readonly ["matched", "unverified", "mismatch"];
|
|
3796
|
+
};
|
|
3797
|
+
readonly authoritative: {
|
|
3798
|
+
readonly type: "boolean";
|
|
3799
|
+
};
|
|
3800
|
+
readonly expectedRoot: {
|
|
3801
|
+
readonly type: "string";
|
|
3802
|
+
readonly minLength: 1;
|
|
3803
|
+
};
|
|
3804
|
+
readonly expectedProjectId: {
|
|
3805
|
+
readonly type: "string";
|
|
3806
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3807
|
+
};
|
|
3808
|
+
readonly code: {
|
|
3809
|
+
readonly enum: readonly ["PROJECT_ROOT_MISMATCH", "PROJECT_ID_MISMATCH", "INVALID_PROJECT_EXPECTATION"];
|
|
3810
|
+
};
|
|
3811
|
+
readonly message: {
|
|
3812
|
+
readonly type: "string";
|
|
3813
|
+
readonly minLength: 1;
|
|
3814
|
+
};
|
|
3815
|
+
};
|
|
3816
|
+
};
|
|
3817
|
+
declare const ARK_PROJECT_IDENTITY_SCHEMA: {
|
|
3818
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3819
|
+
readonly $id: "https://unpkg.com/arkgate@4/schemas/ark.project-identity.schema.json";
|
|
3820
|
+
readonly title: "ArkGate MCP project identity";
|
|
3821
|
+
readonly description: "Stable project binding plus separate runtime and architecture-contract evidence.";
|
|
3822
|
+
readonly type: "object";
|
|
3823
|
+
readonly additionalProperties: false;
|
|
3824
|
+
readonly required: readonly ["schemaVersion", "projectId", "resolvedRoot", "resolvedConfigPath", "arkgateVersion", "contractHash", "contractSource", "runtimeId", "processStartedAt"];
|
|
3825
|
+
readonly properties: {
|
|
3826
|
+
readonly schemaVersion: {
|
|
3827
|
+
readonly const: "1.0";
|
|
3828
|
+
};
|
|
3829
|
+
readonly projectId: {
|
|
3830
|
+
readonly type: "string";
|
|
3831
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3832
|
+
};
|
|
3833
|
+
readonly resolvedRoot: {
|
|
3834
|
+
readonly type: "string";
|
|
3835
|
+
readonly minLength: 1;
|
|
3836
|
+
};
|
|
3837
|
+
readonly resolvedConfigPath: {
|
|
3838
|
+
readonly type: "string";
|
|
3839
|
+
readonly minLength: 1;
|
|
3840
|
+
};
|
|
3841
|
+
readonly arkgateVersion: {
|
|
3842
|
+
readonly type: "string";
|
|
3843
|
+
readonly minLength: 1;
|
|
3844
|
+
};
|
|
3845
|
+
readonly contractHash: {
|
|
3846
|
+
readonly type: "string";
|
|
3847
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3848
|
+
};
|
|
3849
|
+
readonly contractSource: {
|
|
3850
|
+
readonly enum: readonly ["project", "default-profile", "manifest"];
|
|
3851
|
+
};
|
|
3852
|
+
readonly runtimeId: {
|
|
3853
|
+
readonly type: "string";
|
|
3854
|
+
readonly minLength: 1;
|
|
3855
|
+
};
|
|
3856
|
+
readonly processStartedAt: {
|
|
3857
|
+
readonly type: "string";
|
|
3858
|
+
readonly format: "date-time";
|
|
3859
|
+
};
|
|
3860
|
+
};
|
|
3861
|
+
readonly $defs: {
|
|
3862
|
+
readonly expectation: {
|
|
3863
|
+
readonly type: "object";
|
|
3864
|
+
readonly additionalProperties: false;
|
|
3865
|
+
readonly properties: {
|
|
3866
|
+
readonly expectedRoot: {
|
|
3867
|
+
readonly type: "string";
|
|
3868
|
+
readonly minLength: 1;
|
|
3869
|
+
readonly description: string;
|
|
3870
|
+
};
|
|
3871
|
+
readonly expectedProjectId: {
|
|
3872
|
+
readonly type: "string";
|
|
3873
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3874
|
+
readonly description: "Project id previously returned by ark_identity or ark_manifest.";
|
|
3875
|
+
};
|
|
3876
|
+
};
|
|
3877
|
+
};
|
|
3878
|
+
readonly binding: {
|
|
3879
|
+
readonly type: "object";
|
|
3880
|
+
readonly additionalProperties: false;
|
|
3881
|
+
readonly required: readonly ["status", "authoritative"];
|
|
3882
|
+
readonly properties: {
|
|
3883
|
+
readonly status: {
|
|
3884
|
+
readonly enum: readonly ["matched", "unverified", "mismatch"];
|
|
3885
|
+
};
|
|
3886
|
+
readonly authoritative: {
|
|
3887
|
+
readonly type: "boolean";
|
|
3888
|
+
};
|
|
3889
|
+
readonly expectedRoot: {
|
|
3890
|
+
readonly type: "string";
|
|
3891
|
+
readonly minLength: 1;
|
|
3892
|
+
};
|
|
3893
|
+
readonly expectedProjectId: {
|
|
3894
|
+
readonly type: "string";
|
|
3895
|
+
readonly pattern: "^sha256:[a-f0-9]{64}$";
|
|
3896
|
+
};
|
|
3897
|
+
readonly code: {
|
|
3898
|
+
readonly enum: readonly ["PROJECT_ROOT_MISMATCH", "PROJECT_ID_MISMATCH", "INVALID_PROJECT_EXPECTATION"];
|
|
3899
|
+
};
|
|
3900
|
+
readonly message: {
|
|
3901
|
+
readonly type: "string";
|
|
3902
|
+
readonly minLength: 1;
|
|
3903
|
+
};
|
|
3904
|
+
};
|
|
3905
|
+
};
|
|
3906
|
+
};
|
|
3907
|
+
};
|
|
3908
|
+
/**
|
|
3909
|
+
* Stable identity: contract edits and MCP restarts must not change which project
|
|
3910
|
+
* this is. Callers must pass canonical real paths and a SHA-256 hex function.
|
|
3911
|
+
*/
|
|
3912
|
+
declare function createProjectId(resolvedRoot: string, resolvedConfigPath: string, sha256Hex: (value: string) => string): string;
|
|
3913
|
+
declare function createProjectIdentity(input: Omit<ProjectIdentity, 'schemaVersion'>): ProjectIdentity;
|
|
3914
|
+
|
|
3915
|
+
/**
|
|
3916
|
+
* Pure Effective Contract composition (ADR 0012).
|
|
3917
|
+
*
|
|
3918
|
+
* Resolves `arkRules` references against a supplied file-content map (Tooling owns I/O),
|
|
3919
|
+
* validates each part, and returns one in-memory contract with per-rule provenance.
|
|
3920
|
+
* The serialized effective rules feed policyHash via the analysis contract loader.
|
|
3921
|
+
*/
|
|
3922
|
+
|
|
3923
|
+
type EffectiveContractWarning = {
|
|
3924
|
+
path: string;
|
|
3925
|
+
message: string;
|
|
3926
|
+
/** advisory | error — errors fail closed; warnings surface drift (unreferenced files). */
|
|
3927
|
+
severity: 'advisory' | 'error';
|
|
3928
|
+
};
|
|
3929
|
+
type EffectiveContract = {
|
|
3930
|
+
config: ArkConfig;
|
|
3931
|
+
arkRules: EffectiveArkRules;
|
|
3932
|
+
warnings: EffectiveContractWarning[];
|
|
3933
|
+
};
|
|
3934
|
+
type ResolveEffectiveContractInput = {
|
|
3935
|
+
config: ArkConfig;
|
|
3936
|
+
/**
|
|
3937
|
+
* Project-relative path → file contents. Missing keys mean the file is absent.
|
|
3938
|
+
* Paths must use forward slashes and match the arkRules map values exactly.
|
|
3939
|
+
*/
|
|
3940
|
+
fileContents: Readonly<Record<string, string>>;
|
|
3941
|
+
/**
|
|
3942
|
+
* Optional inventory of files under arkrules/ (or other dirs) used only to
|
|
3943
|
+
* detect unreferenced ArkRules files (advisory drift).
|
|
3944
|
+
*/
|
|
3945
|
+
discoveredArkRulesFiles?: readonly string[];
|
|
3946
|
+
/**
|
|
3947
|
+
* Governed project-relative paths. The child wall names slice rule files from
|
|
3948
|
+
* this index. Absence keeps central `arkRules` only.
|
|
3949
|
+
*/
|
|
3950
|
+
governedFiles?: readonly string[];
|
|
3951
|
+
};
|
|
3952
|
+
declare class EffectiveContractError extends Error {
|
|
3953
|
+
readonly issues: ArkConfigIssue[];
|
|
3954
|
+
readonly source: string;
|
|
3955
|
+
constructor(source: string, issues: ArkConfigIssue[]);
|
|
3956
|
+
}
|
|
3957
|
+
/**
|
|
3958
|
+
* Resolve arkRules references into a single Effective Contract.
|
|
3959
|
+
* Fail-closed for missing, unparsable, or schema-invalid referenced files.
|
|
3960
|
+
*/
|
|
3961
|
+
declare function resolveEffectiveContract(input: ResolveEffectiveContractInput, source?: string): EffectiveContract;
|
|
3962
|
+
/**
|
|
3963
|
+
* Canonical payload for policyHash: root config + sorted effective ArkRules.
|
|
3964
|
+
* Absence of arkRules yields the same payload shape with empty structure/invariants.
|
|
3965
|
+
* `stewards`, `layers[].description`, `layers[].trustBoundary`, and
|
|
3966
|
+
* `layers[].owners` are metadata — not import-rule teeth.
|
|
3967
|
+
* `requireLayerOwners` stays in the hash (it is the require switch).
|
|
3968
|
+
*/
|
|
3969
|
+
declare function effectiveContractPolicyPayload(contract: EffectiveContract): unknown;
|
|
3970
|
+
|
|
3971
|
+
/**
|
|
3972
|
+
* ArkRun resolver-fact extraction (ADR 0022 / RN03).
|
|
3973
|
+
*
|
|
3974
|
+
* Syntax evidence only — no verdicts, scores, or sensors. Tooling may replace
|
|
3975
|
+
* this lexical pass with TypeScript-API facts of the same shape.
|
|
3976
|
+
*/
|
|
3977
|
+
|
|
3978
|
+
/** Closed factory names from ADR 0022 `arkrun-missing-root`. */
|
|
3979
|
+
declare const ARKRUN_KERNEL_FACTORY_CALLEES: readonly ["createArkKernel", "createStrictArkKernel", "createLenientArkKernel", "createArkKernelFromConfig", "createStrictArkKernelFromConfig", "createLenientArkKernelFromConfig"];
|
|
3980
|
+
/** Closed interaction callees from ADR 0022 undeclared-emit/handle/depend. */
|
|
3981
|
+
declare const ARKRUN_KERNEL_INTERACTION_CALLEES: readonly ["publisher", "publish", "raise", "raiseAsync", "send", "sendTo", "subscribe", "registerHandler", "resolve", "resolveSingleton"];
|
|
3982
|
+
declare function isArkRunKernelModuleSpecifier(specifier: string): boolean;
|
|
3983
|
+
/**
|
|
3984
|
+
* Closed broker / queue / emitter specifiers for `arkrun-transport-bypass`
|
|
3985
|
+
* (ADR 0022 D4). Exact entry or package-root subpath only — never substring.
|
|
3986
|
+
*/
|
|
3987
|
+
declare const ARKRUN_TRANSPORT_BYPASS_SPECIFIERS: readonly ["events", "node:events", "eventemitter2", "eventemitter3", "emittery", "kafkajs", "kafka-node", "amqplib", "amqp", "bull", "bullmq", "mqtt", "nats", "@aws-sdk/client-sqs", "@aws-sdk/client-sns", "@aws-sdk/client-eventbridge", "@google-cloud/pubsub", "@azure/service-bus"];
|
|
3988
|
+
declare function isArkRunTransportBypassSpecifier(specifier: string): boolean;
|
|
3989
|
+
declare function arkRunKernelCallKind(callee: string): ResolvedArkRunKernelCallKind | undefined;
|
|
3990
|
+
/**
|
|
3991
|
+
* Lexical import/export-from and require/import() specifier edges for the
|
|
3992
|
+
* editor / snippet envelope. Resolution stays unresolved-external — sensors
|
|
3993
|
+
* only need the specifier and from-file.
|
|
3994
|
+
*/
|
|
3995
|
+
declare function extractArkRunValueImportDependenciesFromSource(file: string, content: string): ResolvedDependencyFact[];
|
|
3996
|
+
/** PascalCase named bindings from value import clauses (snippet admitted constructors). */
|
|
3997
|
+
declare function extractArkRunImportedConstructorNamesFromSource(content: string): string[];
|
|
3998
|
+
type ExtractArkRunKernelCallsOptions = {
|
|
3999
|
+
/**
|
|
4000
|
+
* Relative specifiers that resolve to a kernel/composition root module
|
|
4001
|
+
* (see {@link createArkRunKernelRootSpecifierMatcher}); identifiers imported
|
|
4002
|
+
* from them are traced as kernel receivers.
|
|
4003
|
+
*/
|
|
4004
|
+
isKernelRootSpecifier?: (specifier: string) => boolean;
|
|
4005
|
+
/**
|
|
4006
|
+
* The project's effective intent prefixes (configured `layers[].intentPrefixes`
|
|
4007
|
+
* plus the canonical defaults — {@link arkRunEffectiveIntentPrefixes}). An
|
|
4008
|
+
* untraced receiver counts as a kernel call when its name literal carries one.
|
|
4009
|
+
* Omitted: only the canonical prefixes count.
|
|
4010
|
+
*/
|
|
4011
|
+
intentPrefixes?: readonly string[];
|
|
4012
|
+
};
|
|
4013
|
+
declare function extractArkRunKernelCallsFromSource(file: string, content: string, options?: ExtractArkRunKernelCallsOptions): ResolvedArkRunKernelCallFact[];
|
|
4014
|
+
declare function extractArkRunManagedNewsFromSource(file: string, content: string, admittedTypeNames: ReadonlySet<string>): ResolvedArkRunManagedNewFact[];
|
|
4015
|
+
/** File-scoped `uses` / `reactsTo` / `raises` / `sends` string-literal lists (ADR 0023). */
|
|
4016
|
+
declare function extractArkRunDeclarationsFromSource(file: string, content: string): ResolvedArkRunDeclarationFact[];
|
|
4017
|
+
|
|
4018
|
+
/**
|
|
4019
|
+
* Extra-plane merge teeth (ArkRules + ArkRun + ArkOrder). Same classification floor.
|
|
4020
|
+
*
|
|
4021
|
+
* Unknown classification (contract-only callers) allows teeth. Known empty or
|
|
4022
|
+
* under-floor trees demote extra-plane findings so they never merge-block.
|
|
4023
|
+
*/
|
|
4024
|
+
declare const EXTRA_MERGE_TEETH_GOVERNED_FLOOR = 50;
|
|
4025
|
+
type ExtraMergeTeethClassification = {
|
|
4026
|
+
governedPercent?: number | null;
|
|
4027
|
+
populatedLayerCount?: number | null;
|
|
4028
|
+
};
|
|
4029
|
+
type ExtraMergeTeethClassificationInput = ExtraMergeTeethClassification & {
|
|
4030
|
+
classifiedFiles?: number | null;
|
|
4031
|
+
};
|
|
4032
|
+
declare function normalizeExtraMergeTeethClassification(classification?: ExtraMergeTeethClassificationInput | null): ExtraMergeTeethClassification;
|
|
4033
|
+
declare function extraMergeTeethAllowed(classification?: ExtraMergeTeethClassificationInput | null): boolean;
|
|
4034
|
+
declare function classifyResolvedLayerCoverage(files: readonly {
|
|
3791
4035
|
layer?: string | null | undefined;
|
|
3792
4036
|
}[]): ExtraMergeTeethClassification;
|
|
3793
4037
|
declare function isArkRunRuleId(ruleId: unknown): boolean;
|
|
@@ -3877,6 +4121,12 @@ type MergePlanesHonesty = {
|
|
|
3877
4121
|
allowsTeeth: boolean;
|
|
3878
4122
|
};
|
|
3879
4123
|
};
|
|
4124
|
+
type ExtraPlaneStatusInput = {
|
|
4125
|
+
present?: boolean;
|
|
4126
|
+
mode?: string | null;
|
|
4127
|
+
extraMergeTeeth?: boolean;
|
|
4128
|
+
residual?: number | null;
|
|
4129
|
+
};
|
|
3880
4130
|
/**
|
|
3881
4131
|
* Which extra planes can fail merge. Counts and stamps only — never a score.
|
|
3882
4132
|
*/
|
|
@@ -3954,12 +4204,7 @@ declare function summarizeArkRunSection(input?: {
|
|
|
3954
4204
|
layerFlow?: LayerFlowConfigShape | null;
|
|
3955
4205
|
}): ArkRunDoctorSection;
|
|
3956
4206
|
/** Thin status slice — counts only; residual null means unknown, not green. */
|
|
3957
|
-
declare function projectStatusArkRun(input?:
|
|
3958
|
-
present?: boolean;
|
|
3959
|
-
mode?: string | null;
|
|
3960
|
-
extraMergeTeeth?: boolean;
|
|
3961
|
-
residual?: number | null;
|
|
3962
|
-
}): ArkRunStatusSlice;
|
|
4207
|
+
declare function projectStatusArkRun(input?: ExtraPlaneStatusInput): ArkRunStatusSlice;
|
|
3963
4208
|
declare function formatArkRunDoctorLines(section: ArkRunDoctorSection): string[];
|
|
3964
4209
|
|
|
3965
4210
|
declare const ARKRUN_TIER1_SENSOR_IDS: readonly ["arkrun-missing-root", "arkrun-kernel-in-domain", "arkrun-direct-new", "arkrun-undeclared-emit", "arkrun-undeclared-handle", "arkrun-undeclared-depend", "arkrun-transport-bypass"];
|
|
@@ -4161,179 +4406,6 @@ declare function inventoryToExtractionCard(candidate: RulesInventoryCandidate):
|
|
|
4161
4406
|
next: string;
|
|
4162
4407
|
};
|
|
4163
4408
|
|
|
4164
|
-
/** Public, evidence-backed enforcement state shared by doctor adapters. */
|
|
4165
|
-
declare const ARK_ENFORCEMENT_STATE_SCHEMA_VERSION: "1.1";
|
|
4166
|
-
type EnforcementVerification = boolean | 'unverified';
|
|
4167
|
-
type EnforcementEvidenceField = 'configured' | 'installed' | 'active' | 'runtimeObserved' | 'operationCoverage' | 'bypassable' | 'required' | 'hard';
|
|
4168
|
-
type EnforcementEvidence = {
|
|
4169
|
-
field: 'configured' | 'installed' | 'runtimeObserved' | 'hard';
|
|
4170
|
-
source: string;
|
|
4171
|
-
value: boolean;
|
|
4172
|
-
} | {
|
|
4173
|
-
field: 'active' | 'operationCoverage' | 'bypassable' | 'required';
|
|
4174
|
-
source: string;
|
|
4175
|
-
value: EnforcementVerification;
|
|
4176
|
-
};
|
|
4177
|
-
/**
|
|
4178
|
-
* State for one enforcement boundary.
|
|
4179
|
-
*
|
|
4180
|
-
* `configured` records valid wiring, while `installed` requires the referenced
|
|
4181
|
-
* package or executable to resolve. Runtime/provider facts remain
|
|
4182
|
-
* `unverified` until observed; local files never prove `required: true`.
|
|
4183
|
-
*/
|
|
4184
|
-
type EnforcementBoundaryState = {
|
|
4185
|
-
supported: boolean;
|
|
4186
|
-
analyzed: boolean;
|
|
4187
|
-
configured: boolean;
|
|
4188
|
-
installed: boolean;
|
|
4189
|
-
active: EnforcementVerification;
|
|
4190
|
-
runtimeObserved: boolean;
|
|
4191
|
-
operation: string | null;
|
|
4192
|
-
operationCoverage: EnforcementVerification;
|
|
4193
|
-
bypassable: EnforcementVerification;
|
|
4194
|
-
required: EnforcementVerification;
|
|
4195
|
-
hard: boolean;
|
|
4196
|
-
evidence: readonly EnforcementEvidence[];
|
|
4197
|
-
};
|
|
4198
|
-
type ArkEnforcementHost = 'claude' | 'grok' | 'cursor' | 'codex' | 'unknown';
|
|
4199
|
-
type ArkEnforcementState = {
|
|
4200
|
-
schemaVersion: typeof ARK_ENFORCEMENT_STATE_SCHEMA_VERSION;
|
|
4201
|
-
activeHost: ArkEnforcementHost;
|
|
4202
|
-
localWrite: EnforcementBoundaryState;
|
|
4203
|
-
advisoryMcp: EnforcementBoundaryState;
|
|
4204
|
-
ciMerge: EnforcementBoundaryState;
|
|
4205
|
-
};
|
|
4206
|
-
|
|
4207
|
-
/** Public neutral contract for the opt-in new-code design-fitness ratchet. */
|
|
4208
|
-
declare const ARK_DESIGN_DELTA_SCHEMA_VERSION: "1.0";
|
|
4209
|
-
type DesignSmellId = 'io-under-application' | 'handler-in-persistence' | 'god-module' | 'domain-logic-in-ui' | 'facade-sql-in-routes' | 'mixed-pattern-cluster' | 'soft-contract';
|
|
4210
|
-
type DesignDeltaIdentity = {
|
|
4211
|
-
kind: 'git-tree' | 'candidate-tree';
|
|
4212
|
-
value: string;
|
|
4213
|
-
commit?: string;
|
|
4214
|
-
};
|
|
4215
|
-
type DesignSmellEvidence = {
|
|
4216
|
-
kind: string;
|
|
4217
|
-
path: string;
|
|
4218
|
-
line?: number;
|
|
4219
|
-
symbol?: string;
|
|
4220
|
-
detail?: string;
|
|
4221
|
-
magnitude: number;
|
|
4222
|
-
};
|
|
4223
|
-
type DesignSmellFinding = {
|
|
4224
|
-
smellId: DesignSmellId;
|
|
4225
|
-
fingerprint: string;
|
|
4226
|
-
identity: string;
|
|
4227
|
-
evidence: DesignSmellEvidence;
|
|
4228
|
-
repairHint: string;
|
|
4229
|
-
};
|
|
4230
|
-
type DesignDeltaChange = DesignSmellFinding & {
|
|
4231
|
-
classification: 'new' | 'worsened';
|
|
4232
|
-
baseMagnitude: number;
|
|
4233
|
-
candidateMagnitude: number;
|
|
4234
|
-
};
|
|
4235
|
-
/** Created-path merge vs full new+worsened ratchet (Z10). Omitted on older producers. */
|
|
4236
|
-
type DesignDeltaEnforcementScope = 'created-paths' | 'touched-new-or-worsened';
|
|
4237
|
-
type ArkDesignDeltaResult = {
|
|
4238
|
-
schemaVersion: typeof ARK_DESIGN_DELTA_SCHEMA_VERSION;
|
|
4239
|
-
mode: 'git-base' | 'write-candidate';
|
|
4240
|
-
complete: boolean;
|
|
4241
|
-
valid: boolean;
|
|
4242
|
-
base: DesignDeltaIdentity;
|
|
4243
|
-
candidate: DesignDeltaIdentity;
|
|
4244
|
-
supportedSmellIds: readonly DesignSmellId[];
|
|
4245
|
-
touchedPaths: readonly string[];
|
|
4246
|
-
changes: readonly DesignDeltaChange[];
|
|
4247
|
-
baseFindingCount: number;
|
|
4248
|
-
candidateFindingCount: number;
|
|
4249
|
-
historicalResidualCount: number;
|
|
4250
|
-
enforcementScope?: DesignDeltaEnforcementScope;
|
|
4251
|
-
error?: string;
|
|
4252
|
-
};
|
|
4253
|
-
|
|
4254
|
-
/**
|
|
4255
|
-
* Public diagnostic code catalog (ACS02).
|
|
4256
|
-
*
|
|
4257
|
-
* Closed vocabulary of stable `ruleId` values emitted by ArkGate adapters with
|
|
4258
|
-
* human/agent `why` / `fix` anchors and docs fragment ids. Cataloguing only —
|
|
4259
|
-
* no new rule semantics, no LLM verdict, no enforcement from prose.
|
|
4260
|
-
*
|
|
4261
|
-
* **Canonical** for docs, agent projection (ACS04), and finding refs (ACS06).
|
|
4262
|
-
* Runtime remediation remains in `remediation.ts`; parity tests bind the two.
|
|
4263
|
-
*
|
|
4264
|
-
* Zero Node I/O. Optional CLI surface: generated `bin/lib/diagnostic-catalog.mjs`.
|
|
4265
|
-
*
|
|
4266
|
-
* @see docs/diagnostics.md
|
|
4267
|
-
* @see docs/plans/agent-contract-surface-4.3/README.md
|
|
4268
|
-
*/
|
|
4269
|
-
/** Product-relative docs path (shipped in the npm tarball when listed in package files). */
|
|
4270
|
-
declare const DIAGNOSTIC_DOCS_RELATIVE_PATH: "docs/diagnostics.md";
|
|
4271
|
-
/** Schema id for serializing the catalog snapshot (agents / install projection). */
|
|
4272
|
-
declare const DIAGNOSTIC_CATALOG_SCHEMA_VERSION: "1.0";
|
|
4273
|
-
type DiagnosticCategory = 'layer' | 'capability' | 'publish' | 'safety' | 'arkrules' | 'arkrun' | 'arkorder' | 'preflight' | 'analysis' | 'drift' | 'snippet-policy' | 'config' | 'adapter' | 'meta';
|
|
4274
|
-
type DiagnosticCatalogEntry = {
|
|
4275
|
-
/** Stable public violation / diagnostic id. */
|
|
4276
|
-
ruleId: string;
|
|
4277
|
-
/** Short title for indexes and agent projection. */
|
|
4278
|
-
title: string;
|
|
4279
|
-
/** Why this finding exists (contract intent). */
|
|
4280
|
-
why: string;
|
|
4281
|
-
/**
|
|
4282
|
-
* Canonical fix guidance (agent + human). Contextual nextAction on live
|
|
4283
|
-
* findings may specialize this (e.g. type-only vs value layer import).
|
|
4284
|
-
*/
|
|
4285
|
-
fix: string;
|
|
4286
|
-
/** Markdown fragment id for docs/diagnostics.md (without leading #). */
|
|
4287
|
-
docsAnchor: string;
|
|
4288
|
-
category: DiagnosticCategory;
|
|
4289
|
-
/**
|
|
4290
|
-
* When true, finding is commonly advisory / non-blocking in default profiles
|
|
4291
|
-
* (doctor/config warnings, type-only placement debt, empty ArkRule scope).
|
|
4292
|
-
* Not a severity bit for the engine — documentation only.
|
|
4293
|
-
*/
|
|
4294
|
-
oftenAdvisory?: boolean;
|
|
4295
|
-
};
|
|
4296
|
-
/**
|
|
4297
|
-
* Closed public catalog. Order is stable (category groups, then ruleId) for
|
|
4298
|
-
* deterministic serialization and docs generation.
|
|
4299
|
-
*
|
|
4300
|
-
* Every production-emitted `ruleId` must appear here. Remediation switch cases
|
|
4301
|
-
* and adapter nextAction branches are parity-tested against this list.
|
|
4302
|
-
*/
|
|
4303
|
-
declare const DIAGNOSTIC_CATALOG: readonly DiagnosticCatalogEntry[];
|
|
4304
|
-
/** All public ruleIds in catalog order. */
|
|
4305
|
-
declare const DIAGNOSTIC_RULE_IDS: readonly string[];
|
|
4306
|
-
declare function isKnownDiagnosticCode(ruleId: string | null | undefined): boolean;
|
|
4307
|
-
/**
|
|
4308
|
-
* True when the code is catalogued or is an ArkRule-family id handled by the
|
|
4309
|
-
* ARKRULE_* prefix fallback in remediation (structure sensors may add members later
|
|
4310
|
-
* only via catalog + ROADMAP — prefix alone is not a license for free-form ids).
|
|
4311
|
-
*/
|
|
4312
|
-
declare function isCataloguedOrArkRuleFamily(ruleId: string | null | undefined): boolean;
|
|
4313
|
-
declare function getDiagnosticCatalogEntry(ruleId: string | null | undefined): DiagnosticCatalogEntry | undefined;
|
|
4314
|
-
/** Fragment for docs links, e.g. `#LAYER_IMPORT_VIOLATION`. */
|
|
4315
|
-
declare function diagnosticDocsFragment(ruleId: string): string;
|
|
4316
|
-
/**
|
|
4317
|
-
* Repo-relative docs path with fragment (for agents and JSON).
|
|
4318
|
-
* Package consumers resolve against the installed package root or GitHub tree.
|
|
4319
|
-
*/
|
|
4320
|
-
declare function diagnosticDocsPath(ruleId: string): string;
|
|
4321
|
-
/** Catalog snapshot for JSON export / agent projection (stable field order). */
|
|
4322
|
-
declare function serializeDiagnosticCatalog(): {
|
|
4323
|
-
schemaVersion: typeof DIAGNOSTIC_CATALOG_SCHEMA_VERSION;
|
|
4324
|
-
docsPath: typeof DIAGNOSTIC_DOCS_RELATIVE_PATH;
|
|
4325
|
-
codes: readonly DiagnosticCatalogEntry[];
|
|
4326
|
-
};
|
|
4327
|
-
/**
|
|
4328
|
-
* Static catalog fix for a ruleId when no live violation context is available.
|
|
4329
|
-
* Live adapters should still use deterministicNextAction for specialized edges.
|
|
4330
|
-
*/
|
|
4331
|
-
declare function catalogFixForRuleId(ruleId: string | null | undefined): string | undefined;
|
|
4332
|
-
/**
|
|
4333
|
-
* Static catalog why for a ruleId (agent “why” surface).
|
|
4334
|
-
*/
|
|
4335
|
-
declare function catalogWhyForRuleId(ruleId: string | null | undefined): string | undefined;
|
|
4336
|
-
|
|
4337
4409
|
/**
|
|
4338
4410
|
* Doctor / status / report ArkOrder section. Always notAScore.
|
|
4339
4411
|
* Residual is a unique ARKORDER finding-id count — never a score or LLM verdict.
|
|
@@ -4880,7 +4952,7 @@ declare const ARK_STATUS_MANIFEST_SCHEMA: {
|
|
|
4880
4952
|
};
|
|
4881
4953
|
readonly arkRun: {
|
|
4882
4954
|
readonly type: "object";
|
|
4883
|
-
readonly description: "ArkRun extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score.";
|
|
4955
|
+
readonly description: "ArkRun extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score." | "ArkOrder extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score.";
|
|
4884
4956
|
readonly additionalProperties: false;
|
|
4885
4957
|
readonly required: readonly ["notAScore", "present", "mode", "extraMergeTeeth", "residual"];
|
|
4886
4958
|
readonly properties: {
|
|
@@ -4912,7 +4984,7 @@ declare const ARK_STATUS_MANIFEST_SCHEMA: {
|
|
|
4912
4984
|
};
|
|
4913
4985
|
readonly arkOrder: {
|
|
4914
4986
|
readonly type: "object";
|
|
4915
|
-
readonly description: "ArkOrder extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score.";
|
|
4987
|
+
readonly description: "ArkRun extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score." | "ArkOrder extra residual (notAScore). present/mode from config; residual is a finding-id count (null = unknown, not green). extraMergeTeeth is honesty, never a score.";
|
|
4916
4988
|
readonly additionalProperties: false;
|
|
4917
4989
|
readonly required: readonly ["notAScore", "present", "mode", "extraMergeTeeth", "residual"];
|
|
4918
4990
|
readonly properties: {
|
|
@@ -5472,4 +5544,4 @@ declare function agentSkillPackageFileRelativePath(skillName: string): string;
|
|
|
5472
5544
|
*/
|
|
5473
5545
|
declare function flatSkillTemplateFileRelativePath(skillName: string): string;
|
|
5474
5546
|
|
|
5475
|
-
export { ADAPTER_DIAGNOSTIC_DOCS_RELATIVE_PATH, AGENT_PROJECTION_BEGIN_MARKER, AGENT_PROJECTION_END_MARKER, AGENT_PROJECTION_ENFORCEMENT_SURFACES, AGENT_PROJECTION_NON_ENFORCEMENT_LABEL, AGENT_SKILLS_PACKAGE_RELATIVE_ROOT, AGENT_SKILL_ENTRY_FILENAME, type AICodeGate, type AICodeGateContext, type AICodeGateOptions, type AICodeGateResult, type AICodeGateViolation, type AIGateExtension, ANALYSIS_IR_SCHEMA_VERSION, ARKORDER_RULE_IDS, ARKORDER_TIER1_SENSOR_IDS, ARKRUN_INTERACTION_NAME_INCOMPLETE, ARKRUN_KERNEL_FACTORY_CALLEES, ARKRUN_KERNEL_INTERACTION_CALLEES, ARKRUN_RULE_IDS, ARKRUN_TIER1_SENSOR_IDS, ARKRUN_TRANSPORT_BYPASS_SPECIFIERS, ARK_AGENT_PROJECTION_SCHEMA_VERSION, ARK_AGENT_SKILLS_PACKAGE_SCHEMA_VERSION, ARK_ANALYSIS_RESULT_SCHEMA, ARK_ANALYSIS_RESULT_SCHEMA_VERSION, ARK_CONFIG_SCHEMA, ARK_CONFIG_SCHEMA_VERSION, ARK_DESIGN_DELTA_SCHEMA_VERSION, ARK_ENFORCEMENT_STATE_SCHEMA_VERSION, ARK_FIRST_CLASS_SKILL_NAMES, ARK_IMPROVEMENT_COMPASS_SCHEMA_VERSION, ARK_PROJECT_IDENTITY_SCHEMA, ARK_PROJECT_IDENTITY_SCHEMA_URL, ARK_PROJECT_IDENTITY_SCHEMA_VERSION, ARK_RULES_SCHEMA, ARK_RULES_SCHEMA_VERSION, ARK_RULE_SENSORS, ARK_RUN_DOCTOR_SCHEMA_VERSION, ARK_SKILL_CAPACITY, ARK_SKILL_CAPACITY_DEDICATED_DOORS, ARK_SKILL_DESCRIPTION_VERSION_PATTERN, ARK_SKILL_NAMES, ARK_SKILL_NAME_COUNT, ARK_SKILL_NORTH_STAR, ARK_SKILL_REQUIRED_SURFACES, ARK_SKILL_STUB_REDIRECTS, ARK_STATUS_MANIFEST_SCHEMA, ARK_STATUS_MANIFEST_SCHEMA_URL, ARK_STATUS_MANIFEST_SCHEMA_VERSION, type AdapterCompletenessReason, type AdapterDiagnostic, type AdapterResult, type AdapterSeverity, type AdapterViolationInput, type AgentProjectionCatalogEntry, type AgentProjectionFacts, type AgentProjectionLayerSummary, type AgentProjectionMergeAction, type AgentProjectionMergeResult, type AgentProjectionMeta, type AgentProjectionProfile, type AgentSkillPackageEntry, type AgentSkillValidationIssue, type AnalysisCapabilityUse, type AnalysisCompilerOptions, type AnalysisCompleteness, type AnalysisContract, type AnalysisEvidence, type AnalysisFile, type AnalysisFileChange, type AnalysisFileInput, type AnalysisImportEdge, type AnalysisIr, type AnalysisMode, type AnalysisResult, type AnalysisViolation, type AnalyzeArchitectureConvergenceInput, type AnalyzeChangeInput, type AnalyzePolicyDeltaInput, type AnalyzeProjectInput, type AnalyzeResolvedProjectInput, type ArchitectureActualChange, type ArchitectureChangeMap, type ArchitectureChangeMapContract, type ArchitectureChangeMapDependency, type ArchitectureChangeMapFile, type ArchitectureChangeOperation, type ArchitectureConvergenceClassification, type ArchitectureConvergenceFinding, type ArchitectureConvergenceResult, type ArchitectureDependency, type ArchitectureEngineEdge, type ArchitectureEngineResult, type ArchitectureEngineViolation, type ArchitectureLayer, type ArchitectureLayerConfig, type ArchitectureProfile, type ArchitectureRule, type ArkCheckConfig, ArkConfig, ArkConfigLoadResult, type ArkDesignDeltaResult, type ArkEnforcementHost, type ArkEnforcementState, type ArkFirstClassSkillName, type ArkOrderRuleId, type ArkOrderSensorFinding, type ArkRuleSensorViolation, type ArkRulesFile, type ArkRulesIssue, ArkRulesValidationError, type ArkRunDoctorSection, type ArkRunRuleId, type ArkRunSensorFinding, type ArkRunStatusSlice, type ArkRunTier1SensorId, type ArkSkillCapacityDedicatedSurface, type ArkSkillCapacitySurface, type ArkSkillName, type ArkSkillNorthStar, type ArkSkillRequiredSurface, type ArkSkillStubName, type ChangePreflightResult, type ClassShapeFact, type CollectAnalysisConfigWarningsInput, type CoverageEvidence, type CoverageFiles, type CoverageInvariant, type CreateArchitectureProfileFromArkConfigOptions, type CreateArchitectureProfileOptions, type CreateElevenLayerArkConfigOptions, DEFAULT_AGENT_PROJECTION_RULE_IDS, DIAGNOSTIC_CATALOG, DIAGNOSTIC_CATALOG_SCHEMA_VERSION, DIAGNOSTIC_DOCS_RELATIVE_PATH, DIAGNOSTIC_RULE_IDS, type DeclarationShape, type DesignDeltaChange, type DesignDeltaEnforcementScope, type DesignDeltaIdentity, type DesignSmellEvidence, type DesignSmellFinding, type DesignSmellId, type DiagnosticCatalogEntry, type DiagnosticCategory, EXTRA_MERGE_TEETH_GOVERNED_FLOOR, type EffectiveArkRules, type EffectiveContract, EffectiveContractError, type EffectiveContractWarning, type EnforcementBoundaryState, type EnforcementEvidence, type EnforcementEvidenceField, type EnforcementVerification, type EvaluateArchitectureGraphInput, type EvaluateArkRunSensorsInput, type EvaluateArkRunSensorsResult, type ExtraMergeTeethClassification, FLAT_SKILL_TEMPLATES_RELATIVE_ROOT, type ForbiddenCapabilityUse, IMPROVEMENT_COMPASS_OUT_OF_SCOPE_LENSES, IMPROVEMENT_COMPASS_TOP_RESIDUAL_CAP, IMPROVEMENT_LENS_IDS, type ImprovementCompass, type ImprovementCompassEvidence, type ImprovementCompassFacts, type ImprovementCompassNextAction, type ImprovementCompassSmellFact, type ImprovementCompassViolationFact, type ImprovementLens, type ImprovementLensId, type ImprovementLensStatus, type InvariantCoverageEvidence, MERGE_PLANES_DUAL_STAMP, type MentionContext, type MergePlanesHonesty, POLICY_DELTA_SCHEMA_VERSION, PROJECT_BINDING_SCHEMA, PROJECT_EXPECTATION_SCHEMA, type ParseSkillDocumentResult, type ParsedSkillFrontmatter, type PolicyDelta, type PolicyDeltaAcknowledgement, type PolicyDeltaAnalysis, type PolicyDeltaClassification, type PolicyDeltaFinding, type PreflightResolvedChangeInput, type PreparedChangeFile, type ProjectBinding, type ProjectExpectation, type ProjectIdentity, RESOLVED_CANDIDATE_FACTS_SCHEMA, RESOLVED_CANDIDATE_FACTS_SCHEMA_VERSION, type ResolvedAmbientFact, type ResolvedAnalysisFile, type ResolvedAnalysisIr, type ResolvedAnalysisResult, type ResolvedArkRunCompositionRootHitFact, type ResolvedArkRunDeclarationFact, type ResolvedArkRunKernelCallFact, type ResolvedArkRunKernelCallKind, type ResolvedArkRunManagedNewFact, type ResolvedCandidateFacts, type ResolvedCandidateFactsInput, type ResolvedCapability, type ResolvedCapabilityFact, type ResolvedChangePreflightResult, type ResolvedDependencyFact, type ResolvedDependencyKind, type ResolvedDependencyState, type ResolvedFactsCompleteness, type ResolvedFactsReason, type ResolvedFileFact, type ResolvedIntentReferenceFact, type ResolvedPublishFact, type ResolvedSafetyFact, type ResolvedSafetyKind, type ResolvedSafetyReport, type RulesInventoryCandidate, type RulesInventoryResult, STATUS_COMPASS_FACTS_SOURCES, STATUS_COMPASS_MODES, STATUS_COMPASS_REASON_CODES, type SemanticDependency, type SemanticDependencyKind, type SkillProductCapacityIssue, type SkillProductCapacityIssueCode, type StatusActivationSlice, type StatusCheckVerdict, type StatusCompassFactsSource, type StatusCompassMode, type StatusCompassReasonCode, type StatusImprovementCompassSlice, type StatusLastCheckSlice, type StatusManifest, type StatusManifestFacts, type StatusNextAction, type StatusProjectIdentitySlice, type StatusRulesSlice, type StatusWritePathClass, type ValidateAgentSkillDocumentInput, type ValidateAgentSkillsPackageResult, type ValidateSkillProductCapacityInput, type ValidateSkillProductCapacityResult, adapterDocsCodePath, adapterFindingOccurrenceTargetKeys, adapterFindingRefFromTargetKey, adapterFindingTargetKey, agentProjectionContentIdentity, agentSkillEntryRelativePath, agentSkillPackageFileRelativePath, analyzeArchitectureConvergence, analyzeChange, analyzePolicyDelta, analyzeProject, analyzeResolvedProject, arkRunKernelCallKind, arkSkillStubRedirect, buildAgentProjectionBeginMarker, buildAgentProjectionBlock, buildAgentProjectionBody, buildAgentProjectionMeta, buildArkRuleFileHints, buildEffectiveArkRules, buildImprovementCompass, buildRulesInventory, buildStatusManifest, canPromoteInvariant, catalogFixForRuleId, catalogWhyForRuleId, classifyArkPolicyDelta, classifyCoverage, classifyResolvedLayerCoverage, classifyStatusWritePath, collectAnalysisConfigWarnings, collectEmptyAppliesToFindings, collectForbiddenCapabilityUses, composeMergePlanesHonesty, countsAsCoverage, createAICodeGate, createAdapterResult, createArchitectureProfile, createArchitectureProfileFromArkConfig, createElevenLayerArkConfig, createProjectId, createProjectIdentity, createResolvedCandidateFacts, defaultHonestLabel, demoteExtraPlaneTeethUnderClassificationFloor, deriveArkRuleFileHints, describeCoverage, detectArchitectureCycles, deterministicHash, diagnosticDocsFragment, diagnosticDocsPath, effectiveContractPolicyPayload, elevenLayerProfile, emptyEffectiveArkRules, evaluateArchitectureGraph, evaluateArkOrderSensors, evaluateArkRuleSensors, evaluateArkRunEditorSensors, evaluateArkRunEditorSensorsFromSource, evaluateArkRunSensors, evaluateInvariantCoverage, evaluateStatusBinding, explainViolation, extraMergeTeethAllowed, extractAgentProjectionBlock, extractArkRunDeclarationsFromSource, extractArkRunImportedConstructorNamesFromSource, extractArkRunKernelCallsFromSource, extractArkRunManagedNewsFromSource, extractArkRunValueImportDependenciesFromSource, extractClassShapesFromSource, extractSemanticDependencies, flatSkillTemplateFileRelativePath, formatAgentProjectionCatalogShortList, formatAgentProjectionLayers, formatArkRunDoctorLines, formatImprovementCompassDoctorLines, formatImprovementCompassResidualLabels, getDiagnosticCatalogEntry, inventoryToExtractionCard, isArkOrderRuleId, isArkRunKernelModuleSpecifier, isArkRunRuleId, isArkRunTransportBypassSpecifier, isArkSkillName, isCataloguedOrArkRuleFamily, isExtraPlaneFinding, isFirstClassArkSkillName, isKnownDiagnosticCode, isValidAgentSkillName, loadArkConfigContract, loadArkRulesContract, loadContract, loadResolvedCandidateFacts, mergeAgentProjectionDocument, normalizeExtraMergeTeethClassification, normalizeSkillContent, normalizeStatusImprovementCompass, parseAgentProjectionStamp, parseArkConfigJson, parseArkRulesJson, parseSkillDescriptionVersion, parseSkillDocument, policyDeltaAcknowledgementMatches, preflightChange, preflightResolvedChange, primaryImprovementCompassNextAction, projectStatusArkRun, projectStatusImprovementCompass, projectionHasNonEnforcementLabel, projectionMatchesPackageVersion, resolveEffectiveContract, resolveStatusNextAction, resolvedFactsEvidenceRequirementsHash, serializeDiagnosticCatalog, skillDescriptionVersionPrefix, stableSerialize, stampSkillDescription, statusCompassResidualIsSubsetOfDoctor, stripSkillDescriptionVersion, summarizeArkRunSection, toAdapterDiagnostic, unavailableStatusImprovementCompass, validateAgentSkillDocument, validateAgentSkillsPackage, validateSkillProductCapacity, version };
|
|
5547
|
+
export { ADAPTER_DIAGNOSTIC_DOCS_RELATIVE_PATH, AGENT_PROJECTION_BEGIN_MARKER, AGENT_PROJECTION_END_MARKER, AGENT_PROJECTION_ENFORCEMENT_SURFACES, AGENT_PROJECTION_NON_ENFORCEMENT_LABEL, AGENT_SKILLS_PACKAGE_RELATIVE_ROOT, AGENT_SKILL_ENTRY_FILENAME, type AICodeGate, type AICodeGateContext, type AICodeGateOptions, type AICodeGateResult, type AICodeGateViolation, type AIGateExtension, ANALYSIS_IR_SCHEMA_VERSION, ARKORDER_RULE_IDS, ARKORDER_TIER1_SENSOR_IDS, ARKRUN_INTERACTION_NAME_INCOMPLETE, ARKRUN_KERNEL_FACTORY_CALLEES, ARKRUN_KERNEL_INTERACTION_CALLEES, ARKRUN_RULE_IDS, ARKRUN_TIER1_SENSOR_IDS, ARKRUN_TRANSPORT_BYPASS_SPECIFIERS, ARK_AGENT_PROJECTION_SCHEMA_VERSION, ARK_AGENT_SKILLS_PACKAGE_SCHEMA_VERSION, ARK_ANALYSIS_RESULT_SCHEMA, ARK_ANALYSIS_RESULT_SCHEMA_VERSION, ARK_CONFIG_SCHEMA, ARK_CONFIG_SCHEMA_VERSION, ARK_DESIGN_DELTA_SCHEMA_VERSION, ARK_ENFORCEMENT_STATE_SCHEMA_VERSION, ARK_FIRST_CLASS_SKILL_NAMES, ARK_IMPROVEMENT_COMPASS_SCHEMA_VERSION, ARK_PROJECT_IDENTITY_SCHEMA, ARK_PROJECT_IDENTITY_SCHEMA_URL, ARK_PROJECT_IDENTITY_SCHEMA_VERSION, ARK_RULES_SCHEMA, ARK_RULES_SCHEMA_VERSION, ARK_RULE_SENSORS, ARK_RUN_DOCTOR_SCHEMA_VERSION, ARK_SKILL_CAPACITY, ARK_SKILL_CAPACITY_DEDICATED_DOORS, ARK_SKILL_DESCRIPTION_VERSION_PATTERN, ARK_SKILL_NAMES, ARK_SKILL_NAME_COUNT, ARK_SKILL_NORTH_STAR, ARK_SKILL_REQUIRED_SURFACES, ARK_SKILL_STUB_REDIRECTS, ARK_STATUS_MANIFEST_SCHEMA, ARK_STATUS_MANIFEST_SCHEMA_URL, ARK_STATUS_MANIFEST_SCHEMA_VERSION, type AdapterCompletenessReason, type AdapterDiagnostic, type AdapterResult, type AdapterSeverity, type AdapterViolationInput, type AgentProjectionCatalogEntry, type AgentProjectionFacts, type AgentProjectionLayerSummary, type AgentProjectionMergeAction, type AgentProjectionMergeResult, type AgentProjectionMeta, type AgentProjectionProfile, type AgentSkillPackageEntry, type AgentSkillValidationIssue, type AnalysisCapabilityUse, type AnalysisCompilerOptions, type AnalysisCompleteness, type AnalysisContract, type AnalysisEvidence, type AnalysisFile, type AnalysisFileChange, type AnalysisFileInput, type AnalysisImportEdge, type AnalysisIr, type AnalysisMode, type AnalysisResult, type AnalysisViolation, type AnalyzeArchitectureConvergenceInput, type AnalyzeChangeInput, type AnalyzePolicyDeltaInput, type AnalyzeProjectInput, type AnalyzeResolvedProjectInput, type ArchitectureActualChange, type ArchitectureChangeMap, type ArchitectureChangeMapContract, type ArchitectureChangeMapDependency, type ArchitectureChangeMapFile, type ArchitectureChangeOperation, type ArchitectureConvergenceClassification, type ArchitectureConvergenceFinding, type ArchitectureConvergenceResult, type ArchitectureDependency, type ArchitectureEngineEdge, type ArchitectureEngineResult, type ArchitectureEngineViolation, type ArchitectureLayer, type ArchitectureLayerConfig, type ArchitectureProfile, type ArchitectureRule, type ArkCheckConfig, ArkConfig, ArkConfigLoadResult, type ArkDesignDeltaResult, type ArkEnforcementHost, type ArkEnforcementState, type ArkFirstClassSkillName, type ArkOrderRuleId, type ArkOrderSensorFinding, type ArkRuleSensorViolation, type ArkRulesFile, type ArkRulesIssue, ArkRulesValidationError, type ArkRunDoctorSection, type ArkRunRuleId, type ArkRunSensorFinding, type ArkRunStatusSlice, type ArkRunTier1SensorId, type ArkSkillCapacityDedicatedSurface, type ArkSkillCapacitySurface, type ArkSkillName, type ArkSkillNorthStar, type ArkSkillRequiredSurface, type ArkSkillStubName, type ChangePreflightResult, type ClassShapeFact, type CollectAnalysisConfigWarningsInput, type CoverageEvidence, type CoverageFiles, type CoverageInvariant, type CreateArchitectureProfileFromArkConfigOptions, type CreateArchitectureProfileOptions, type CreateElevenLayerArkConfigOptions, DEFAULT_AGENT_PROJECTION_RULE_IDS, DIAGNOSTIC_CATALOG, DIAGNOSTIC_CATALOG_SCHEMA_VERSION, DIAGNOSTIC_DOCS_RELATIVE_PATH, DIAGNOSTIC_RULE_IDS, type DeclarationShape, type DesignDeltaChange, type DesignDeltaEnforcementScope, type DesignDeltaIdentity, type DesignSmellEvidence, type DesignSmellFinding, type DesignSmellId, type DiagnosticCatalogEntry, type DiagnosticCategory, EXTRA_MERGE_TEETH_GOVERNED_FLOOR, type EffectiveArkRules, type EffectiveContract, EffectiveContractError, type EffectiveContractWarning, type EnforcementBoundaryState, type EnforcementEvidence, type EnforcementEvidenceField, type EnforcementVerification, type EvaluateArchitectureGraphInput, type EvaluateArkRunSensorsInput, type EvaluateArkRunSensorsResult, type ExtraMergeTeethClassification, FLAT_SKILL_TEMPLATES_RELATIVE_ROOT, type ForbiddenCapabilityUse, IMPROVEMENT_COMPASS_OUT_OF_SCOPE_LENSES, IMPROVEMENT_COMPASS_TOP_RESIDUAL_CAP, IMPROVEMENT_LENS_IDS, type ImprovementCompass, type ImprovementCompassEvidence, type ImprovementCompassFacts, type ImprovementCompassNextAction, type ImprovementCompassSmellFact, type ImprovementCompassViolationFact, type ImprovementLens, type ImprovementLensId, type ImprovementLensStatus, type InvariantCoverageEvidence, type InvariantProbeSummary, MERGE_PLANES_DUAL_STAMP, type MentionContext, type MergePlanesHonesty, POLICY_DELTA_SCHEMA_VERSION, PROJECT_BINDING_SCHEMA, PROJECT_EXPECTATION_SCHEMA, type ParseSkillDocumentResult, type ParsedSkillFrontmatter, type PolicyDelta, type PolicyDeltaAcknowledgement, type PolicyDeltaAnalysis, type PolicyDeltaClassification, type PolicyDeltaFinding, type PreflightResolvedChangeInput, type PreparedChangeFile, type ProjectBinding, type ProjectExpectation, type ProjectIdentity, RESOLVED_CANDIDATE_FACTS_SCHEMA, RESOLVED_CANDIDATE_FACTS_SCHEMA_VERSION, type ResolvedAmbientFact, type ResolvedAnalysisFile, type ResolvedAnalysisIr, type ResolvedAnalysisResult, type ResolvedArkRunCompositionRootHitFact, type ResolvedArkRunDeclarationFact, type ResolvedArkRunKernelCallFact, type ResolvedArkRunKernelCallKind, type ResolvedArkRunManagedNewFact, type ResolvedCandidateFacts, type ResolvedCandidateFactsInput, type ResolvedCapability, type ResolvedCapabilityFact, type ResolvedChangePreflightResult, type ResolvedDependencyFact, type ResolvedDependencyKind, type ResolvedDependencyState, type ResolvedFactsCompleteness, type ResolvedFactsReason, type ResolvedFileFact, type ResolvedIntentReferenceFact, type ResolvedPublishFact, type ResolvedSafetyFact, type ResolvedSafetyKind, type ResolvedSafetyReport, type RulesInventoryCandidate, type RulesInventoryResult, STATUS_COMPASS_FACTS_SOURCES, STATUS_COMPASS_MODES, STATUS_COMPASS_REASON_CODES, type SemanticDependency, type SemanticDependencyKind, type SkillProductCapacityIssue, type SkillProductCapacityIssueCode, type StatusActivationSlice, type StatusCheckVerdict, type StatusCompassFactsSource, type StatusCompassMode, type StatusCompassReasonCode, type StatusImprovementCompassSlice, type StatusLastCheckSlice, type StatusManifest, type StatusManifestFacts, type StatusNextAction, type StatusProjectIdentitySlice, type StatusRulesSlice, type StatusWritePathClass, type ValidateAgentSkillDocumentInput, type ValidateAgentSkillsPackageResult, type ValidateSkillProductCapacityInput, type ValidateSkillProductCapacityResult, adapterDocsCodePath, adapterFindingOccurrenceTargetKeys, adapterFindingRefFromTargetKey, adapterFindingTargetKey, agentProjectionContentIdentity, agentSkillEntryRelativePath, agentSkillPackageFileRelativePath, analyzeArchitectureConvergence, analyzeChange, analyzePolicyDelta, analyzeProject, analyzeResolvedProject, arkRunKernelCallKind, arkSkillStubRedirect, buildAgentProjectionBeginMarker, buildAgentProjectionBlock, buildAgentProjectionBody, buildAgentProjectionMeta, buildArkRuleFileHints, buildEffectiveArkRules, buildImprovementCompass, buildRulesInventory, buildStatusManifest, canPromoteInvariant, catalogFixForRuleId, catalogWhyForRuleId, classifyArkPolicyDelta, classifyCoverage, classifyResolvedLayerCoverage, classifyStatusWritePath, collectAnalysisConfigWarnings, collectEmptyAppliesToFindings, collectForbiddenCapabilityUses, composeMergePlanesHonesty, countsAsCoverage, createAICodeGate, createAdapterResult, createArchitectureProfile, createArchitectureProfileFromArkConfig, createElevenLayerArkConfig, createProjectId, createProjectIdentity, createResolvedCandidateFacts, defaultHonestLabel, demoteExtraPlaneTeethUnderClassificationFloor, deriveArkRuleFileHints, describeCoverage, detectArchitectureCycles, deterministicHash, diagnosticDocsFragment, diagnosticDocsPath, effectiveContractPolicyPayload, elevenLayerProfile, emptyEffectiveArkRules, evaluateArchitectureGraph, evaluateArkOrderSensors, evaluateArkRuleSensors, evaluateArkRunEditorSensors, evaluateArkRunEditorSensorsFromSource, evaluateArkRunSensors, evaluateInvariantCoverage, evaluateStatusBinding, explainViolation, extraMergeTeethAllowed, extractAgentProjectionBlock, extractArkRunDeclarationsFromSource, extractArkRunImportedConstructorNamesFromSource, extractArkRunKernelCallsFromSource, extractArkRunManagedNewsFromSource, extractArkRunValueImportDependenciesFromSource, extractClassShapesFromSource, extractSemanticDependencies, flatSkillTemplateFileRelativePath, formatAgentProjectionCatalogShortList, formatAgentProjectionLayers, formatArkRunDoctorLines, formatImprovementCompassDoctorLines, formatImprovementCompassResidualLabels, getDiagnosticCatalogEntry, inventoryToExtractionCard, isArkOrderRuleId, isArkRunKernelModuleSpecifier, isArkRunRuleId, isArkRunTransportBypassSpecifier, isArkSkillName, isCataloguedOrArkRuleFamily, isExtraPlaneFinding, isFirstClassArkSkillName, isKnownDiagnosticCode, isValidAgentSkillName, loadArkConfigContract, loadArkRulesContract, loadContract, loadResolvedCandidateFacts, mergeAgentProjectionDocument, normalizeExtraMergeTeethClassification, normalizeSkillContent, normalizeStatusImprovementCompass, parseAgentProjectionStamp, parseArkConfigJson, parseArkRulesJson, parseSkillDescriptionVersion, parseSkillDocument, policyDeltaAcknowledgementMatches, preflightChange, preflightResolvedChange, primaryImprovementCompassNextAction, projectStatusArkRun, projectStatusImprovementCompass, projectionHasNonEnforcementLabel, projectionMatchesPackageVersion, resolveEffectiveContract, resolveStatusNextAction, resolvedFactsEvidenceRequirementsHash, serializeDiagnosticCatalog, skillDescriptionVersionPrefix, stableSerialize, stampSkillDescription, statusCompassResidualIsSubsetOfDoctor, stripSkillDescriptionVersion, summarizeArkRunSection, toAdapterDiagnostic, unavailableStatusImprovementCompass, validateAgentSkillDocument, validateAgentSkillsPackage, validateSkillProductCapacity, version };
|