@armoriq/policy-ir 0.1.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/LICENSE +21 -0
- package/README.md +39 -0
- package/dist/index.cjs +1433 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +426 -0
- package/dist/index.d.ts +426 -0
- package/dist/index.js +1373 -0
- package/dist/index.js.map +1 -0
- package/dist/vectors.cjs +969 -0
- package/dist/vectors.cjs.map +1 -0
- package/dist/vectors.d.cts +61 -0
- package/dist/vectors.d.ts +61 -0
- package/dist/vectors.js +942 -0
- package/dist/vectors.js.map +1 -0
- package/package.json +61 -0
- package/vectors/canonical.json +73 -0
- package/vectors/compile.json +17 -0
- package/vectors/document.json +19 -0
- package/vectors/evaluate.json +27 -0
- package/vectors/hash.json +115 -0
- package/vectors/schema-hash-vectors.json +497 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `armor.policy.v2` intermediate representation.
|
|
3
|
+
*
|
|
4
|
+
* Data, never a program: the same JSON is evaluated by conmap, the Armor CLI
|
|
5
|
+
* daemon, the SDK pre-check and OPA. The document is the hashing and signing
|
|
6
|
+
* boundary, so every field here is part of `policyHash` except `policyHash`.
|
|
7
|
+
*/
|
|
8
|
+
declare const SCHEMA_VERSION: "armor.policy.v2";
|
|
9
|
+
type Verdict = 'allow' | 'hold' | 'block';
|
|
10
|
+
/** Where a document sits in the layering ladder. A boundary is a floor: it can only tighten. */
|
|
11
|
+
type Layer = 'floor' | 'group' | 'agent' | 'member' | 'local';
|
|
12
|
+
type PolicyTarget = {
|
|
13
|
+
org: '*';
|
|
14
|
+
} | {
|
|
15
|
+
group: string;
|
|
16
|
+
} | {
|
|
17
|
+
agent: string;
|
|
18
|
+
mcpServers?: string[];
|
|
19
|
+
} | {
|
|
20
|
+
device: 'local';
|
|
21
|
+
products?: string[];
|
|
22
|
+
};
|
|
23
|
+
interface Defaults {
|
|
24
|
+
tools: Verdict;
|
|
25
|
+
network: Verdict;
|
|
26
|
+
files: Verdict;
|
|
27
|
+
skills: Verdict;
|
|
28
|
+
}
|
|
29
|
+
interface Capture {
|
|
30
|
+
arguments: boolean;
|
|
31
|
+
redact: string[];
|
|
32
|
+
maxBytesPerCall: number;
|
|
33
|
+
sample: number;
|
|
34
|
+
}
|
|
35
|
+
type KeyTier = 'exact' | 'glob';
|
|
36
|
+
type StatementMatch = {
|
|
37
|
+
tool: string;
|
|
38
|
+
keyTier: KeyTier;
|
|
39
|
+
order: number;
|
|
40
|
+
} | {
|
|
41
|
+
capability: string;
|
|
42
|
+
};
|
|
43
|
+
type ConditionOp = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'glob' | 'regex' | 'notRegex' | 'startsWith' | 'exists';
|
|
44
|
+
interface SchemaBinding {
|
|
45
|
+
/** `sha256:` of the tool's canonical input schema at compile time; null when the inventory had none. */
|
|
46
|
+
schemaHash: string | null;
|
|
47
|
+
}
|
|
48
|
+
interface Condition {
|
|
49
|
+
/** Dotpath into the call: `args.amount`, `args.command.program`, `path`. */
|
|
50
|
+
field: string;
|
|
51
|
+
op: ConditionOp;
|
|
52
|
+
value?: unknown;
|
|
53
|
+
schemaBinding?: SchemaBinding;
|
|
54
|
+
}
|
|
55
|
+
interface Approval {
|
|
56
|
+
approvers: number;
|
|
57
|
+
roles?: string[];
|
|
58
|
+
members?: string[];
|
|
59
|
+
anyMember?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** Who a statement applies to. Absent means everyone the document targets. */
|
|
62
|
+
type Subject = {
|
|
63
|
+
membershipId: string;
|
|
64
|
+
} | {
|
|
65
|
+
email: string;
|
|
66
|
+
} | {
|
|
67
|
+
group: string;
|
|
68
|
+
} | {
|
|
69
|
+
product: string;
|
|
70
|
+
};
|
|
71
|
+
interface Provenance {
|
|
72
|
+
ruleKey: string;
|
|
73
|
+
variant: number;
|
|
74
|
+
source: 'yaml' | 'converter' | 'compose' | 'settings-import';
|
|
75
|
+
layer: Layer;
|
|
76
|
+
}
|
|
77
|
+
interface Statement {
|
|
78
|
+
id: string;
|
|
79
|
+
subject: Subject | null;
|
|
80
|
+
match: StatementMatch;
|
|
81
|
+
effect: Verdict;
|
|
82
|
+
conditions: Condition[];
|
|
83
|
+
approval?: Approval;
|
|
84
|
+
/** ISO date-time, or the literal `never`. Always present. */
|
|
85
|
+
expiresAt: string | 'never';
|
|
86
|
+
controls?: string[];
|
|
87
|
+
provenance: Provenance;
|
|
88
|
+
}
|
|
89
|
+
interface PolicyDocument {
|
|
90
|
+
schemaVersion: typeof SCHEMA_VERSION;
|
|
91
|
+
policyId: string;
|
|
92
|
+
/** `sha256:` over the canonical document without this field. */
|
|
93
|
+
policyHash?: string;
|
|
94
|
+
target: PolicyTarget;
|
|
95
|
+
layer: Layer;
|
|
96
|
+
defaults: Defaults;
|
|
97
|
+
capture: Capture;
|
|
98
|
+
/** ISO date-time, or the literal `never`. Always present. */
|
|
99
|
+
expiresAt: string | 'never';
|
|
100
|
+
statements: Statement[];
|
|
101
|
+
}
|
|
102
|
+
declare function layerOfTarget(target: PolicyTarget): Layer;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Canonical JSON: sorted keys, no whitespace, ASCII escapes for anything
|
|
106
|
+
* outside printable ASCII. Byte-for-byte the rule the SDKs and the tool
|
|
107
|
+
* inventory use for `schemaHash`, so the platform has one hashing rule.
|
|
108
|
+
* Not RFC 8785. `undefined` object members are dropped; `undefined` and
|
|
109
|
+
* `null` values both serialize as `null`.
|
|
110
|
+
*/
|
|
111
|
+
declare function canonicalJson(value: unknown): string;
|
|
112
|
+
|
|
113
|
+
declare const HASH_PREFIX = "sha256:";
|
|
114
|
+
/** `sha256:` over the canonical JSON of any value. */
|
|
115
|
+
declare function sha256Canonical(value: unknown): string;
|
|
116
|
+
/**
|
|
117
|
+
* The document's hash: canonical JSON of the document with `policyHash`
|
|
118
|
+
* removed. Stable across key order and whitespace; any change to a
|
|
119
|
+
* statement, default, target or capture setting changes it. This is the
|
|
120
|
+
* hashing and signing boundary shared by every runtime.
|
|
121
|
+
*/
|
|
122
|
+
declare function policyHash(document: PolicyDocument): string;
|
|
123
|
+
/** True when `document.policyHash` is present and matches its content. */
|
|
124
|
+
declare function verifyPolicyHash(document: PolicyDocument): boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A tool's input schema reduced to what governs a call: annotations
|
|
128
|
+
* (`description`, `title`) are dropped, local `$ref`s are resolved, and the
|
|
129
|
+
* result is hashed in canonical form. Byte-for-byte the rule the SDKs and the
|
|
130
|
+
* tool inventory use, pinned by the shared vectors, so a policy compiled
|
|
131
|
+
* against a snapshot hash and a call carrying the live hash compare equal
|
|
132
|
+
* only when the schema is the same.
|
|
133
|
+
*/
|
|
134
|
+
declare function schemaHash(inputSchema: unknown): string | null;
|
|
135
|
+
|
|
136
|
+
interface Principal {
|
|
137
|
+
membershipId?: string;
|
|
138
|
+
email?: string;
|
|
139
|
+
groups?: string[];
|
|
140
|
+
/** The local agent making the call, for a `products:` overlay. */
|
|
141
|
+
product?: string;
|
|
142
|
+
}
|
|
143
|
+
/** One call, as the enforce path and the local hook both see it. */
|
|
144
|
+
interface CallInput {
|
|
145
|
+
tool: string;
|
|
146
|
+
arguments: Record<string, unknown>;
|
|
147
|
+
/**
|
|
148
|
+
* Derived fields a host may supply: `path`, `program`, `command`,
|
|
149
|
+
* `writeRedirection`, `withinWorkspace`, `url`, `host`, `skill`, `env`.
|
|
150
|
+
* Globs are literal, so a host writes `path` home-relative (`~/.ssh/id_rsa`)
|
|
151
|
+
* when the path is under the user's home; `files.deny: ["~/.ssh/**"]` then
|
|
152
|
+
* matches exactly what the author wrote.
|
|
153
|
+
*/
|
|
154
|
+
derived?: Record<string, unknown>;
|
|
155
|
+
/** Capability tags the inventory holds for this tool. */
|
|
156
|
+
capabilities?: string[];
|
|
157
|
+
/** The tool's live input-schema hash, when the caller knows it. */
|
|
158
|
+
schemaHash?: string | null;
|
|
159
|
+
member?: Principal;
|
|
160
|
+
/** ISO date-time the call is evaluated at. */
|
|
161
|
+
timestamp: string;
|
|
162
|
+
}
|
|
163
|
+
interface SchemaDriftObligation {
|
|
164
|
+
type: 'schema_drift';
|
|
165
|
+
statementId: string;
|
|
166
|
+
bound: string;
|
|
167
|
+
observed: string | null;
|
|
168
|
+
}
|
|
169
|
+
type Obligation = SchemaDriftObligation;
|
|
170
|
+
interface VerdictProvenance {
|
|
171
|
+
policyId: string;
|
|
172
|
+
statementId: string | null;
|
|
173
|
+
ruleKey: string;
|
|
174
|
+
variant: number;
|
|
175
|
+
layer: Layer;
|
|
176
|
+
}
|
|
177
|
+
interface Evaluation {
|
|
178
|
+
verdict: Verdict;
|
|
179
|
+
/** The floor's own verdict, so a caller can tell a floor block from a rule block. */
|
|
180
|
+
floorVerdict: Verdict | null;
|
|
181
|
+
approval: Approval | null;
|
|
182
|
+
obligations: Obligation[];
|
|
183
|
+
provenance: VerdictProvenance;
|
|
184
|
+
}
|
|
185
|
+
declare const VERDICT_RANK: Record<Verdict, number>;
|
|
186
|
+
declare function stricter(a: Verdict, b: Verdict): Verdict;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The documents bound to one target. At most one per layer, enforced by the
|
|
190
|
+
* single-active trigger; the floor is the organization's.
|
|
191
|
+
*/
|
|
192
|
+
interface BoundDocuments {
|
|
193
|
+
floor?: PolicyDocument;
|
|
194
|
+
group?: PolicyDocument;
|
|
195
|
+
agent?: PolicyDocument;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Four stages over four layers (PRD §7.4):
|
|
199
|
+
* 1. floor: a floor block ends evaluation; otherwise its verdict is retained
|
|
200
|
+
* 2. resolve: the member scope inside the most specific document
|
|
201
|
+
* 3. candidate: member rule, then agent, then group, then the most specific tools.default
|
|
202
|
+
* 4. merge: the stricter of floor and candidate
|
|
203
|
+
*/
|
|
204
|
+
declare function evaluate(input: CallInput, bound: BoundDocuments): Evaluation;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Glob matching for tool keys and paths. `*` matches any run of characters
|
|
208
|
+
* except `/`; `**` matches across `/`; `?` matches one character. Tool keys
|
|
209
|
+
* carry no `/`, so `*` spans the whole name there. Anchored at both ends.
|
|
210
|
+
*/
|
|
211
|
+
declare function globToRegExp(pattern: string): RegExp;
|
|
212
|
+
declare function matchGlob(pattern: string, value: string): boolean;
|
|
213
|
+
declare function isGlob(key: string): boolean;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Resolve a dotpath against the call. `args.*` reads `arguments`; any other
|
|
217
|
+
* root reads the host-derived fields. `undefined` means absent, and an absent
|
|
218
|
+
* field fails the condition rather than throwing or matching.
|
|
219
|
+
*/
|
|
220
|
+
declare function resolveField(input: CallInput, field: string): unknown;
|
|
221
|
+
declare function conditionsHold(input: CallInput, conditions: Condition[]): boolean;
|
|
222
|
+
declare function conditionHolds(input: CallInput, condition: Condition): boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Key selection: an exact key beats any glob, a longer glob beats a shorter
|
|
226
|
+
* one. Two same-length globs matching one tool are rejected at compile time;
|
|
227
|
+
* here the first in document order wins so evaluation stays deterministic.
|
|
228
|
+
*/
|
|
229
|
+
declare function selectRuleKey(statements: Statement[], tool: string): string | null;
|
|
230
|
+
|
|
231
|
+
type Severity = 'error' | 'warning';
|
|
232
|
+
interface Diagnostic {
|
|
233
|
+
code: string;
|
|
234
|
+
severity: Severity;
|
|
235
|
+
/** JSON-pointer-like path into the source document, `/spec/tools/rules/Bash/0`. */
|
|
236
|
+
path: string;
|
|
237
|
+
message: string;
|
|
238
|
+
}
|
|
239
|
+
declare class Diagnostics {
|
|
240
|
+
readonly items: Diagnostic[];
|
|
241
|
+
error(code: string, path: string, message: string): void;
|
|
242
|
+
warning(code: string, path: string, message: string): void;
|
|
243
|
+
get hasErrors(): boolean;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** The `armor.io/v2` source document after strict parsing, before lowering. */
|
|
247
|
+
interface PolicySource {
|
|
248
|
+
apiVersion: 'armor.io/v2';
|
|
249
|
+
kind: 'Policy';
|
|
250
|
+
metadata: {
|
|
251
|
+
name: string;
|
|
252
|
+
description?: string;
|
|
253
|
+
orgId?: string;
|
|
254
|
+
labels?: Record<string, string>;
|
|
255
|
+
};
|
|
256
|
+
target: SourceTarget;
|
|
257
|
+
precedence?: 'device-first' | 'agent-first';
|
|
258
|
+
spec: PolicySpec;
|
|
259
|
+
}
|
|
260
|
+
type SourceTarget = {
|
|
261
|
+
agent: string;
|
|
262
|
+
mcpServers?: string[];
|
|
263
|
+
} | {
|
|
264
|
+
group: string;
|
|
265
|
+
} | {
|
|
266
|
+
org: '*';
|
|
267
|
+
} | {
|
|
268
|
+
device: 'local';
|
|
269
|
+
};
|
|
270
|
+
interface PolicySpec {
|
|
271
|
+
tools: ToolsSection;
|
|
272
|
+
files?: {
|
|
273
|
+
deny?: string[];
|
|
274
|
+
allowOutsideWorkspace?: boolean;
|
|
275
|
+
};
|
|
276
|
+
network?: {
|
|
277
|
+
default?: Verdict;
|
|
278
|
+
allow?: NetworkEntry[];
|
|
279
|
+
deny?: NetworkEntry[];
|
|
280
|
+
};
|
|
281
|
+
skills?: {
|
|
282
|
+
default?: Verdict;
|
|
283
|
+
hold?: string[];
|
|
284
|
+
block?: string[];
|
|
285
|
+
};
|
|
286
|
+
secrets?: {
|
|
287
|
+
envBlocklist?: string[];
|
|
288
|
+
};
|
|
289
|
+
members?: Record<string, Overlay>;
|
|
290
|
+
products?: Record<string, Overlay>;
|
|
291
|
+
capture?: {
|
|
292
|
+
arguments?: boolean;
|
|
293
|
+
redact?: string[];
|
|
294
|
+
maxBytesPerCall?: number;
|
|
295
|
+
sample?: number;
|
|
296
|
+
};
|
|
297
|
+
approvalDefaults?: Approval;
|
|
298
|
+
expiresAt: string;
|
|
299
|
+
}
|
|
300
|
+
type NetworkEntry = string | {
|
|
301
|
+
host: string;
|
|
302
|
+
reason?: string;
|
|
303
|
+
};
|
|
304
|
+
interface ToolsSection {
|
|
305
|
+
default: Verdict;
|
|
306
|
+
rules?: Record<string, RuleValue>;
|
|
307
|
+
}
|
|
308
|
+
interface Overlay {
|
|
309
|
+
tools?: {
|
|
310
|
+
default?: Verdict;
|
|
311
|
+
rules?: Record<string, RuleValue>;
|
|
312
|
+
};
|
|
313
|
+
expiresAt: string;
|
|
314
|
+
}
|
|
315
|
+
/** A scalar verdict is shorthand for one unconditional variant. */
|
|
316
|
+
type RuleValue = Verdict | RuleVariant[];
|
|
317
|
+
interface RuleVariant {
|
|
318
|
+
action: Verdict;
|
|
319
|
+
when?: Record<string, ConditionSpec>;
|
|
320
|
+
approval?: Approval;
|
|
321
|
+
reason?: string;
|
|
322
|
+
controls?: string[];
|
|
323
|
+
expiresAt: string;
|
|
324
|
+
}
|
|
325
|
+
/** `{gt: 5000}`, `{in: [a, b]}`, `{matches: '^x'}`, `{exists: true}`. Exactly one operator. */
|
|
326
|
+
type ConditionSpec = Partial<Record<SourceOperator, unknown>>;
|
|
327
|
+
declare const SOURCE_OPERATORS: readonly ["eq", "neq", "in", "notIn", "gt", "gte", "lt", "lte", "matches", "notMatches", "startsWith", "glob", "withinWorkspace", "exists"];
|
|
328
|
+
type SourceOperator = (typeof SOURCE_OPERATORS)[number];
|
|
329
|
+
declare const VERDICTS: readonly Verdict[];
|
|
330
|
+
declare const NEVER = "never";
|
|
331
|
+
|
|
332
|
+
interface ParseResult {
|
|
333
|
+
source: PolicySource | null;
|
|
334
|
+
diagnostics: Diagnostics;
|
|
335
|
+
}
|
|
336
|
+
/** Parse `armor.io/v2` YAML text strictly. */
|
|
337
|
+
declare function parseYaml(text: string): ParseResult;
|
|
338
|
+
/** Parse an already-loaded YAML/JSON value strictly. */
|
|
339
|
+
declare function parseDocument(value: unknown): ParseResult;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Everything that can be checked without an inventory. Inventory-dependent
|
|
343
|
+
* checks (roster clamp, glob collisions on real tools, schema binding) live in
|
|
344
|
+
* the compiler.
|
|
345
|
+
*/
|
|
346
|
+
declare function validate(source: PolicySource): Diagnostics;
|
|
347
|
+
|
|
348
|
+
/** One tool the target can reach, as the inventory knows it. */
|
|
349
|
+
interface InventoryTool {
|
|
350
|
+
/** The wire name the model sees; for an MCP tool the host may also supply the qualified `mcp__<server>__<tool>` form as `qualifiedName`. */
|
|
351
|
+
name: string;
|
|
352
|
+
qualifiedName?: string;
|
|
353
|
+
owner: {
|
|
354
|
+
type: 'mcp_server' | 'agent' | 'local';
|
|
355
|
+
id: string;
|
|
356
|
+
name?: string;
|
|
357
|
+
};
|
|
358
|
+
schemaHash: string | null;
|
|
359
|
+
inputSchema?: unknown;
|
|
360
|
+
capabilities?: string[];
|
|
361
|
+
/** False for a row the observed feed created and no owner has declared: the compiler warns instead of binding. */
|
|
362
|
+
declared: boolean;
|
|
363
|
+
}
|
|
364
|
+
/** What a host implements: conmap on `tool_snapshots`, the Armor CLI on the local tool list. */
|
|
365
|
+
interface InventoryPort {
|
|
366
|
+
toolsForTarget(target: SourceTarget): Promise<InventoryTool[]>;
|
|
367
|
+
}
|
|
368
|
+
declare const CAPABILITY_KEYS: ReadonlySet<string>;
|
|
369
|
+
|
|
370
|
+
type Enforceability = 'enforced' | 'argument-only' | 'inert';
|
|
371
|
+
type Section = 'tools' | 'files' | 'network' | 'skills' | 'secrets';
|
|
372
|
+
/**
|
|
373
|
+
* Per-section honesty (FR-9, FR-19): a local device sees real paths and
|
|
374
|
+
* hosts; the enterprise SDK path sees only path-shaped and URL-shaped
|
|
375
|
+
* arguments; skills and secrets have no enterprise surface at all.
|
|
376
|
+
*/
|
|
377
|
+
interface EnforceabilityReport {
|
|
378
|
+
sections: Partial<Record<Section, Enforceability>>;
|
|
379
|
+
/** Tools in the inventory that no capability rule reaches, when the document uses capability keys (M-12). */
|
|
380
|
+
notCoveredByCapabilityRules: string[];
|
|
381
|
+
}
|
|
382
|
+
declare function enforceabilityReport(source: PolicySource, inventory: InventoryTool[]): EnforceabilityReport;
|
|
383
|
+
|
|
384
|
+
interface CompileOptions {
|
|
385
|
+
policyId: string;
|
|
386
|
+
source?: Statement['provenance']['source'];
|
|
387
|
+
}
|
|
388
|
+
interface CompileResult {
|
|
389
|
+
document: PolicyDocument | null;
|
|
390
|
+
diagnostics: Diagnostics;
|
|
391
|
+
report: EnforceabilityReport;
|
|
392
|
+
}
|
|
393
|
+
/** Validate, clamp against the inventory, lower to IR, hash. Synchronous once the inventory is in hand. */
|
|
394
|
+
declare function compile(source: PolicySource, inventory: InventoryTool[], options: CompileOptions): CompileResult;
|
|
395
|
+
declare function compileWithPort(source: PolicySource, port: InventoryPort, options: CompileOptions): Promise<CompileResult>;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* PolicySource back to YAML such that `parse(serialize(x))` equals `x`
|
|
399
|
+
* (VC-10). A single unconditional variant with no other fields is written as
|
|
400
|
+
* the scalar shorthand; `expiresAt: never` is written only where the parser
|
|
401
|
+
* would not materialize it identically anyway (everywhere), so it is kept.
|
|
402
|
+
*/
|
|
403
|
+
declare function serialize(source: PolicySource): string;
|
|
404
|
+
|
|
405
|
+
type KeyKind = 'exact' | 'glob' | 'capability';
|
|
406
|
+
interface ResolvedKey {
|
|
407
|
+
kind: KeyKind;
|
|
408
|
+
/** For an exact key: the one inventory tool it binds, when declared. */
|
|
409
|
+
tool: InventoryTool | null;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Tell a rule key's kind apart by lookup, not by syntax: a glob if it has
|
|
413
|
+
* wildcards, a capability if it names a known capability or a tag the
|
|
414
|
+
* inventory carries, else an exact tool name clamped against the inventory
|
|
415
|
+
* (VC-8). A bare name declared by more than one owner is an error that asks
|
|
416
|
+
* for the qualified form.
|
|
417
|
+
*/
|
|
418
|
+
declare function resolveKey(key: string, inventory: InventoryTool[], diag: Diagnostics, path: string): ResolvedKey;
|
|
419
|
+
/** Two same-length globs matching one real tool is rejected at compile time (VC-4). */
|
|
420
|
+
declare function checkGlobCollisions(keys: string[], inventory: InventoryTool[], diag: Diagnostics, path: string): void;
|
|
421
|
+
/** An `args.*` key the tool's schema does not declare is a warning (VC-9). */
|
|
422
|
+
declare function checkArgumentKeys(fields: string[], tool: InventoryTool, diag: Diagnostics, path: string): void;
|
|
423
|
+
|
|
424
|
+
declare const KNOWN_CONTROLS: ReadonlySet<string>;
|
|
425
|
+
|
|
426
|
+
export { type Approval, type BoundDocuments, CAPABILITY_KEYS, type CallInput, type Capture, type CompileOptions, type CompileResult, type Condition, type ConditionOp, type ConditionSpec, type Defaults, type Diagnostic, Diagnostics, type Enforceability, type EnforceabilityReport, type Evaluation, HASH_PREFIX, type InventoryPort, type InventoryTool, KNOWN_CONTROLS, type KeyTier, type Layer, NEVER, type NetworkEntry, type Obligation, type Overlay, type ParseResult, type PolicyDocument, type PolicySource, type PolicySpec, type PolicyTarget, type Principal, type Provenance, type RuleValue, type RuleVariant, SCHEMA_VERSION, SOURCE_OPERATORS, type SchemaBinding, type SchemaDriftObligation, type Section, type Severity, type SourceOperator, type SourceTarget, type Statement, type StatementMatch, type Subject, type ToolsSection, VERDICTS, VERDICT_RANK, type Verdict, type VerdictProvenance, canonicalJson, checkArgumentKeys, checkGlobCollisions, compile, compileWithPort, conditionHolds, conditionsHold, enforceabilityReport, evaluate, globToRegExp, isGlob, layerOfTarget, matchGlob, parseDocument, parseYaml, policyHash, resolveField, resolveKey, schemaHash, selectRuleKey, serialize, sha256Canonical, stricter, validate, verifyPolicyHash };
|