arkgate 2.12.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -0
- package/README.md +90 -51
- package/bin/ark-check.mjs +156 -39
- package/bin/ark-mcp.mjs +119 -6
- package/bin/ark-shared.mjs +216 -129
- package/bin/ark.mjs +134 -34
- package/bin/lib/adapter-contract.mjs +93 -0
- package/bin/lib/agent-gates.mjs +13 -0
- package/bin/lib/analysis-engine.mjs +1171 -0
- package/bin/lib/architecture-scan.mjs +84 -127
- package/bin/lib/ci-and-commands.mjs +40 -3
- package/bin/lib/codex-home.mjs +7 -0
- package/bin/lib/config-contract.mjs +331 -0
- package/bin/lib/config-warnings.mjs +7 -205
- package/bin/lib/doctor-plan.mjs +43 -16
- package/bin/lib/enforcement-profiles.mjs +97 -0
- package/bin/lib/field-install.mjs +67 -10
- package/bin/lib/gate-files.mjs +42 -3
- package/bin/lib/graph-cycles.mjs +4 -54
- package/bin/lib/hook-templates.mjs +33 -1
- package/bin/lib/host-support-matrix.mjs +83 -0
- package/bin/lib/install-migrate.mjs +99 -30
- package/bin/lib/mcp-adoption.mjs +35 -3
- package/bin/lib/open-html.mjs +75 -0
- package/bin/lib/presets.mjs +45 -4
- package/bin/lib/safety-diagnostics.mjs +36 -15
- package/bin/lib/scan-files.mjs +12 -1
- package/bin/lib/skill-install.mjs +72 -1
- package/bin/lib/source-policy.mjs +36 -0
- package/bin/lib/start-preview.mjs +271 -0
- package/bin/lib/ts-resolve.mjs +13 -3
- package/bin/lib/weakest-link.mjs +417 -0
- package/bin/lib/write-path-capabilities.mjs +186 -0
- package/bin/lib/write-path-detect.mjs +62 -99
- package/compat/nestjs.cjs +2 -0
- package/compat/nestjs.d.ts +2 -0
- package/compat/nestjs.js +1 -0
- package/compat/runtime.cjs +2 -0
- package/compat/runtime.d.ts +2 -0
- package/compat/runtime.js +1 -0
- package/dist/configContract-BxSIwVRo.d.cts +259 -0
- package/dist/configContract-BxSIwVRo.d.ts +259 -0
- package/dist/eslint/index.cjs +500 -61
- package/dist/eslint/index.d.cts +36 -20
- package/dist/eslint/index.d.ts +36 -20
- package/dist/eslint/index.js +500 -61
- package/dist/index.cjs +1349 -2741
- package/dist/index.d.cts +449 -483
- package/dist/index.d.ts +449 -483
- package/dist/index.js +1325 -2687
- package/docs/agent-guide.md +58 -34
- package/docs/ai-gates.md +79 -21
- package/docs/configuration.md +97 -0
- package/docs/enthusiast/README.md +3 -3
- package/docs/enthusiast/how-to-agent-gates.md +7 -3
- package/docs/migrate-from-ark-runtime-kernel.md +5 -3
- package/docs/package-surface.md +19 -19
- package/docs/production-hardening.md +31 -5
- package/docs/threat-model.md +65 -0
- package/docs/typescript-support.md +30 -3
- package/package.json +46 -11
- package/schemas/ark.analysis-result.schema.json +91 -0
- package/schemas/ark.config.schema.json +750 -0
- package/server.json +2 -2
- package/templates/hooks/pre-commit-ark +37 -0
- package/templates/skills/ark-architect.md +3 -2
- package/templates/skills/ark-coverage.md +2 -2
- package/templates/skills/ark-runtime.md +8 -5
- package/templates/skills/ark-upgrade.md +36 -16
- package/tests/fixtures/ts-consumer/ark.config.json +2 -0
- package/dist/eslint/index.cjs.map +0 -1
- package/dist/eslint/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/nestjs/index.cjs +0 -2498
- package/dist/nestjs/index.cjs.map +0 -1
- package/dist/nestjs/index.d.cts +0 -22
- package/dist/nestjs/index.d.ts +0 -22
- package/dist/nestjs/index.js +0 -2474
- package/dist/nestjs/index.js.map +0 -1
- package/dist/runtime/index.cjs +0 -3352
- package/dist/runtime/index.cjs.map +0 -1
- package/dist/runtime/index.d.cts +0 -2
- package/dist/runtime/index.d.ts +0 -2
- package/dist/runtime/index.js +0 -3270
- package/dist/runtime/index.js.map +0 -1
- package/dist/types-BZ17b9i5.d.cts +0 -1068
- package/dist/types-BZ17b9i5.d.ts +0 -1068
|
@@ -1,118 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Extracted from agent-gates so install orchestration stays scannable.
|
|
2
|
+
* Active-host write-path capability surface for doctor and install checks.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Never claims silent apply; "repair" means host can re-inject a patch after hard deny.
|
|
4
|
+
* `inventory` records every supported host found in the repository. Top-level
|
|
5
|
+
* capabilities and compatibility fields describe only `activeHost`, so a
|
|
6
|
+
* Claude/Grok hook can never become a Codex/Cursor guarantee.
|
|
10
7
|
*/
|
|
11
|
-
import fs from 'node:fs';
|
|
12
|
-
import path from 'node:path';
|
|
13
8
|
import { arkCommand } from '../ark-shared.mjs';
|
|
9
|
+
import { formatHostSupportSummary } from './host-support-matrix.mjs';
|
|
10
|
+
import { buildWritePathCapabilityModel } from './write-path-capabilities.mjs';
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* hookPresent: boolean,
|
|
21
|
-
* hookRepair: boolean,
|
|
22
|
-
* mcpPresent: boolean,
|
|
23
|
-
* evidence: string[],
|
|
24
|
-
* gap: null | { id: string, severity: string, message: string, fix: string },
|
|
25
|
-
* }}
|
|
26
|
-
*/
|
|
27
|
-
export function detectWritePathCapabilities(root) {
|
|
28
|
-
const evidence = [];
|
|
29
|
-
let hookPresent = false;
|
|
30
|
-
let hookRepair = false;
|
|
31
|
-
|
|
32
|
-
const hookFiles = [
|
|
33
|
-
'.claude/settings.json',
|
|
34
|
-
'.grok/hooks/ark-write-gate.json',
|
|
35
|
-
];
|
|
36
|
-
for (const rel of hookFiles) {
|
|
37
|
-
const abs = path.join(root, rel);
|
|
38
|
-
if (!fs.existsSync(abs)) continue;
|
|
39
|
-
let text = '';
|
|
40
|
-
try {
|
|
41
|
-
text = fs.readFileSync(abs, 'utf8');
|
|
42
|
-
} catch {
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
// PreToolUse / write-gate command referencing ark(-gate)?-mcp --hook
|
|
46
|
-
if (
|
|
47
|
-
/--hook\b/.test(text) ||
|
|
48
|
-
/\b(ark|arkgate)-mcp\b[\s\S]{0,80}--hook\b/.test(text) ||
|
|
49
|
-
/\b--hook\b[\s\S]{0,80}\b(ark|arkgate)-mcp\b/.test(text)
|
|
50
|
-
) {
|
|
51
|
-
hookPresent = true;
|
|
52
|
-
evidence.push(rel);
|
|
53
|
-
}
|
|
54
|
-
if (
|
|
55
|
-
/--hook-repair\b/.test(text) ||
|
|
56
|
-
/ARK_HOOK_REPAIR\s*=\s*['"]?(1|true|yes|on)/i.test(text)
|
|
57
|
-
) {
|
|
58
|
-
hookRepair = true;
|
|
59
|
-
if (!evidence.includes(rel)) evidence.push(rel);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
let mcpPresent = false;
|
|
64
|
-
const mcpFiles = ['.mcp.json', '.cursor/mcp.json', '.grok/config.toml'];
|
|
65
|
-
for (const rel of mcpFiles) {
|
|
66
|
-
const abs = path.join(root, rel);
|
|
67
|
-
if (!fs.existsSync(abs)) continue;
|
|
68
|
-
let text = '';
|
|
69
|
-
try {
|
|
70
|
-
text = fs.readFileSync(abs, 'utf8');
|
|
71
|
-
} catch {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
if (
|
|
75
|
-
/\b(ark|arkgate)-mcp\b/.test(text) ||
|
|
76
|
-
/mcp_servers\.ark\b/.test(text) ||
|
|
77
|
-
/"ark"\s*:\s*\{/.test(text) ||
|
|
78
|
-
/mcpServers[\s\S]*\bark\b/.test(text)
|
|
79
|
-
) {
|
|
80
|
-
mcpPresent = true;
|
|
81
|
-
evidence.push(rel);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
12
|
+
function installToolsForHost(activeHost) {
|
|
13
|
+
return activeHost === 'unknown'
|
|
14
|
+
? 'claude,grok,cursor,codex'
|
|
15
|
+
: activeHost;
|
|
16
|
+
}
|
|
84
17
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
const
|
|
18
|
+
export function detectWritePathCapabilities(root, explicitHost) {
|
|
19
|
+
const model = buildWritePathCapabilityModel(root, explicitHost);
|
|
20
|
+
const { activeHost, support, capabilities, capabilityEvidence, inventory } = model;
|
|
21
|
+
const hardWrite = capabilities['hard-write'];
|
|
22
|
+
const advisoryWrite = capabilities['advisory-write'];
|
|
23
|
+
const repairPayload = capabilities['repair-payload'];
|
|
89
24
|
|
|
90
25
|
/** @type {'repair' | 'reject-only' | 'mcp-only' | 'none'} */
|
|
91
26
|
let mode = 'none';
|
|
92
|
-
if (
|
|
93
|
-
else if (
|
|
94
|
-
else if (
|
|
27
|
+
if (hardWrite && repairPayload) mode = 'repair';
|
|
28
|
+
else if (hardWrite) mode = 'reject-only';
|
|
29
|
+
else if (advisoryWrite) mode = 'mcp-only';
|
|
95
30
|
|
|
31
|
+
const tools = installToolsForHost(activeHost);
|
|
96
32
|
let gap = null;
|
|
97
33
|
if (mode === 'none') {
|
|
98
34
|
gap = {
|
|
99
35
|
id: 'write-path-none',
|
|
100
36
|
severity: 'warn',
|
|
101
37
|
message:
|
|
102
|
-
|
|
103
|
-
|
|
38
|
+
`Active host ${activeHost} has no hard write boundary or advisory Ark MCP. ` +
|
|
39
|
+
(capabilities['merge-gate']
|
|
40
|
+
? 'The CI check remains separate and does not block local writes.'
|
|
41
|
+
: 'No Ark CI check was detected either.'),
|
|
42
|
+
fix: arkCommand(
|
|
43
|
+
root,
|
|
44
|
+
'ark-check',
|
|
45
|
+
`--install-agent-gates --tools ${tools}`
|
|
46
|
+
),
|
|
104
47
|
};
|
|
105
48
|
} else if (mode === 'reject-only') {
|
|
106
49
|
gap = {
|
|
107
50
|
id: 'write-path-reject-only',
|
|
108
51
|
severity: 'info',
|
|
109
|
-
message:
|
|
110
|
-
|
|
111
|
-
|
|
52
|
+
message:
|
|
53
|
+
`Active host ${activeHost} has a hard write boundary without a repair payload. ` +
|
|
54
|
+
(advisoryWrite
|
|
55
|
+
? 'Advisory MCP tools remain available.'
|
|
56
|
+
: 'Install its MCP surface or enable hook repair for guided re-entry.'),
|
|
112
57
|
fix: arkCommand(
|
|
113
58
|
root,
|
|
114
59
|
'ark-check',
|
|
115
|
-
|
|
60
|
+
`--install-agent-gates --tools ${tools} --force`
|
|
116
61
|
),
|
|
117
62
|
};
|
|
118
63
|
} else if (mode === 'mcp-only') {
|
|
@@ -120,19 +65,37 @@ export function detectWritePathCapabilities(root) {
|
|
|
120
65
|
id: 'write-path-mcp-only',
|
|
121
66
|
severity: 'info',
|
|
122
67
|
message:
|
|
123
|
-
|
|
124
|
-
|
|
68
|
+
`Active host ${activeHost} has advisory prepare-write/autoPatch tools, ` +
|
|
69
|
+
'but no hard write boundary; the CI check can still reject the change before merge.',
|
|
70
|
+
fix: arkCommand(
|
|
71
|
+
root,
|
|
72
|
+
'ark-check',
|
|
73
|
+
`--install-agent-gates --tools ${tools}`
|
|
74
|
+
),
|
|
125
75
|
};
|
|
126
76
|
}
|
|
127
77
|
|
|
128
78
|
return {
|
|
79
|
+
activeHost,
|
|
80
|
+
support,
|
|
81
|
+
supportSummary: formatHostSupportSummary(support),
|
|
82
|
+
capabilities,
|
|
83
|
+
capabilityEvidence,
|
|
84
|
+
inventory,
|
|
85
|
+
// Compatibility projection for existing doctor/API consumers.
|
|
129
86
|
mode,
|
|
130
|
-
prepareWrite,
|
|
131
|
-
autoPatch,
|
|
132
|
-
hookPresent,
|
|
133
|
-
hookRepair,
|
|
134
|
-
mcpPresent,
|
|
135
|
-
evidence: [
|
|
87
|
+
prepareWrite: advisoryWrite,
|
|
88
|
+
autoPatch: advisoryWrite || repairPayload,
|
|
89
|
+
hookPresent: hardWrite,
|
|
90
|
+
hookRepair: repairPayload,
|
|
91
|
+
mcpPresent: advisoryWrite,
|
|
92
|
+
evidence: [
|
|
93
|
+
...new Set([
|
|
94
|
+
...capabilityEvidence['hard-write'],
|
|
95
|
+
...capabilityEvidence['advisory-write'],
|
|
96
|
+
...capabilityEvidence['repair-payload'],
|
|
97
|
+
]),
|
|
98
|
+
],
|
|
136
99
|
gap,
|
|
137
100
|
};
|
|
138
101
|
}
|
package/compat/nestjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@arkgate/runtime/nestjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@arkgate/runtime';
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical, pure contract for ark.config.json.
|
|
3
|
+
*
|
|
4
|
+
* Tooling adapters own filesystem I/O; this module owns JSON parsing, deterministic
|
|
5
|
+
* migration, defaults, validation, diagnostics, and the published JSON Schema.
|
|
6
|
+
* The standalone CLI artifact is generated into bin/lib/config-contract.mjs.
|
|
7
|
+
*/
|
|
8
|
+
declare const ARK_CONFIG_SCHEMA_VERSION: "1.0";
|
|
9
|
+
type ArkConfigCyclePolicy = 'strict' | 'soft' | 'framework-soft' | 'off';
|
|
10
|
+
type ArkConfigLayer = {
|
|
11
|
+
name: string;
|
|
12
|
+
patterns: string[];
|
|
13
|
+
exclude?: string[];
|
|
14
|
+
intentPrefixes?: string[];
|
|
15
|
+
description?: string;
|
|
16
|
+
forbiddenGlobals?: string[];
|
|
17
|
+
mayImportInfrastructure?: boolean;
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
};
|
|
20
|
+
type ArkConfigRule = {
|
|
21
|
+
from: string;
|
|
22
|
+
to: string;
|
|
23
|
+
allowed: boolean;
|
|
24
|
+
message?: string;
|
|
25
|
+
peerIsolation?: boolean;
|
|
26
|
+
sliceFolders?: string[];
|
|
27
|
+
};
|
|
28
|
+
type ArkConfigSafety = {
|
|
29
|
+
maxTsSuppressions?: number;
|
|
30
|
+
maxAnyCasts?: number;
|
|
31
|
+
allowInMemory?: boolean;
|
|
32
|
+
allowDisabledPeerIsolation?: boolean;
|
|
33
|
+
};
|
|
34
|
+
type ArkConfig = {
|
|
35
|
+
$schema: string;
|
|
36
|
+
schemaVersion: typeof ARK_CONFIG_SCHEMA_VERSION;
|
|
37
|
+
name?: string;
|
|
38
|
+
include: string[];
|
|
39
|
+
exclude?: string[];
|
|
40
|
+
excludeGenerated?: boolean;
|
|
41
|
+
frameworkOverlay?: string;
|
|
42
|
+
layers: ArkConfigLayer[];
|
|
43
|
+
rules: ArkConfigRule[];
|
|
44
|
+
cyclePolicy?: ArkConfigCyclePolicy;
|
|
45
|
+
dynamicImportAllowlist?: string[];
|
|
46
|
+
safety?: ArkConfigSafety;
|
|
47
|
+
};
|
|
48
|
+
declare const ARK_CONFIG_SCHEMA: {
|
|
49
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
50
|
+
readonly $id: "https://unpkg.com/arkgate@2/schemas/ark.config.schema.json";
|
|
51
|
+
readonly title: "ArkGate architecture contract";
|
|
52
|
+
readonly description: "Versioned contract consumed identically by ArkGate CLI, MCP, and ESLint surfaces.";
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly additionalProperties: false;
|
|
55
|
+
readonly required: readonly ["$schema", "schemaVersion", "include", "layers", "rules"];
|
|
56
|
+
readonly properties: {
|
|
57
|
+
readonly $schema: {
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
readonly minLength: 1;
|
|
60
|
+
readonly default: "https://unpkg.com/arkgate@2/schemas/ark.config.schema.json";
|
|
61
|
+
readonly description: "Editor-facing URL or local path for this JSON Schema.";
|
|
62
|
+
};
|
|
63
|
+
readonly schemaVersion: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly const: "1.0";
|
|
66
|
+
readonly default: "1.0";
|
|
67
|
+
};
|
|
68
|
+
readonly name: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
readonly minLength: 1;
|
|
71
|
+
};
|
|
72
|
+
readonly include: {
|
|
73
|
+
readonly minItems: 1;
|
|
74
|
+
readonly default: readonly ["src"];
|
|
75
|
+
readonly type: "array";
|
|
76
|
+
readonly items: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly minLength: 1;
|
|
79
|
+
};
|
|
80
|
+
readonly uniqueItems: true;
|
|
81
|
+
};
|
|
82
|
+
readonly exclude: {
|
|
83
|
+
readonly default: readonly [];
|
|
84
|
+
readonly type: "array";
|
|
85
|
+
readonly items: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly minLength: 1;
|
|
88
|
+
};
|
|
89
|
+
readonly uniqueItems: true;
|
|
90
|
+
};
|
|
91
|
+
readonly excludeGenerated: {
|
|
92
|
+
readonly type: "boolean";
|
|
93
|
+
readonly default: true;
|
|
94
|
+
};
|
|
95
|
+
readonly frameworkOverlay: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly minLength: 1;
|
|
98
|
+
};
|
|
99
|
+
readonly layers: {
|
|
100
|
+
readonly type: "array";
|
|
101
|
+
readonly default: readonly [];
|
|
102
|
+
readonly items: {
|
|
103
|
+
readonly $ref: "#/$defs/layer";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly rules: {
|
|
107
|
+
readonly type: "array";
|
|
108
|
+
readonly default: ArkConfigRule[];
|
|
109
|
+
readonly items: {
|
|
110
|
+
readonly $ref: "#/$defs/rule";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
readonly cyclePolicy: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly enum: readonly ["strict", "soft", "framework-soft", "off"];
|
|
116
|
+
readonly default: "strict";
|
|
117
|
+
};
|
|
118
|
+
readonly dynamicImportAllowlist: {
|
|
119
|
+
readonly default: readonly [];
|
|
120
|
+
readonly type: "array";
|
|
121
|
+
readonly items: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly minLength: 1;
|
|
124
|
+
};
|
|
125
|
+
readonly uniqueItems: true;
|
|
126
|
+
};
|
|
127
|
+
readonly safety: {
|
|
128
|
+
readonly $ref: "#/$defs/safety";
|
|
129
|
+
readonly default: {
|
|
130
|
+
readonly maxTsSuppressions: 0;
|
|
131
|
+
readonly maxAnyCasts: 0;
|
|
132
|
+
readonly allowInMemory: false;
|
|
133
|
+
readonly allowDisabledPeerIsolation: false;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
readonly $defs: {
|
|
138
|
+
readonly layer: {
|
|
139
|
+
readonly type: "object";
|
|
140
|
+
readonly additionalProperties: false;
|
|
141
|
+
readonly required: readonly ["name", "patterns"];
|
|
142
|
+
readonly properties: {
|
|
143
|
+
readonly name: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly minLength: 1;
|
|
146
|
+
};
|
|
147
|
+
readonly patterns: {
|
|
148
|
+
readonly minItems: 1;
|
|
149
|
+
readonly type: "array";
|
|
150
|
+
readonly items: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly minLength: 1;
|
|
153
|
+
};
|
|
154
|
+
readonly uniqueItems: true;
|
|
155
|
+
};
|
|
156
|
+
readonly exclude: {
|
|
157
|
+
readonly type: "array";
|
|
158
|
+
readonly items: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
readonly minLength: 1;
|
|
161
|
+
};
|
|
162
|
+
readonly uniqueItems: true;
|
|
163
|
+
};
|
|
164
|
+
readonly intentPrefixes: {
|
|
165
|
+
readonly type: "array";
|
|
166
|
+
readonly items: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly minLength: 1;
|
|
169
|
+
};
|
|
170
|
+
readonly uniqueItems: true;
|
|
171
|
+
};
|
|
172
|
+
readonly description: {
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
readonly minLength: 1;
|
|
175
|
+
};
|
|
176
|
+
readonly forbiddenGlobals: {
|
|
177
|
+
readonly type: "array";
|
|
178
|
+
readonly items: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly minLength: 1;
|
|
181
|
+
};
|
|
182
|
+
readonly uniqueItems: true;
|
|
183
|
+
};
|
|
184
|
+
readonly mayImportInfrastructure: {
|
|
185
|
+
readonly type: "boolean";
|
|
186
|
+
};
|
|
187
|
+
readonly optional: {
|
|
188
|
+
readonly type: "boolean";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly rule: {
|
|
193
|
+
readonly type: "object";
|
|
194
|
+
readonly additionalProperties: false;
|
|
195
|
+
readonly required: readonly ["from", "to", "allowed"];
|
|
196
|
+
readonly properties: {
|
|
197
|
+
readonly from: {
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
readonly minLength: 1;
|
|
200
|
+
};
|
|
201
|
+
readonly to: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
readonly minLength: 1;
|
|
204
|
+
};
|
|
205
|
+
readonly allowed: {
|
|
206
|
+
readonly type: "boolean";
|
|
207
|
+
};
|
|
208
|
+
readonly message: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly minLength: 1;
|
|
211
|
+
};
|
|
212
|
+
readonly peerIsolation: {
|
|
213
|
+
readonly type: "boolean";
|
|
214
|
+
};
|
|
215
|
+
readonly sliceFolders: {
|
|
216
|
+
readonly minItems: 1;
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly items: {
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
readonly minLength: 1;
|
|
221
|
+
};
|
|
222
|
+
readonly uniqueItems: true;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly safety: {
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly additionalProperties: false;
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly maxTsSuppressions: {
|
|
231
|
+
readonly type: "integer";
|
|
232
|
+
readonly minimum: 0;
|
|
233
|
+
readonly default: 0;
|
|
234
|
+
};
|
|
235
|
+
readonly maxAnyCasts: {
|
|
236
|
+
readonly type: "integer";
|
|
237
|
+
readonly minimum: 0;
|
|
238
|
+
readonly default: 0;
|
|
239
|
+
};
|
|
240
|
+
readonly allowInMemory: {
|
|
241
|
+
readonly type: "boolean";
|
|
242
|
+
readonly default: false;
|
|
243
|
+
};
|
|
244
|
+
readonly allowDisabledPeerIsolation: {
|
|
245
|
+
readonly type: "boolean";
|
|
246
|
+
readonly default: false;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
type ArkConfigLoadResult = {
|
|
253
|
+
config: ArkConfig;
|
|
254
|
+
migratedFrom: 'unversioned' | null;
|
|
255
|
+
};
|
|
256
|
+
declare function loadArkConfigContract(input: unknown, source?: string): ArkConfigLoadResult;
|
|
257
|
+
declare function parseArkConfigJson(json: string, source?: string): ArkConfigLoadResult;
|
|
258
|
+
|
|
259
|
+
export { type ArkConfig as A, type ArkConfigRule as a, type ArkConfigLayer as b, type ArkConfigLoadResult as c, ARK_CONFIG_SCHEMA as d, ARK_CONFIG_SCHEMA_VERSION as e, loadArkConfigContract as l, parseArkConfigJson as p };
|