@kya-os/checkpoint-nextjs 1.7.1 → 1.10.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 +107 -0
- package/EDGE_RUNTIME_WASM_SETUP.md +11 -11
- package/README.md +144 -251
- package/bin/setup-edge-wasm.js +9 -1
- package/dist/adapt.d.mts +6 -34
- package/dist/adapt.d.mts.map +1 -0
- package/dist/adapt.d.ts +6 -34
- package/dist/adapt.d.ts.map +1 -0
- package/dist/adapt.js +79 -49
- package/dist/adapt.mjs +78 -46
- package/dist/adapt.mjs.map +1 -0
- package/dist/api-client.d.mts +150 -150
- package/dist/api-client.d.mts.map +1 -0
- package/dist/api-client.d.ts +150 -150
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +218 -204
- package/dist/api-client.mjs +217 -201
- package/dist/api-client.mjs.map +1 -0
- package/dist/api-middleware-CDSh3TSE.js +379 -0
- package/dist/api-middleware-CMDRoQik.mjs +357 -0
- package/dist/api-middleware-CMDRoQik.mjs.map +1 -0
- package/dist/api-middleware.d.mts +117 -129
- package/dist/api-middleware.d.mts.map +1 -0
- package/dist/api-middleware.d.ts +117 -129
- package/dist/api-middleware.d.ts.map +1 -0
- package/dist/api-middleware.js +8 -540
- package/dist/api-middleware.mjs +3 -534
- package/dist/composed-policy-BCaNiVHv.d.mts +98 -0
- package/dist/composed-policy-BCaNiVHv.d.mts.map +1 -0
- package/dist/composed-policy-zzJYNFTb.d.ts +98 -0
- package/dist/composed-policy-zzJYNFTb.d.ts.map +1 -0
- package/dist/composed-policy.d.mts +2 -115
- package/dist/composed-policy.d.ts +2 -115
- package/dist/composed-policy.js +122 -88
- package/dist/composed-policy.mjs +121 -85
- package/dist/composed-policy.mjs.map +1 -0
- package/dist/config-CbAg2mze.d.ts +255 -0
- package/dist/config-CbAg2mze.d.ts.map +1 -0
- package/dist/config-Doe0Tn53.d.mts +255 -0
- package/dist/config-Doe0Tn53.d.mts.map +1 -0
- package/dist/create-middleware.d.mts +7 -18
- package/dist/create-middleware.d.mts.map +1 -0
- package/dist/create-middleware.d.ts +7 -18
- package/dist/create-middleware.d.ts.map +1 -0
- package/dist/create-middleware.js +36 -31
- package/dist/create-middleware.mjs +35 -28
- package/dist/create-middleware.mjs.map +1 -0
- package/dist/edge/index.d.mts +64 -86
- package/dist/edge/index.d.mts.map +1 -0
- package/dist/edge/index.d.ts +64 -86
- package/dist/edge/index.d.ts.map +1 -0
- package/dist/edge/index.js +349 -275
- package/dist/edge/index.mjs +348 -272
- package/dist/edge/index.mjs.map +1 -0
- package/dist/edge-runtime-loader.d.mts +37 -63
- package/dist/edge-runtime-loader.d.mts.map +1 -0
- package/dist/edge-runtime-loader.d.ts +37 -63
- package/dist/edge-runtime-loader.d.ts.map +1 -0
- package/dist/edge-runtime-loader.js +268 -225
- package/dist/edge-runtime-loader.mjs +267 -222
- package/dist/edge-runtime-loader.mjs.map +1 -0
- package/dist/edge-wasm-middleware.d.mts +27 -46
- package/dist/edge-wasm-middleware.d.mts.map +1 -0
- package/dist/edge-wasm-middleware.d.ts +27 -46
- package/dist/edge-wasm-middleware.d.ts.map +1 -0
- package/dist/edge-wasm-middleware.js +26 -15
- package/dist/edge-wasm-middleware.mjs +25 -12
- package/dist/edge-wasm-middleware.mjs.map +1 -0
- package/dist/index.d.mts +10 -17
- package/dist/index.d.ts +10 -17
- package/dist/index.js +55 -1224
- package/dist/index.mjs +16 -1193
- package/dist/index.mjs.map +1 -0
- package/dist/middleware-bundler.d.mts +7 -0
- package/dist/middleware-bundler.d.mts.map +1 -0
- package/dist/middleware-bundler.d.ts +7 -0
- package/dist/middleware-bundler.d.ts.map +1 -0
- package/dist/middleware-bundler.js +16 -0
- package/dist/middleware-bundler.mjs +16 -0
- package/dist/middleware-bundler.mjs.map +1 -0
- package/dist/middleware-core-BYQP9FND.mjs +165 -0
- package/dist/middleware-core-BYQP9FND.mjs.map +1 -0
- package/dist/middleware-core-D6TijE6P.js +175 -0
- package/dist/middleware-edge.d.mts +8 -50
- package/dist/middleware-edge.d.mts.map +1 -0
- package/dist/middleware-edge.d.ts +8 -50
- package/dist/middleware-edge.d.ts.map +1 -0
- package/dist/middleware-edge.js +41 -307
- package/dist/middleware-edge.mjs +39 -299
- package/dist/middleware-edge.mjs.map +1 -0
- package/dist/middleware-node-CE4GevYs.d.ts +20 -0
- package/dist/middleware-node-CE4GevYs.d.ts.map +1 -0
- package/dist/middleware-node-DtyOuPta.d.mts +20 -0
- package/dist/middleware-node-DtyOuPta.d.mts.map +1 -0
- package/dist/middleware-node-context-BqPbf-fI.mjs +34 -0
- package/dist/middleware-node-context-BqPbf-fI.mjs.map +1 -0
- package/dist/middleware-node-context-rgnc7UNR.js +38 -0
- package/dist/middleware-node.d.mts +3 -63
- package/dist/middleware-node.d.ts +3 -63
- package/dist/middleware-node.js +13 -308
- package/dist/middleware-node.mjs +12 -301
- package/dist/middleware-node.mjs.map +1 -0
- package/dist/middleware.d.mts +8 -28
- package/dist/middleware.d.mts.map +1 -0
- package/dist/middleware.d.ts +8 -28
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +43 -9
- package/dist/middleware.mjs +42 -6
- package/dist/middleware.mjs.map +1 -0
- package/dist/nodejs-wasm-loader.d.mts +8 -7
- package/dist/nodejs-wasm-loader.d.mts.map +1 -0
- package/dist/nodejs-wasm-loader.d.ts +8 -7
- package/dist/nodejs-wasm-loader.d.ts.map +1 -0
- package/dist/nodejs-wasm-loader.js +53 -19
- package/dist/nodejs-wasm-loader.mjs +52 -16
- package/dist/nodejs-wasm-loader.mjs.map +1 -0
- package/dist/policy.d.mts +86 -110
- package/dist/policy.d.mts.map +1 -0
- package/dist/policy.d.ts +86 -110
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +203 -160
- package/dist/policy.mjs +183 -147
- package/dist/policy.mjs.map +1 -0
- package/dist/session-tracker.d.mts +42 -47
- package/dist/session-tracker.d.mts.map +1 -0
- package/dist/session-tracker.d.ts +42 -47
- package/dist/session-tracker.d.ts.map +1 -0
- package/dist/session-tracker.js +141 -163
- package/dist/session-tracker.mjs +140 -160
- package/dist/session-tracker.mjs.map +1 -0
- package/dist/translate.d.mts +18 -30
- package/dist/translate.d.mts.map +1 -0
- package/dist/translate.d.ts +18 -30
- package/dist/translate.d.ts.map +1 -0
- package/dist/translate.js +70 -34
- package/dist/translate.mjs +70 -32
- package/dist/translate.mjs.map +1 -0
- package/dist/types-C0SkqLMM.d.mts +102 -0
- package/dist/types-C0SkqLMM.d.mts.map +1 -0
- package/dist/types-C7DNSCTO.d.ts +102 -0
- package/dist/types-C7DNSCTO.d.ts.map +1 -0
- package/dist/utils-Cj4XNhIY.mjs +35 -0
- package/dist/utils-Cj4XNhIY.mjs.map +1 -0
- package/dist/utils-DAisnYnI.js +45 -0
- package/dist/wasm-setup.d.mts +6 -5
- package/dist/wasm-setup.d.mts.map +1 -0
- package/dist/wasm-setup.d.ts +6 -5
- package/dist/wasm-setup.d.ts.map +1 -0
- package/dist/wasm-setup.js +82 -113
- package/dist/wasm-setup.mjs +85 -108
- package/dist/wasm-setup.mjs.map +1 -0
- package/package.json +22 -15
- package/dist/config-DAwIA4DB.d.mts +0 -214
- package/dist/config-DyU4l5er.d.ts +0 -214
- package/dist/types-D9RQvPNy.d.mts +0 -105
- package/dist/types-D9RQvPNy.d.ts +0 -105
package/dist/middleware.d.mts
CHANGED
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import '@kya-os/checkpoint';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Phase D — legacy TS-pattern-matching middleware path is
|
|
8
|
-
* gone. This file now exists only to preserve the historical export
|
|
9
|
-
* surface (`createAgentShieldMiddleware`, `agentShield`) at compile
|
|
10
|
-
* time. Calling either function throws a clear migration error.
|
|
11
|
-
*
|
|
12
|
-
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`
|
|
13
|
-
* (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime).
|
|
14
|
-
* The new factory accepts a `CheckpointConfig` and routes every
|
|
15
|
-
* verification through the Rust `kya-os-engine` via WASM. See the
|
|
16
|
-
* package CHANGELOG for the recipe.
|
|
17
|
-
*
|
|
18
|
-
* Architect Q10 deletion ratification — the 600-line TS pattern
|
|
19
|
-
* matcher (`edge-detector-wrapper.ts`) was removed in Phase D's
|
|
20
|
-
* cutover. The new path is structurally simpler and decisive: one
|
|
21
|
-
* engine, one verdict, every runtime.
|
|
22
|
-
*/
|
|
23
|
-
|
|
1
|
+
import { r as NextJSMiddlewareConfig } from "./types-C0SkqLMM.mjs";
|
|
2
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
3
|
+
//#region src/middleware.d.ts
|
|
24
4
|
/**
|
|
25
5
|
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
26
6
|
* Throws on invocation; surface exists only so static analysis sees
|
|
27
7
|
* the historical export.
|
|
28
8
|
*/
|
|
29
|
-
declare function createAgentShieldMiddleware(_config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
9
|
+
export declare function createAgentShieldMiddleware(_config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
30
10
|
/**
|
|
31
11
|
* @deprecated Alias of the deprecated `createAgentShieldMiddleware`.
|
|
32
12
|
* Migrate to `withCheckpoint`.
|
|
33
13
|
*/
|
|
34
|
-
declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
14
|
+
export declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
35
15
|
/**
|
|
36
16
|
* Pass-through export required by Next.js 16+ middleware file validation.
|
|
37
17
|
* Next.js requires any file named `middleware.ts` to export a function named
|
|
@@ -40,6 +20,6 @@ declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request
|
|
|
40
20
|
*
|
|
41
21
|
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
42
22
|
*/
|
|
43
|
-
declare function middleware(_request: NextRequest): NextResponse<unknown>;
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
export declare function middleware(_request: NextRequest): NextResponse<unknown>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=middleware.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.mts","names":[],"sources":["../src/middleware.ts"],"mappings":";;;;;;;;wBAoCgB,4BACd,UAAS,QAAQ,2BACf,SAAS,gBAAgB,QAAQ;;;;;wBAQrB,YACd,SAAQ,QAAQ,2BACd,SAAS,gBAAgB,QAAQ;;;;;;;;;wBAYrB,WAAW,UAAU,cAAW"}
|
package/dist/middleware.d.ts
CHANGED
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import '@kya-os/checkpoint';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Phase D — legacy TS-pattern-matching middleware path is
|
|
8
|
-
* gone. This file now exists only to preserve the historical export
|
|
9
|
-
* surface (`createAgentShieldMiddleware`, `agentShield`) at compile
|
|
10
|
-
* time. Calling either function throws a clear migration error.
|
|
11
|
-
*
|
|
12
|
-
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`
|
|
13
|
-
* (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime).
|
|
14
|
-
* The new factory accepts a `CheckpointConfig` and routes every
|
|
15
|
-
* verification through the Rust `kya-os-engine` via WASM. See the
|
|
16
|
-
* package CHANGELOG for the recipe.
|
|
17
|
-
*
|
|
18
|
-
* Architect Q10 deletion ratification — the 600-line TS pattern
|
|
19
|
-
* matcher (`edge-detector-wrapper.ts`) was removed in Phase D's
|
|
20
|
-
* cutover. The new path is structurally simpler and decisive: one
|
|
21
|
-
* engine, one verdict, every runtime.
|
|
22
|
-
*/
|
|
23
|
-
|
|
1
|
+
import { r as NextJSMiddlewareConfig } from "./types-C7DNSCTO.js";
|
|
2
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
3
|
+
//#region src/middleware.d.ts
|
|
24
4
|
/**
|
|
25
5
|
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
26
6
|
* Throws on invocation; surface exists only so static analysis sees
|
|
27
7
|
* the historical export.
|
|
28
8
|
*/
|
|
29
|
-
declare function createAgentShieldMiddleware(_config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
9
|
+
export declare function createAgentShieldMiddleware(_config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
30
10
|
/**
|
|
31
11
|
* @deprecated Alias of the deprecated `createAgentShieldMiddleware`.
|
|
32
12
|
* Migrate to `withCheckpoint`.
|
|
33
13
|
*/
|
|
34
|
-
declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
14
|
+
export declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request: NextRequest) => Promise<NextResponse>;
|
|
35
15
|
/**
|
|
36
16
|
* Pass-through export required by Next.js 16+ middleware file validation.
|
|
37
17
|
* Next.js requires any file named `middleware.ts` to export a function named
|
|
@@ -40,6 +20,6 @@ declare function agentShield(config?: Partial<NextJSMiddlewareConfig>): (request
|
|
|
40
20
|
*
|
|
41
21
|
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
42
22
|
*/
|
|
43
|
-
declare function middleware(_request: NextRequest): NextResponse<unknown>;
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
export declare function middleware(_request: NextRequest): NextResponse<unknown>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../src/middleware.ts"],"mappings":";;;;;;;;wBAoCgB,4BACd,UAAS,QAAQ,2BACf,SAAS,gBAAgB,QAAQ;;;;;wBAQrB,YACd,SAAQ,QAAQ,2BACd,SAAS,gBAAgB,QAAQ;;;;;;;;;wBAYrB,WAAW,UAAU,cAAW"}
|
package/dist/middleware.js
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let next_server = require("next/server");
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
//#region src/middleware.ts
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Phase D — legacy TS-pattern-matching middleware path is
|
|
7
|
+
* gone. This file now exists only to preserve the historical export
|
|
8
|
+
* surface (`createAgentShieldMiddleware`, `agentShield`) at compile
|
|
9
|
+
* time. Calling either function throws a clear migration error.
|
|
10
|
+
*
|
|
11
|
+
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`
|
|
12
|
+
* (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime).
|
|
13
|
+
* The new factory accepts a `CheckpointConfig` and routes every
|
|
14
|
+
* verification through the Rust `kya-os-engine` via WASM. See the
|
|
15
|
+
* package CHANGELOG for the recipe.
|
|
16
|
+
*
|
|
17
|
+
* Architect Q10 deletion ratification — the 600-line TS pattern
|
|
18
|
+
* matcher (`edge-detector-wrapper.ts`) was removed in Phase D's
|
|
19
|
+
* cutover. The new path is structurally simpler and decisive: one
|
|
20
|
+
* engine, one verdict, every runtime.
|
|
21
|
+
*/
|
|
22
|
+
const MIGRATION_ERROR = "@kya-os/checkpoint-nextjs's `createAgentShieldMiddleware` / `agentShield` were deleted in Phase D (engine consolidation). The 600-line TS pattern matcher that backed them is gone. Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime). See packages/checkpoint-nextjs/CHANGELOG.md (1.0.0) for the recipe.";
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
25
|
+
* Throws on invocation; surface exists only so static analysis sees
|
|
26
|
+
* the historical export.
|
|
27
|
+
*/
|
|
7
28
|
function createAgentShieldMiddleware(_config = {}) {
|
|
8
|
-
|
|
29
|
+
throw new Error(MIGRATION_ERROR);
|
|
9
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Alias of the deprecated `createAgentShieldMiddleware`.
|
|
33
|
+
* Migrate to `withCheckpoint`.
|
|
34
|
+
*/
|
|
10
35
|
function agentShield(config = {}) {
|
|
11
|
-
|
|
36
|
+
return createAgentShieldMiddleware(config);
|
|
12
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Pass-through export required by Next.js 16+ middleware file validation.
|
|
40
|
+
* Next.js requires any file named `middleware.ts` to export a function named
|
|
41
|
+
* `middleware` or a default function. This stub satisfies that constraint so
|
|
42
|
+
* consumers that still reference the `./middleware` subpath can build.
|
|
43
|
+
*
|
|
44
|
+
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
45
|
+
*/
|
|
13
46
|
function middleware(_request) {
|
|
14
|
-
|
|
47
|
+
return next_server.NextResponse.next();
|
|
15
48
|
}
|
|
16
49
|
|
|
50
|
+
//#endregion
|
|
17
51
|
exports.agentShield = agentShield;
|
|
18
52
|
exports.createAgentShieldMiddleware = createAgentShieldMiddleware;
|
|
19
|
-
exports.middleware = middleware;
|
|
53
|
+
exports.middleware = middleware;
|
package/dist/middleware.mjs
CHANGED
|
@@ -1,15 +1,51 @@
|
|
|
1
|
-
import { NextResponse } from
|
|
1
|
+
import { NextResponse } from "next/server";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
//#region src/middleware.ts
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Phase D — legacy TS-pattern-matching middleware path is
|
|
6
|
+
* gone. This file now exists only to preserve the historical export
|
|
7
|
+
* surface (`createAgentShieldMiddleware`, `agentShield`) at compile
|
|
8
|
+
* time. Calling either function throws a clear migration error.
|
|
9
|
+
*
|
|
10
|
+
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`
|
|
11
|
+
* (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime).
|
|
12
|
+
* The new factory accepts a `CheckpointConfig` and routes every
|
|
13
|
+
* verification through the Rust `kya-os-engine` via WASM. See the
|
|
14
|
+
* package CHANGELOG for the recipe.
|
|
15
|
+
*
|
|
16
|
+
* Architect Q10 deletion ratification — the 600-line TS pattern
|
|
17
|
+
* matcher (`edge-detector-wrapper.ts`) was removed in Phase D's
|
|
18
|
+
* cutover. The new path is structurally simpler and decisive: one
|
|
19
|
+
* engine, one verdict, every runtime.
|
|
20
|
+
*/
|
|
21
|
+
const MIGRATION_ERROR = "@kya-os/checkpoint-nextjs's `createAgentShieldMiddleware` / `agentShield` were deleted in Phase D (engine consolidation). The 600-line TS pattern matcher that backed them is gone. Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime). See packages/checkpoint-nextjs/CHANGELOG.md (1.0.0) for the recipe.";
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
24
|
+
* Throws on invocation; surface exists only so static analysis sees
|
|
25
|
+
* the historical export.
|
|
26
|
+
*/
|
|
5
27
|
function createAgentShieldMiddleware(_config = {}) {
|
|
6
|
-
|
|
28
|
+
throw new Error(MIGRATION_ERROR);
|
|
7
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Alias of the deprecated `createAgentShieldMiddleware`.
|
|
32
|
+
* Migrate to `withCheckpoint`.
|
|
33
|
+
*/
|
|
8
34
|
function agentShield(config = {}) {
|
|
9
|
-
|
|
35
|
+
return createAgentShieldMiddleware(config);
|
|
10
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Pass-through export required by Next.js 16+ middleware file validation.
|
|
39
|
+
* Next.js requires any file named `middleware.ts` to export a function named
|
|
40
|
+
* `middleware` or a default function. This stub satisfies that constraint so
|
|
41
|
+
* consumers that still reference the `./middleware` subpath can build.
|
|
42
|
+
*
|
|
43
|
+
* @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.
|
|
44
|
+
*/
|
|
11
45
|
function middleware(_request) {
|
|
12
|
-
|
|
46
|
+
return NextResponse.next();
|
|
13
47
|
}
|
|
14
48
|
|
|
49
|
+
//#endregion
|
|
15
50
|
export { agentShield, createAgentShieldMiddleware, middleware };
|
|
51
|
+
//# sourceMappingURL=middleware.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.mjs","names":[],"sources":["../src/middleware.ts"],"sourcesContent":["/**\n * @deprecated Phase D — legacy TS-pattern-matching middleware path is\n * gone. This file now exists only to preserve the historical export\n * surface (`createAgentShieldMiddleware`, `agentShield`) at compile\n * time. Calling either function throws a clear migration error.\n *\n * Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`\n * (Node runtime) or `@kya-os/checkpoint-nextjs/edge` (Edge runtime).\n * The new factory accepts a `CheckpointConfig` and routes every\n * verification through the Rust `kya-os-engine` via WASM. See the\n * package CHANGELOG for the recipe.\n *\n * Architect Q10 deletion ratification — the 600-line TS pattern\n * matcher (`edge-detector-wrapper.ts`) was removed in Phase D's\n * cutover. The new path is structurally simpler and decisive: one\n * engine, one verdict, every runtime.\n */\n\nimport { NextResponse } from 'next/server';\nimport type { NextRequest } from 'next/server';\n\nimport type { NextJSMiddlewareConfig } from './types';\n\nconst MIGRATION_ERROR =\n \"@kya-os/checkpoint-nextjs's `createAgentShieldMiddleware` / `agentShield` \" +\n 'were deleted in Phase D (engine consolidation). The 600-line TS pattern ' +\n 'matcher that backed them is gone. Migrate to `withCheckpoint` from ' +\n '`@kya-os/checkpoint-nextjs` (Node runtime) or ' +\n '`@kya-os/checkpoint-nextjs/edge` (Edge runtime). ' +\n 'See packages/checkpoint-nextjs/CHANGELOG.md (1.0.0) for the recipe.';\n\n/**\n * @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.\n * Throws on invocation; surface exists only so static analysis sees\n * the historical export.\n */\nexport function createAgentShieldMiddleware(\n _config: Partial<NextJSMiddlewareConfig> = {}\n): (request: NextRequest) => Promise<NextResponse> {\n throw new Error(MIGRATION_ERROR);\n}\n\n/**\n * @deprecated Alias of the deprecated `createAgentShieldMiddleware`.\n * Migrate to `withCheckpoint`.\n */\nexport function agentShield(\n config: Partial<NextJSMiddlewareConfig> = {}\n): (request: NextRequest) => Promise<NextResponse> {\n return createAgentShieldMiddleware(config);\n}\n\n/**\n * Pass-through export required by Next.js 16+ middleware file validation.\n * Next.js requires any file named `middleware.ts` to export a function named\n * `middleware` or a default function. This stub satisfies that constraint so\n * consumers that still reference the `./middleware` subpath can build.\n *\n * @deprecated Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs`.\n */\nexport function middleware(_request: NextRequest) {\n return NextResponse.next();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,kBACJ;;;;;;AAYF,SAAgB,4BACd,UAA2C,CAAC,GACK;CACjD,MAAM,IAAI,MAAM,eAAe;AACjC;;;;;AAMA,SAAgB,YACd,SAA0C,CAAC,GACM;CACjD,OAAO,4BAA4B,MAAM;AAC3C;;;;;;;;;AAUA,SAAgB,WAAW,UAAuB;CAChD,OAAO,aAAa,KAAK;AAC3B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/nodejs-wasm-loader.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated Phase-D.9a — legacy Node.js WASM loader for the retired
|
|
3
4
|
* `agentshield-wasm` Rust crate. This file used `fs.readFileSync` to
|
|
@@ -12,30 +13,30 @@
|
|
|
12
13
|
* Edge runtimes.
|
|
13
14
|
*/
|
|
14
15
|
/** @internal — test-only reset for the one-shot warn latch. */
|
|
15
|
-
declare function __resetNodejsWasmWarningForTests(): void;
|
|
16
|
+
export declare function __resetNodejsWasmWarningForTests(): void;
|
|
16
17
|
/**
|
|
17
18
|
* @deprecated Removed in Phase-D.9a. Use `withCheckpoint` from
|
|
18
19
|
* `@kya-os/checkpoint-nextjs` — it auto-loads `kya-os-engine` WASM
|
|
19
20
|
* via `@kya-os/checkpoint-wasm-runtime`. Throws on invocation; surface
|
|
20
21
|
* exists only so static analysis sees the historical export.
|
|
21
22
|
*/
|
|
22
|
-
declare function loadWasmNodejs(): Promise<boolean>;
|
|
23
|
+
export declare function loadWasmNodejs(): Promise<boolean>;
|
|
23
24
|
/**
|
|
24
25
|
* @deprecated Removed in Phase-D.9a. The runtime guard is no longer
|
|
25
26
|
* needed; `@kya-os/checkpoint-wasm-runtime`'s loaders auto-detect
|
|
26
27
|
* runtime via the `"node"` / `"edge-runtime"` export conditions.
|
|
27
28
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
28
29
|
*/
|
|
29
|
-
declare function isNodejsRuntime(): boolean;
|
|
30
|
+
export declare function isNodejsRuntime(): boolean;
|
|
30
31
|
/**
|
|
31
32
|
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
32
33
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
33
34
|
*/
|
|
34
|
-
declare function getWasmModule(): WebAssembly.Module | null;
|
|
35
|
+
export declare function getWasmModule(): WebAssembly.Module | null;
|
|
35
36
|
/**
|
|
36
37
|
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
37
38
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
38
39
|
*/
|
|
39
|
-
declare function isWasmInitialized(): boolean;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
export declare function isWasmInitialized(): boolean;
|
|
41
|
+
//#endregion
|
|
42
|
+
//# sourceMappingURL=nodejs-wasm-loader.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodejs-wasm-loader.d.mts","names":[],"sources":["../src/nodejs-wasm-loader.ts"],"mappings":";;;;;;;;;;;;;;;wBAkCgB;;;;;;;wBAUM,kBAAkB;;;;;;;wBAWxB;;;;;wBASA,iBAAiB,YAAY;;;;;wBAS7B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/nodejs-wasm-loader.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated Phase-D.9a — legacy Node.js WASM loader for the retired
|
|
3
4
|
* `agentshield-wasm` Rust crate. This file used `fs.readFileSync` to
|
|
@@ -12,30 +13,30 @@
|
|
|
12
13
|
* Edge runtimes.
|
|
13
14
|
*/
|
|
14
15
|
/** @internal — test-only reset for the one-shot warn latch. */
|
|
15
|
-
declare function __resetNodejsWasmWarningForTests(): void;
|
|
16
|
+
export declare function __resetNodejsWasmWarningForTests(): void;
|
|
16
17
|
/**
|
|
17
18
|
* @deprecated Removed in Phase-D.9a. Use `withCheckpoint` from
|
|
18
19
|
* `@kya-os/checkpoint-nextjs` — it auto-loads `kya-os-engine` WASM
|
|
19
20
|
* via `@kya-os/checkpoint-wasm-runtime`. Throws on invocation; surface
|
|
20
21
|
* exists only so static analysis sees the historical export.
|
|
21
22
|
*/
|
|
22
|
-
declare function loadWasmNodejs(): Promise<boolean>;
|
|
23
|
+
export declare function loadWasmNodejs(): Promise<boolean>;
|
|
23
24
|
/**
|
|
24
25
|
* @deprecated Removed in Phase-D.9a. The runtime guard is no longer
|
|
25
26
|
* needed; `@kya-os/checkpoint-wasm-runtime`'s loaders auto-detect
|
|
26
27
|
* runtime via the `"node"` / `"edge-runtime"` export conditions.
|
|
27
28
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
28
29
|
*/
|
|
29
|
-
declare function isNodejsRuntime(): boolean;
|
|
30
|
+
export declare function isNodejsRuntime(): boolean;
|
|
30
31
|
/**
|
|
31
32
|
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
32
33
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
33
34
|
*/
|
|
34
|
-
declare function getWasmModule(): WebAssembly.Module | null;
|
|
35
|
+
export declare function getWasmModule(): WebAssembly.Module | null;
|
|
35
36
|
/**
|
|
36
37
|
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
37
38
|
* Throws on invocation; surface exists only for export-compatibility.
|
|
38
39
|
*/
|
|
39
|
-
declare function isWasmInitialized(): boolean;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
export declare function isWasmInitialized(): boolean;
|
|
41
|
+
//#endregion
|
|
42
|
+
//# sourceMappingURL=nodejs-wasm-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodejs-wasm-loader.d.ts","names":[],"sources":["../src/nodejs-wasm-loader.ts"],"mappings":";;;;;;;;;;;;;;;wBAkCgB;;;;;;;wBAUM,kBAAkB;;;;;;;wBAWxB;;;;;wBASA,iBAAiB,YAAY;;;;;wBAS7B"}
|
|
@@ -1,36 +1,70 @@
|
|
|
1
|
-
'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
//#region src/nodejs-wasm-loader.ts
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Phase-D.9a — legacy Node.js WASM loader for the retired
|
|
5
|
+
* `agentshield-wasm` Rust crate. This file used `fs.readFileSync` to
|
|
6
|
+
* locate + load the legacy detector's WASM binary into the legacy
|
|
7
|
+
* detection class. Both the WASM crate (Phase-D.9a/D.9b) and the
|
|
8
|
+
* detection class (removed in AgentDetector-Deletion-2) are retired.
|
|
9
|
+
*
|
|
10
|
+
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — it
|
|
11
|
+
* loads the canonical `kya-os-engine` WASM automatically via
|
|
12
|
+
* `@kya-os/checkpoint-wasm-runtime`'s loaders. No manual `fs.readFileSync`
|
|
13
|
+
* needed; the runtime handles bundler resolution across Next.js Node +
|
|
14
|
+
* Edge runtimes.
|
|
15
|
+
*/
|
|
16
|
+
const MIGRATION_ERROR = "`@kya-os/checkpoint-nextjs`'s `loadWasmNodejs` / `isNodejsRuntime` / `getWasmModule` / `isWasmInitialized` were deprecated in Phase-D.9a (legacy `agentshield-wasm` Rust crate retirement). The legacy detection class they fed was removed in AgentDetector-Deletion-2. Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — engine-backed via the Rust `kya-os-engine` crate, with automatic WASM loading via `@kya-os/checkpoint-wasm-runtime`. See packages/checkpoint-nextjs/README.md for the canonical recipe.";
|
|
17
|
+
let _nodejsWasmWarned = false;
|
|
6
18
|
function warnNodejsWasmDeprecated() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
if (_nodejsWasmWarned) return;
|
|
20
|
+
_nodejsWasmWarned = true;
|
|
21
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
22
|
+
console.warn(`[Checkpoint] ${MIGRATION_ERROR}`);
|
|
11
23
|
}
|
|
24
|
+
/** @internal — test-only reset for the one-shot warn latch. */
|
|
12
25
|
function __resetNodejsWasmWarningForTests() {
|
|
13
|
-
|
|
26
|
+
_nodejsWasmWarned = false;
|
|
14
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Removed in Phase-D.9a. Use `withCheckpoint` from
|
|
30
|
+
* `@kya-os/checkpoint-nextjs` — it auto-loads `kya-os-engine` WASM
|
|
31
|
+
* via `@kya-os/checkpoint-wasm-runtime`. Throws on invocation; surface
|
|
32
|
+
* exists only so static analysis sees the historical export.
|
|
33
|
+
*/
|
|
15
34
|
async function loadWasmNodejs() {
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
warnNodejsWasmDeprecated();
|
|
36
|
+
throw new Error(MIGRATION_ERROR);
|
|
18
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Removed in Phase-D.9a. The runtime guard is no longer
|
|
40
|
+
* needed; `@kya-os/checkpoint-wasm-runtime`'s loaders auto-detect
|
|
41
|
+
* runtime via the `"node"` / `"edge-runtime"` export conditions.
|
|
42
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
43
|
+
*/
|
|
19
44
|
function isNodejsRuntime() {
|
|
20
|
-
|
|
21
|
-
|
|
45
|
+
warnNodejsWasmDeprecated();
|
|
46
|
+
throw new Error(MIGRATION_ERROR);
|
|
22
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
50
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
51
|
+
*/
|
|
23
52
|
function getWasmModule() {
|
|
24
|
-
|
|
25
|
-
|
|
53
|
+
warnNodejsWasmDeprecated();
|
|
54
|
+
throw new Error(MIGRATION_ERROR);
|
|
26
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
58
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
59
|
+
*/
|
|
27
60
|
function isWasmInitialized() {
|
|
28
|
-
|
|
29
|
-
|
|
61
|
+
warnNodejsWasmDeprecated();
|
|
62
|
+
throw new Error(MIGRATION_ERROR);
|
|
30
63
|
}
|
|
31
64
|
|
|
65
|
+
//#endregion
|
|
32
66
|
exports.__resetNodejsWasmWarningForTests = __resetNodejsWasmWarningForTests;
|
|
33
67
|
exports.getWasmModule = getWasmModule;
|
|
34
68
|
exports.isNodejsRuntime = isNodejsRuntime;
|
|
35
69
|
exports.isWasmInitialized = isWasmInitialized;
|
|
36
|
-
exports.loadWasmNodejs = loadWasmNodejs;
|
|
70
|
+
exports.loadWasmNodejs = loadWasmNodejs;
|
|
@@ -1,30 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/nodejs-wasm-loader.ts
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Phase-D.9a — legacy Node.js WASM loader for the retired
|
|
4
|
+
* `agentshield-wasm` Rust crate. This file used `fs.readFileSync` to
|
|
5
|
+
* locate + load the legacy detector's WASM binary into the legacy
|
|
6
|
+
* detection class. Both the WASM crate (Phase-D.9a/D.9b) and the
|
|
7
|
+
* detection class (removed in AgentDetector-Deletion-2) are retired.
|
|
8
|
+
*
|
|
9
|
+
* Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — it
|
|
10
|
+
* loads the canonical `kya-os-engine` WASM automatically via
|
|
11
|
+
* `@kya-os/checkpoint-wasm-runtime`'s loaders. No manual `fs.readFileSync`
|
|
12
|
+
* needed; the runtime handles bundler resolution across Next.js Node +
|
|
13
|
+
* Edge runtimes.
|
|
14
|
+
*/
|
|
15
|
+
const MIGRATION_ERROR = "`@kya-os/checkpoint-nextjs`'s `loadWasmNodejs` / `isNodejsRuntime` / `getWasmModule` / `isWasmInitialized` were deprecated in Phase-D.9a (legacy `agentshield-wasm` Rust crate retirement). The legacy detection class they fed was removed in AgentDetector-Deletion-2. Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — engine-backed via the Rust `kya-os-engine` crate, with automatic WASM loading via `@kya-os/checkpoint-wasm-runtime`. See packages/checkpoint-nextjs/README.md for the canonical recipe.";
|
|
16
|
+
let _nodejsWasmWarned = false;
|
|
4
17
|
function warnNodejsWasmDeprecated() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
if (_nodejsWasmWarned) return;
|
|
19
|
+
_nodejsWasmWarned = true;
|
|
20
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
21
|
+
console.warn(`[Checkpoint] ${MIGRATION_ERROR}`);
|
|
9
22
|
}
|
|
23
|
+
/** @internal — test-only reset for the one-shot warn latch. */
|
|
10
24
|
function __resetNodejsWasmWarningForTests() {
|
|
11
|
-
|
|
25
|
+
_nodejsWasmWarned = false;
|
|
12
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Removed in Phase-D.9a. Use `withCheckpoint` from
|
|
29
|
+
* `@kya-os/checkpoint-nextjs` — it auto-loads `kya-os-engine` WASM
|
|
30
|
+
* via `@kya-os/checkpoint-wasm-runtime`. Throws on invocation; surface
|
|
31
|
+
* exists only so static analysis sees the historical export.
|
|
32
|
+
*/
|
|
13
33
|
async function loadWasmNodejs() {
|
|
14
|
-
|
|
15
|
-
|
|
34
|
+
warnNodejsWasmDeprecated();
|
|
35
|
+
throw new Error(MIGRATION_ERROR);
|
|
16
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Removed in Phase-D.9a. The runtime guard is no longer
|
|
39
|
+
* needed; `@kya-os/checkpoint-wasm-runtime`'s loaders auto-detect
|
|
40
|
+
* runtime via the `"node"` / `"edge-runtime"` export conditions.
|
|
41
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
42
|
+
*/
|
|
17
43
|
function isNodejsRuntime() {
|
|
18
|
-
|
|
19
|
-
|
|
44
|
+
warnNodejsWasmDeprecated();
|
|
45
|
+
throw new Error(MIGRATION_ERROR);
|
|
20
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
49
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
50
|
+
*/
|
|
21
51
|
function getWasmModule() {
|
|
22
|
-
|
|
23
|
-
|
|
52
|
+
warnNodejsWasmDeprecated();
|
|
53
|
+
throw new Error(MIGRATION_ERROR);
|
|
24
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.
|
|
57
|
+
* Throws on invocation; surface exists only for export-compatibility.
|
|
58
|
+
*/
|
|
25
59
|
function isWasmInitialized() {
|
|
26
|
-
|
|
27
|
-
|
|
60
|
+
warnNodejsWasmDeprecated();
|
|
61
|
+
throw new Error(MIGRATION_ERROR);
|
|
28
62
|
}
|
|
29
63
|
|
|
64
|
+
//#endregion
|
|
30
65
|
export { __resetNodejsWasmWarningForTests, getWasmModule, isNodejsRuntime, isWasmInitialized, loadWasmNodejs };
|
|
66
|
+
//# sourceMappingURL=nodejs-wasm-loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodejs-wasm-loader.mjs","names":[],"sources":["../src/nodejs-wasm-loader.ts"],"sourcesContent":["/**\n * @deprecated Phase-D.9a — legacy Node.js WASM loader for the retired\n * `agentshield-wasm` Rust crate. This file used `fs.readFileSync` to\n * locate + load the legacy detector's WASM binary into the legacy\n * detection class. Both the WASM crate (Phase-D.9a/D.9b) and the\n * detection class (removed in AgentDetector-Deletion-2) are retired.\n *\n * Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — it\n * loads the canonical `kya-os-engine` WASM automatically via\n * `@kya-os/checkpoint-wasm-runtime`'s loaders. No manual `fs.readFileSync`\n * needed; the runtime handles bundler resolution across Next.js Node +\n * Edge runtimes.\n */\n\nconst MIGRATION_ERROR =\n \"`@kya-os/checkpoint-nextjs`'s `loadWasmNodejs` / `isNodejsRuntime` / \" +\n '`getWasmModule` / `isWasmInitialized` were deprecated in Phase-D.9a ' +\n '(legacy `agentshield-wasm` Rust crate retirement). The legacy ' +\n 'detection class they fed was removed in AgentDetector-Deletion-2. ' +\n 'Migrate to `withCheckpoint` from `@kya-os/checkpoint-nextjs` — ' +\n 'engine-backed via the Rust `kya-os-engine` crate, with automatic ' +\n 'WASM loading via `@kya-os/checkpoint-wasm-runtime`. See ' +\n 'packages/checkpoint-nextjs/README.md for the canonical recipe.';\n\n// One-shot dev-only deprecation warning. Suppressed in production.\nlet _nodejsWasmWarned = false;\nfunction warnNodejsWasmDeprecated(): void {\n if (_nodejsWasmWarned) return;\n _nodejsWasmWarned = true;\n if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'production') return;\n console.warn(`[Checkpoint] ${MIGRATION_ERROR}`);\n}\n\n/** @internal — test-only reset for the one-shot warn latch. */\nexport function __resetNodejsWasmWarningForTests(): void {\n _nodejsWasmWarned = false;\n}\n\n/**\n * @deprecated Removed in Phase-D.9a. Use `withCheckpoint` from\n * `@kya-os/checkpoint-nextjs` — it auto-loads `kya-os-engine` WASM\n * via `@kya-os/checkpoint-wasm-runtime`. Throws on invocation; surface\n * exists only so static analysis sees the historical export.\n */\nexport async function loadWasmNodejs(): Promise<boolean> {\n warnNodejsWasmDeprecated();\n throw new Error(MIGRATION_ERROR);\n}\n\n/**\n * @deprecated Removed in Phase-D.9a. The runtime guard is no longer\n * needed; `@kya-os/checkpoint-wasm-runtime`'s loaders auto-detect\n * runtime via the `\"node\"` / `\"edge-runtime\"` export conditions.\n * Throws on invocation; surface exists only for export-compatibility.\n */\nexport function isNodejsRuntime(): boolean {\n warnNodejsWasmDeprecated();\n throw new Error(MIGRATION_ERROR);\n}\n\n/**\n * @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.\n * Throws on invocation; surface exists only for export-compatibility.\n */\nexport function getWasmModule(): WebAssembly.Module | null {\n warnNodejsWasmDeprecated();\n throw new Error(MIGRATION_ERROR);\n}\n\n/**\n * @deprecated Removed in Phase-D.9a. Migrate to `withCheckpoint`.\n * Throws on invocation; surface exists only for export-compatibility.\n */\nexport function isWasmInitialized(): boolean {\n warnNodejsWasmDeprecated();\n throw new Error(MIGRATION_ERROR);\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,kBACJ;AAUF,IAAI,oBAAoB;AACxB,SAAS,2BAAiC;CACxC,IAAI,mBAAmB;CACvB,oBAAoB;CACpB,IAAI,OAAO,YAAY,eAAe,QAAQ,KAAK,aAAa,cAAc;CAC9E,QAAQ,KAAK,gBAAgB,iBAAiB;AAChD;;AAGA,SAAgB,mCAAyC;CACvD,oBAAoB;AACtB;;;;;;;AAQA,eAAsB,iBAAmC;CACvD,yBAAyB;CACzB,MAAM,IAAI,MAAM,eAAe;AACjC;;;;;;;AAQA,SAAgB,kBAA2B;CACzC,yBAAyB;CACzB,MAAM,IAAI,MAAM,eAAe;AACjC;;;;;AAMA,SAAgB,gBAA2C;CACzD,yBAAyB;CACzB,MAAM,IAAI,MAAM,eAAe;AACjC;;;;;AAMA,SAAgB,oBAA6B;CAC3C,yBAAyB;CACzB,MAAM,IAAI,MAAM,eAAe;AACjC"}
|