@intutic/shared-types 1.10.0 → 1.10.1
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/README.md +1 -1
- package/dist/anomaly.d.ts +11 -0
- package/dist/anomaly.d.ts.map +1 -1
- package/dist/api-contracts.d.ts +97 -9
- package/dist/api-contracts.d.ts.map +1 -1
- package/dist/api-contracts.js +9 -0
- package/dist/api-contracts.js.map +1 -1
- package/dist/auth.d.ts +157 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +39 -1
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +2 -99
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +2 -17
- package/dist/billing.js.map +1 -1
- package/dist/enums.d.ts +341 -4
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +369 -6
- package/dist/enums.js.map +1 -1
- package/dist/errors.d.ts +20 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -1
- package/dist/errors.js.map +1 -1
- package/dist/finops.d.ts +97 -1
- package/dist/finops.d.ts.map +1 -1
- package/dist/governanceCoverage.d.ts +82 -0
- package/dist/governanceCoverage.d.ts.map +1 -0
- package/dist/governanceCoverage.js +72 -0
- package/dist/governanceCoverage.js.map +1 -0
- package/dist/guardrailIr.d.ts +287 -0
- package/dist/guardrailIr.d.ts.map +1 -0
- package/dist/guardrailIr.js +301 -0
- package/dist/guardrailIr.js.map +1 -0
- package/dist/guardrailRender.d.ts +154 -0
- package/dist/guardrailRender.d.ts.map +1 -0
- package/dist/guardrailRender.js +440 -0
- package/dist/guardrailRender.js.map +1 -0
- package/dist/identity.d.ts +75 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +5 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +34 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +124 -2
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +37 -11
- package/dist/intelligence.d.ts.map +1 -1
- package/dist/intelligence.js.map +1 -1
- package/dist/modelCatalog.d.ts +89 -0
- package/dist/modelCatalog.d.ts.map +1 -0
- package/dist/modelCatalog.generated.d.ts +7204 -0
- package/dist/modelCatalog.generated.d.ts.map +1 -0
- package/dist/modelCatalog.generated.js +576 -0
- package/dist/modelCatalog.generated.js.map +1 -0
- package/dist/modelCatalog.js +112 -0
- package/dist/modelCatalog.js.map +1 -0
- package/dist/notifications.d.ts +134 -2
- package/dist/notifications.d.ts.map +1 -1
- package/dist/observability.d.ts +4 -0
- package/dist/observability.d.ts.map +1 -1
- package/dist/policyGuardrails.d.ts +433 -0
- package/dist/policyGuardrails.d.ts.map +1 -0
- package/dist/policyGuardrails.js +91 -0
- package/dist/policyGuardrails.js.map +1 -0
- package/dist/posturePresets.d.ts +74 -0
- package/dist/posturePresets.d.ts.map +1 -0
- package/dist/posturePresets.js +139 -0
- package/dist/posturePresets.js.map +1 -0
- package/dist/providerVerification.d.ts +64 -0
- package/dist/providerVerification.d.ts.map +1 -0
- package/dist/providerVerification.js +184 -0
- package/dist/providerVerification.js.map +1 -0
- package/dist/providers.d.ts +93 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +176 -0
- package/dist/providers.js.map +1 -0
- package/dist/rulePredicateDsl.d.ts +101 -0
- package/dist/rulePredicateDsl.d.ts.map +1 -0
- package/dist/rulePredicateDsl.js +263 -0
- package/dist/rulePredicateDsl.js.map +1 -0
- package/dist/rulePredicateEval.d.ts +38 -0
- package/dist/rulePredicateEval.d.ts.map +1 -0
- package/dist/rulePredicateEval.js +124 -0
- package/dist/rulePredicateEval.js.map +1 -0
- package/dist/scriptScan.d.ts +162 -0
- package/dist/scriptScan.d.ts.map +1 -0
- package/dist/scriptScan.js +362 -0
- package/dist/scriptScan.js.map +1 -0
- package/dist/secretPatterns.d.ts +43 -0
- package/dist/secretPatterns.d.ts.map +1 -0
- package/dist/secretPatterns.js +73 -0
- package/dist/secretPatterns.js.map +1 -0
- package/dist/skillScan.d.ts +166 -0
- package/dist/skillScan.d.ts.map +1 -0
- package/dist/skillScan.js +398 -0
- package/dist/skillScan.js.map +1 -0
- package/dist/sop.d.ts +188 -9
- package/dist/sop.d.ts.map +1 -1
- package/dist/sop.js +54 -2
- package/dist/sop.js.map +1 -1
- package/dist/sourceProviders.d.ts +41 -0
- package/dist/sourceProviders.d.ts.map +1 -0
- package/dist/sourceProviders.js +48 -0
- package/dist/sourceProviders.js.map +1 -0
- package/dist/sync.d.ts +98 -8
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js.map +1 -1
- package/dist/toon.d.ts +80 -0
- package/dist/toon.d.ts.map +1 -0
- package/dist/toon.js +278 -0
- package/dist/toon.js.map +1 -0
- package/dist/usage.d.ts +23 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/wasmHost.d.ts +58 -0
- package/dist/wasmHost.d.ts.map +1 -0
- package/dist/wasmHost.js +80 -0
- package/dist/wasmHost.js.map +1 -0
- package/dist/workspaceSettings.d.ts +463 -21
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +86 -1
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host functions a WASM governance rule may import — one definition.
|
|
3
|
+
*
|
|
4
|
+
* The Rust source of truth is `HOST_IMPORTS` in
|
|
5
|
+
* `packages/proxy/src/wasm/host.rs`; this is its TypeScript mirror, kept honest
|
|
6
|
+
* by `tools/scripts/check-wasm-host-imports.js`, which reads both from source
|
|
7
|
+
* and fails the build if they disagree.
|
|
8
|
+
*
|
|
9
|
+
* ## Why there is a mirror at all
|
|
10
|
+
*
|
|
11
|
+
* Three TypeScript surfaces have to know this list — the CLI's validation
|
|
12
|
+
* sandbox, the control plane's rule-upload endpoint, and the SDK's own test
|
|
13
|
+
* harness — and each of them had its own copy. That is exactly how the original
|
|
14
|
+
* defect happened: the CLI offered a fourth import, `seed`, that the proxy had
|
|
15
|
+
* never registered, so a rule reaching `Math.random()` passed
|
|
16
|
+
* `intutic policy test`, passed `intutic policy install`, and then failed to
|
|
17
|
+
* link inside the proxy. The WASM runner fails **open**, so the rule enforced
|
|
18
|
+
* nothing and nothing said so.
|
|
19
|
+
*
|
|
20
|
+
* Adding a copy is the failure mode. Import this.
|
|
21
|
+
*
|
|
22
|
+
* ## Why `seed` is absent, permanently
|
|
23
|
+
*
|
|
24
|
+
* AssemblyScript emits `env.seed` for anything reaching `Math.random()`. It is
|
|
25
|
+
* refused on purpose rather than registered: a governance verdict that can
|
|
26
|
+
* differ on identical input cannot be audited, and the replay and mutation
|
|
27
|
+
* corpus gates both assume determinism.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* ## Why `read_referenced_file` is present
|
|
33
|
+
*
|
|
34
|
+
* It is not a filesystem import, and the distinction is the whole design. The
|
|
35
|
+
* proxy resolves and reads the file **before** the sandbox is instantiated,
|
|
36
|
+
* from paths derived from the tool call under evaluation, confined to a
|
|
37
|
+
* configured root, extension-allowlisted and size-capped. The guest passes a
|
|
38
|
+
* path as a *lookup key* into that fixed table; there is no code path from a
|
|
39
|
+
* guest string to an `open(2)`. WASI stays unavailable, and a rule still cannot
|
|
40
|
+
* name a file the agent did not.
|
|
41
|
+
*
|
|
42
|
+
* `packages/proxy/src/wasm/referenced_files.rs` documents every guard and what
|
|
43
|
+
* each one costs.
|
|
44
|
+
*/
|
|
45
|
+
/** Exactly what `env` provides to a rule. Nothing else resolves. */
|
|
46
|
+
export declare const WASM_HOST_IMPORTS: readonly ["log_info", "abort", "trace", "read_referenced_file"];
|
|
47
|
+
export type WasmHostImport = (typeof WASM_HOST_IMPORTS)[number];
|
|
48
|
+
/**
|
|
49
|
+
* Names every function a compiled rule imports that the host will not provide.
|
|
50
|
+
*
|
|
51
|
+
* Returns `[]` for a rule that links. Callers should refuse anything else:
|
|
52
|
+
* loading such a rule produces a plugin that is listed, counted, and silently
|
|
53
|
+
* bypassed on every request.
|
|
54
|
+
*/
|
|
55
|
+
export declare function unsupportedWasmImports(module: WebAssembly.Module): string[];
|
|
56
|
+
/** A remedy for the imports authors actually hit, not just a refusal. */
|
|
57
|
+
export declare function explainWasmImport(name: string): string;
|
|
58
|
+
//# sourceMappingURL=wasmHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasmHost.d.ts","sourceRoot":"","sources":["../src/wasmHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;;;;GAaG;AAEH,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,iEAAkE,CAAA;AAEhG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,CAM3E;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtD"}
|
package/dist/wasmHost.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The host functions a WASM governance rule may import — one definition.
|
|
4
|
+
*
|
|
5
|
+
* The Rust source of truth is `HOST_IMPORTS` in
|
|
6
|
+
* `packages/proxy/src/wasm/host.rs`; this is its TypeScript mirror, kept honest
|
|
7
|
+
* by `tools/scripts/check-wasm-host-imports.js`, which reads both from source
|
|
8
|
+
* and fails the build if they disagree.
|
|
9
|
+
*
|
|
10
|
+
* ## Why there is a mirror at all
|
|
11
|
+
*
|
|
12
|
+
* Three TypeScript surfaces have to know this list — the CLI's validation
|
|
13
|
+
* sandbox, the control plane's rule-upload endpoint, and the SDK's own test
|
|
14
|
+
* harness — and each of them had its own copy. That is exactly how the original
|
|
15
|
+
* defect happened: the CLI offered a fourth import, `seed`, that the proxy had
|
|
16
|
+
* never registered, so a rule reaching `Math.random()` passed
|
|
17
|
+
* `intutic policy test`, passed `intutic policy install`, and then failed to
|
|
18
|
+
* link inside the proxy. The WASM runner fails **open**, so the rule enforced
|
|
19
|
+
* nothing and nothing said so.
|
|
20
|
+
*
|
|
21
|
+
* Adding a copy is the failure mode. Import this.
|
|
22
|
+
*
|
|
23
|
+
* ## Why `seed` is absent, permanently
|
|
24
|
+
*
|
|
25
|
+
* AssemblyScript emits `env.seed` for anything reaching `Math.random()`. It is
|
|
26
|
+
* refused on purpose rather than registered: a governance verdict that can
|
|
27
|
+
* differ on identical input cannot be audited, and the replay and mutation
|
|
28
|
+
* corpus gates both assume determinism.
|
|
29
|
+
*
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.WASM_HOST_IMPORTS = void 0;
|
|
34
|
+
exports.unsupportedWasmImports = unsupportedWasmImports;
|
|
35
|
+
exports.explainWasmImport = explainWasmImport;
|
|
36
|
+
/**
|
|
37
|
+
* ## Why `read_referenced_file` is present
|
|
38
|
+
*
|
|
39
|
+
* It is not a filesystem import, and the distinction is the whole design. The
|
|
40
|
+
* proxy resolves and reads the file **before** the sandbox is instantiated,
|
|
41
|
+
* from paths derived from the tool call under evaluation, confined to a
|
|
42
|
+
* configured root, extension-allowlisted and size-capped. The guest passes a
|
|
43
|
+
* path as a *lookup key* into that fixed table; there is no code path from a
|
|
44
|
+
* guest string to an `open(2)`. WASI stays unavailable, and a rule still cannot
|
|
45
|
+
* name a file the agent did not.
|
|
46
|
+
*
|
|
47
|
+
* `packages/proxy/src/wasm/referenced_files.rs` documents every guard and what
|
|
48
|
+
* each one costs.
|
|
49
|
+
*/
|
|
50
|
+
/** Exactly what `env` provides to a rule. Nothing else resolves. */
|
|
51
|
+
exports.WASM_HOST_IMPORTS = ['log_info', 'abort', 'trace', 'read_referenced_file'];
|
|
52
|
+
/**
|
|
53
|
+
* Names every function a compiled rule imports that the host will not provide.
|
|
54
|
+
*
|
|
55
|
+
* Returns `[]` for a rule that links. Callers should refuse anything else:
|
|
56
|
+
* loading such a rule produces a plugin that is listed, counted, and silently
|
|
57
|
+
* bypassed on every request.
|
|
58
|
+
*/
|
|
59
|
+
function unsupportedWasmImports(module) {
|
|
60
|
+
const allowed = new Set(exports.WASM_HOST_IMPORTS);
|
|
61
|
+
return WebAssembly.Module.imports(module)
|
|
62
|
+
.filter((i) => i.kind === 'function')
|
|
63
|
+
.filter((i) => i.module !== 'env' || !allowed.has(i.name))
|
|
64
|
+
.map((i) => `${i.module}.${i.name}`);
|
|
65
|
+
}
|
|
66
|
+
/** A remedy for the imports authors actually hit, not just a refusal. */
|
|
67
|
+
function explainWasmImport(name) {
|
|
68
|
+
if (name === 'env.seed') {
|
|
69
|
+
return ('env.seed — emitted by Math.random(). Randomness is refused on purpose: a ' +
|
|
70
|
+
'verdict that can differ on identical input cannot be audited. Derive any ' +
|
|
71
|
+
'variation you need from the request context instead.');
|
|
72
|
+
}
|
|
73
|
+
if (name.startsWith('wasi_') || name.includes('fd_') || name.includes('clock_')) {
|
|
74
|
+
return (`${name} — WASI is not available. A rule that needs to look inside a file a tool ` +
|
|
75
|
+
'call references should import env.read_referenced_file, which the host resolves, ' +
|
|
76
|
+
'confines to a configured root and reads on the rule’s behalf.');
|
|
77
|
+
}
|
|
78
|
+
return `${name} — not provided by the proxy sandbox.`;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=wasmHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasmHost.js","sourceRoot":"","sources":["../src/wasmHost.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AA6BH,wDAMC;AAGD,8CAgBC;AApDD;;;;;;;;;;;;;GAaG;AAEH,oEAAoE;AACvD,QAAA,iBAAiB,GAAG,CAAC,UAAU,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