gemi 0.101.0 → 0.103.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 (182) hide show
  1. package/dist/ai/index.d.ts +1 -1
  2. package/dist/ai/index.d.ts.map +1 -1
  3. package/dist/ai/index.js +13 -13
  4. package/dist/ai/index.js.map +3 -3
  5. package/dist/app/index.js +1 -1
  6. package/dist/bun/plugin.js +1 -1
  7. package/dist/bun/preload.js +1 -1
  8. package/dist/{chunk-f6s7ddjz.js → chunk-0fney17e.js} +2 -2
  9. package/dist/{chunk-f6s7ddjz.js.map → chunk-0fney17e.js.map} +1 -1
  10. package/dist/{chunk-z8jf7jwg.js → chunk-18aqqrev.js} +2 -2
  11. package/dist/{chunk-z8jf7jwg.js.map → chunk-18aqqrev.js.map} +1 -1
  12. package/dist/{chunk-68zf43ah.js → chunk-1xzdexbq.js} +2 -2
  13. package/dist/{chunk-68zf43ah.js.map → chunk-1xzdexbq.js.map} +1 -1
  14. package/dist/{chunk-99wzvsz5.js → chunk-214av8am.js} +4 -4
  15. package/dist/{chunk-99wzvsz5.js.map → chunk-214av8am.js.map} +1 -1
  16. package/dist/{chunk-adm5g1v8.js → chunk-22k4b395.js} +2 -2
  17. package/dist/{chunk-adm5g1v8.js.map → chunk-22k4b395.js.map} +1 -1
  18. package/dist/{chunk-nffk2cj3.js → chunk-2baxmae9.js} +2 -2
  19. package/dist/{chunk-nffk2cj3.js.map → chunk-2baxmae9.js.map} +1 -1
  20. package/dist/{chunk-4x41cmg3.js → chunk-3cxbvrts.js} +3 -3
  21. package/dist/{chunk-4x41cmg3.js.map → chunk-3cxbvrts.js.map} +1 -1
  22. package/dist/chunk-3e73zaft.js +5 -0
  23. package/dist/{chunk-8v5z6646.js.map → chunk-3e73zaft.js.map} +3 -3
  24. package/dist/{chunk-2tm56xq1.js → chunk-3m93v7bt.js} +2 -2
  25. package/dist/{chunk-2tm56xq1.js.map → chunk-3m93v7bt.js.map} +1 -1
  26. package/dist/{chunk-63cp4s8g.js → chunk-47dqttnk.js} +2 -2
  27. package/dist/{chunk-63cp4s8g.js.map → chunk-47dqttnk.js.map} +1 -1
  28. package/dist/{chunk-qttatc7h.js → chunk-4f7n1r02.js} +2 -2
  29. package/dist/{chunk-qttatc7h.js.map → chunk-4f7n1r02.js.map} +1 -1
  30. package/dist/{chunk-6397mbr2.js → chunk-4p752vk2.js} +3 -3
  31. package/dist/{chunk-6397mbr2.js.map → chunk-4p752vk2.js.map} +1 -1
  32. package/dist/{chunk-br9p390p.js → chunk-5dwtmkk8.js} +2 -2
  33. package/dist/{chunk-br9p390p.js.map → chunk-5dwtmkk8.js.map} +1 -1
  34. package/dist/{chunk-a9nxjfdy.js → chunk-5k3rm4b6.js} +2 -2
  35. package/dist/{chunk-a9nxjfdy.js.map → chunk-5k3rm4b6.js.map} +1 -1
  36. package/dist/{chunk-bvsevtpp.js → chunk-5ngv175h.js} +1 -1
  37. package/dist/{chunk-jhaeemjf.js → chunk-62cv9vjt.js} +2 -2
  38. package/dist/{chunk-jhaeemjf.js.map → chunk-62cv9vjt.js.map} +1 -1
  39. package/dist/{chunk-msg6re1f.js → chunk-63hvh35x.js} +2 -2
  40. package/dist/{chunk-msg6re1f.js.map → chunk-63hvh35x.js.map} +1 -1
  41. package/dist/{chunk-69yw2pb1.js → chunk-8nkdvgd9.js} +2 -2
  42. package/dist/{chunk-69yw2pb1.js.map → chunk-8nkdvgd9.js.map} +1 -1
  43. package/dist/{chunk-eqtsfvvd.js → chunk-ayss2f8c.js} +2 -2
  44. package/dist/{chunk-eqtsfvvd.js.map → chunk-ayss2f8c.js.map} +1 -1
  45. package/dist/{chunk-bf1q3m7a.js → chunk-b0jpvp5t.js} +3 -3
  46. package/dist/{chunk-bf1q3m7a.js.map → chunk-b0jpvp5t.js.map} +1 -1
  47. package/dist/{chunk-3tn480wt.js → chunk-b1dqx3b9.js} +2 -2
  48. package/dist/{chunk-3tn480wt.js.map → chunk-b1dqx3b9.js.map} +1 -1
  49. package/dist/{chunk-pjg7gqnh.js → chunk-bsq80942.js} +2 -2
  50. package/dist/{chunk-pjg7gqnh.js.map → chunk-bsq80942.js.map} +1 -1
  51. package/dist/{chunk-aa13sgs2.js → chunk-cbywzv21.js} +1 -1
  52. package/dist/{chunk-snz7nze3.js → chunk-cw7qfcvt.js} +2 -2
  53. package/dist/{chunk-snz7nze3.js.map → chunk-cw7qfcvt.js.map} +1 -1
  54. package/dist/{chunk-4rns9cnb.js → chunk-dtybftkq.js} +2 -2
  55. package/dist/{chunk-4rns9cnb.js.map → chunk-dtybftkq.js.map} +1 -1
  56. package/dist/{chunk-8ma08vxq.js → chunk-dyew1yf7.js} +2 -2
  57. package/dist/{chunk-8ma08vxq.js.map → chunk-dyew1yf7.js.map} +1 -1
  58. package/dist/{chunk-cp8gxeqs.js → chunk-ee92kx8s.js} +2 -2
  59. package/dist/{chunk-cp8gxeqs.js.map → chunk-ee92kx8s.js.map} +1 -1
  60. package/dist/chunk-f2n21fef.js +5 -0
  61. package/dist/{chunk-yhkffean.js.map → chunk-f2n21fef.js.map} +1 -1
  62. package/dist/{chunk-ghz3e8b7.js → chunk-fcsq613t.js} +2 -2
  63. package/dist/{chunk-ghz3e8b7.js.map → chunk-fcsq613t.js.map} +1 -1
  64. package/dist/chunk-g8qp01t6.js +17 -0
  65. package/dist/{chunk-d6prwkff.js.map → chunk-g8qp01t6.js.map} +4 -4
  66. package/dist/{chunk-c9vga0sk.js → chunk-gvv2trvz.js} +3 -3
  67. package/dist/{chunk-c9vga0sk.js.map → chunk-gvv2trvz.js.map} +1 -1
  68. package/dist/{chunk-4qjy1bts.js → chunk-gy6d6jeg.js} +2 -2
  69. package/dist/{chunk-4qjy1bts.js.map → chunk-gy6d6jeg.js.map} +1 -1
  70. package/dist/{chunk-64j3yef2.js → chunk-gyareq03.js} +2 -2
  71. package/dist/{chunk-64j3yef2.js.map → chunk-gyareq03.js.map} +1 -1
  72. package/dist/{chunk-5wgx5n2q.js → chunk-h945tg0r.js} +2 -2
  73. package/dist/{chunk-5wgx5n2q.js.map → chunk-h945tg0r.js.map} +1 -1
  74. package/dist/{chunk-hsec03gh.js → chunk-hwc8gt4n.js} +2 -2
  75. package/dist/{chunk-hsec03gh.js.map → chunk-hwc8gt4n.js.map} +1 -1
  76. package/dist/{chunk-gykbgtvg.js → chunk-hzmnqe4x.js} +2 -2
  77. package/dist/{chunk-gykbgtvg.js.map → chunk-hzmnqe4x.js.map} +1 -1
  78. package/dist/{chunk-shb51m4y.js → chunk-j041a7ej.js} +2 -2
  79. package/dist/{chunk-shb51m4y.js.map → chunk-j041a7ej.js.map} +1 -1
  80. package/dist/{chunk-pdvsc6jd.js → chunk-j3y6cs0z.js} +2 -2
  81. package/dist/{chunk-pdvsc6jd.js.map → chunk-j3y6cs0z.js.map} +1 -1
  82. package/dist/{chunk-xf9axxzx.js → chunk-j6e99sra.js} +3 -3
  83. package/dist/{chunk-xf9axxzx.js.map → chunk-j6e99sra.js.map} +1 -1
  84. package/dist/{chunk-9xf2fx98.js → chunk-j9deswmn.js} +2 -2
  85. package/dist/{chunk-9xf2fx98.js.map → chunk-j9deswmn.js.map} +1 -1
  86. package/dist/{chunk-epwaxctc.js → chunk-jfnhzza6.js} +2 -2
  87. package/dist/{chunk-epwaxctc.js.map → chunk-jfnhzza6.js.map} +1 -1
  88. package/dist/{chunk-prg5k57m.js → chunk-kwkbzswm.js} +2 -2
  89. package/dist/{chunk-prg5k57m.js.map → chunk-kwkbzswm.js.map} +1 -1
  90. package/dist/{chunk-n63xjrck.js → chunk-ma5rmcbe.js} +2 -2
  91. package/dist/{chunk-n63xjrck.js.map → chunk-ma5rmcbe.js.map} +1 -1
  92. package/dist/{chunk-6abjjfjr.js → chunk-mnctdd8r.js} +2 -2
  93. package/dist/{chunk-6abjjfjr.js.map → chunk-mnctdd8r.js.map} +1 -1
  94. package/dist/{chunk-y4fp0eg9.js → chunk-p2jn4bnx.js} +2 -2
  95. package/dist/{chunk-y4fp0eg9.js.map → chunk-p2jn4bnx.js.map} +1 -1
  96. package/dist/{chunk-xp6nr441.js → chunk-pfjr510h.js} +2 -2
  97. package/dist/{chunk-xp6nr441.js.map → chunk-pfjr510h.js.map} +1 -1
  98. package/dist/{chunk-dn2mw39y.js → chunk-q8r9mvzx.js} +2 -2
  99. package/dist/{chunk-dn2mw39y.js.map → chunk-q8r9mvzx.js.map} +1 -1
  100. package/dist/{chunk-1vs4xhcg.js → chunk-r5pnz4nn.js} +2 -2
  101. package/dist/{chunk-1vs4xhcg.js.map → chunk-r5pnz4nn.js.map} +1 -1
  102. package/dist/{chunk-yk2mtcwv.js → chunk-rjcmbwcc.js} +2 -2
  103. package/dist/{chunk-yk2mtcwv.js.map → chunk-rjcmbwcc.js.map} +1 -1
  104. package/dist/{chunk-80t4tfke.js → chunk-rkre6bqc.js} +1 -1
  105. package/dist/{chunk-mekw2ap4.js → chunk-sedwjgvf.js} +2 -2
  106. package/dist/{chunk-mekw2ap4.js.map → chunk-sedwjgvf.js.map} +1 -1
  107. package/dist/{chunk-ztcsyeg7.js → chunk-spgpvz77.js} +2 -2
  108. package/dist/{chunk-ztcsyeg7.js.map → chunk-spgpvz77.js.map} +1 -1
  109. package/dist/{chunk-3fr22rtg.js → chunk-st0d3ndv.js} +2 -2
  110. package/dist/{chunk-3fr22rtg.js.map → chunk-st0d3ndv.js.map} +1 -1
  111. package/dist/{chunk-tymhsmgq.js → chunk-szrgwggb.js} +3 -3
  112. package/dist/{chunk-tymhsmgq.js.map → chunk-szrgwggb.js.map} +1 -1
  113. package/dist/{chunk-jyswmx60.js → chunk-tcce63wk.js} +2 -2
  114. package/dist/{chunk-jyswmx60.js.map → chunk-tcce63wk.js.map} +1 -1
  115. package/dist/{chunk-7vjbebst.js → chunk-v4exgqbp.js} +2 -2
  116. package/dist/{chunk-7vjbebst.js.map → chunk-v4exgqbp.js.map} +1 -1
  117. package/dist/{chunk-7fn3wwyq.js → chunk-vh1hxm9y.js} +2 -2
  118. package/dist/{chunk-7fn3wwyq.js.map → chunk-vh1hxm9y.js.map} +1 -1
  119. package/dist/{chunk-1pbwrzwp.js → chunk-vqvdptx4.js} +2 -2
  120. package/dist/{chunk-1pbwrzwp.js.map → chunk-vqvdptx4.js.map} +1 -1
  121. package/dist/{chunk-48dek9s7.js → chunk-xnggfm0s.js} +3 -3
  122. package/dist/{chunk-48dek9s7.js.map → chunk-xnggfm0s.js.map} +1 -1
  123. package/dist/{chunk-n4807648.js → chunk-xxkk60aw.js} +3 -3
  124. package/dist/{chunk-n4807648.js.map → chunk-xxkk60aw.js.map} +1 -1
  125. package/dist/{chunk-xmjhensy.js → chunk-yxh4xs3k.js} +2 -2
  126. package/dist/{chunk-xmjhensy.js.map → chunk-yxh4xs3k.js.map} +1 -1
  127. package/dist/{chunk-77kw61f4.js → chunk-zhk3z9zk.js} +3 -3
  128. package/dist/{chunk-77kw61f4.js.map → chunk-zhk3z9zk.js.map} +1 -1
  129. package/dist/{chunk-f9t39vwk.js → chunk-zm00crsx.js} +2 -2
  130. package/dist/{chunk-f9t39vwk.js.map → chunk-zm00crsx.js.map} +1 -1
  131. package/dist/{chunk-np5b3cd7.js → chunk-zmag8k0z.js} +2 -2
  132. package/dist/{chunk-np5b3cd7.js.map → chunk-zmag8k0z.js.map} +1 -1
  133. package/dist/config/index.js +1 -1
  134. package/dist/console/run.js +2 -2
  135. package/dist/console/run.js.map +1 -1
  136. package/dist/container/index.js +2 -2
  137. package/dist/container/index.js.map +1 -1
  138. package/dist/database/index.js +2 -2
  139. package/dist/database/index.js.map +1 -1
  140. package/dist/email/index.js +2 -2
  141. package/dist/email/index.js.map +1 -1
  142. package/dist/facades/index.js +2 -2
  143. package/dist/facades/index.js.map +1 -1
  144. package/dist/foundation/index.js +2 -2
  145. package/dist/foundation/index.js.map +1 -1
  146. package/dist/http/McpRouter.d.ts +210 -16
  147. package/dist/http/McpRouter.d.ts.map +1 -1
  148. package/dist/http/index.d.ts +1 -1
  149. package/dist/http/index.d.ts.map +1 -1
  150. package/dist/http/index.js +2 -2
  151. package/dist/http/index.js.map +1 -1
  152. package/dist/i18n/dictionaryRuntime.js +2 -2
  153. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  154. package/dist/i18n/index.js +2 -2
  155. package/dist/i18n/index.js.map +1 -1
  156. package/dist/kernel/index.js +2 -2
  157. package/dist/kernel/index.js.map +1 -1
  158. package/dist/orm/index.js +2 -2
  159. package/dist/orm/index.js.map +1 -1
  160. package/dist/server/index.js +2 -2
  161. package/dist/server/index.js.map +1 -1
  162. package/dist/services/index.d.ts +2 -2
  163. package/dist/services/index.d.ts.map +1 -1
  164. package/dist/services/index.js +2 -2
  165. package/dist/services/index.js.map +1 -1
  166. package/dist/services/mcp/McpRegistry.d.ts +67 -5
  167. package/dist/services/mcp/McpRegistry.d.ts.map +1 -1
  168. package/dist/services/mcp/toAgentTools.d.ts +57 -1
  169. package/dist/services/mcp/toAgentTools.d.ts.map +1 -1
  170. package/dist/services/queue/work.js +2 -2
  171. package/dist/services/queue/work.js.map +1 -1
  172. package/dist/services/router/ApiRouteDispatcher.d.ts +27 -1
  173. package/dist/services/router/ApiRouteDispatcher.d.ts.map +1 -1
  174. package/dist/support/index.js +2 -2
  175. package/dist/support/index.js.map +1 -1
  176. package/package.json +1 -1
  177. package/dist/chunk-8v5z6646.js +0 -5
  178. package/dist/chunk-d6prwkff.js +0 -17
  179. package/dist/chunk-yhkffean.js +0 -5
  180. /package/dist/{chunk-bvsevtpp.js.map → chunk-5ngv175h.js.map} +0 -0
  181. /package/dist/{chunk-aa13sgs2.js.map → chunk-cbywzv21.js.map} +0 -0
  182. /package/dist/{chunk-80t4tfke.js.map → chunk-rkre6bqc.js.map} +0 -0
@@ -1,6 +1,7 @@
1
1
  import type { ToolContext } from "../ai/Agent";
2
2
  import type { AnySchema, Infer, Schema } from "../ai/Schema";
3
3
  import type { UrlParser } from "../client/types";
4
+ import type { McpCallContext, McpCredentials } from "../services/mcp/McpRegistry";
4
5
  import type { ApiRouterHandler } from "./ApiRouter";
5
6
  import type { HttpRequest } from "./HttpRequest";
6
7
  /**
@@ -23,22 +24,88 @@ export type McpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
23
24
  * say in it: the param is absent from the tool's input schema, and anything
24
25
  * the model sends under its name is dropped before the url is built.
25
26
  *
26
- * It is handed the run's request, not a tool context, so the same binder
27
- * keeps meaning something for a caller that is not an agent run. A binder may
28
- * read the user as `req.ctx().user`: that is the store of the request that
29
- * started the run, and it stays open until the run settles — through a
30
- * streamed response, and after the client has disconnected, since leaving does
31
- * not stop the run. `user` is whatever that route's middleware set, so the
32
- * route that starts the run must be behind `auth` for it to be there.
27
+ * It is handed the run's request first, so the same binder keeps meaning
28
+ * something for a caller that is not an agent run. A binder may read the user
29
+ * as `req.ctx().user`: that is the store of the request that started the run,
30
+ * and it stays open until the run settles — through a streamed response, and
31
+ * after the client has disconnected, since leaving does not stop the run.
32
+ * `user` is whatever that route's middleware set, so the route that starts the
33
+ * run must be behind `auth` for it to be there.
34
+ *
35
+ * The second argument is the whole call (#756): the caller, the tool, the
36
+ * model's parsed arguments, and `ctx`, the run's `ToolContext` — absent when
37
+ * the registry is called without one. A param that names "the resource this
38
+ * run is about" reads it from there rather than from the chat route's url:
39
+ *
40
+ * ```ts
41
+ * params: { siteId: (_req, { ctx }) => ctx?.context.siteId }
42
+ * ```
43
+ *
44
+ * `ctx.body` is the client's, as untrusted as a request body: bind from it
45
+ * only what the route's own middleware checks anyway.
46
+ */
47
+ export type McpParamBinder = (req: HttpRequest<any, any>, call: McpCallContext) => string | number | Promise<string | number>;
48
+ /**
49
+ * A path param the model names in its own terms, and the app translates (#767).
50
+ *
51
+ * A bound param leaves the model no say, and an `"input"` one makes it send
52
+ * the raw segment — an id it would have to copy around. This is the third
53
+ * mode: the tool's input schema carries a field in the model's vocabulary
54
+ * (`page: "/about"`), and `bind` turns what the model sent into the segment
55
+ * (`:pageId`) before the url is built.
56
+ *
57
+ * Built with `McpRouter.param`, which is what types `bind`'s `value` from
58
+ * `input`. See `McpModelParamOptions`.
59
+ */
60
+ export declare class McpModelParam<V = unknown> {
61
+ /** The key in the tool's input schema, or `undefined` for the param's own name. */
62
+ readonly as: string | undefined;
63
+ readonly input: AnySchema;
64
+ readonly bind: McpModelParamResolver<V>;
65
+ readonly __internal_brand = "McpModelParam";
66
+ constructor(
67
+ /** The key in the tool's input schema, or `undefined` for the param's own name. */
68
+ as: string | undefined, input: AnySchema, bind: McpModelParamResolver<V>);
69
+ }
70
+ /**
71
+ * Turns what the model sent for a model-facing param into the url segment.
72
+ *
73
+ * `value` is the model's field, parsed by its schema. `req` and `call` are what
74
+ * a binder gets, so a resolver can look the value up within the resource the
75
+ * run is about (`call.ctx`).
76
+ *
77
+ * To refuse, throw an `McpToolError` (or any `ToolError`): its message reaches
78
+ * the model, which can correct the call — `There is no page "/abuot"`. Any
79
+ * other throw, or an empty answer, is the server's failure: logged, and the
80
+ * model reads only that the tool failed.
33
81
  */
34
- export type McpParamBinder = (req: HttpRequest<any, any>) => string | number | Promise<string | number>;
82
+ export type McpModelParamResolver<V> = (value: V, req: HttpRequest<any, any>, call: McpCallContext) => string | number | Promise<string | number>;
83
+ /** What `McpRouter.param` takes. */
84
+ export type McpModelParamOptions<S extends AnySchema> = {
85
+ /**
86
+ * The field's name in the tool's input schema. Defaults to the param's own
87
+ * name. It is never sent to the route, in the body or the query: it only
88
+ * reaches `bind`, and `call.input`.
89
+ */
90
+ as?: string;
91
+ /**
92
+ * The field's schema, as the model sees it. Describe it here — it is the
93
+ * only thing the model reads about the field:
94
+ * `s.string().nullable().describe("A page path, like /about, or null for this chat's page")`.
95
+ */
96
+ input: S;
97
+ /** Maps the model's value to the segment. See `McpModelParamResolver`. */
98
+ bind: McpModelParamResolver<Infer<S>>;
99
+ };
35
100
  /**
36
101
  * Picks the attachment a bound file field sends, usually out of `ctx.turn`.
37
102
  * The id still resolves through `ctx.attachments`, so a binder can narrow which
38
103
  * of the caller's files is sent and can never reach anybody else's. `undefined`
39
104
  * means there is no file to send, and the model is told so.
105
+ *
106
+ * The second argument is the whole call, as a param binder gets it.
40
107
  */
41
- export type McpFileBinder = (ctx: ToolContext) => string | undefined | Promise<string | undefined>;
108
+ export type McpFileBinder = (ctx: ToolContext, call: McpCallContext) => string | undefined | Promise<string | undefined>;
42
109
  /** `Methods[M][K]`, exactly as `useMutation` splits `RPC` — plus `GET`. */
43
110
  type RoutesOf<R> = {
44
111
  [M in McpMethod]: {
@@ -47,6 +114,12 @@ type RoutesOf<R> = {
47
114
  };
48
115
  type IsAny<T> = 0 extends 1 & T ? true : false;
49
116
  type BodyOf<H> = H extends ApiRouterHandler<infer T, any, any> ? T : never;
117
+ /**
118
+ * What the route answers on success, as `useQuery` reads it. The registry
119
+ * hands `result` the parsed JSON, so a `Date` in a handler's return arrives as
120
+ * the string it was serialised to.
121
+ */
122
+ export type DataOf<H> = H extends ApiRouterHandler<any, infer O, any, any> ? Awaited<O> : unknown;
50
123
  /**
51
124
  * A body there is nothing to check against: a handler that never names its
52
125
  * request (`async list() {}` infers `unknown`), or one typed `any`. The meta
@@ -91,10 +164,13 @@ type InputCheck<I, B> = IsLoose<B> extends true ? unknown : I extends AnySchema
91
164
  "input has fields the route's body does not": Exclude<keyof Infer<I>, keyof JsonBody<B>>;
92
165
  } : unknown;
93
166
  type ParamsOf<K> = UrlParser<`${K & string}`>;
167
+ /** One path param's declaration: bound, the model's raw segment, or the model's in its own terms. */
168
+ export type McpParamDeclaration = McpParamBinder | "input" | McpModelParam<any>;
94
169
  /**
95
- * Every path param is either bound or `"input"`, and there is no default: a
96
- * param left for the model by omission is exactly the tenant-isolation bug
97
- * this field exists to prevent, so omitting one is a compile error.
170
+ * Every path param is bound, `"input"` or a `this.param(...)`, and there is no
171
+ * default: a param left for the model by omission is exactly the
172
+ * tenant-isolation bug this field exists to prevent, so omitting one is a
173
+ * compile error.
98
174
  */
99
175
  type ParamsMeta<K> = string extends keyof ParamsOf<K> ? {
100
176
  params?: never;
@@ -102,7 +178,7 @@ type ParamsMeta<K> = string extends keyof ParamsOf<K> ? {
102
178
  params?: never;
103
179
  } : {
104
180
  params: {
105
- [P in keyof ParamsOf<K>]-?: McpParamBinder | "input";
181
+ [P in keyof ParamsOf<K>]-?: McpParamDeclaration;
106
182
  };
107
183
  };
108
184
  /**
@@ -148,15 +224,83 @@ type InputProp<B, I> = {
148
224
  */
149
225
  input: I & NoInfer<InputCheck<I, B>>;
150
226
  };
151
- export type McpRouteMeta<H, K, I> = MetaBase & InputMeta<BodyOf<H>, I> & ParamsMeta<K> & FilesMeta<BodyOf<H>>;
227
+ /**
228
+ * What `result` is handed beside the route's answer: the whole call, as the
229
+ * binders and the `credentials` hook get it — the tool, the model's parsed
230
+ * arguments, the caller and the run's `ToolContext`.
231
+ */
232
+ export type McpResultContext = McpCallContext;
233
+ /**
234
+ * Turns the route's answer into what the model is shown. See `ResultMeta`.
235
+ */
236
+ export type McpResultProjection<D = any, P = unknown> = (data: D, call: McpResultContext) => P | Promise<P>;
237
+ /**
238
+ * An `output` without a `result` must describe what the route answers.
239
+ * Checked one way — the answer must be assignable to the schema's type — so a
240
+ * schema that names fewer fields than the route answers is fine (parsing
241
+ * drops the rest), and one naming a field the route does not have, or with a
242
+ * different type, is not. A route whose answer type is unknown is not checked.
243
+ */
244
+ type OutputCheck<O, P> = IsAny<P> extends true ? unknown : unknown extends P ? unknown : O extends AnySchema ? [P] extends [Infer<O>] ? unknown : {
245
+ "output does not describe what the route answers": Infer<O>;
246
+ } : unknown;
247
+ /** What `result` must return: anything, or what `output` describes when it is set. */
248
+ type ResultReturn<O> = O extends AnySchema ? Infer<O> | Promise<Infer<O>> : unknown;
249
+ /**
250
+ * Two shapes, told apart by whether `result` is there, because `output`
251
+ * describes a different thing in each: what `result` returns, or what the
252
+ * route answers.
253
+ *
254
+ * `result`'s return is checked against `output` through its contextual type
255
+ * rather than by inferring it and comparing afterwards. A type parameter for
256
+ * it would have to be inferred from a context-sensitive function, and any
257
+ * check that mentioned it beside `output` fixed it to its default first.
258
+ */
259
+ type ResultMeta<H, O> = {
260
+ /**
261
+ * Trims or reshapes the route's 2xx JSON before the model sees it.
262
+ * Routes are written for a UI and answer whole records; a model needs a
263
+ * few fields of them, and every other one costs context on every call.
264
+ *
265
+ * ```ts
266
+ * result: (pages) => pages.map(({ path, title }) => ({ path, title })),
267
+ * ```
268
+ *
269
+ * A 4xx is not passed through it: a refusal reaches the model as the
270
+ * route wrote it. A throw is the server's failure, logged, and the model
271
+ * is told only that the tool failed.
272
+ */
273
+ result: (data: DataOf<H>, call: McpResultContext) => ResultReturn<O>;
274
+ /**
275
+ * The shape of what `result` returns. The return is parsed with it,
276
+ * which drops every field it does not declare. It is the descriptor's
277
+ * `outputSchema`, and the `AgentTool`'s. A value that does not parse is
278
+ * the server's failure.
279
+ */
280
+ output?: O;
281
+ } | {
282
+ result?: never;
283
+ /**
284
+ * The shape of what the route answers. The answer is parsed with it,
285
+ * which drops every field it does not declare, so an `output` alone is
286
+ * a projection too: it may name fewer fields than the route answers,
287
+ * never one it does not have. It is the descriptor's `outputSchema`, and
288
+ * the `AgentTool`'s. An answer that does not parse is the server's
289
+ * failure.
290
+ */
291
+ output?: O & NoInfer<OutputCheck<O, DataOf<H>>>;
292
+ };
293
+ export type McpRouteMeta<H, K, I, O = undefined> = MetaBase & InputMeta<BodyOf<H>, I> & ParamsMeta<K> & FilesMeta<BodyOf<H>> & ResultMeta<H, O>;
152
294
  /** The runtime shape of a meta, generics erased. */
153
295
  export type McpRouteMetaRuntime = {
154
296
  description: string;
155
297
  input?: AnySchema;
156
298
  tags?: readonly string[];
157
299
  requiresApproval?: boolean;
158
- params?: Record<string, McpParamBinder | "input">;
300
+ params?: Record<string, McpParamDeclaration>;
159
301
  files?: Record<string, McpFileBinder | "input">;
302
+ result?: McpResultProjection;
303
+ output?: AnySchema;
160
304
  };
161
305
  /**
162
306
  * One exposed route: what `fromApiRoute` returns and `routes` holds. Plain
@@ -201,7 +345,57 @@ export declare class McpRouteDeclaration<M extends McpMethod = McpMethod, K exte
201
345
  export declare class McpRouter<R = McpRoutes> {
202
346
  static __brand: string;
203
347
  routes: Record<string, McpRouteDeclaration>;
204
- fromApiRoute<M extends McpMethod, K extends keyof RoutesOf<R>[M] & string, I extends AnySchema | undefined = undefined>(method: M, url: K, meta: McpRouteMeta<RoutesOf<R>[M][K], K, I>): McpRouteDeclaration<M, K>;
348
+ /**
349
+ * The app's own credentials for one tool call, sent beside the access token
350
+ * of the user who started the run. Optional; without it a tool call carries
351
+ * gemi's access token and nothing else.
352
+ *
353
+ * For routes whose middleware reads something gemi does not know about: a
354
+ * cookie naming an anonymous owner, or a header the app signs per run so a
355
+ * route can check what this run may touch.
356
+ *
357
+ * ```ts
358
+ * credentials({ req, ctx }: McpCallContext) {
359
+ * return {
360
+ * cookies: { owner: req.cookies.get("owner") },
361
+ * headers: { "x-run-grant": signGrant(ctx?.runId) },
362
+ * };
363
+ * }
364
+ * ```
365
+ *
366
+ * Nothing of the initiator's is forwarded unless it is returned here, value
367
+ * by value. `access_token`, `Cookie`, `Host`, `User-Agent`, the body's
368
+ * framing headers and `x-forwarded-*` cannot be set: the identity stays the
369
+ * initiator's, and the call fails on the server, logged, if one is returned.
370
+ * The route's middleware still decides what a credential is worth, so this
371
+ * can reach nothing a direct request carrying the same values could not.
372
+ */
373
+ credentials?(call: McpCallContext): McpCredentials | undefined | Promise<McpCredentials | undefined>;
374
+ /**
375
+ * A path param the model names in its own terms, for `params` (#767).
376
+ *
377
+ * ```ts
378
+ * params: {
379
+ * pageId: this.param({
380
+ * as: "page",
381
+ * input: s.string().nullable().describe("A page path, like /about, or null for this chat's page"),
382
+ * bind: (path, _req, { ctx }) => pageIdFor(ctx, path),
383
+ * }),
384
+ * }
385
+ * ```
386
+ *
387
+ * The tool's input schema has `page`, described as written, and no `pageId`.
388
+ * `bind` gets the model's value, parsed and typed by `input`, and answers the
389
+ * segment; a `McpToolError` it throws reaches the model. The answer is then
390
+ * treated exactly as a model-supplied segment would be: encoded as one
391
+ * segment and dispatched through the route's own middleware, which decides
392
+ * whether the caller may reach it.
393
+ *
394
+ * The result is plain data and can be shared by several tools: declare it as
395
+ * a field above `routes` and use it in each.
396
+ */
397
+ param<S extends AnySchema>(options: McpModelParamOptions<S>): McpModelParam<Infer<S>>;
398
+ fromApiRoute<M extends McpMethod, K extends keyof RoutesOf<R>[M] & string, I extends AnySchema | undefined = undefined, O extends AnySchema | undefined = undefined>(method: M, url: K, meta: McpRouteMeta<RoutesOf<R>[M][K], K, I, O>): McpRouteDeclaration<M, K>;
205
399
  }
206
400
  export {};
207
401
  //# sourceMappingURL=McpRouter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpRouter.d.ts","sourceRoot":"","sources":["../../http/McpRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;CAAG;AAE7B,sFAAsF;AACtF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KACvB,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,MAAM,GAAG,SAAS,GAA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AAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAC7C,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC;CAG7B"}
@@ -1,6 +1,6 @@
1
1
  export { Controller, ResourceController } from "./Controller";
2
2
  export { ApiRouter, type CreateRPC } from "./ApiRouter";
3
- export { McpRouter, McpRouteDeclaration, type McpFileBinder, type McpMethod, type McpParamBinder, type McpRouteMeta, type McpRoutes, } from "./McpRouter";
3
+ export { McpRouter, McpRouteDeclaration, type McpFileBinder, type McpMethod, McpModelParam, type McpModelParamOptions, type McpModelParamResolver, type McpParamBinder, type McpParamDeclaration, type McpRouteMeta, type McpRoutes, } from "./McpRouter";
4
4
  export { createFileResponse, ViewRouter, type CreateViewRPC, type FileOutput, type ViewHandler, } from "./ViewRouter";
5
5
  export { toMiddlewareList, type MiddlewareInput } from "./middlewareList";
6
6
  export { createStreamResponse, createUnsatisfiableResponse, type StreamOutput, type StreamDescriptor, type StreamReadResult, } from "./createStreamResponse";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL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CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,KAAK,yBAAyB,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ac as H,Fd as I,Gd as J,Hd as K,Id as L,Jd as M,Kd as N,gc as n,hc as o,ic as p,jc as v,kc as w,lc as x,nc as y,oc as z,pc as A,qc as B,rc as C,sc as D,tc as E,yc as F,zc as G}from"../chunk-d6prwkff.js";import"../chunk-bf1q3m7a.js";import"../chunk-adm5g1v8.js";import{Me as a,Ne as b,Oe as d,Se as e,Te as f,Ue as g,Ve as h,We as i,Xe as j,af as k,bf as l,ff as m,gf as q,hf as r,if as s,jf as t,kf as u}from"../chunk-4x41cmg3.js";import{zf as c}from"../chunk-9xf2fx98.js";import"../chunk-eqtsfvvd.js";import"../chunk-br9p390p.js";import"../chunk-n4807648.js";import"../chunk-ghz3e8b7.js";import"../chunk-7vjbebst.js";import"../chunk-3fr22rtg.js";import"../chunk-qttatc7h.js";import"../chunk-48dek9s7.js";import"../chunk-f6s7ddjz.js";import"../chunk-n63xjrck.js";import"../chunk-2tm56xq1.js";import"../chunk-68zf43ah.js";export{g as toRangeHeaderValue,n as toMiddlewareList,f as resolveRange,e as parseRangeHeader,h as parseContentRange,E as middlewareConfigDefaults,z as httpError,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,D as defineMiddlewareConfig,o as createUnsatisfiableResponse,p as createStreamResponse,A as createFileResponse,H as clientIp,B as ViewRouter,k as ValidationError,b as ResourceController,c as RequestBreakerError,G as RateLimitMiddleware,F as RateLimitExceededError,s as RangeNotSatisfiableError,M as PoliciesServiceProvider,N as Policies,C as Middleware,x as McpRouter,w as McpRouteDeclaration,l as InvalidValidationRuleError,r as InsufficientPermissionsError,y as HttpResponse,m as HttpRequest,t as FileNotFoundError,K as CorsMiddleware,a as Controller,J as CacheMiddleware,L as CSRFMiddleware,q as AuthorizationError,I as AuthenticationMiddleware,u as AuthenticationError,v as ApiRouter};
2
+ import{Ac as H,Bc as I,Gd as J,Hd as K,Id as L,Jd as M,Kd as N,Ld as O,gc as n,hc as o,ic as p,jc as v,kc as w,lc as x,mc as y,oc as z,pc as A,qc as B,rc as C,sc as D,tc as E,uc as F,zc as G}from"../chunk-g8qp01t6.js";import"../chunk-b0jpvp5t.js";import"../chunk-22k4b395.js";import{Ne as a,Oe as b,Pe as d,Te as e,Ue as f,Ve as g,We as h,Xe as i,Ye as j,bf as k,cf as l,gf as m,hf as q,if as r,jf as s,kf as t,lf as u}from"../chunk-3cxbvrts.js";import{Af as c}from"../chunk-j9deswmn.js";import"../chunk-ayss2f8c.js";import"../chunk-5dwtmkk8.js";import"../chunk-xxkk60aw.js";import"../chunk-fcsq613t.js";import"../chunk-v4exgqbp.js";import"../chunk-st0d3ndv.js";import"../chunk-4f7n1r02.js";import"../chunk-xnggfm0s.js";import"../chunk-0fney17e.js";import"../chunk-ma5rmcbe.js";import"../chunk-3m93v7bt.js";import"../chunk-1xzdexbq.js";export{g as toRangeHeaderValue,n as toMiddlewareList,f as resolveRange,e as parseRangeHeader,h as parseContentRange,F as middlewareConfigDefaults,A as httpError,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,E as defineMiddlewareConfig,o as createUnsatisfiableResponse,p as createStreamResponse,B as createFileResponse,I as clientIp,C as ViewRouter,k as ValidationError,b as ResourceController,c as RequestBreakerError,H as RateLimitMiddleware,G as RateLimitExceededError,s as RangeNotSatisfiableError,N as PoliciesServiceProvider,O as Policies,D as Middleware,y as McpRouter,x as McpRouteDeclaration,w as McpModelParam,l as InvalidValidationRuleError,r as InsufficientPermissionsError,z as HttpResponse,m as HttpRequest,t as FileNotFoundError,L as CorsMiddleware,a as Controller,K as CacheMiddleware,M as CSRFMiddleware,q as AuthorizationError,J as AuthenticationMiddleware,u as AuthenticationError,v as ApiRouter};
3
3
 
4
- //# debugId=40862F9DA4E1987764756E2164756E21
4
+ //# debugId=4F2BECB707D07B5C64756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "40862F9DA4E1987764756E2164756E21",
7
+ "debugId": "4F2BECB707D07B5C64756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{aa as y,ba as p}from"../chunk-mekw2ap4.js";import{qa as c,ra as d,ta as l}from"../chunk-9a8qz3s7.js";import{mg as e,ng as i,pg as t,qg as r,rg as o,sg as n,tg as a,ug as s}from"../chunk-7vjbebst.js";import"../chunk-68zf43ah.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
2
+ import{aa as y,ba as p}from"../chunk-sedwjgvf.js";import{qa as c,ra as d,ta as l}from"../chunk-9a8qz3s7.js";import{ng as e,og as i,qg as t,rg as r,sg as o,tg as n,ug as a,vg as s}from"../chunk-v4exgqbp.js";import"../chunk-1xzdexbq.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
3
3
 
4
- //# debugId=9CF699FACE5C277E64756E2164756E21
4
+ //# debugId=A01D4EB3CAF77D8864756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "9CF699FACE5C277E64756E2164756E21",
7
+ "debugId": "A01D4EB3CAF77D8864756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{aa as w}from"../chunk-mekw2ap4.js";import"../chunk-9a8qz3s7.js";import{Wa as b}from"../chunk-yhkffean.js";import{dc as R,ec as S}from"../chunk-f9t39vwk.js";import"../chunk-7kedxtbp.js";import{Mc as j}from"../chunk-d6prwkff.js";import"../chunk-bf1q3m7a.js";import"../chunk-adm5g1v8.js";import"../chunk-4x41cmg3.js";import"../chunk-9xf2fx98.js";import"../chunk-eqtsfvvd.js";import"../chunk-br9p390p.js";import"../chunk-n4807648.js";import"../chunk-ghz3e8b7.js";import"../chunk-7vjbebst.js";import"../chunk-3fr22rtg.js";import{Dg as X,Eg as E,Fg as V,Gg as L}from"../chunk-qttatc7h.js";import"../chunk-48dek9s7.js";import"../chunk-f6s7ddjz.js";import"../chunk-n63xjrck.js";import"../chunk-2tm56xq1.js";import"../chunk-68zf43ah.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{S as translationConfigDefaults,N as translate,E as isValidTimeZone,R as defineTranslationConfig,w as defineDictionary,V as createFormatter,L as Translator,b as TranslationServiceProvider,P as Dictionary,X as DEFAULT_TIME_ZONE};
2
+ import{aa as w}from"../chunk-sedwjgvf.js";import"../chunk-9a8qz3s7.js";import{Wa as b}from"../chunk-f2n21fef.js";import{dc as R,ec as S}from"../chunk-zm00crsx.js";import"../chunk-7kedxtbp.js";import{Nc as j}from"../chunk-g8qp01t6.js";import"../chunk-b0jpvp5t.js";import"../chunk-22k4b395.js";import"../chunk-3cxbvrts.js";import"../chunk-j9deswmn.js";import"../chunk-ayss2f8c.js";import"../chunk-5dwtmkk8.js";import"../chunk-xxkk60aw.js";import"../chunk-fcsq613t.js";import"../chunk-v4exgqbp.js";import"../chunk-st0d3ndv.js";import{Eg as X,Fg as E,Gg as V,Hg as L}from"../chunk-4f7n1r02.js";import"../chunk-xnggfm0s.js";import"../chunk-0fney17e.js";import"../chunk-ma5rmcbe.js";import"../chunk-3m93v7bt.js";import"../chunk-1xzdexbq.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{S as translationConfigDefaults,N as translate,E as isValidTimeZone,R as defineTranslationConfig,w as defineDictionary,V as createFormatter,L as Translator,b as TranslationServiceProvider,P as Dictionary,X as DEFAULT_TIME_ZONE};
3
3
 
4
- //# debugId=57FB2330D198750F64756E2164756E21
4
+ //# debugId=6EBD0BD09D520AA564756E2164756E21
@@ -7,6 +7,6 @@
7
7
  "import { Lang } from \"../facades\";\nimport { parseTranslation } from \"../utils/parseTranslation\";\nimport type { ParseTranslationParamsServer, Prettify } from \"../utils/type\";\nimport type { DictionaryHandle } from \"./defineDictionary\";\nimport type { DictionaryTranslations } from \"./dictionaryShape\";\n\n/**\n * Read one string from a `defineDictionary` dictionary outside React — a\n * controller, a job, an email template.\n *\n * Async because a bundled dictionary loads its locale on demand. Server code\n * does not go through the bundler, so in practice this resolves without ever\n * yielding; the `await` is what makes the same call work either way.\n *\n * Kept out of `defineDictionary.ts` on purpose: that module is imported by\n * components and has to stay free of the server facades this one needs.\n */\nexport async function translate<\n T extends DictionaryTranslations,\n K extends keyof T & string,\n U extends keyof T[K],\n R = Prettify<ParseTranslationParamsServer<T[K][U] & string>>,\n>(\n dictionary: DictionaryHandle<T>,\n key: K,\n ...args: R extends Record<string, never>\n ? [args?: { locale?: U | (string & {}) }]\n : [args: { locale?: U | (string & {}); params: R }]\n): Promise<string> {\n const { locale = Lang.locale(), params } = { params: {}, ...args[0] };\n const strings = await dictionary.load(String(locale));\n const template = strings[key];\n\n if (typeof template !== \"string\") {\n throw new Error(\n `Translation not found for \"${key}\" in \"${String(locale)}\" (dictionary ${dictionary.id})`,\n );\n }\n\n return parseTranslation(template, (params ?? {}) as any) as string;\n}\n"
8
8
  ],
9
9
  "mappings": ";w0BAAA,mBAAS,SAAe,eAAU,SAO3B,IAAS,JAAgB,JAAC,HAAkB,HAAwB,JAEzE,DAAM,HAAS,EAAO,EAAO,JAAM,HAAE,AACnC,JAAC,DACC,EAAO,DAAU,YACjB,EAAgB,EAAkC,EAAE,CAAC,CACzD,EAMM,EAAQ,kDAEd,GAAI,CAAC,EAqCH,OAnCe,EAAS,QAAQ,EAAO,CAAC,EAAO,EAAM,EAAM,IAAY,CAErE,IAAM,EAAY,EAAK,SAAS,GAAG,EAAI,EAAK,MAAM,GAAG,EAAE,GAAK,EAEtD,EAAQ,EAAO,GACrB,GAAI,IAAU,OACZ,OAAO,EAGT,GAAI,OAAO,IAAU,WAAY,CAG/B,IAAM,EAAiB,EADD,IAAY,OAAY,EAAU,EACd,EAE1C,GAAI,EAAe,CAAc,EAC/B,MAAU,MAAM,gCAAgC,EAElD,OAAO,OAAO,CAAc,EAI9B,GAAI,EACF,OAAQ,EAAK,YAAY,OAClB,SACH,OAAO,OAAO,CAAK,EAAE,SAAS,MAC3B,SACH,OAAO,OAAO,CAAK,MAChB,UACH,OAAO,QAAQ,CAAK,EAAE,SA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SAAS,EAAK,OAAO,EAAG,UAAW,CACzC,OAAQ,CAAC,KACN,EAAK,EACV,EAEA,GAAI,OAAO,OAAW,IACpB,MAAU,MAAM,kCAAkC,EAGpD,GAAI,CAAC,KAAK,aAAa,KAAO,GAC5B,MAAU,MACR,6BAA6B,OAAO,CAAG,QAAQ,OAAO,CAAM,GAC9D,EAEF,OAAO,EAAiB,KAAK,WAAW,GAAK,GAAS,GAAU,CAAC,CAAC,QAU7D,OAAoC,CAAC,EAAc,EAAiB,CACzE,OAAO,IAAI,EAAc,EAAM,CAAY,QAGtC,KAA+D,CACpE,KACG,EAWK,CACR,IAAQ,SAAS,EAAK,OAAO,EAAG,UAAW,CAAE,OAAQ,CAAC,KAAM,IAAO,EAAG,EAEtE,GAAI,CAAC,IAAU,GACb,MAAU,MAAM,6BAA6B,OAAO,CAAM,GAAG,EAG/D,OAAO,EAAiB,EAAQ,GAAS,GAAU,CAAC,CAAC,EAEzD,CC7EA,eAAsB,CAKrB,CACC,EACA,KACG,EAGc,CACjB,IAAQ,SAAS,EAAK,OAAO,EAAG,UAAW,CAAE,OAAQ,CAAC,KAAM,EAAK,EAAG,EAE9D,GADU,MAAM,EAAW,KAAK,OAAO,CAAM,CAAC,GAC3B,GAEzB,GAAI,OAAO,IAAa,SACtB,MAAU,MACR,8BAA8B,UAAY,OAAO,CAAM,kBAAkB,EAAW,KACtF,EAGF,OAAO,EAAiB,EAAW,GAAU,CAAC,CAAS",
10
- "debugId": "57FB2330D198750F64756E2164756E21",
10
+ "debugId": "6EBD0BD09D520AA564756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ya as y}from"../chunk-epwaxctc.js";import{Va as i}from"../chunk-pjg7gqnh.js";import{Wa as g}from"../chunk-yhkffean.js";import{$a as e,Za as T,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as c,vb as p,yb as n}from"../chunk-8v5z6646.js";import"../chunk-wc46df4w.js";import"../chunk-3tn480wt.js";import{_b as r}from"../chunk-z8jf7jwg.js";import"../chunk-f9t39vwk.js";import"../chunk-7kedxtbp.js";import{Ad as m,Bd as Q,Cd as t,Dd as o,Fc as Zj,Gc as $j,Jc as Gj,Kc as Hj,nd as x,sd as I,td as E,wd as K,xd as M,yd as s,zd as C}from"../chunk-d6prwkff.js";import{Od as a}from"../chunk-bf1q3m7a.js";import{$d as V,ee as f}from"../chunk-adm5g1v8.js";import{ff as F}from"../chunk-4x41cmg3.js";import{yf as B}from"../chunk-9xf2fx98.js";import{Ef as L}from"../chunk-eqtsfvvd.js";import"../chunk-br9p390p.js";import"../chunk-n4807648.js";import"../chunk-ghz3e8b7.js";import"../chunk-7vjbebst.js";import"../chunk-3fr22rtg.js";import"../chunk-77kw61f4.js";import"../chunk-qttatc7h.js";import{Hg as _,Jg as N,Kg as b}from"../chunk-48dek9s7.js";import"../chunk-f6s7ddjz.js";import"../chunk-xmjhensy.js";import"../chunk-n63xjrck.js";import{Xg as q}from"../chunk-2tm56xq1.js";import"../chunk-68zf43ah.js";function Jj(j){let X=j.headers.get("Cache-Control")?.toLowerCase()??"";return/(^|[\s,])(public|s-maxage)\b/.test(X)}var Wj=new Set,Xj={refusal:null,apply:(j)=>j,carried:null};async function k(j){let X=b(x);if(X.config.global.length===0)return Xj;let{pathname:Z}=new URL(j.url),W=q(Z),z=new F(j,{},W?"api":"view","");return await L.run(z,async()=>{let $=L.getStore(),{headers:H,cookies:zj}=$,Y=(J)=>{if(!Jj(J))return Q(J,H,zj);let G=new Headers(H);return G.delete("Set-Cookie"),Q(J,G,Wj)};try{return await X.runGlobalMiddleware(),{refusal:null,apply:Y,carried:{user:$.user}}}catch(J){let G=!W&&Z.endsWith(".json");if(J?.kind===B){let O=W?m(J.payload.api):G?M(J.payload.viewData??J.payload.api):K(J.payload.view);return{refusal:Y(O),apply:Y,carried:null}}if(V(J)&&(W||G))return{refusal:Y(C()),apply:Y,carried:null};if(f(J)){console.error(J);let O=W||G?I():K(E());return{refusal:Y(O),apply:Y,carried:null}}throw J}finally{$.destroy()}})}var U=[l,d,y,P,n,A,S,v,R,D,h,p,u,g,c,w];class jj{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new N;boot(){if(this.models.length>0)i(...this.models);else Yj();this.app.config.merge(this.config),N.setInstance(this.app),this.app.registerMany([...U,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let Z of this.services){let W=typeof Z==="function"?new Z:Z,z=W.constructor;if(!z.token)throw Error(`Service [${z.name}] is listed in \`services\` but does not declare a \`static token\`.`);let $=X.get(z.token);if($)throw Error(`Services [${$}] and [${z.name}] both declare the token "${z.token}". Tokens are the container's keys, so they must be unique.`);X.set(z.token,z.name);let H=z;if(!j.has(z.token)&&this.app.bound(H))throw Error(`Service [${z.name}] declares the token "${z.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(H,W),this.serviceInstances.push(W),this.serviceTokens.add(z.token)}}async waitForBoot(){await this.app.boot(),await this.bootServices(),e(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return _.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(t)}viewRoutes(){return this.app.make(s)}domains(){return this.app.make(o)}queue(){return this.app.make(r)}globalMiddleware(j){return k(j)}destroy(){if(this.app.resolved(T))this.app.make(T).stop();if(this.app.flush(),N.getInstance()===this.app)N.setInstance(void 0);_.disable()}}function Yj(){if(Bun.env.NODE_ENV==="production")return;let j=a();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
2
+ import{ya as y}from"../chunk-jfnhzza6.js";import{Va as i}from"../chunk-bsq80942.js";import{Wa as g}from"../chunk-f2n21fef.js";import{$a as e,Za as T,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as c,vb as p,yb as n}from"../chunk-3e73zaft.js";import"../chunk-wc46df4w.js";import"../chunk-b1dqx3b9.js";import{_b as r}from"../chunk-18aqqrev.js";import"../chunk-zm00crsx.js";import"../chunk-7kedxtbp.js";import{Ad as C,Bd as m,Cd as Q,Dd as t,Ed as o,Gc as Zj,Hc as $j,Kc as Gj,Lc as Hj,od as x,td as I,ud as E,xd as K,yd as M,zd as s}from"../chunk-g8qp01t6.js";import{Pd as a}from"../chunk-b0jpvp5t.js";import{ae as V,fe as f}from"../chunk-22k4b395.js";import{gf as F}from"../chunk-3cxbvrts.js";import{zf as B}from"../chunk-j9deswmn.js";import{Ff as L}from"../chunk-ayss2f8c.js";import"../chunk-5dwtmkk8.js";import"../chunk-xxkk60aw.js";import"../chunk-fcsq613t.js";import"../chunk-v4exgqbp.js";import"../chunk-st0d3ndv.js";import"../chunk-zhk3z9zk.js";import"../chunk-4f7n1r02.js";import{Ig as _,Kg as N,Lg as b}from"../chunk-xnggfm0s.js";import"../chunk-0fney17e.js";import"../chunk-yxh4xs3k.js";import"../chunk-ma5rmcbe.js";import{Yg as q}from"../chunk-3m93v7bt.js";import"../chunk-1xzdexbq.js";function Jj(j){let X=j.headers.get("Cache-Control")?.toLowerCase()??"";return/(^|[\s,])(public|s-maxage)\b/.test(X)}var Wj=new Set,Xj={refusal:null,apply:(j)=>j,carried:null};async function k(j){let X=b(x);if(X.config.global.length===0)return Xj;let{pathname:Z}=new URL(j.url),W=q(Z),z=new F(j,{},W?"api":"view","");return await L.run(z,async()=>{let $=L.getStore(),{headers:H,cookies:zj}=$,Y=(J)=>{if(!Jj(J))return Q(J,H,zj);let G=new Headers(H);return G.delete("Set-Cookie"),Q(J,G,Wj)};try{return await X.runGlobalMiddleware(),{refusal:null,apply:Y,carried:{user:$.user}}}catch(J){let G=!W&&Z.endsWith(".json");if(J?.kind===B){let O=W?m(J.payload.api):G?M(J.payload.viewData??J.payload.api):K(J.payload.view);return{refusal:Y(O),apply:Y,carried:null}}if(V(J)&&(W||G))return{refusal:Y(C()),apply:Y,carried:null};if(f(J)){console.error(J);let O=W||G?I():K(E());return{refusal:Y(O),apply:Y,carried:null}}throw J}finally{$.destroy()}})}var U=[l,d,y,P,n,A,S,v,R,D,h,p,u,g,c,w];class jj{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new N;boot(){if(this.models.length>0)i(...this.models);else Yj();this.app.config.merge(this.config),N.setInstance(this.app),this.app.registerMany([...U,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let Z of this.services){let W=typeof Z==="function"?new Z:Z,z=W.constructor;if(!z.token)throw Error(`Service [${z.name}] is listed in \`services\` but does not declare a \`static token\`.`);let $=X.get(z.token);if($)throw Error(`Services [${$}] and [${z.name}] both declare the token "${z.token}". Tokens are the container's keys, so they must be unique.`);X.set(z.token,z.name);let H=z;if(!j.has(z.token)&&this.app.bound(H))throw Error(`Service [${z.name}] declares the token "${z.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(H,W),this.serviceInstances.push(W),this.serviceTokens.add(z.token)}}async waitForBoot(){await this.app.boot(),await this.bootServices(),e(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return _.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(t)}viewRoutes(){return this.app.make(s)}domains(){return this.app.make(o)}queue(){return this.app.make(r)}globalMiddleware(j){return k(j)}destroy(){if(this.app.resolved(T))this.app.make(T).stop();if(this.app.flush(),N.getInstance()===this.app)N.setInstance(void 0);_.disable()}}function Yj(){if(Bun.env.NODE_ENV==="production")return;let j=a();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
3
3
  Nested relation reads resolve a model by name, so a policy on a subclass that does not own its
4
4
  `+" name is skipped inside every include \u2014 scoped at the root, "+`unscoped in an include, with nothing
5
5
  to notice it. Declaring the modules registers each class under its own name and audits the set:
@@ -13,4 +13,4 @@ import{ya as y}from"../chunk-epwaxctc.js";import{Va as i}from"../chunk-pjg7gqnh.
13
13
 
14
14
  See docs/orm.md#your-model-class. Development only; this never prints in production.`)}export{$j as oneTimeSecretMatches,Zj as hashOneTimeSecret,U as frameworkProviders,Hj as UserProvider,Gj as SESSION_SELECT,jj as Kernel};
15
15
 
16
- //# debugId=EF7168C4632C856264756E2164756E21
16
+ //# debugId=6D1A9BD62F3E579364756E2164756E21
@@ -7,6 +7,6 @@
7
7
  "import { Application } from \"../foundation/Application\";\nimport type { ServiceProviderConstructor, ShutdownReport } from \"../foundation/Application\";\nimport type { ServiceToken } from \"../container/Container\";\nimport type { ConfigItems } from \"../support/Repository\";\nimport type { Service, ServiceConstructor } from \"../support/Service\";\nimport { registerModels } from \"../orm/registration\";\nimport { registeredNames } from \"../orm/registry\";\nimport { Scheduler } from \"../services/cron/Scheduler\";\nimport { QueueManager } from \"../services/queue/QueueManager\";\nimport { startClaimingIfServing } from \"../services/queue/QueueServiceProvider\";\nimport { ApiRouteDispatcher } from \"../services/router/ApiRouteDispatcher\";\nimport { ViewRouteDispatcher } from \"../services/router/ViewRouteDispatcher\";\nimport { DomainRouter } from \"../services/router/DomainRouter\";\nimport { runGlobalMiddleware } from \"../services/router/globalMiddleware\";\nimport { kernelContext } from \"./context\";\nimport { frameworkProviders } from \"./providers\";\n\n/**\n * The app's entry point into the framework. A Kernel subclass declares what the\n * app adds — its `config` slices and any extra `providers` — and everything\n * else lives in the Application container it owns.\n */\nexport class Kernel {\n /**\n * App-level config, merged over the framework defaults. Each key is a config\n * slice: `{ mail: { ... }, route: { ... } }`, normally the modules under\n * `app/config`.\n */\n protected config: ConfigItems = {};\n\n /**\n * App-level providers, registered after the framework's own so they can\n * rebind anything the framework bound.\n */\n protected providers: ServiceProviderConstructor[] = [];\n\n /**\n * The app's own singleton services. Each is constructed during the\n * synchronous boot phase and its `boot()` awaited during the asynchronous\n * one, in the order listed — so a service whose `boot()` depends on another\n * goes after it.\n *\n * An entry is either the class itself or a configured instance from\n * `Service.with({ ... })`. Listing is explicit rather than discovered because\n * the order is load-bearing here, and because a service is always imported by\n * whatever injects it — there is no file the import graph would miss.\n */\n protected services: Array<ServiceConstructor | Service> = [];\n\n private serviceInstances: Service[] = [];\n private serviceTokens = new Set<string>();\n private servicesBooted = false;\n\n /**\n * The modules holding the app's model classes — normally\n * `[generated, models]`, the generated namespace and the barrel of subclasses\n * written over it. Every model class they export is registered under the name\n * its schema carries, later modules winning, and the whole set is audited\n * before anything else boots.\n *\n * ### Why this is a Kernel field and not a line in a file somewhere\n *\n * Registration used to be `register(\"User\", User)` next to each subclass, and\n * the failure mode of forgetting it is an authorization hole that nothing\n * reports: a relation read resolves its target by name, so an unregistered\n * policied subclass leaves the generated base owning the name and every\n * nested `include` of that model comes back unscoped. No error at the root\n * either, because `$exec`'s divergence guard begins `registered !== this` and\n * the base it is running on *is* the registered one. A model only ever read\n * through an include — a membership, a pivot, the kind that carries a tenant\n * scope — never trips anything.\n *\n * Listing the modules here says it once, in the same place the app already\n * declares its config slices and providers, and turns the mistake into a\n * failure to boot rather than a quiet cross-tenant read.\n *\n * It sees the modules it is given, so a model class in a file that no barrel\n * re-exports is still invisible. That is the residual, and it is a smaller\n * one: a barrel is a place to notice an omission, and thirteen `register`\n * lines scattered across thirteen files is not.\n */\n protected models: Array<Record<string, unknown>> = [];\n\n readonly app = new Application();\n\n /**\n * Phase one, synchronous: every provider is constructed and its `register()`\n * runs. Only bindings are recorded here — no service is instantiated, so this\n * is safe to call from a synchronous constructor (`new App({ kernel })`).\n * Phase two is `waitForBoot()`.\n */\n boot() {\n // Before the container, deliberately. This throws on a model whose policies\n // would be skipped, and the useful moment for that is the one where nothing\n // has been constructed and no request can be in flight.\n if (this.models.length > 0) registerModels(...this.models);\n else warnIfModelsAreRegisteredButUndeclared();\n\n this.app.config.merge(this.config);\n Application.setInstance(this.app);\n this.app.registerMany([...frameworkProviders, ...this.providers]);\n this.registerServices();\n }\n\n /**\n * Constructs every listed service and binds it into the container. Runs after\n * the providers have registered, so a provider's `boot()` can `inject()` one;\n * a `Service` constructor does no I/O, so doing this synchronously costs\n * nothing beyond the field initializers.\n */\n private registerServices() {\n // What a previous pass bound, so re-running this on the same kernel is not\n // mistaken for a collision with something else.\n const ours = this.serviceTokens;\n\n this.serviceInstances = [];\n this.serviceTokens = new Set();\n this.servicesBooted = false;\n\n const owners = new Map<string, string>();\n\n for (const declaration of this.services) {\n const instance =\n typeof declaration === \"function\" ? new declaration() : declaration;\n const ctor = instance.constructor as ServiceConstructor;\n\n if (!ctor.token) {\n throw new Error(\n `Service [${ctor.name}] is listed in \\`services\\` but does not declare a \\`static token\\`.`,\n );\n }\n\n // Two services under one token is the failure this refuses to have\n // silently: the second would replace the first in the container, and\n // every `inject()` written against either would hand back whichever was\n // listed last.\n const owner = owners.get(ctor.token);\n if (owner) {\n throw new Error(\n `Services [${owner}] and [${ctor.name}] both declare the token \"${ctor.token}\". Tokens are the container's keys, so they must be unique.`,\n );\n }\n owners.set(ctor.token, ctor.name);\n\n // The same failure one level out. `Container.instance()` writes into\n // `instances`, which `make()` consults before `bindings`, so a token that\n // is already spoken for is not shared with its owner — it replaces it, for\n // every `app()` and `inject()` in the process. An app service that named\n // itself \"mail\" would leave `Mail.send()` resolving to an object with no\n // `send`, and the boot that caused it would report nothing. Providers have\n // all registered by now, so anything bound here belongs to somebody else.\n const token = ctor as unknown as ServiceToken<Service>;\n if (!ours.has(ctor.token) && this.app.bound(token)) {\n throw new Error(\n `Service [${ctor.name}] declares the token \"${ctor.token}\", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`,\n );\n }\n\n this.app.instance(token, instance);\n this.serviceInstances.push(instance);\n this.serviceTokens.add(ctor.token);\n }\n }\n\n /**\n * Phase two, asynchronous: every provider's `boot()` runs, in registration\n * order, after all of them have registered. Idempotent.\n */\n async waitForBoot() {\n await this.app.boot();\n await this.bootServices();\n // Last, once every job — queued listeners included — is registered.\n startClaimingIfServing(this.app);\n }\n\n /**\n * Phase two for services, after every provider's `boot()` — so a service may\n * use the facades and anything else a provider owns. Idempotent, like the\n * provider phase it follows.\n */\n private async bootServices() {\n if (this.servicesBooted) {\n return;\n }\n for (const service of this.serviceInstances) {\n await service.boot();\n }\n this.servicesBooted = true;\n }\n\n /**\n * Every provider's `shutdown()`, in reverse registration order, inside the\n * application context — so a hook may use the facades, as a cron tick or a\n * request would. See `Application.shutdown` for the deadline and the\n * report. Idempotent.\n */\n shutdown(options?: { timeoutMs?: number }): Promise<ShutdownReport> {\n return this.run(() => this.app.shutdown(options));\n }\n\n run<T>(cb: () => T) {\n return kernelContext.run(this.app, cb);\n }\n\n /**\n * Resolve a service by token. Callers outside this module should prefer the\n * named accessors below or `app()`; this exists for tooling that holds a\n * Kernel but no ambient context.\n */\n resolve<T>(token: ServiceToken<T>): T {\n return this.app.make(token);\n }\n\n // Named accessors. `app/App.ts` goes through these rather than importing the\n // service classes itself — see the note in that file about the two copies of\n // gemi that coexist at build time.\n apiRoutes(): ApiRouteDispatcher {\n return this.app.make(ApiRouteDispatcher);\n }\n\n viewRoutes(): ViewRouteDispatcher {\n return this.app.make(ViewRouteDispatcher);\n }\n\n domains(): DomainRouter {\n return this.app.make(DomainRouter);\n }\n\n queue(): QueueManager {\n return this.app.make(QueueManager);\n }\n\n /** The `global` middleware list for one request. Call it inside `run`. */\n globalMiddleware(req: Request) {\n return runGlobalMiddleware(req);\n }\n\n destroy() {\n // Only touch services that were actually resolved — resolving one here\n // would construct it purely to tear it down.\n if (this.app.resolved(Scheduler)) {\n this.app.make(Scheduler).stop();\n }\n\n this.app.flush();\n\n if (Application.getInstance() === this.app) {\n Application.setInstance(undefined);\n }\n\n kernelContext.disable();\n }\n}\n\n/**\n * Says something to an application that has models and has not declared them.\n *\n * Without this the fix for #316 defaults to off. `models` is `[]`, `boot()`\n * no-ops, and an app upgrading from 0.48 is in exactly the state the issue\n * describes until somebody edits their Kernel by hand — while the only place\n * that says to is the **Setup** section of `docs/orm.md`, which an existing app\n * read once and will not read again. #316 was filed by an app mid-migration\n * with a 79-model schema, which is precisely the reader who never sees it.\n *\n * The condition is what makes this worth printing. A populated registry with an\n * empty `models` means the generated `index.ts` was imported and its bases are\n * what every nested read resolves to — so if any policy lives on a subclass, it\n * is being skipped inside includes right now. A Kernel with no ORM at all has\n * an empty registry and hears nothing.\n *\n * Development only, and a warning rather than a throw: an app in this state is\n * running today, and turning a working deploy into a failure to start over an\n * arrangement that *might* be fine is not a patch-level thing to do. The\n * failure it points at is silent, so the fix for it has to be noisy somewhere,\n * and the terminal an author is already looking at is the cheapest somewhere\n * there is.\n */\nfunction warnIfModelsAreRegisteredButUndeclared(): void {\n if (process.env.NODE_ENV === \"production\") return;\n\n const registered = registeredNames();\n if (registered.length === 0) return;\n\n console.warn(\n `[gemi] ${registered.length} model${registered.length === 1 ? \" is\" : \"s are\"} ` +\n `registered, but Kernel.models is empty.\\n` +\n ` Nested relation reads resolve a model by name, so a policy on a ` +\n `subclass that does not own its\\n` +\n ` name is skipped inside every include — scoped at the root, ` +\n `unscoped in an include, with nothing\\n` +\n ` to notice it. Declaring the modules registers each class under ` +\n `its own name and audits the set:\\n\\n` +\n ` import * as generated from \"../models/generated\"\\n` +\n ` import * as models from \"../models\"\\n\\n` +\n ` export default class extends Kernel {\\n` +\n ` models = [generated, models]\\n` +\n ` }\\n\\n` +\n ` See docs/orm.md#your-model-class. Development only; this never ` +\n `prints in production.`,\n );\n}\n"
8
8
  ],
9
9
  "mappings": ";g2CAqCA,IAAS,HAAe,JAAC,HAAoB,JAC3C,DAAM,HA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