@kya-os/checkpoint-wasm-runtime 1.1.2 → 1.2.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 +81 -0
- package/dist/adapters.d.mts +1 -1
- package/dist/adapters.d.ts +1 -1
- package/dist/edge.js +1 -1
- package/dist/edge.mjs +2 -2
- package/dist/engine-edge.d.mts +3 -3
- package/dist/engine-edge.d.ts +3 -3
- package/dist/engine.d.mts +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/engine.mjs +5 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +5 -2
- package/dist/kya_os_engine_bg.wasm +0 -0
- package/dist/node.js +1 -1
- package/dist/node.mjs +5 -2
- package/dist/orchestrator-edge.d.mts +1 -1
- package/dist/orchestrator-edge.d.ts +1 -1
- package/dist/orchestrator-edge.js +28 -7
- package/dist/orchestrator-edge.mjs +28 -7
- package/dist/orchestrator-node.d.mts +1 -1
- package/dist/orchestrator-node.d.ts +1 -1
- package/dist/orchestrator-node.js +29 -7
- package/dist/orchestrator-node.mjs +34 -10
- package/dist/orchestrator.d.mts +1 -1
- package/dist/orchestrator.d.ts +1 -1
- package/dist/orchestrator.js +31 -14
- package/dist/orchestrator.mjs +36 -17
- package/dist/{types-D0j85fF0.d.mts → types-ByrdPLL2.d.mts} +2 -1
- package/dist/{types-D0j85fF0.d.ts → types-ByrdPLL2.d.ts} +2 -1
- package/package.json +2 -2
- package/wasm/agentshield_wasm_bg.wasm +0 -0
- package/wasm/kya-os-engine/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine-web/kya_os_engine_bg.wasm +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
1
|
# @kya-os/checkpoint-wasm-runtime
|
|
2
2
|
|
|
3
|
+
## 1.2.0 — 2026-05-18
|
|
4
|
+
|
|
5
|
+
Phase-D.8b engine-surface expansion.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `VerifyResult.detectionDetail`, emitted by `kya-os-engine` in the same
|
|
10
|
+
pass as `decision`. This preserves the rich detection shape (`isAgent`,
|
|
11
|
+
`detectedAgent`, `agentType`, `verificationMethod`, `riskLevel`,
|
|
12
|
+
`reasons`) without forcing consumers to reconstruct it from
|
|
13
|
+
`decision.signals`.
|
|
14
|
+
- Cross-runtime parity now compares `detectionDetail` across Rust,
|
|
15
|
+
Node-WASM, and Edge-WASM fixtures.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `verifyRequest()` and `verifyRequestEdge()` now return the richer
|
|
20
|
+
`VerifyResult` shape consistently for normal results and parse-error
|
|
21
|
+
fallbacks.
|
|
22
|
+
|
|
23
|
+
## 1.1.3 — 2026-05-17
|
|
24
|
+
|
|
25
|
+
**Critical runtime fix for Express on Vercel.** 1.1.2 still failed at
|
|
26
|
+
deploy time on `@vercel/node`-hosted Express functions with:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Error: Dynamic require of "fs" is not supported
|
|
30
|
+
at .../dist/orchestrator-node.mjs:14:9
|
|
31
|
+
at wasm/kya-os-engine/kya_os_engine.js (...:454:21)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Root cause
|
|
35
|
+
|
|
36
|
+
The wasm-bindgen `--target nodejs` glue contains literal
|
|
37
|
+
`require('fs').readFileSync(...)` to load the .wasm artifact. esbuild
|
|
38
|
+
rewrites that to its `__require('fs')` helper. The helper checks
|
|
39
|
+
`typeof require !== "undefined"` — in a pure ESM context (.mjs at
|
|
40
|
+
runtime) there is no global `require`, so the helper falls through
|
|
41
|
+
to its `throw Error('Dynamic require of "X" is not supported')`.
|
|
42
|
+
|
|
43
|
+
`shims: true` injects `__dirname` / `__filename` shims but does **not**
|
|
44
|
+
inject a `require` shim. The two are separate concerns in tsup.
|
|
45
|
+
|
|
46
|
+
### Fix
|
|
47
|
+
|
|
48
|
+
Format-aware tsup `banner` injects
|
|
49
|
+
`const require = createRequire(import.meta.url);` at the top of every
|
|
50
|
+
ESM (.mjs) Node-target bundle. esbuild's `__require` helper then
|
|
51
|
+
finds `require` in scope and uses it for the .wasm load. CJS bundles
|
|
52
|
+
are unchanged (they already have a real `require` global). Edge
|
|
53
|
+
bundles are unchanged (separate tsup config, no banner — Edge runtimes
|
|
54
|
+
do not support `node:module`).
|
|
55
|
+
|
|
56
|
+
### Why the previous "pivot to Express" path didn't escape this
|
|
57
|
+
|
|
58
|
+
The architect's earlier verdict (close [#2616](https://github.com/Know-That-Ai/agent-shield/pull/2616),
|
|
59
|
+
pivot bench to Express) was made under the assumption that Express's
|
|
60
|
+
direct Node import flow would bypass the bundler-interop layers that
|
|
61
|
+
broke Next.js Turbopack. Empirically, `@vercel/node` compiles the
|
|
62
|
+
function entry into a CJS→ESM hybrid that loads
|
|
63
|
+
`dist/orchestrator-node.mjs` through `loadESMFromCJS` — which executes
|
|
64
|
+
the .mjs in pure ESM context. Same require-less environment, same
|
|
65
|
+
failure. Express was not an escape.
|
|
66
|
+
|
|
67
|
+
### Followup
|
|
68
|
+
|
|
69
|
+
[SDK-Next.js-Integration-Audit-1 (#2618)](https://github.com/Know-That-Ai/agent-shield/issues/2618)
|
|
70
|
+
Option B (wasm-bindgen `--target bundler`) remains the proper long-term
|
|
71
|
+
fix — it generates wasm-bindgen glue that does not require runtime CJS
|
|
72
|
+
globals. Until that lands, the createRequire banner is the minimal
|
|
73
|
+
defense for all Node-host runtimes.
|
|
74
|
+
|
|
75
|
+
### Surfaced by
|
|
76
|
+
|
|
77
|
+
Bench-Before-After-1 §3.8 — `bench-new-express` deployment on Vercel
|
|
78
|
+
returned `FUNCTION_INVOCATION_FAILED` with the stack trace above. The
|
|
79
|
+
stack proved the failure persists past the Express pivot, requiring
|
|
80
|
+
the wasm-runtime fix to be re-opened.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
3
84
|
## 1.1.2 — 2026-05-17
|
|
4
85
|
|
|
5
86
|
Fourth in the SDK-WASM-Bundler-Loader sequence. The 1.1.1 fix made
|
package/dist/adapters.d.mts
CHANGED
package/dist/adapters.d.ts
CHANGED
package/dist/edge.js
CHANGED
|
@@ -1218,7 +1218,7 @@ var RulesDetector = class {
|
|
|
1218
1218
|
return;
|
|
1219
1219
|
}
|
|
1220
1220
|
try {
|
|
1221
|
-
this.rules = checkpointShared.
|
|
1221
|
+
this.rules = checkpointShared.RuleLoader.loadSync();
|
|
1222
1222
|
this.ready = true;
|
|
1223
1223
|
} catch (error) {
|
|
1224
1224
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
package/dist/edge.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RuleLoader } from '@kya-os/checkpoint-shared';
|
|
2
2
|
|
|
3
3
|
// src/types.ts
|
|
4
4
|
var CONFIDENCE = {
|
|
@@ -1216,7 +1216,7 @@ var RulesDetector = class {
|
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
try {
|
|
1219
|
-
this.rules =
|
|
1219
|
+
this.rules = RuleLoader.loadSync();
|
|
1220
1220
|
this.ready = true;
|
|
1221
1221
|
} catch (error) {
|
|
1222
1222
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
package/dist/engine-edge.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-
|
|
2
|
-
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-
|
|
3
|
-
export { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-ByrdPLL2.mjs';
|
|
2
|
+
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-ByrdPLL2.mjs';
|
|
3
|
+
export { DetectionDetail, McpIPayload } from '@kya-os/checkpoint-shared';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `kya-os-engine` WASM bridge for edge runtimes — Edge-WASM-1.
|
package/dist/engine-edge.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-
|
|
2
|
-
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-
|
|
3
|
-
export { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-ByrdPLL2.js';
|
|
2
|
+
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-ByrdPLL2.js';
|
|
3
|
+
export { DetectionDetail, McpIPayload } from '@kya-os/checkpoint-shared';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `kya-os-engine` WASM bridge for edge runtimes — Edge-WASM-1.
|
package/dist/engine.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-
|
|
2
|
-
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-
|
|
3
|
-
export { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-ByrdPLL2.mjs';
|
|
2
|
+
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-ByrdPLL2.mjs';
|
|
3
|
+
export { DetectionDetail, McpIPayload } from '@kya-os/checkpoint-shared';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `kya-os-engine` WASM bridge — E-1 (#2486 follow-up).
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-
|
|
2
|
-
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-
|
|
3
|
-
export { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { A as AgentRequest, C as ContextSpec, V as VerifyResult } from './types-ByrdPLL2.js';
|
|
2
|
+
export { a as A2ARequest, b as A2PRequest, B as BlockReason, c as ChallengeParams, D as Decision, d as DidDocument, E as EnforcementMode, e as EngineInfo, H as HttpSignedRequest, I as InstructPayload, K as KeyType, M as McpIRequest, P as PlainHttpRequest, R as RedirectTarget, S as SuggestedAction, f as VerificationMethod } from './types-ByrdPLL2.js';
|
|
3
|
+
export { DetectionDetail, McpIPayload } from '@kya-os/checkpoint-shared';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `kya-os-engine` WASM bridge — E-1 (#2486 follow-up).
|
package/dist/engine.mjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import { fileURLToPath } from 'url';
|
|
3
4
|
|
|
5
|
+
const require$1 = createRequire(import.meta.url);
|
|
4
6
|
var __create = Object.create;
|
|
5
7
|
var __defProp = Object.defineProperty;
|
|
6
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
9
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
11
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
12
|
+
var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
13
|
+
get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b]
|
|
12
14
|
}) : x)(function(x) {
|
|
13
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
+
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
14
16
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
15
17
|
});
|
|
16
18
|
var __esm = (fn, res) => function __init() {
|
package/dist/index.js
CHANGED
|
@@ -1443,7 +1443,7 @@ var RulesDetector = class {
|
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
1445
|
try {
|
|
1446
|
-
this.rules = checkpointShared.
|
|
1446
|
+
this.rules = checkpointShared.RuleLoader.loadSync();
|
|
1447
1447
|
this.ready = true;
|
|
1448
1448
|
} catch (error) {
|
|
1449
1449
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { RuleLoader } from '@kya-os/checkpoint-shared';
|
|
3
|
+
|
|
4
|
+
createRequire(import.meta.url);
|
|
2
5
|
|
|
3
6
|
// src/types.ts
|
|
4
7
|
var CONFIDENCE = {
|
|
@@ -1439,7 +1442,7 @@ var RulesDetector = class {
|
|
|
1439
1442
|
return;
|
|
1440
1443
|
}
|
|
1441
1444
|
try {
|
|
1442
|
-
this.rules =
|
|
1445
|
+
this.rules = RuleLoader.loadSync();
|
|
1443
1446
|
this.ready = true;
|
|
1444
1447
|
} catch (error) {
|
|
1445
1448
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
|
Binary file
|
package/dist/node.js
CHANGED
|
@@ -786,7 +786,7 @@ var RulesDetector = class {
|
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
788
788
|
try {
|
|
789
|
-
this.rules = checkpointShared.
|
|
789
|
+
this.rules = checkpointShared.RuleLoader.loadSync();
|
|
790
790
|
this.ready = true;
|
|
791
791
|
} catch (error) {
|
|
792
792
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { RuleLoader } from '@kya-os/checkpoint-shared';
|
|
3
|
+
|
|
4
|
+
createRequire(import.meta.url);
|
|
2
5
|
|
|
3
6
|
// src/types.ts
|
|
4
7
|
var CONFIDENCE = {
|
|
@@ -784,7 +787,7 @@ var RulesDetector = class {
|
|
|
784
787
|
return;
|
|
785
788
|
}
|
|
786
789
|
try {
|
|
787
|
-
this.rules =
|
|
790
|
+
this.rules = RuleLoader.loadSync();
|
|
788
791
|
this.ready = true;
|
|
789
792
|
} catch (error) {
|
|
790
793
|
console.warn("[RulesDetector] Failed to load rules:", error);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { initEngineEdge } from './engine-edge.mjs';
|
|
2
|
-
import { E as EnforcementMode, A as AgentRequest, V as VerifyResult } from './types-
|
|
2
|
+
import { E as EnforcementMode, A as AgentRequest, V as VerifyResult } from './types-ByrdPLL2.mjs';
|
|
3
3
|
import { DidResolverAdapter, StatusListCacheAdapter, ReputationOracleAdapter, PolicyEvaluatorAdapter, ClockAdapter } from './adapters.mjs';
|
|
4
4
|
import '@kya-os/checkpoint-shared';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { initEngineEdge } from './engine-edge.js';
|
|
2
|
-
import { E as EnforcementMode, A as AgentRequest, V as VerifyResult } from './types-
|
|
2
|
+
import { E as EnforcementMode, A as AgentRequest, V as VerifyResult } from './types-ByrdPLL2.js';
|
|
3
3
|
import { DidResolverAdapter, StatusListCacheAdapter, ReputationOracleAdapter, PolicyEvaluatorAdapter, ClockAdapter } from './adapters.js';
|
|
4
4
|
import '@kya-os/checkpoint-shared';
|
|
5
5
|
|
|
@@ -799,6 +799,32 @@ function bodyAsBytes(body) {
|
|
|
799
799
|
return [];
|
|
800
800
|
}
|
|
801
801
|
|
|
802
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
803
|
+
function hostSynthesizedEngineInfo() {
|
|
804
|
+
return {
|
|
805
|
+
name: "checkpoint-engine-wasm",
|
|
806
|
+
version: "0.0.0-host-synth",
|
|
807
|
+
rulesetHash: "sha256:host-synthesized",
|
|
808
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
809
|
+
extras: { synthesized: true }
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
function parseErrorDetectionDetail(detail) {
|
|
813
|
+
return {
|
|
814
|
+
isAgent: false,
|
|
815
|
+
confidence: 0,
|
|
816
|
+
detectionClass: { type: "IncompleteData" },
|
|
817
|
+
confidenceLevel: "low",
|
|
818
|
+
reasons: [detail],
|
|
819
|
+
signals: [],
|
|
820
|
+
verificationMethod: "error",
|
|
821
|
+
riskLevel: "high",
|
|
822
|
+
forgeabilityRisk: "high",
|
|
823
|
+
timestamp: 0,
|
|
824
|
+
engine: hostSynthesizedEngineInfo()
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
|
|
802
828
|
// src/engine/orchestrator/render-decision.ts
|
|
803
829
|
function renderDecisionAsResponse(result) {
|
|
804
830
|
const baseHeaders = buildBaseHeaders(result);
|
|
@@ -1049,14 +1075,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
1049
1075
|
detail
|
|
1050
1076
|
}
|
|
1051
1077
|
},
|
|
1078
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1052
1079
|
enforcementMode,
|
|
1053
|
-
engineInfo:
|
|
1054
|
-
name: "checkpoint-engine-wasm",
|
|
1055
|
-
version: "0.0.0-host-synth",
|
|
1056
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1057
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1058
|
-
extras: { synthesized: true }
|
|
1059
|
-
}
|
|
1080
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1060
1081
|
};
|
|
1061
1082
|
}
|
|
1062
1083
|
function defaultLogger(msg) {
|
|
@@ -796,6 +796,32 @@ function bodyAsBytes(body) {
|
|
|
796
796
|
return [];
|
|
797
797
|
}
|
|
798
798
|
|
|
799
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
800
|
+
function hostSynthesizedEngineInfo() {
|
|
801
|
+
return {
|
|
802
|
+
name: "checkpoint-engine-wasm",
|
|
803
|
+
version: "0.0.0-host-synth",
|
|
804
|
+
rulesetHash: "sha256:host-synthesized",
|
|
805
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
806
|
+
extras: { synthesized: true }
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
function parseErrorDetectionDetail(detail) {
|
|
810
|
+
return {
|
|
811
|
+
isAgent: false,
|
|
812
|
+
confidence: 0,
|
|
813
|
+
detectionClass: { type: "IncompleteData" },
|
|
814
|
+
confidenceLevel: "low",
|
|
815
|
+
reasons: [detail],
|
|
816
|
+
signals: [],
|
|
817
|
+
verificationMethod: "error",
|
|
818
|
+
riskLevel: "high",
|
|
819
|
+
forgeabilityRisk: "high",
|
|
820
|
+
timestamp: 0,
|
|
821
|
+
engine: hostSynthesizedEngineInfo()
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
|
|
799
825
|
// src/engine/orchestrator/render-decision.ts
|
|
800
826
|
function renderDecisionAsResponse(result) {
|
|
801
827
|
const baseHeaders = buildBaseHeaders(result);
|
|
@@ -1046,14 +1072,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
1046
1072
|
detail
|
|
1047
1073
|
}
|
|
1048
1074
|
},
|
|
1075
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1049
1076
|
enforcementMode,
|
|
1050
|
-
engineInfo:
|
|
1051
|
-
name: "checkpoint-engine-wasm",
|
|
1052
|
-
version: "0.0.0-host-synth",
|
|
1053
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1054
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1055
|
-
extras: { synthesized: true }
|
|
1056
|
-
}
|
|
1077
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1057
1078
|
};
|
|
1058
1079
|
}
|
|
1059
1080
|
function defaultLogger(msg) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as DidDocument, D as Decision, E as EnforcementMode, V as VerifyResult, A as AgentRequest } from './types-
|
|
1
|
+
import { d as DidDocument, D as Decision, E as EnforcementMode, V as VerifyResult, A as AgentRequest } from './types-ByrdPLL2.mjs';
|
|
2
2
|
import '@kya-os/checkpoint-shared';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as DidDocument, D as Decision, E as EnforcementMode, V as VerifyResult, A as AgentRequest } from './types-
|
|
1
|
+
import { d as DidDocument, D as Decision, E as EnforcementMode, V as VerifyResult, A as AgentRequest } from './types-ByrdPLL2.js';
|
|
2
2
|
import '@kya-os/checkpoint-shared';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -741,6 +741,33 @@ function bodyAsBytes(body) {
|
|
|
741
741
|
return [];
|
|
742
742
|
}
|
|
743
743
|
|
|
744
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
745
|
+
init_cjs_shims();
|
|
746
|
+
function hostSynthesizedEngineInfo() {
|
|
747
|
+
return {
|
|
748
|
+
name: "checkpoint-engine-wasm",
|
|
749
|
+
version: "0.0.0-host-synth",
|
|
750
|
+
rulesetHash: "sha256:host-synthesized",
|
|
751
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
752
|
+
extras: { synthesized: true }
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function parseErrorDetectionDetail(detail) {
|
|
756
|
+
return {
|
|
757
|
+
isAgent: false,
|
|
758
|
+
confidence: 0,
|
|
759
|
+
detectionClass: { type: "IncompleteData" },
|
|
760
|
+
confidenceLevel: "low",
|
|
761
|
+
reasons: [detail],
|
|
762
|
+
signals: [],
|
|
763
|
+
verificationMethod: "error",
|
|
764
|
+
riskLevel: "high",
|
|
765
|
+
forgeabilityRisk: "high",
|
|
766
|
+
timestamp: 0,
|
|
767
|
+
engine: hostSynthesizedEngineInfo()
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
|
|
744
771
|
// src/engine/orchestrator/verify-request.ts
|
|
745
772
|
var DEFAULT_REPUTATION_BASELINE = 1;
|
|
746
773
|
function makeVerifyRequest(opts) {
|
|
@@ -828,14 +855,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
828
855
|
detail
|
|
829
856
|
}
|
|
830
857
|
},
|
|
858
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
831
859
|
enforcementMode,
|
|
832
|
-
engineInfo:
|
|
833
|
-
name: "checkpoint-engine-wasm",
|
|
834
|
-
version: "0.0.0-host-synth",
|
|
835
|
-
rulesetHash: "sha256:host-synthesized",
|
|
836
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
837
|
-
extras: { synthesized: true }
|
|
838
|
-
}
|
|
860
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
839
861
|
};
|
|
840
862
|
}
|
|
841
863
|
function defaultLogger(msg) {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import { fileURLToPath } from 'url';
|
|
3
4
|
|
|
5
|
+
const require$1 = createRequire(import.meta.url);
|
|
4
6
|
var __create = Object.create;
|
|
5
7
|
var __defProp = Object.defineProperty;
|
|
6
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
9
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
11
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
12
|
+
var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
13
|
+
get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b]
|
|
12
14
|
}) : x)(function(x) {
|
|
13
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
+
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
14
16
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
15
17
|
});
|
|
16
18
|
var __esm = (fn, res) => function __init() {
|
|
@@ -744,6 +746,33 @@ function bodyAsBytes(body) {
|
|
|
744
746
|
return [];
|
|
745
747
|
}
|
|
746
748
|
|
|
749
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
750
|
+
init_esm_shims();
|
|
751
|
+
function hostSynthesizedEngineInfo() {
|
|
752
|
+
return {
|
|
753
|
+
name: "checkpoint-engine-wasm",
|
|
754
|
+
version: "0.0.0-host-synth",
|
|
755
|
+
rulesetHash: "sha256:host-synthesized",
|
|
756
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
757
|
+
extras: { synthesized: true }
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function parseErrorDetectionDetail(detail) {
|
|
761
|
+
return {
|
|
762
|
+
isAgent: false,
|
|
763
|
+
confidence: 0,
|
|
764
|
+
detectionClass: { type: "IncompleteData" },
|
|
765
|
+
confidenceLevel: "low",
|
|
766
|
+
reasons: [detail],
|
|
767
|
+
signals: [],
|
|
768
|
+
verificationMethod: "error",
|
|
769
|
+
riskLevel: "high",
|
|
770
|
+
forgeabilityRisk: "high",
|
|
771
|
+
timestamp: 0,
|
|
772
|
+
engine: hostSynthesizedEngineInfo()
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
|
|
747
776
|
// src/engine/orchestrator/verify-request.ts
|
|
748
777
|
var DEFAULT_REPUTATION_BASELINE = 1;
|
|
749
778
|
function makeVerifyRequest(opts) {
|
|
@@ -831,14 +860,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
831
860
|
detail
|
|
832
861
|
}
|
|
833
862
|
},
|
|
863
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
834
864
|
enforcementMode,
|
|
835
|
-
engineInfo:
|
|
836
|
-
name: "checkpoint-engine-wasm",
|
|
837
|
-
version: "0.0.0-host-synth",
|
|
838
|
-
rulesetHash: "sha256:host-synthesized",
|
|
839
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
840
|
-
extras: { synthesized: true }
|
|
841
|
-
}
|
|
865
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
842
866
|
};
|
|
843
867
|
}
|
|
844
868
|
function defaultLogger(msg) {
|
package/dist/orchestrator.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VerifyRequestOpts, IncomingHttpLike } from './orchestrator-node.mjs';
|
|
2
2
|
export { BuildAgentRequestOpts, RenderedResponse, buildAgentRequest, extractAgentDid, extractCredentialStatusUrl, extractIssuer, hasMalformedJwsBody, makeVerifyRequest, renderDecisionAsResponse, verifyRequest } from './orchestrator-node.mjs';
|
|
3
|
-
import { V as VerifyResult } from './types-
|
|
3
|
+
import { V as VerifyResult } from './types-ByrdPLL2.mjs';
|
|
4
4
|
import '@kya-os/checkpoint-shared';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VerifyRequestOpts, IncomingHttpLike } from './orchestrator-node.js';
|
|
2
2
|
export { BuildAgentRequestOpts, RenderedResponse, buildAgentRequest, extractAgentDid, extractCredentialStatusUrl, extractIssuer, hasMalformedJwsBody, makeVerifyRequest, renderDecisionAsResponse, verifyRequest } from './orchestrator-node.js';
|
|
3
|
-
import { V as VerifyResult } from './types-
|
|
3
|
+
import { V as VerifyResult } from './types-ByrdPLL2.js';
|
|
4
4
|
import '@kya-os/checkpoint-shared';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/orchestrator.js
CHANGED
|
@@ -1244,6 +1244,33 @@ function bodyAsBytes(body) {
|
|
|
1244
1244
|
return [];
|
|
1245
1245
|
}
|
|
1246
1246
|
|
|
1247
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
1248
|
+
init_cjs_shims();
|
|
1249
|
+
function hostSynthesizedEngineInfo() {
|
|
1250
|
+
return {
|
|
1251
|
+
name: "checkpoint-engine-wasm",
|
|
1252
|
+
version: "0.0.0-host-synth",
|
|
1253
|
+
rulesetHash: "sha256:host-synthesized",
|
|
1254
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
1255
|
+
extras: { synthesized: true }
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
function parseErrorDetectionDetail(detail) {
|
|
1259
|
+
return {
|
|
1260
|
+
isAgent: false,
|
|
1261
|
+
confidence: 0,
|
|
1262
|
+
detectionClass: { type: "IncompleteData" },
|
|
1263
|
+
confidenceLevel: "low",
|
|
1264
|
+
reasons: [detail],
|
|
1265
|
+
signals: [],
|
|
1266
|
+
verificationMethod: "error",
|
|
1267
|
+
riskLevel: "high",
|
|
1268
|
+
forgeabilityRisk: "high",
|
|
1269
|
+
timestamp: 0,
|
|
1270
|
+
engine: hostSynthesizedEngineInfo()
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1247
1274
|
// src/engine/orchestrator/verify-request.ts
|
|
1248
1275
|
var DEFAULT_REPUTATION_BASELINE = 1;
|
|
1249
1276
|
function makeVerifyRequest(opts) {
|
|
@@ -1331,14 +1358,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
1331
1358
|
detail
|
|
1332
1359
|
}
|
|
1333
1360
|
},
|
|
1361
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1334
1362
|
enforcementMode,
|
|
1335
|
-
engineInfo:
|
|
1336
|
-
name: "checkpoint-engine-wasm",
|
|
1337
|
-
version: "0.0.0-host-synth",
|
|
1338
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1339
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1340
|
-
extras: { synthesized: true }
|
|
1341
|
-
}
|
|
1363
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1342
1364
|
};
|
|
1343
1365
|
}
|
|
1344
1366
|
function defaultLogger(msg) {
|
|
@@ -1625,14 +1647,9 @@ function blockWithParseError2(detail, enforcementMode) {
|
|
|
1625
1647
|
detail
|
|
1626
1648
|
}
|
|
1627
1649
|
},
|
|
1650
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1628
1651
|
enforcementMode,
|
|
1629
|
-
engineInfo:
|
|
1630
|
-
name: "checkpoint-engine-wasm",
|
|
1631
|
-
version: "0.0.0-host-synth",
|
|
1632
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1633
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1634
|
-
extras: { synthesized: true }
|
|
1635
|
-
}
|
|
1652
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1636
1653
|
};
|
|
1637
1654
|
}
|
|
1638
1655
|
function defaultLogger2(msg) {
|
package/dist/orchestrator.mjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import { fileURLToPath } from 'url';
|
|
3
4
|
|
|
5
|
+
const require$1 = createRequire(import.meta.url);
|
|
4
6
|
var __create = Object.create;
|
|
5
7
|
var __defProp = Object.defineProperty;
|
|
6
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
9
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
11
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
12
|
+
var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
13
|
+
get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b]
|
|
12
14
|
}) : x)(function(x) {
|
|
13
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
+
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
14
16
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
15
17
|
});
|
|
16
18
|
var __esm = (fn, res) => function __init() {
|
|
@@ -1244,6 +1246,33 @@ function bodyAsBytes(body) {
|
|
|
1244
1246
|
return [];
|
|
1245
1247
|
}
|
|
1246
1248
|
|
|
1249
|
+
// src/engine/orchestrator/synthetic-results.ts
|
|
1250
|
+
init_esm_shims();
|
|
1251
|
+
function hostSynthesizedEngineInfo() {
|
|
1252
|
+
return {
|
|
1253
|
+
name: "checkpoint-engine-wasm",
|
|
1254
|
+
version: "0.0.0-host-synth",
|
|
1255
|
+
rulesetHash: "sha256:host-synthesized",
|
|
1256
|
+
rulesetVersion: "0.0.0-host-synth",
|
|
1257
|
+
extras: { synthesized: true }
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
function parseErrorDetectionDetail(detail) {
|
|
1261
|
+
return {
|
|
1262
|
+
isAgent: false,
|
|
1263
|
+
confidence: 0,
|
|
1264
|
+
detectionClass: { type: "IncompleteData" },
|
|
1265
|
+
confidenceLevel: "low",
|
|
1266
|
+
reasons: [detail],
|
|
1267
|
+
signals: [],
|
|
1268
|
+
verificationMethod: "error",
|
|
1269
|
+
riskLevel: "high",
|
|
1270
|
+
forgeabilityRisk: "high",
|
|
1271
|
+
timestamp: 0,
|
|
1272
|
+
engine: hostSynthesizedEngineInfo()
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1247
1276
|
// src/engine/orchestrator/verify-request.ts
|
|
1248
1277
|
var DEFAULT_REPUTATION_BASELINE = 1;
|
|
1249
1278
|
function makeVerifyRequest(opts) {
|
|
@@ -1331,14 +1360,9 @@ function blockWithParseError(detail, enforcementMode) {
|
|
|
1331
1360
|
detail
|
|
1332
1361
|
}
|
|
1333
1362
|
},
|
|
1363
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1334
1364
|
enforcementMode,
|
|
1335
|
-
engineInfo:
|
|
1336
|
-
name: "checkpoint-engine-wasm",
|
|
1337
|
-
version: "0.0.0-host-synth",
|
|
1338
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1339
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1340
|
-
extras: { synthesized: true }
|
|
1341
|
-
}
|
|
1365
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1342
1366
|
};
|
|
1343
1367
|
}
|
|
1344
1368
|
function defaultLogger(msg) {
|
|
@@ -1625,14 +1649,9 @@ function blockWithParseError2(detail, enforcementMode) {
|
|
|
1625
1649
|
detail
|
|
1626
1650
|
}
|
|
1627
1651
|
},
|
|
1652
|
+
detectionDetail: parseErrorDetectionDetail(detail),
|
|
1628
1653
|
enforcementMode,
|
|
1629
|
-
engineInfo:
|
|
1630
|
-
name: "checkpoint-engine-wasm",
|
|
1631
|
-
version: "0.0.0-host-synth",
|
|
1632
|
-
rulesetHash: "sha256:host-synthesized",
|
|
1633
|
-
rulesetVersion: "0.0.0-host-synth",
|
|
1634
|
-
extras: { synthesized: true }
|
|
1635
|
-
}
|
|
1654
|
+
engineInfo: hostSynthesizedEngineInfo()
|
|
1636
1655
|
};
|
|
1637
1656
|
}
|
|
1638
1657
|
function defaultLogger2(msg) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { McpIPayload, DetectionDetail } from '@kya-os/checkpoint-shared';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* TypeScript shapes for the `kya-os-engine` WASM `verify` ABI (E-1).
|
|
@@ -138,6 +138,7 @@ interface EngineInfo {
|
|
|
138
138
|
}
|
|
139
139
|
interface VerifyResult {
|
|
140
140
|
decision: Decision;
|
|
141
|
+
detectionDetail: DetectionDetail;
|
|
141
142
|
enforcementMode: EnforcementMode;
|
|
142
143
|
engineInfo: EngineInfo;
|
|
143
144
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpIPayload } from '@kya-os/checkpoint-shared';
|
|
1
|
+
import { McpIPayload, DetectionDetail } from '@kya-os/checkpoint-shared';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* TypeScript shapes for the `kya-os-engine` WASM `verify` ABI (E-1).
|
|
@@ -138,6 +138,7 @@ interface EngineInfo {
|
|
|
138
138
|
}
|
|
139
139
|
interface VerifyResult {
|
|
140
140
|
decision: Decision;
|
|
141
|
+
detectionDetail: DetectionDetail;
|
|
141
142
|
enforcementMode: EnforcementMode;
|
|
142
143
|
engineInfo: EngineInfo;
|
|
143
144
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/checkpoint-wasm-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Checkpoint WASM runtime for AI agent detection across all environments (formerly @kya-os/agentshield-wasm-runtime)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"multiformats": "^13",
|
|
120
|
-
"@kya-os/checkpoint-shared": "1.
|
|
120
|
+
"@kya-os/checkpoint-shared": "1.1.0"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
123
|
"@types/node": "^20.11.24",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|