@kya-os/checkpoint-nextjs 1.9.0 → 1.11.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.
Files changed (156) hide show
  1. package/CHANGELOG.md +322 -0
  2. package/README.md +205 -31
  3. package/dist/adapt-BdQ9R7Iw.mjs +97 -0
  4. package/dist/adapt-BdQ9R7Iw.mjs.map +1 -0
  5. package/dist/adapt-CCSKGjVH.js +107 -0
  6. package/dist/api-client-JHOrRUA_.d.mts +222 -0
  7. package/dist/api-client-JHOrRUA_.d.mts.map +1 -0
  8. package/dist/api-client-JHOrRUA_.d.ts +222 -0
  9. package/dist/api-client-JHOrRUA_.d.ts.map +1 -0
  10. package/dist/api-client.d.mts +2 -213
  11. package/dist/api-client.d.ts +2 -213
  12. package/dist/api-client.js +221 -206
  13. package/dist/api-client.mjs +222 -202
  14. package/dist/api-client.mjs.map +1 -0
  15. package/dist/api-middleware-BWjokNis.d.mts +131 -0
  16. package/dist/api-middleware-BWjokNis.d.mts.map +1 -0
  17. package/dist/api-middleware-Bf3xmM9W.js +391 -0
  18. package/dist/api-middleware-C-ngFX_8.mjs +387 -0
  19. package/dist/api-middleware-C-ngFX_8.mjs.map +1 -0
  20. package/dist/api-middleware-DyLDqOYF.d.ts +131 -0
  21. package/dist/api-middleware-DyLDqOYF.d.ts.map +1 -0
  22. package/dist/api-middleware.d.mts +2 -166
  23. package/dist/api-middleware.d.ts +2 -166
  24. package/dist/api-middleware.js +3 -526
  25. package/dist/api-middleware.mjs +2 -521
  26. package/dist/cedar-wasm.d.mts +20 -0
  27. package/dist/cedar-wasm.d.mts.map +1 -0
  28. package/dist/cedar-wasm.d.ts +19 -0
  29. package/dist/cedar-wasm.d.ts.map +1 -0
  30. package/dist/cedar-wasm.js +24 -0
  31. package/dist/cedar-wasm.mjs +23 -0
  32. package/dist/cedar-wasm.mjs.map +1 -0
  33. package/dist/config-CPP1RV0f.d.mts +291 -0
  34. package/dist/config-CPP1RV0f.d.mts.map +1 -0
  35. package/dist/config-DVgOFxJs.d.ts +291 -0
  36. package/dist/config-DVgOFxJs.d.ts.map +1 -0
  37. package/dist/engine-wasm.d.mts +20 -0
  38. package/dist/engine-wasm.d.mts.map +1 -0
  39. package/dist/engine-wasm.d.ts +19 -0
  40. package/dist/engine-wasm.d.ts.map +1 -0
  41. package/dist/engine-wasm.js +24 -0
  42. package/dist/engine-wasm.mjs +23 -0
  43. package/dist/engine-wasm.mjs.map +1 -0
  44. package/dist/index-edge.d.mts +8 -0
  45. package/dist/index-edge.d.ts +8 -0
  46. package/dist/index-edge.js +14 -0
  47. package/dist/index-edge.mjs +7 -0
  48. package/dist/index.d.mts +8 -17
  49. package/dist/index.d.ts +8 -17
  50. package/dist/index.js +36 -1275
  51. package/dist/index.mjs +29 -1234
  52. package/dist/index.mjs.map +1 -0
  53. package/dist/middleware-bundler.d.mts +6 -12
  54. package/dist/middleware-bundler.d.mts.map +1 -0
  55. package/dist/middleware-bundler.d.ts +6 -12
  56. package/dist/middleware-bundler.d.ts.map +1 -0
  57. package/dist/middleware-bundler.js +12 -350
  58. package/dist/middleware-bundler.mjs +11 -347
  59. package/dist/middleware-bundler.mjs.map +1 -0
  60. package/dist/middleware-core-B0jf5_Hm.mjs +264 -0
  61. package/dist/middleware-core-B0jf5_Hm.mjs.map +1 -0
  62. package/dist/middleware-core-Bol44X9C.d.ts +17 -0
  63. package/dist/middleware-core-Bol44X9C.d.ts.map +1 -0
  64. package/dist/middleware-core-CMc-2QkU.js +274 -0
  65. package/dist/middleware-core-DycsbHUd.d.mts +17 -0
  66. package/dist/middleware-core-DycsbHUd.d.mts.map +1 -0
  67. package/dist/middleware-edge.d.mts +16 -14
  68. package/dist/middleware-edge.d.mts.map +1 -0
  69. package/dist/middleware-edge.d.ts +16 -14
  70. package/dist/middleware-edge.d.ts.map +1 -0
  71. package/dist/middleware-edge.js +94 -355
  72. package/dist/middleware-edge.mjs +90 -347
  73. package/dist/middleware-edge.mjs.map +1 -0
  74. package/dist/middleware-node-context-591KsiYg.js +39 -0
  75. package/dist/middleware-node-context-D_ZyUEcA.mjs +35 -0
  76. package/dist/middleware-node-context-D_ZyUEcA.mjs.map +1 -0
  77. package/dist/middleware-node.d.mts +10 -25
  78. package/dist/middleware-node.d.mts.map +1 -0
  79. package/dist/middleware-node.d.ts +10 -25
  80. package/dist/middleware-node.d.ts.map +1 -0
  81. package/dist/middleware-node.js +21 -351
  82. package/dist/middleware-node.mjs +19 -347
  83. package/dist/middleware-node.mjs.map +1 -0
  84. package/dist/posture-outcome-Ccujx_9V.d.mts +14 -0
  85. package/dist/posture-outcome-Ccujx_9V.d.mts.map +1 -0
  86. package/dist/posture-outcome-Ccujx_9V.d.ts +14 -0
  87. package/dist/posture-outcome-Ccujx_9V.d.ts.map +1 -0
  88. package/dist/posture-outcome-DQ4fdMfq.mjs +21 -0
  89. package/dist/posture-outcome-DQ4fdMfq.mjs.map +1 -0
  90. package/dist/posture-outcome-DddsJtL8.js +25 -0
  91. package/dist/public-api-CYsHrTQI.d.ts +5 -0
  92. package/dist/public-api-DkG7pRE0.d.mts +5 -0
  93. package/dist/rolldown-runtime-C24Yb2bl.js +33 -0
  94. package/dist/utils-Cnwg0VrY.mjs +88 -0
  95. package/dist/utils-Cnwg0VrY.mjs.map +1 -0
  96. package/dist/utils-dyFxqlFI.js +104 -0
  97. package/package.json +31 -66
  98. package/EDGE_RUNTIME_WASM_SETUP.md +0 -342
  99. package/bin/setup-edge-wasm.js +0 -513
  100. package/dist/adapt.d.mts +0 -39
  101. package/dist/adapt.d.ts +0 -39
  102. package/dist/adapt.js +0 -59
  103. package/dist/adapt.mjs +0 -57
  104. package/dist/composed-policy.d.mts +0 -115
  105. package/dist/composed-policy.d.ts +0 -115
  106. package/dist/composed-policy.js +0 -103
  107. package/dist/composed-policy.mjs +0 -97
  108. package/dist/config-CleTeeoW.d.mts +0 -233
  109. package/dist/config-XMOIkxFN.d.ts +0 -233
  110. package/dist/create-middleware.d.mts +0 -22
  111. package/dist/create-middleware.d.ts +0 -22
  112. package/dist/create-middleware.js +0 -34
  113. package/dist/create-middleware.mjs +0 -31
  114. package/dist/edge/index.d.mts +0 -112
  115. package/dist/edge/index.d.ts +0 -112
  116. package/dist/edge/index.js +0 -277
  117. package/dist/edge/index.mjs +0 -275
  118. package/dist/edge-runtime-loader.d.mts +0 -77
  119. package/dist/edge-runtime-loader.d.ts +0 -77
  120. package/dist/edge-runtime-loader.js +0 -242
  121. package/dist/edge-runtime-loader.mjs +0 -235
  122. package/dist/edge-wasm-middleware.d.mts +0 -62
  123. package/dist/edge-wasm-middleware.d.ts +0 -62
  124. package/dist/edge-wasm-middleware.js +0 -26
  125. package/dist/edge-wasm-middleware.mjs +0 -22
  126. package/dist/middleware.d.mts +0 -45
  127. package/dist/middleware.d.ts +0 -45
  128. package/dist/middleware.js +0 -19
  129. package/dist/middleware.mjs +0 -15
  130. package/dist/nodejs-wasm-loader.d.mts +0 -41
  131. package/dist/nodejs-wasm-loader.d.ts +0 -41
  132. package/dist/nodejs-wasm-loader.js +0 -36
  133. package/dist/nodejs-wasm-loader.mjs +0 -30
  134. package/dist/policy.d.mts +0 -162
  135. package/dist/policy.d.ts +0 -162
  136. package/dist/policy.js +0 -198
  137. package/dist/policy.mjs +0 -174
  138. package/dist/session-tracker.d.mts +0 -55
  139. package/dist/session-tracker.d.ts +0 -55
  140. package/dist/session-tracker.js +0 -172
  141. package/dist/session-tracker.mjs +0 -169
  142. package/dist/translate.d.mts +0 -63
  143. package/dist/translate.d.ts +0 -63
  144. package/dist/translate.js +0 -44
  145. package/dist/translate.mjs +0 -42
  146. package/dist/types-Chgi5TFC.d.mts +0 -105
  147. package/dist/types-Chgi5TFC.d.ts +0 -105
  148. package/dist/wasm-setup.d.mts +0 -46
  149. package/dist/wasm-setup.d.ts +0 -46
  150. package/dist/wasm-setup.js +0 -122
  151. package/dist/wasm-setup.mjs +0 -118
  152. package/wasm/agentshield_wasm.d.ts +0 -479
  153. package/wasm/agentshield_wasm.js +0 -1536
  154. package/wasm/agentshield_wasm_bg.wasm +0 -0
  155. package/wasm/package.json +0 -30
  156. package/wasm.d.ts +0 -21
@@ -1,166 +1,2 @@
1
- import { NextRequest, NextResponse } from 'next/server';
2
- import { ClientIpTrustPolicy, ChallengeEnvelopeMode } from '@kya-os/checkpoint-shared';
3
- import { EnforcementDecision } from './api-client.mjs';
4
-
5
- /**
6
- * API-based AgentShield Middleware for Next.js
7
- *
8
- * This middleware uses the AgentShield API for detection and enforcement,
9
- * instead of running detection locally. This approach:
10
- *
11
- * 1. Works reliably in Edge Runtime (no WASM loading issues)
12
- * 2. Ensures consistent detection across all platforms
13
- * 3. Applies centralized policies from the dashboard
14
- * 4. Supports deny lists, thresholds, and path rules
15
- *
16
- * @example
17
- * ```typescript
18
- * // middleware.ts
19
- * import { withCheckpointApi } from '@kya-os/checkpoint-nextjs/api-middleware';
20
- *
21
- * export default withCheckpointApi({
22
- * apiKey: process.env.CHECKPOINT_API_KEY!,
23
- * // Optional overrides:
24
- * onBlock: 'redirect', // 'block' | 'redirect' | 'challenge'
25
- * redirectUrl: '/blocked',
26
- * skipPaths: ['/api/health', '/_next/*'],
27
- * });
28
- *
29
- * export const config = {
30
- * matcher: ['/((?!_next/static|favicon.ico).*)'],
31
- * };
32
- * ```
33
- */
34
-
35
- /**
36
- * Middleware configuration
37
- */
38
- interface CheckpointApiMiddlewareConfig {
39
- /** Explicit deployment/proxy trust profile for client-IP resolution. */
40
- clientIpPolicy?: ClientIpTrustPolicy;
41
- /** API key (or use CHECKPOINT_API_KEY env var) */
42
- apiKey?: string;
43
- /** API base URL (defaults to production) */
44
- apiUrl?: string;
45
- /**
46
- * Use edge detection for lower latency (~30-50ms vs ~150ms) and better coverage.
47
- * Edge detection can identify non-JS clients (curl, Python, Claude Code WebFetch)
48
- * that the pixel cannot detect since they don't execute JavaScript.
49
- * Set to false to use the Vercel API instead.
50
- * @default true
51
- */
52
- useEdge?: boolean;
53
- /** Request timeout in ms (default: 5000) */
54
- timeout?: number;
55
- /**
56
- * Action to take when an agent should be blocked
57
- * - 'block': Return 403 response
58
- * - 'redirect': Redirect to redirectUrl
59
- * - 'challenge': Show a challenge page (future)
60
- * Default: uses policy from dashboard
61
- */
62
- onBlock?: 'block' | 'redirect' | 'challenge';
63
- /**
64
- * URL to redirect to when blocking (if onBlock is 'redirect')
65
- * Default: uses redirectUrl from dashboard policy
66
- */
67
- redirectUrl?: string;
68
- /**
69
- * How the middleware handles a `redirect` / `instruct` action.
70
- *
71
- * - `'instruct'` (default): return HTTP 401 with a KYA-OS Link header + JSON
72
- * body pointing the agent at the redirect URL. LLMs surface the URL as a
73
- * clickable link for the user. Matches the Cloudflare Gateway contract.
74
- * - `'http'`: legacy behavior — return HTTP 302 with `Location`. Most LLM
75
- * fetchers won't follow the redirect, so this is only useful when your
76
- * traffic is real browsers.
77
- *
78
- * @default 'instruct'
79
- */
80
- redirectMode?: 'instruct' | 'http';
81
- /**
82
- * Challenge-emission envelope mode (draft-kya-http-02 §8.1 fetcher-200).
83
- * `negotiated` serves a body-readable HTTP 200 instruct response to
84
- * cooperative agents (so fetchers that drop 4xx bodies can read it),
85
- * keeping the spec 401 for everyone else. Defaults to `negotiated` (#3530).
86
- * A cooperative-UX bridge, NOT an access control.
87
- */
88
- delegationChallengeMode?: ChallengeEnvelopeMode;
89
- /**
90
- * Custom blocked response
91
- */
92
- blockedResponse?: {
93
- status?: number;
94
- message?: string;
95
- headers?: Record<string, string>;
96
- };
97
- /**
98
- * Paths to skip (in addition to dashboard policy)
99
- * Supports glob patterns: '/api/*', '/_next/*'
100
- */
101
- skipPaths?: string[];
102
- /**
103
- * Only enforce on these paths (overrides dashboard policy)
104
- */
105
- includePaths?: string[];
106
- /**
107
- * Callback when an agent is detected
108
- */
109
- onAgentDetected?: (request: NextRequest, decision: EnforcementDecision) => void | Promise<void>;
110
- /**
111
- * Callback to customize the blocked response
112
- */
113
- customBlockedResponse?: (request: NextRequest, decision: EnforcementDecision) => NextResponse | Promise<NextResponse>;
114
- /**
115
- * Whether to fail open (allow) on API errors
116
- * Default: true (recommended for production)
117
- */
118
- failOpen?: boolean;
119
- /**
120
- * Enable debug logging
121
- */
122
- debug?: boolean;
123
- }
124
- /**
125
- * Create AgentShield middleware with API-based detection
126
- *
127
- * @example
128
- * ```typescript
129
- * // middleware.ts
130
- * import { withCheckpointApi } from '@kya-os/checkpoint-nextjs/api-middleware';
131
- *
132
- * export default withCheckpointApi({
133
- * onBlock: 'block',
134
- * skipPaths: ['/api/health'],
135
- * });
136
- * ```
137
- */
138
- declare function withCheckpointApi(config?: CheckpointApiMiddlewareConfig): (request: NextRequest) => Promise<NextResponse>;
139
- /** @deprecated Renamed to {@link withCheckpointApi}. The behaviour is identical. */
140
- declare const withAgentShield: typeof withCheckpointApi;
141
- /** @deprecated Renamed to {@link CheckpointApiMiddlewareConfig}. */
142
- type AgentShieldMiddlewareConfig = CheckpointApiMiddlewareConfig;
143
- /**
144
- * @deprecated Module-load-time invocation of the legacy `withAgentShield()`.
145
- * Construct the middleware explicitly via `withCheckpointApi({ apiKey })`
146
- * instead of relying on a default-constructed singleton at import time.
147
- */
148
- declare function agentShieldMiddleware(_request: NextRequest): Promise<NextResponse>;
149
- /**
150
- * @deprecated The "enhanced middleware" combined detection + storage +
151
- * enforcement into a single legacy path that no longer exists. Migrate
152
- * to `withCheckpoint` (local-engine) or `withCheckpointApi` (SaaS-gateway).
153
- */
154
- declare function createEnhancedAgentShieldMiddleware(_config?: EnhancedMiddlewareConfig): (request: NextRequest) => Promise<NextResponse>;
155
- /** @deprecated The enhanced-middleware path is gone. Use `CheckpointConfig` (local-engine) or `CheckpointApiMiddlewareConfig` (SaaS). */
156
- type EnhancedMiddlewareConfig = Record<string, unknown>;
157
- /** @deprecated Storage was tied to the legacy enhanced-middleware path. */
158
- type StorageAdapter = Record<string, unknown>;
159
- /** @deprecated Storage was tied to the legacy enhanced-middleware path. */
160
- type StorageConfig = Record<string, unknown>;
161
- /** @deprecated Detection events now flow through the engine; the legacy event shape no longer applies. */
162
- type AgentDetectionEvent = Record<string, unknown>;
163
- /** @deprecated Use `EdgeSessionTracker` / `StatelessSessionChecker` from `./session-tracker`. */
164
- type AgentSession = Record<string, unknown>;
165
-
166
- export { type AgentDetectionEvent, type AgentSession, type AgentShieldMiddlewareConfig, type CheckpointApiMiddlewareConfig, type EnhancedMiddlewareConfig, type StorageAdapter, type StorageConfig, agentShieldMiddleware, createEnhancedAgentShieldMiddleware, withAgentShield, withCheckpointApi };
1
+ import { n as withCheckpointApi, t as CheckpointApiMiddlewareConfig } from "./api-middleware-BWjokNis.mjs";
2
+ export { CheckpointApiMiddlewareConfig, withCheckpointApi };
@@ -1,166 +1,2 @@
1
- import { NextRequest, NextResponse } from 'next/server';
2
- import { ClientIpTrustPolicy, ChallengeEnvelopeMode } from '@kya-os/checkpoint-shared';
3
- import { EnforcementDecision } from './api-client.js';
4
-
5
- /**
6
- * API-based AgentShield Middleware for Next.js
7
- *
8
- * This middleware uses the AgentShield API for detection and enforcement,
9
- * instead of running detection locally. This approach:
10
- *
11
- * 1. Works reliably in Edge Runtime (no WASM loading issues)
12
- * 2. Ensures consistent detection across all platforms
13
- * 3. Applies centralized policies from the dashboard
14
- * 4. Supports deny lists, thresholds, and path rules
15
- *
16
- * @example
17
- * ```typescript
18
- * // middleware.ts
19
- * import { withCheckpointApi } from '@kya-os/checkpoint-nextjs/api-middleware';
20
- *
21
- * export default withCheckpointApi({
22
- * apiKey: process.env.CHECKPOINT_API_KEY!,
23
- * // Optional overrides:
24
- * onBlock: 'redirect', // 'block' | 'redirect' | 'challenge'
25
- * redirectUrl: '/blocked',
26
- * skipPaths: ['/api/health', '/_next/*'],
27
- * });
28
- *
29
- * export const config = {
30
- * matcher: ['/((?!_next/static|favicon.ico).*)'],
31
- * };
32
- * ```
33
- */
34
-
35
- /**
36
- * Middleware configuration
37
- */
38
- interface CheckpointApiMiddlewareConfig {
39
- /** Explicit deployment/proxy trust profile for client-IP resolution. */
40
- clientIpPolicy?: ClientIpTrustPolicy;
41
- /** API key (or use CHECKPOINT_API_KEY env var) */
42
- apiKey?: string;
43
- /** API base URL (defaults to production) */
44
- apiUrl?: string;
45
- /**
46
- * Use edge detection for lower latency (~30-50ms vs ~150ms) and better coverage.
47
- * Edge detection can identify non-JS clients (curl, Python, Claude Code WebFetch)
48
- * that the pixel cannot detect since they don't execute JavaScript.
49
- * Set to false to use the Vercel API instead.
50
- * @default true
51
- */
52
- useEdge?: boolean;
53
- /** Request timeout in ms (default: 5000) */
54
- timeout?: number;
55
- /**
56
- * Action to take when an agent should be blocked
57
- * - 'block': Return 403 response
58
- * - 'redirect': Redirect to redirectUrl
59
- * - 'challenge': Show a challenge page (future)
60
- * Default: uses policy from dashboard
61
- */
62
- onBlock?: 'block' | 'redirect' | 'challenge';
63
- /**
64
- * URL to redirect to when blocking (if onBlock is 'redirect')
65
- * Default: uses redirectUrl from dashboard policy
66
- */
67
- redirectUrl?: string;
68
- /**
69
- * How the middleware handles a `redirect` / `instruct` action.
70
- *
71
- * - `'instruct'` (default): return HTTP 401 with a KYA-OS Link header + JSON
72
- * body pointing the agent at the redirect URL. LLMs surface the URL as a
73
- * clickable link for the user. Matches the Cloudflare Gateway contract.
74
- * - `'http'`: legacy behavior — return HTTP 302 with `Location`. Most LLM
75
- * fetchers won't follow the redirect, so this is only useful when your
76
- * traffic is real browsers.
77
- *
78
- * @default 'instruct'
79
- */
80
- redirectMode?: 'instruct' | 'http';
81
- /**
82
- * Challenge-emission envelope mode (draft-kya-http-02 §8.1 fetcher-200).
83
- * `negotiated` serves a body-readable HTTP 200 instruct response to
84
- * cooperative agents (so fetchers that drop 4xx bodies can read it),
85
- * keeping the spec 401 for everyone else. Defaults to `negotiated` (#3530).
86
- * A cooperative-UX bridge, NOT an access control.
87
- */
88
- delegationChallengeMode?: ChallengeEnvelopeMode;
89
- /**
90
- * Custom blocked response
91
- */
92
- blockedResponse?: {
93
- status?: number;
94
- message?: string;
95
- headers?: Record<string, string>;
96
- };
97
- /**
98
- * Paths to skip (in addition to dashboard policy)
99
- * Supports glob patterns: '/api/*', '/_next/*'
100
- */
101
- skipPaths?: string[];
102
- /**
103
- * Only enforce on these paths (overrides dashboard policy)
104
- */
105
- includePaths?: string[];
106
- /**
107
- * Callback when an agent is detected
108
- */
109
- onAgentDetected?: (request: NextRequest, decision: EnforcementDecision) => void | Promise<void>;
110
- /**
111
- * Callback to customize the blocked response
112
- */
113
- customBlockedResponse?: (request: NextRequest, decision: EnforcementDecision) => NextResponse | Promise<NextResponse>;
114
- /**
115
- * Whether to fail open (allow) on API errors
116
- * Default: true (recommended for production)
117
- */
118
- failOpen?: boolean;
119
- /**
120
- * Enable debug logging
121
- */
122
- debug?: boolean;
123
- }
124
- /**
125
- * Create AgentShield middleware with API-based detection
126
- *
127
- * @example
128
- * ```typescript
129
- * // middleware.ts
130
- * import { withCheckpointApi } from '@kya-os/checkpoint-nextjs/api-middleware';
131
- *
132
- * export default withCheckpointApi({
133
- * onBlock: 'block',
134
- * skipPaths: ['/api/health'],
135
- * });
136
- * ```
137
- */
138
- declare function withCheckpointApi(config?: CheckpointApiMiddlewareConfig): (request: NextRequest) => Promise<NextResponse>;
139
- /** @deprecated Renamed to {@link withCheckpointApi}. The behaviour is identical. */
140
- declare const withAgentShield: typeof withCheckpointApi;
141
- /** @deprecated Renamed to {@link CheckpointApiMiddlewareConfig}. */
142
- type AgentShieldMiddlewareConfig = CheckpointApiMiddlewareConfig;
143
- /**
144
- * @deprecated Module-load-time invocation of the legacy `withAgentShield()`.
145
- * Construct the middleware explicitly via `withCheckpointApi({ apiKey })`
146
- * instead of relying on a default-constructed singleton at import time.
147
- */
148
- declare function agentShieldMiddleware(_request: NextRequest): Promise<NextResponse>;
149
- /**
150
- * @deprecated The "enhanced middleware" combined detection + storage +
151
- * enforcement into a single legacy path that no longer exists. Migrate
152
- * to `withCheckpoint` (local-engine) or `withCheckpointApi` (SaaS-gateway).
153
- */
154
- declare function createEnhancedAgentShieldMiddleware(_config?: EnhancedMiddlewareConfig): (request: NextRequest) => Promise<NextResponse>;
155
- /** @deprecated The enhanced-middleware path is gone. Use `CheckpointConfig` (local-engine) or `CheckpointApiMiddlewareConfig` (SaaS). */
156
- type EnhancedMiddlewareConfig = Record<string, unknown>;
157
- /** @deprecated Storage was tied to the legacy enhanced-middleware path. */
158
- type StorageAdapter = Record<string, unknown>;
159
- /** @deprecated Storage was tied to the legacy enhanced-middleware path. */
160
- type StorageConfig = Record<string, unknown>;
161
- /** @deprecated Detection events now flow through the engine; the legacy event shape no longer applies. */
162
- type AgentDetectionEvent = Record<string, unknown>;
163
- /** @deprecated Use `EdgeSessionTracker` / `StatelessSessionChecker` from `./session-tracker`. */
164
- type AgentSession = Record<string, unknown>;
165
-
166
- export { type AgentDetectionEvent, type AgentSession, type AgentShieldMiddlewareConfig, type CheckpointApiMiddlewareConfig, type EnhancedMiddlewareConfig, type StorageAdapter, type StorageConfig, agentShieldMiddleware, createEnhancedAgentShieldMiddleware, withAgentShield, withCheckpointApi };
1
+ import { n as withCheckpointApi, t as CheckpointApiMiddlewareConfig } from "./api-middleware-DyLDqOYF.js";
2
+ export { CheckpointApiMiddlewareConfig, withCheckpointApi };