@h-ai/kit 0.1.0-alpha.13 → 0.1.0-alpha.16

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.
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
1
+ {"version":3,"sources":["../../src/client/kit-nav-adapter.ts"],"names":[],"mappings":";;;;;AAmCO,SAAS,yBAAA,GAId;AACA,EAAA,OAAO;AAAA,IACL,IAAI,QAAA,GAAW;AACb,MAAA,OAAO,KAAK,GAAA,CAAI,QAAA;AAAA,IAClB,CAAA;AAAA,IACA,MAAM,SAAS,GAAA,EAAa;AAC1B,MAAA,MAAM,IAAA,CAAK,GAAA,EAAK,EAAE,aAAA,EAAe,MAAM,CAAA;AAAA,IACzC,CAAA;AAAA,IACA,MAAM,OAAA,GAAU;AACd,MAAA,MAAM,aAAA,EAAc;AAAA,IACtB;AAAA,GACF;AACF","file":"index.js","sourcesContent":["/**\n * @h-ai/kit — SvelteKit 路由适配器\n *\n * 此前位于 `@h-ai/ui/sveltekit`,为避免 `@h-ai/ui` 耦合 SvelteKit,迁移至本模块。\n *\n * 为 `@h-ai/ui` 的 `CrudPage` 等需要“宿主路由”的场景组件提供 SvelteKit 实现。\n * 返回值结构与 `@h-ai/ui` 的 `NavAdapter` 完全一致;TS 通过结构类型自动匹配,\n * 无需在 `@h-ai/kit` 中显式依赖 `@h-ai/ui`。\n *\n * @example\n * ```svelte\n * <script lang='ts'>\n * import { CrudPage } from '@h-ai/ui'\n * import { createSvelteKitNavAdapter } from '@h-ai/kit/client'\n *\n * const nav = createSvelteKitNavAdapter()\n * </script>\n *\n * <CrudPage {crud} {data} {nav} />\n * ```\n *\n * @module kit-nav-adapter\n */\n\nimport { goto, invalidateAll } from '$app/navigation'\nimport { page } from '$app/state'\n\n/**\n * SvelteKit `NavAdapter`:\n *\n * - `pathname` 来自 `$app/state` 的 `page.url.pathname`(响应式)。\n * - `navigate` 使用 `$app/navigation` 的 `goto`,并自动 `invalidateAll`,\n * 触发 `+page.server.ts` 的 `load` 重新执行。\n * - `refresh` 调用 `invalidateAll()`,常用于写操作后刷新列表数据。\n */\nexport function createSvelteKitNavAdapter(): {\n readonly pathname: string\n readonly navigate: (url: string) => Promise<void>\n readonly refresh: () => Promise<void>\n} {\n return {\n get pathname() {\n return page.url.pathname\n },\n async navigate(url: string) {\n await goto(url, { invalidateAll: true })\n },\n async refresh() {\n await invalidateAll()\n },\n }\n}\n"]}
@@ -1,7 +1,73 @@
1
+ import { CryptoFunctions } from '@h-ai/crypto';
1
2
  import { HaiResult } from '@h-ai/core';
2
3
  import { PasswordCredentials, AuthResult, OtpCredentials, LdapCredentials, ApiKeyCredentials, RegisterOptions } from '@h-ai/iam';
3
- import { HandleFetch } from '@sveltejs/kit';
4
- import { T as TransportCryptoServiceLike } from './kit-crypto-types-C-gEvx04.js';
4
+ import { z } from 'zod';
5
+
6
+ /**
7
+ * @h-ai/kit — transport 配置
8
+ *
9
+ * 为 `config/_kit.yml` 提供统一的 transport 配置结构、默认值与校验逻辑,
10
+ * 方便应用层用一份配置同时驱动 `hooks.server.ts` 与 `kit.client.create()`。
11
+ * @module kit-config
12
+ */
13
+
14
+ /** `config/_kit.yml` 中的 transport 配置。 */
15
+ interface KitTransportConfig {
16
+ readonly keyExchangePath: `/${string}`;
17
+ readonly excludePaths: readonly `/${string}`[];
18
+ readonly requireEncryption: boolean;
19
+ readonly encryptResponse: boolean;
20
+ readonly maxClients: number;
21
+ }
22
+ /** `config/_kit.yml` 的顶层配置结构。 */
23
+ interface KitConfig {
24
+ readonly transport: false | KitTransportConfig;
25
+ }
26
+ /** `config/_kit.yml` 中的 transport 输入类型。 */
27
+ type KitTransportConfigInput = Partial<{
28
+ readonly keyExchangePath: `/${string}`;
29
+ readonly excludePaths: readonly `/${string}`[];
30
+ readonly requireEncryption: boolean;
31
+ readonly encryptResponse: boolean;
32
+ readonly maxClients: number;
33
+ }>;
34
+ /** `config/_kit.yml` 的顶层输入类型。 */
35
+ interface KitConfigInput {
36
+ readonly transport?: false | KitTransportConfigInput;
37
+ }
38
+ /** `config/_kit.yml` 对应的配置 Schema。 */
39
+ declare const KitConfigSchema: z.ZodPipe<z.ZodObject<{
40
+ transport: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
41
+ keyExchangePath: z.ZodDefault<z.ZodCustom<`/${string}`, `/${string}`>>;
42
+ excludePaths: z.ZodDefault<z.ZodArray<z.ZodCustom<`/${string}`, `/${string}`>>>;
43
+ requireEncryption: z.ZodDefault<z.ZodBoolean>;
44
+ encryptResponse: z.ZodDefault<z.ZodBoolean>;
45
+ maxClients: z.ZodDefault<z.ZodNumber>;
46
+ }, z.core.$strip>]>>;
47
+ }, z.core.$strip>, z.ZodTransform<{
48
+ transport: false | KitTransportConfig;
49
+ }, {
50
+ transport?: false | {
51
+ keyExchangePath: `/${string}`;
52
+ excludePaths: `/${string}`[];
53
+ requireEncryption: boolean;
54
+ encryptResponse: boolean;
55
+ maxClients: number;
56
+ } | undefined;
57
+ }>>;
58
+ /**
59
+ * 解析 transport 配置并补齐默认值。
60
+ *
61
+ * @param input - `config/_kit.yml` 中的 transport 配置
62
+ * @returns 完整 transport 配置;`false` 表示关闭
63
+ */
64
+ declare function resolveKitTransportConfig(input?: false | KitTransportConfigInput): false | KitTransportConfig;
65
+ /**
66
+ * 解析 `config/_kit.yml` 顶层配置并补齐默认值。
67
+ *
68
+ * 适合同一份配置同时供 SvelteKit 服务端 hook 与浏览器端 client 读取。
69
+ */
70
+ declare function resolveKitConfig(input?: KitConfigInput): KitConfig;
5
71
 
6
72
  /**
7
73
  * @h-ai/kit — Bearer 认证工具
@@ -123,10 +189,6 @@ declare function setBrowserToken(token: string): void;
123
189
  * 清除浏览器端 Access Token。
124
190
  */
125
191
  declare function clearBrowserToken(): void;
126
- /**
127
- * 创建浏览器端同源请求自动附加 Access Token 的 HandleFetch。
128
- */
129
- declare function createHandleFetch(tokenStore?: BrowserTokenStore): HandleFetch;
130
192
 
131
193
  /**
132
194
  * @h-ai/kit — 统一客户端
@@ -140,10 +202,12 @@ declare function createHandleFetch(tokenStore?: BrowserTokenStore): HandleFetch;
140
202
  * 传输加密客户端配置
141
203
  */
142
204
  interface ClientTransportConfig {
143
- /** 传输加密服务实例(@h-ai/crypto 的 asymmetric + symmetric) */
144
- crypto: TransportCryptoServiceLike;
145
- /** 密钥交换端点 URL(默认 `'/api/kit/key-exchange'`) */
205
+ /** @h-ai/crypto 服务实例 */
206
+ crypto: CryptoFunctions;
207
+ /** 密钥交换端点 URL(默认 `'/api/_hai/key-exchange'`) */
146
208
  keyExchangeUrl?: string;
209
+ /** 排除路径(命中后强制走明文),需与服务端 transport.excludePaths 保持一致 */
210
+ excludePaths?: string[];
147
211
  }
148
212
  /**
149
213
  * Kit 客户端配置
@@ -180,6 +244,44 @@ interface KitClient {
180
244
  /** 销毁密钥状态 */
181
245
  destroy: () => void;
182
246
  }
247
+ /**
248
+ * 在浏览器启动时安装同源 transport fetch 包装。
249
+ *
250
+ * 该包装作用于同源 `/api/*` 与 SvelteKit `__data.json` 请求,页面文档、
251
+ * 静态资源以及 multipart/form-data 等上传请求保持原样。应用只需安装一次,
252
+ * 后续 `fetch` / SvelteKit 内部 data fetch / `kit.client.create()` 明文发送路径
253
+ * 都会共用这层传输加密能力。
254
+ */
255
+ declare function installBrowserTransportFetch(transportConfig?: ClientTransportConfig): void;
256
+ /**
257
+ * 用 `config/_kit.yml` 解析后的 {@link KitConfig} 一次性安装浏览器端传输加密。
258
+ *
259
+ * 行为:
260
+ * - `config.transport === false` 时直接返回(不启用传输加密);
261
+ * - 否则启动 {@link installBrowserTransportFetch},并预热 {@link CryptoFunctions} 模块。
262
+ *
263
+ * 应用层(SvelteKit `+layout.svelte` 或浏览器入口)只需调用此函数一次,
264
+ * 之后所有同源 `/api/*` 与 `__data.json` 请求都会自动走传输加密。
265
+ *
266
+ * @param config 已解析的 kit 顶层配置
267
+ * @param deps 外部依赖
268
+ * @param deps.crypto `@h-ai/crypto` 模块实例
269
+ *
270
+ * @example
271
+ * ```ts
272
+ * import { browser } from '$app/environment'
273
+ * import { crypto } from '@h-ai/crypto'
274
+ * import { kit } from '@h-ai/kit'
275
+ * import { adminConsoleKitConfig } from '$lib/config/kit-config.js'
276
+ *
277
+ * if (browser) {
278
+ * kit.client.installBrowserTransport(adminConsoleKitConfig, { crypto })
279
+ * }
280
+ * ```
281
+ */
282
+ declare function installBrowserTransport(config: KitConfig, deps: {
283
+ crypto: CryptoFunctions;
284
+ }): void;
183
285
  /**
184
286
  * 创建 Kit 客户端
185
287
  *
@@ -200,4 +302,41 @@ interface KitClient {
200
302
  */
201
303
  declare function createKitClient(config?: KitClientConfig): KitClient;
202
304
 
203
- export { type ClientTransportConfig as C, type KitClient as K, clearBrowserToken as a, createTokenStore as b, createKitClient as c, createHandleFetch as d, type KitClientConfig as e, loginWithOtp as f, loginWithLdap as g, loginWithApiKey as h, logout as i, login as l, registerAndLogin as r, setBrowserToken as s };
305
+ /**
306
+ * @h-ai/kit — SvelteKit 路由适配器
307
+ *
308
+ * 此前位于 `@h-ai/ui/sveltekit`,为避免 `@h-ai/ui` 耦合 SvelteKit,迁移至本模块。
309
+ *
310
+ * 为 `@h-ai/ui` 的 `CrudPage` 等需要“宿主路由”的场景组件提供 SvelteKit 实现。
311
+ * 返回值结构与 `@h-ai/ui` 的 `NavAdapter` 完全一致;TS 通过结构类型自动匹配,
312
+ * 无需在 `@h-ai/kit` 中显式依赖 `@h-ai/ui`。
313
+ *
314
+ * @example
315
+ * ```svelte
316
+ * <script lang='ts'>
317
+ * import { CrudPage } from '@h-ai/ui'
318
+ * import { createSvelteKitNavAdapter } from '@h-ai/kit/client'
319
+ *
320
+ * const nav = createSvelteKitNavAdapter()
321
+ * </script>
322
+ *
323
+ * <CrudPage {crud} {data} {nav} />
324
+ * ```
325
+ *
326
+ * @module kit-nav-adapter
327
+ */
328
+ /**
329
+ * SvelteKit `NavAdapter`:
330
+ *
331
+ * - `pathname` 来自 `$app/state` 的 `page.url.pathname`(响应式)。
332
+ * - `navigate` 使用 `$app/navigation` 的 `goto`,并自动 `invalidateAll`,
333
+ * 触发 `+page.server.ts` 的 `load` 重新执行。
334
+ * - `refresh` 调用 `invalidateAll()`,常用于写操作后刷新列表数据。
335
+ */
336
+ declare function createSvelteKitNavAdapter(): {
337
+ readonly pathname: string;
338
+ readonly navigate: (url: string) => Promise<void>;
339
+ readonly refresh: () => Promise<void>;
340
+ };
341
+
342
+ export { type ClientTransportConfig as C, type KitClient as K, installBrowserTransportFetch as a, clearBrowserToken as b, createKitClient as c, createTokenStore as d, type KitClientConfig as e, type KitConfig as f, type KitConfigInput as g, KitConfigSchema as h, installBrowserTransport as i, type KitTransportConfig as j, type KitTransportConfigInput as k, createSvelteKitNavAdapter as l, resolveKitTransportConfig as m, login as n, loginWithOtp as o, loginWithLdap as p, loginWithApiKey as q, resolveKitConfig as r, setBrowserToken as s, registerAndLogin as t, logout as u };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { c as createKitClient, l as login, f as loginWithOtp, g as loginWithLdap, h as loginWithApiKey, r as registerAndLogin, i as logout, s as setBrowserToken, a as clearBrowserToken, b as createTokenStore, d as createHandleFetch } from './index-BotXLTck.js';
2
- export { C as ClientTransportConfig, K as KitClient, e as KitClientConfig } from './index-BotXLTck.js';
1
+ import { c as createKitClient, i as installBrowserTransport, a as installBrowserTransportFetch, n as login, o as loginWithOtp, p as loginWithLdap, q as loginWithApiKey, t as registerAndLogin, u as logout, s as setBrowserToken, b as clearBrowserToken, d as createTokenStore } from './index-M00CsNUR.js';
2
+ export { C as ClientTransportConfig, K as KitClient, e as KitClientConfig, f as KitConfig, g as KitConfigInput, h as KitConfigSchema, j as KitTransportConfig, k as KitTransportConfigInput, l as createSvelteKitNavAdapter, r as resolveKitConfig, m as resolveKitTransportConfig } from './index-M00CsNUR.js';
3
3
  import { d as defineCrud, s as setAllModulesLocale } from './kit-i18n-CgpNTh9G.js';
4
4
  export { C as CrudApiDef, a as CrudFieldDef, b as CrudFieldOption, c as CrudFieldOptions, e as CrudFieldType, f as CrudFieldValidation, g as CrudFilterParams, h as CrudOperations, i as CrudPaginatedResult, j as CrudPaginationParams, k as CrudResourceDef, l as CrudTableColumn, m as CrudText, r as resolveOptions, n as resolveText } from './kit-i18n-CgpNTh9G.js';
5
- import { S as SessionData, k as RouteGuard, l as SessionLike, h as HandleConfig, C as CorsConfig, M as Middleware } from './kit-types-BHlDNNpd.js';
6
- export { A as ApiResponse, a as AuthOperations, b as AuthOperationsProvider, F as FormError, c as FormValidationResult, G as GuardConfig, d as GuardResult, H as HaiRequestEvent, e as HandleA2AConfig, f as HandleA2AOperations, g as HandleAuthConfig, i as HookCryptoConfig, m as MemoryRateLimitStore, j as MiddlewareContext, R as RateLimitConfig, n as RateLimitEntry, o as RateLimitStore, T as TransportEncryptionOptions, r as rateLimitMiddleware } from './kit-types-BHlDNNpd.js';
5
+ import { S as SessionData, k as RouteGuard, l as SessionLike, h as HandleConfig, C as CorsConfig, M as Middleware } from './kit-types-XUMggtk_.js';
6
+ export { A as ApiResponse, a as AuthOperations, b as AuthOperationsProvider, F as FormError, c as FormValidationResult, G as GuardConfig, d as GuardResult, H as HaiRequestEvent, e as HandleA2AConfig, f as HandleA2AOperations, g as HandleAuthConfig, i as HookCryptoConfig, m as MemoryRateLimitStore, j as MiddlewareContext, R as RateLimitConfig, n as RateLimitEntry, o as RateLimitStore, T as TransportEncryptionOptions, r as rateLimitMiddleware } from './kit-types-XUMggtk_.js';
7
7
  import { RequestEvent, Cookies, Handle, RequestHandler } from '@sveltejs/kit';
8
- import { T as TransportCryptoServiceLike } from './kit-crypto-types-C-gEvx04.js';
9
- export { C as CryptoCsrfConfig, a as CryptoServiceLike, E as EncryptedCookieConfig, b as EncryptedPayload, c as TransportEncryptionConfig, d as TransportEncryptionManager, e as TransportKeyPair, W as WebhookVerifyConfig } from './kit-crypto-types-C-gEvx04.js';
8
+ import { CryptoFunctions } from '@h-ai/crypto';
9
+ export { EncryptedPayload, TransportEncryptionManager, TransportKeyPair } from '@h-ai/crypto';
10
+ import * as zod_v4_core from 'zod/v4/core';
10
11
  import * as zod from 'zod';
11
12
  import { z } from 'zod';
12
- import * as zod_v4_core from 'zod/v4/core';
13
13
  import { HaiError } from '@h-ai/core';
14
14
  export { A2AApiKeyAuthConfig, KitA2AHandlerConfig, ResolvedA2AConfig, createA2AApiKeyAuthenticator, createA2AHandler, createAgentCardHandler, handleA2ARequest, resolveA2AConfig } from './modules/a2a/index.js';
15
- export { createCsrfManager, createEncryptedCookie, createKeyExchangeHandler, createTransportEncryption, isValidEncryptedPayload, signRequest, transportEncryptionMiddleware, verifyWebhookSignature } from './modules/crypto/index.js';
15
+ export { CryptoCsrfConfig, CryptoServiceLike, EncryptedCookieConfig, TransportEncryptionConfig, WebhookVerifyConfig, createCsrfManager, createEncryptedCookie, signRequest, transportEncryptionMiddleware, verifyWebhookSignature } from './modules/crypto/index.js';
16
16
  import '@h-ai/iam';
17
17
 
18
18
  /**
@@ -349,7 +349,7 @@ interface CookieProxyConfig {
349
349
  /** 需要加密的 Cookie 名称集合 */
350
350
  names: Set<string>;
351
351
  /** 对称加密服务(SM4) */
352
- symmetric: TransportCryptoServiceLike['symmetric'];
352
+ symmetric: CryptoFunctions['symmetric'];
353
353
  /** 加密密钥(32 字符十六进制) */
354
354
  encryptionKey: string;
355
355
  }
@@ -423,73 +423,6 @@ declare function createHandle(config?: HandleConfig): Handle;
423
423
  */
424
424
  declare function sequence(...handles: Handle[]): Handle;
425
425
 
426
- /**
427
- * @h-ai/kit — 契约 Handler
428
- *
429
- * 基于 EndpointDef 契约创建类型安全的 API handler:
430
- * - 自动从 request body/query 提取参数
431
- * - 自动使用契约的 input schema 校验
432
- * - handler 返回值类型必须匹配 output schema
433
- * - 自动包装为标准 kit.response.ok() 响应
434
- * @module kit-contract
435
- */
436
-
437
- /**
438
- * API 端点契约定义
439
- *
440
- * 客户端和服务端共享的唯一真相源,保证路径、入参、出参编译时一致。
441
- */
442
- interface EndpointDef<TInput = unknown, TOutput = unknown> {
443
- /** HTTP 方法 */
444
- method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
445
- /** 相对路径(相对于 API 前缀,如 '/auth/login') */
446
- path: string;
447
- /** 入参 Zod Schema(GET 请求为 query params,其他为 body) */
448
- input: z.ZodType<TInput>;
449
- /** 出参 Zod Schema */
450
- output: z.ZodType<TOutput>;
451
- /** 是否需要认证(默认 true) */
452
- requireAuth?: boolean;
453
- /** OpenAPI 描述元数据(可选) */
454
- meta?: {
455
- summary?: string;
456
- tags?: string[];
457
- };
458
- }
459
- /**
460
- * 辅助函数:创建端点定义(获得类型推导)
461
- *
462
- * @param def - 端点定义对象
463
- * @returns 同一个对象(类型安全)
464
- */
465
- declare function defineEndpoint<TInput, TOutput>(def: EndpointDef<TInput, TOutput>): EndpointDef<TInput, TOutput>;
466
- /**
467
- * 基于契约创建 API handler
468
- *
469
- * - 自动从 request body/query 提取参数
470
- * - 自动使用契约的 input schema 校验
471
- * - handler 返回值类型必须匹配 output schema
472
- * - 自动包装为标准 kit.response.ok() 响应
473
- *
474
- * @param endpoint - 端点契约定义
475
- * @param fn - 业务处理函数(接收校验后的 input 和 RequestEvent)
476
- * @returns SvelteKit RequestHandler
477
- *
478
- * @example
479
- * ```ts
480
- * import { iamEndpoints } from '@h-ai/iam/api'
481
- *
482
- * export const POST = kit.fromContract(iamEndpoints.login, async (input, event) => {
483
- * const result = await iam.auth.login(input)
484
- * if (!result.success) {
485
- * throw kit.response.error('AUTH_FAILED', result.error.message, 401)
486
- * }
487
- * return result.data
488
- * })
489
- * ```
490
- */
491
- declare function fromContract<TInput, TOutput>(endpoint: EndpointDef<TInput, TOutput>, fn: (input: TInput, event: RequestEvent) => Promise<TOutput>): RequestHandler;
492
-
493
426
  /**
494
427
  * @h-ai/kit — API Handler 包装器
495
428
  *
@@ -696,6 +629,9 @@ declare function fromError(haiError: HaiError, requestId?: string): Response;
696
629
  * @h-ai/kit — 请求数据验证
697
630
  *
698
631
  * 基于 Zod 的请求数据验证工具,支持表单/JSON Body、URL 查询参数与路由参数。
632
+ * Zod 默认错误消息的本地化规则委托给 `core.zodValidation`,避免 kit / serv
633
+ * 等模块重复维护同一套 issue 解析与消息映射逻辑;模块前缀映射也统一交给
634
+ * `core.zodValidation.createPrefixedZodMessageGetter()` 处理。
699
635
  * 每种数据源都提供两类 API:
700
636
  * - 安全返回:`FormValidationResult`
701
637
  * - 失败抛出:`OrFail`(抛出 `Response` 以走 SvelteKit 控制流)
@@ -799,8 +735,6 @@ declare const kit: {
799
735
  sequence: typeof sequence;
800
736
  /** API Handler 包装器(自动错误边界) */
801
737
  handler: typeof handler;
802
- /** 基于 API 契约创建类型安全的路由 handler */
803
- fromContract: typeof fromContract;
804
738
  guard: {
805
739
  /** 要求权限,不满足时 throw Response(SvelteKit 控制流) */
806
740
  require: typeof requirePermission;
@@ -858,6 +792,13 @@ declare const kit: {
858
792
  client: {
859
793
  /** 创建统一客户端(CSRF + 传输加密透明合并) */
860
794
  create: typeof createKitClient;
795
+ /**
796
+ * 用解析后的 {@link KitConfig} 一键安装浏览器端传输加密
797
+ * (应用层推荐入口;内部预热 crypto 并调用 installBrowserTransportFetch)
798
+ */
799
+ installBrowserTransport: typeof installBrowserTransport;
800
+ /** 底层入口:直接传 transport 配置安装浏览器全局 fetch 包装 */
801
+ installBrowserTransportFetch: typeof installBrowserTransportFetch;
861
802
  };
862
803
  auth: {
863
804
  /** 服务端登录(密码):内部调用 iam.auth.login + 自动写入 Token Cookie */
@@ -878,8 +819,6 @@ declare const kit: {
878
819
  clearBrowserToken: typeof clearBrowserToken;
879
820
  /** 创建浏览器端 Token 存储器(自定义 key 时使用) */
880
821
  createTokenStore: typeof createTokenStore;
881
- /** 创建浏览器端同源请求自动附加 Authorization 的 HandleFetch */
882
- createHandleFetch: typeof createHandleFetch;
883
822
  };
884
823
  crud: {
885
824
  /** 定义 CRUD 资源(声明式配置 → 操作对象) */
@@ -960,4 +899,4 @@ interface LoggingMiddlewareConfig {
960
899
  */
961
900
  declare function loggingMiddleware(config?: LoggingMiddlewareConfig): Middleware;
962
901
 
963
- export { type AuthGuardConfig, type CookieProxyConfig, CorsConfig, type EndpointDef, HandleConfig, IdParamSchema, type LoggingMiddlewareConfig, Middleware, PaginationQuerySchema, type PermissionGuardConfig, type RoleGuardConfig, RouteGuard, SessionData, type SessionGuardConfig, SessionLike, TransportCryptoServiceLike, allGuards, anyGuard, assertPermission, authGuard, conditionalGuard, corsMiddleware, createEncryptedCookieProxy, createHandle, createKitClient, defineCrud, defineEndpoint, hasPermission, kit, loggingMiddleware, matchPermission, notGuard, permissionGuard, requirePermission, roleGuard, sequence, sessionGuard, withPermission };
902
+ export { type AuthGuardConfig, type CookieProxyConfig, CorsConfig, HandleConfig, IdParamSchema, type LoggingMiddlewareConfig, Middleware, PaginationQuerySchema, type PermissionGuardConfig, type RoleGuardConfig, RouteGuard, SessionData, type SessionGuardConfig, SessionLike, allGuards, anyGuard, assertPermission, authGuard, conditionalGuard, corsMiddleware, createEncryptedCookieProxy, createHandle, createKitClient, defineCrud, hasPermission, installBrowserTransport, installBrowserTransportFetch, kit, loggingMiddleware, matchPermission, notGuard, permissionGuard, requirePermission, roleGuard, sequence, sessionGuard, withPermission };