@kya-os/checkpoint-express 1.0.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @kya-os/checkpoint-express
2
2
 
3
+ ## 1.1.1 — 2026-05-17
4
+
5
+ Companion patch to `@kya-os/checkpoint-wasm-runtime@1.1.0`. Express
6
+ consumers can already use `withCheckpoint` (Next.js Turbopack was the
7
+ trigger, not Express's bundler-less Node import flow), but this bump
8
+ keeps the wasm-runtime dep range consistent across all checkpoint-\*
9
+ packages.
10
+
11
+ ### Internal change
12
+
13
+ - `@kya-os/checkpoint-wasm-runtime` optional-dep changed from exact
14
+ `1.0.0` pin to `^1.1.0` range (via `workspace:^`).
15
+
16
+ ---
17
+
18
+ ## 1.1.0 — 2026-05-17
19
+
20
+ Closes [SDK-Envelope-Plumbing-1 (#2594)](https://github.com/Know-That-Ai/agent-shield/issues/2594)
21
+ for Express. Coordinated release with `@kya-os/checkpoint-nextjs@1.1.0` —
22
+ identical config surface across both SDKs.
23
+
24
+ ### New config (additive — no breaking changes)
25
+
26
+ - `CheckpointConfig.legacyEnvelopeFallback?: boolean` (default `false`) — accept
27
+ envelopes via the legacy `KYA-Delegation` HTTP header alongside the canonical
28
+ body form. Use for agents that pre-date Envelope-1 (#2537). Forwarded to
29
+ the orchestrator's `VerifyRequestOpts.legacyEnvelopeFallback`.
30
+
31
+ ### What's NOT in this release (and why)
32
+
33
+ Express's `translate.ts` already forwards `req.body` (as parsed by `body-parser`)
34
+ to the orchestrator, so the canonical `_meta.proof.jws` body transport has worked
35
+ since 1.0.0. No `drainJsonBody` config is needed — express consumers configure
36
+ body parsing via `express.json()` upstream of the middleware.
37
+
38
+ Express has a single middleware factory (`createCheckpointMiddleware` from
39
+ `./create-middleware`) which already calls `verifyRequest` through the
40
+ orchestrator — no factory-clarity migration needed (Next.js had a pattern-only
41
+ twin that competed with `withCheckpoint`; Express does not).
42
+
43
+ ### Migration
44
+
45
+ No code changes required for existing 1.0.x consumers — `legacyEnvelopeFallback`
46
+ is optional and defaults to `false`. Consumers wanting to accept legacy header
47
+ envelopes:
48
+
49
+ ```diff
50
+ app.use(withCheckpoint({
51
+ tenantHost: 'acme.checkpoint.example',
52
+ + legacyEnvelopeFallback: true,
53
+ }));
54
+ ```
55
+
56
+ ---
57
+
3
58
  ## 1.0.0 — 2026-05-16 (Phase E)
4
59
 
5
60
  ### Breaking
package/dist/index.d.mts CHANGED
@@ -83,6 +83,23 @@ interface CheckpointConfig {
83
83
  * response.
84
84
  */
85
85
  onResult?: (result: VerifyResult, req: Request) => void | Promise<void>;
86
+ /**
87
+ * Accept legacy `KYA-Delegation`-header envelope form alongside the
88
+ * canonical `_meta.proof.jws` body form. Default `false`.
89
+ *
90
+ * **When to enable** — customers whose agents pre-date Envelope-1
91
+ * (#2537) and ship MCP-I proofs as `{protected,payload,signature}`
92
+ * JSON in a `KYA-Delegation` HTTP header. Post-Envelope-1 agents
93
+ * ship compact JWS in the request body's `_meta.proof.jws` field;
94
+ * those don't need this flag (Express's body-parser pre-populates
95
+ * `req.body` which `translate.ts` already forwards to the
96
+ * orchestrator).
97
+ *
98
+ * Forwarded to the orchestrator's `VerifyRequestOpts.legacyEnvelopeFallback`.
99
+ *
100
+ * SDK-Envelope-Plumbing-1 (#2594). Added in `@kya-os/checkpoint-express@1.1.0`.
101
+ */
102
+ legacyEnvelopeFallback?: boolean;
86
103
  }
87
104
  /**
88
105
  * Build the Checkpoint middleware. Returns an Express `RequestHandler`
package/dist/index.d.ts CHANGED
@@ -83,6 +83,23 @@ interface CheckpointConfig {
83
83
  * response.
84
84
  */
85
85
  onResult?: (result: VerifyResult, req: Request) => void | Promise<void>;
86
+ /**
87
+ * Accept legacy `KYA-Delegation`-header envelope form alongside the
88
+ * canonical `_meta.proof.jws` body form. Default `false`.
89
+ *
90
+ * **When to enable** — customers whose agents pre-date Envelope-1
91
+ * (#2537) and ship MCP-I proofs as `{protected,payload,signature}`
92
+ * JSON in a `KYA-Delegation` HTTP header. Post-Envelope-1 agents
93
+ * ship compact JWS in the request body's `_meta.proof.jws` field;
94
+ * those don't need this flag (Express's body-parser pre-populates
95
+ * `req.body` which `translate.ts` already forwards to the
96
+ * orchestrator).
97
+ *
98
+ * Forwarded to the orchestrator's `VerifyRequestOpts.legacyEnvelopeFallback`.
99
+ *
100
+ * SDK-Envelope-Plumbing-1 (#2594). Added in `@kya-os/checkpoint-express@1.1.0`.
101
+ */
102
+ legacyEnvelopeFallback?: boolean;
86
103
  }
87
104
  /**
88
105
  * Build the Checkpoint middleware. Returns an Express `RequestHandler`
package/dist/index.js CHANGED
@@ -658,18 +658,18 @@ function createAutoPipelineProxy(_redis, namespace = "root") {
658
658
  }
659
659
  });
660
660
  }
661
- var __defProp3, __export3, error_exports, UpstashError, UrlError, UpstashJSONParseError, MAX_BUFFER_SIZE, HttpClient, defaultSerializer, Command, ExecCommand, FIELD_TYPES, SearchIndex, HRandFieldCommand, AppendCommand, BitCountCommand, BitFieldCommand, BitOpCommand, BitPosCommand, ClientSetInfoCommand, CopyCommand, DBSizeCommand, DecrCommand, DecrByCommand, DelCommand, EchoCommand, EvalROCommand, EvalCommand, EvalshaROCommand, EvalshaCommand, ExistsCommand, ExpireCommand, ExpireAtCommand, FCallCommand, FCallRoCommand, FlushAllCommand, FlushDBCommand, FunctionDeleteCommand, FunctionFlushCommand, FunctionListCommand, FunctionLoadCommand, FunctionStatsCommand, GeoAddCommand, GeoDistCommand, GeoHashCommand, GeoPosCommand, GeoSearchCommand, GeoSearchStoreCommand, GetCommand, GetBitCommand, GetDelCommand, GetExCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HExpireCommand, HExpireAtCommand, HExpireTimeCommand, HPersistCommand, HPExpireCommand, HPExpireAtCommand, HPExpireTimeCommand, HPTtlCommand, HGetCommand, HGetAllCommand, HMGetCommand, HGetDelCommand, HGetExCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMSetCommand, HScanCommand, HSetCommand, HSetExCommand, HSetNXCommand, HStrLenCommand, HTtlCommand, HValsCommand, IncrCommand, IncrByCommand, IncrByFloatCommand, JsonArrAppendCommand, JsonArrIndexCommand, JsonArrInsertCommand, JsonArrLenCommand, JsonArrPopCommand, JsonArrTrimCommand, JsonClearCommand, JsonDelCommand, JsonForgetCommand, JsonGetCommand, JsonMergeCommand, JsonMGetCommand, JsonMSetCommand, JsonNumIncrByCommand, JsonNumMultByCommand, JsonObjKeysCommand, JsonObjLenCommand, JsonRespCommand, JsonSetCommand, JsonStrAppendCommand, JsonStrLenCommand, JsonToggleCommand, JsonTypeCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LMoveCommand, LmPopCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireCommand, PExpireAtCommand, PfAddCommand, PfCountCommand, PfMergeCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetCommand, SetBitCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterCardCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMIsMemberCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, XAckCommand, XAckDelCommand, XAddCommand, XAutoClaim, XClaimCommand, XDelCommand, XDelExCommand, XGroupCommand, XInfoCommand, XLenCommand, XPendingCommand, XRangeCommand, UNBALANCED_XREAD_ERR, XReadCommand, UNBALANCED_XREADGROUP_ERR, XReadGroupCommand, XRevRangeCommand, XTrimCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionCommand, ZUnionStoreCommand, ZDiffStoreCommand, ZMScoreCommand, Pipeline, EXCLUDE_COMMANDS, AutoPipelineExecutor, PSubscribeCommand, Subscriber, SubscribeCommand, parseWithTryCatch, Script, ScriptRO, Redis, VERSION;
661
+ var __defProp2, __export2, error_exports, UpstashError, UrlError, UpstashJSONParseError, MAX_BUFFER_SIZE, HttpClient, defaultSerializer, Command, ExecCommand, FIELD_TYPES, SearchIndex, HRandFieldCommand, AppendCommand, BitCountCommand, BitFieldCommand, BitOpCommand, BitPosCommand, ClientSetInfoCommand, CopyCommand, DBSizeCommand, DecrCommand, DecrByCommand, DelCommand, EchoCommand, EvalROCommand, EvalCommand, EvalshaROCommand, EvalshaCommand, ExistsCommand, ExpireCommand, ExpireAtCommand, FCallCommand, FCallRoCommand, FlushAllCommand, FlushDBCommand, FunctionDeleteCommand, FunctionFlushCommand, FunctionListCommand, FunctionLoadCommand, FunctionStatsCommand, GeoAddCommand, GeoDistCommand, GeoHashCommand, GeoPosCommand, GeoSearchCommand, GeoSearchStoreCommand, GetCommand, GetBitCommand, GetDelCommand, GetExCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HExpireCommand, HExpireAtCommand, HExpireTimeCommand, HPersistCommand, HPExpireCommand, HPExpireAtCommand, HPExpireTimeCommand, HPTtlCommand, HGetCommand, HGetAllCommand, HMGetCommand, HGetDelCommand, HGetExCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMSetCommand, HScanCommand, HSetCommand, HSetExCommand, HSetNXCommand, HStrLenCommand, HTtlCommand, HValsCommand, IncrCommand, IncrByCommand, IncrByFloatCommand, JsonArrAppendCommand, JsonArrIndexCommand, JsonArrInsertCommand, JsonArrLenCommand, JsonArrPopCommand, JsonArrTrimCommand, JsonClearCommand, JsonDelCommand, JsonForgetCommand, JsonGetCommand, JsonMergeCommand, JsonMGetCommand, JsonMSetCommand, JsonNumIncrByCommand, JsonNumMultByCommand, JsonObjKeysCommand, JsonObjLenCommand, JsonRespCommand, JsonSetCommand, JsonStrAppendCommand, JsonStrLenCommand, JsonToggleCommand, JsonTypeCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LMoveCommand, LmPopCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireCommand, PExpireAtCommand, PfAddCommand, PfCountCommand, PfMergeCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetCommand, SetBitCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterCardCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMIsMemberCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, XAckCommand, XAckDelCommand, XAddCommand, XAutoClaim, XClaimCommand, XDelCommand, XDelExCommand, XGroupCommand, XInfoCommand, XLenCommand, XPendingCommand, XRangeCommand, UNBALANCED_XREAD_ERR, XReadCommand, UNBALANCED_XREADGROUP_ERR, XReadGroupCommand, XRevRangeCommand, XTrimCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionCommand, ZUnionStoreCommand, ZDiffStoreCommand, ZMScoreCommand, Pipeline, EXCLUDE_COMMANDS, AutoPipelineExecutor, PSubscribeCommand, Subscriber, SubscribeCommand, parseWithTryCatch, Script, ScriptRO, Redis, VERSION;
662
662
  var init_chunk_IH7W44G6 = __esm({
663
663
  "../../node_modules/.pnpm/@upstash+redis@1.37.0/node_modules/@upstash/redis/chunk-IH7W44G6.mjs"() {
664
664
  init_crypto_node();
665
665
  init_crypto_node();
666
- __defProp3 = Object.defineProperty;
667
- __export3 = (target, all) => {
666
+ __defProp2 = Object.defineProperty;
667
+ __export2 = (target, all) => {
668
668
  for (var name in all)
669
- __defProp3(target, name, { get: all[name], enumerable: true });
669
+ __defProp2(target, name, { get: all[name], enumerable: true });
670
670
  };
671
671
  error_exports = {};
672
- __export3(error_exports, {
672
+ __export2(error_exports, {
673
673
  UpstashError: () => UpstashError,
674
674
  UpstashJSONParseError: () => UpstashJSONParseError,
675
675
  UrlError: () => UrlError
@@ -5197,443 +5197,7 @@ var init_nodejs = __esm({
5197
5197
  }
5198
5198
  });
5199
5199
 
5200
- // ../checkpoint-wasm-runtime/dist/orchestrator.mjs
5201
- var __defProp2 = Object.defineProperty;
5202
- var __export2 = (target, all) => {
5203
- for (var name in all)
5204
- __defProp2(target, name, { get: all[name], enumerable: true });
5205
- };
5206
- var kya_os_engine_exports = {};
5207
- __export2(kya_os_engine_exports, {
5208
- default: () => kya_os_engine_default,
5209
- initSync: () => initSync,
5210
- verify: () => verify
5211
- });
5212
- function getUint8ArrayMemory0() {
5213
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
5214
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
5215
- }
5216
- return cachedUint8ArrayMemory0;
5217
- }
5218
- function decodeText(ptr, len) {
5219
- numBytesDecoded += len;
5220
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
5221
- cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
5222
- cachedTextDecoder.decode();
5223
- numBytesDecoded = len;
5224
- }
5225
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
5226
- }
5227
- function getStringFromWasm0(ptr, len) {
5228
- ptr = ptr >>> 0;
5229
- return decodeText(ptr, len);
5230
- }
5231
- function addHeapObject(obj) {
5232
- if (heap_next === heap.length) heap.push(heap.length + 1);
5233
- const idx = heap_next;
5234
- heap_next = heap[idx];
5235
- heap[idx] = obj;
5236
- return idx;
5237
- }
5238
- function getObject(idx) {
5239
- return heap[idx];
5240
- }
5241
- function passStringToWasm0(arg, malloc, realloc) {
5242
- if (realloc === void 0) {
5243
- const buf = cachedTextEncoder.encode(arg);
5244
- const ptr2 = malloc(buf.length, 1) >>> 0;
5245
- getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
5246
- WASM_VECTOR_LEN = buf.length;
5247
- return ptr2;
5248
- }
5249
- let len = arg.length;
5250
- let ptr = malloc(len, 1) >>> 0;
5251
- const mem = getUint8ArrayMemory0();
5252
- let offset = 0;
5253
- for (; offset < len; offset++) {
5254
- const code = arg.charCodeAt(offset);
5255
- if (code > 127) break;
5256
- mem[ptr + offset] = code;
5257
- }
5258
- if (offset !== len) {
5259
- if (offset !== 0) {
5260
- arg = arg.slice(offset);
5261
- }
5262
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
5263
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
5264
- const ret = cachedTextEncoder.encodeInto(arg, view);
5265
- offset += ret.written;
5266
- ptr = realloc(ptr, len, offset, 1) >>> 0;
5267
- }
5268
- WASM_VECTOR_LEN = offset;
5269
- return ptr;
5270
- }
5271
- function getDataViewMemory0() {
5272
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
5273
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
5274
- }
5275
- return cachedDataViewMemory0;
5276
- }
5277
- function isLikeNone(x) {
5278
- return x === void 0 || x === null;
5279
- }
5280
- function debugString(val) {
5281
- const type = typeof val;
5282
- if (type == "number" || type == "boolean" || val == null) {
5283
- return `${val}`;
5284
- }
5285
- if (type == "string") {
5286
- return `"${val}"`;
5287
- }
5288
- if (type == "symbol") {
5289
- const description = val.description;
5290
- if (description == null) {
5291
- return "Symbol";
5292
- } else {
5293
- return `Symbol(${description})`;
5294
- }
5295
- }
5296
- if (type == "function") {
5297
- const name = val.name;
5298
- if (typeof name == "string" && name.length > 0) {
5299
- return `Function(${name})`;
5300
- } else {
5301
- return "Function";
5302
- }
5303
- }
5304
- if (Array.isArray(val)) {
5305
- const length = val.length;
5306
- let debug = "[";
5307
- if (length > 0) {
5308
- debug += debugString(val[0]);
5309
- }
5310
- for (let i = 1; i < length; i++) {
5311
- debug += ", " + debugString(val[i]);
5312
- }
5313
- debug += "]";
5314
- return debug;
5315
- }
5316
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
5317
- let className;
5318
- if (builtInMatches && builtInMatches.length > 1) {
5319
- className = builtInMatches[1];
5320
- } else {
5321
- return toString.call(val);
5322
- }
5323
- if (className == "Object") {
5324
- try {
5325
- return "Object(" + JSON.stringify(val) + ")";
5326
- } catch (_) {
5327
- return "Object";
5328
- }
5329
- }
5330
- if (val instanceof Error) {
5331
- return `${val.name}: ${val.message}
5332
- ${val.stack}`;
5333
- }
5334
- return className;
5335
- }
5336
- function handleError(f, args) {
5337
- try {
5338
- return f.apply(this, args);
5339
- } catch (e) {
5340
- wasm.__wbindgen_export3(addHeapObject(e));
5341
- }
5342
- }
5343
- function getArrayU8FromWasm0(ptr, len) {
5344
- ptr = ptr >>> 0;
5345
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
5346
- }
5347
- function dropObject(idx) {
5348
- if (idx < 132) return;
5349
- heap[idx] = heap_next;
5350
- heap_next = idx;
5351
- }
5352
- function takeObject(idx) {
5353
- const ret = getObject(idx);
5354
- dropObject(idx);
5355
- return ret;
5356
- }
5357
- function verify(input_js, ctx_js) {
5358
- try {
5359
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5360
- wasm.verify(retptr, addHeapObject(input_js), addHeapObject(ctx_js));
5361
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5362
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5363
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5364
- if (r2) {
5365
- throw takeObject(r1);
5366
- }
5367
- return takeObject(r0);
5368
- } finally {
5369
- wasm.__wbindgen_add_to_stack_pointer(16);
5370
- }
5371
- }
5372
- function __wbg_get_imports() {
5373
- const imports = {};
5374
- imports.wbg = {};
5375
- imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
5376
- const ret = Error(getStringFromWasm0(arg0, arg1));
5377
- return addHeapObject(ret);
5378
- };
5379
- imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
5380
- const ret = Number(getObject(arg0));
5381
- return ret;
5382
- };
5383
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
5384
- const ret = String(getObject(arg1));
5385
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5386
- const len1 = WASM_VECTOR_LEN;
5387
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5388
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5389
- };
5390
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
5391
- const v = getObject(arg1);
5392
- const ret = typeof v === "bigint" ? v : void 0;
5393
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
5394
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5395
- };
5396
- imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
5397
- const v = getObject(arg0);
5398
- const ret = typeof v === "boolean" ? v : void 0;
5399
- return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
5400
- };
5401
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
5402
- const ret = debugString(getObject(arg1));
5403
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5404
- const len1 = WASM_VECTOR_LEN;
5405
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5406
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5407
- };
5408
- imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
5409
- const ret = getObject(arg0) in getObject(arg1);
5410
- return ret;
5411
- };
5412
- imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
5413
- const ret = typeof getObject(arg0) === "bigint";
5414
- return ret;
5415
- };
5416
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
5417
- const ret = typeof getObject(arg0) === "function";
5418
- return ret;
5419
- };
5420
- imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
5421
- const val = getObject(arg0);
5422
- const ret = typeof val === "object" && val !== null;
5423
- return ret;
5424
- };
5425
- imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
5426
- const ret = typeof getObject(arg0) === "string";
5427
- return ret;
5428
- };
5429
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
5430
- const ret = getObject(arg0) === void 0;
5431
- return ret;
5432
- };
5433
- imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
5434
- const ret = getObject(arg0) === getObject(arg1);
5435
- return ret;
5436
- };
5437
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
5438
- const ret = getObject(arg0) == getObject(arg1);
5439
- return ret;
5440
- };
5441
- imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
5442
- const obj = getObject(arg1);
5443
- const ret = typeof obj === "number" ? obj : void 0;
5444
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
5445
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5446
- };
5447
- imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
5448
- const obj = getObject(arg1);
5449
- const ret = typeof obj === "string" ? obj : void 0;
5450
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5451
- var len1 = WASM_VECTOR_LEN;
5452
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5453
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5454
- };
5455
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
5456
- throw new Error(getStringFromWasm0(arg0, arg1));
5457
- };
5458
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() {
5459
- return handleError(function(arg0, arg1) {
5460
- const ret = getObject(arg0).call(getObject(arg1));
5461
- return addHeapObject(ret);
5462
- }, arguments);
5463
- };
5464
- imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
5465
- const ret = getObject(arg0).done;
5466
- return ret;
5467
- };
5468
- imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
5469
- const ret = Object.entries(getObject(arg0));
5470
- return addHeapObject(ret);
5471
- };
5472
- imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5473
- const ret = getObject(arg0)[arg1 >>> 0];
5474
- return addHeapObject(ret);
5475
- };
5476
- imports.wbg.__wbg_get_efcb449f58ec27c2 = function() {
5477
- return handleError(function(arg0, arg1) {
5478
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
5479
- return addHeapObject(ret);
5480
- }, arguments);
5481
- };
5482
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
5483
- const ret = getObject(arg0)[getObject(arg1)];
5484
- return addHeapObject(ret);
5485
- };
5486
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
5487
- let result;
5488
- try {
5489
- result = getObject(arg0) instanceof ArrayBuffer;
5490
- } catch (_) {
5491
- result = false;
5492
- }
5493
- const ret = result;
5494
- return ret;
5495
- };
5496
- imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
5497
- let result;
5498
- try {
5499
- result = getObject(arg0) instanceof Map;
5500
- } catch (_) {
5501
- result = false;
5502
- }
5503
- const ret = result;
5504
- return ret;
5505
- };
5506
- imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
5507
- let result;
5508
- try {
5509
- result = getObject(arg0) instanceof Uint8Array;
5510
- } catch (_) {
5511
- result = false;
5512
- }
5513
- const ret = result;
5514
- return ret;
5515
- };
5516
- imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
5517
- const ret = Array.isArray(getObject(arg0));
5518
- return ret;
5519
- };
5520
- imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
5521
- const ret = Number.isSafeInteger(getObject(arg0));
5522
- return ret;
5523
- };
5524
- imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
5525
- const ret = Symbol.iterator;
5526
- return addHeapObject(ret);
5527
- };
5528
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
5529
- const ret = getObject(arg0).length;
5530
- return ret;
5531
- };
5532
- imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5533
- const ret = getObject(arg0).length;
5534
- return ret;
5535
- };
5536
- imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
5537
- const ret = new Object();
5538
- return addHeapObject(ret);
5539
- };
5540
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
5541
- const ret = new Uint8Array(getObject(arg0));
5542
- return addHeapObject(ret);
5543
- };
5544
- imports.wbg.__wbg_new_68651c719dcda04e = function() {
5545
- const ret = /* @__PURE__ */ new Map();
5546
- return addHeapObject(ret);
5547
- };
5548
- imports.wbg.__wbg_new_e17d9f43105b08be = function() {
5549
- const ret = new Array();
5550
- return addHeapObject(ret);
5551
- };
5552
- imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() {
5553
- return handleError(function(arg0) {
5554
- const ret = getObject(arg0).next();
5555
- return addHeapObject(ret);
5556
- }, arguments);
5557
- };
5558
- imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
5559
- const ret = getObject(arg0).next;
5560
- return addHeapObject(ret);
5561
- };
5562
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
5563
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
5564
- };
5565
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5566
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5567
- };
5568
- imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5569
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5570
- return addHeapObject(ret);
5571
- };
5572
- imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
5573
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5574
- };
5575
- imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
5576
- const ret = getObject(arg0).value;
5577
- return addHeapObject(ret);
5578
- };
5579
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
5580
- const ret = getStringFromWasm0(arg0, arg1);
5581
- return addHeapObject(ret);
5582
- };
5583
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
5584
- const ret = BigInt.asUintN(64, arg0);
5585
- return addHeapObject(ret);
5586
- };
5587
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
5588
- const ret = arg0;
5589
- return addHeapObject(ret);
5590
- };
5591
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
5592
- const ret = arg0;
5593
- return addHeapObject(ret);
5594
- };
5595
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
5596
- const ret = getObject(arg0);
5597
- return addHeapObject(ret);
5598
- };
5599
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
5600
- takeObject(arg0);
5601
- };
5602
- return imports;
5603
- }
5604
- function __wbg_finalize_init(instance, module) {
5605
- wasm = instance.exports;
5606
- cachedDataViewMemory0 = null;
5607
- cachedUint8ArrayMemory0 = null;
5608
- return wasm;
5609
- }
5610
- function initSync(module) {
5611
- if (wasm !== void 0) return wasm;
5612
- if (typeof module !== "undefined") {
5613
- if (Object.getPrototypeOf(module) === Object.prototype) {
5614
- ({ module } = module);
5615
- } else {
5616
- console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
5617
- }
5618
- }
5619
- const imports = __wbg_get_imports();
5620
- if (!(module instanceof WebAssembly.Module)) {
5621
- module = new WebAssembly.Module(module);
5622
- }
5623
- const instance = new WebAssembly.Instance(module, imports);
5624
- return __wbg_finalize_init(instance);
5625
- }
5626
- var wasm;
5627
- var cachedUint8ArrayMemory0;
5628
- var cachedTextDecoder;
5629
- var MAX_SAFARI_DECODE_BYTES;
5630
- var numBytesDecoded;
5631
- var heap;
5632
- var heap_next;
5633
- var WASM_VECTOR_LEN;
5634
- var cachedTextEncoder;
5635
- var cachedDataViewMemory0;
5636
- var kya_os_engine_default;
5200
+ // ../checkpoint-wasm-runtime/dist/orchestrator-node.mjs
5637
5201
  var BLOCKED_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "metadata", "metadata.google.internal"]);
5638
5202
  var UnsafeOutboundUrl = class extends Error {
5639
5203
  kind = "UnsafeOutboundUrl";
@@ -7075,7 +6639,8 @@ function buildVerifyOpts(config) {
7075
6639
  tenantHost: config.tenantHost,
7076
6640
  enforcementMode: config.enforcementMode ?? "enforce",
7077
6641
  reputationBaseline: config.reputationBaseline,
7078
- argusUrl: config.argusUrl
6642
+ argusUrl: config.argusUrl,
6643
+ legacyEnvelopeFallback: config.legacyEnvelopeFallback ?? false
7079
6644
  };
7080
6645
  }
7081
6646
  async function dispatchOnResult(config, result, req) {
@@ -7516,5 +7081,3 @@ exports.sendBlockedResponse = sendBlockedResponse;
7516
7081
  exports.sendRedirectResponse = sendRedirectResponse;
7517
7082
  exports.withCheckpoint = withCheckpoint;
7518
7083
  exports.withSessionTracking = withSessionTracking;
7519
- //# sourceMappingURL=index.js.map
7520
- //# sourceMappingURL=index.js.map