gemi 0.136.0 → 0.137.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 (220) hide show
  1. package/dist/ai/Agent.d.ts +48 -5
  2. package/dist/ai/Agent.d.ts.map +1 -1
  3. package/dist/ai/AgentController.d.ts +42 -2
  4. package/dist/ai/AgentController.d.ts.map +1 -1
  5. package/dist/ai/index.d.ts +3 -1
  6. package/dist/ai/index.d.ts.map +1 -1
  7. package/dist/ai/index.js +85 -18
  8. package/dist/ai/index.js.map +5 -4
  9. package/dist/ai/memory/AgentMemories.d.ts +226 -0
  10. package/dist/ai/memory/AgentMemories.d.ts.map +1 -0
  11. package/dist/ai/memory/AgentMemoryStore.d.ts +182 -0
  12. package/dist/ai/memory/AgentMemoryStore.d.ts.map +1 -0
  13. package/dist/ai/memory/DatabaseAgentMemoryStore.d.ts +76 -0
  14. package/dist/ai/memory/DatabaseAgentMemoryStore.d.ts.map +1 -0
  15. package/dist/ai/memory/contextBlock.d.ts +32 -0
  16. package/dist/ai/memory/contextBlock.d.ts.map +1 -0
  17. package/dist/ai/memory/index.d.ts +6 -0
  18. package/dist/ai/memory/index.d.ts.map +1 -0
  19. package/dist/ai/memory/runMemory.d.ts +355 -0
  20. package/dist/ai/memory/runMemory.d.ts.map +1 -0
  21. package/dist/ai/memory/safety.d.ts +34 -0
  22. package/dist/ai/memory/safety.d.ts.map +1 -0
  23. package/dist/ai/memory/search.d.ts +23 -0
  24. package/dist/ai/memory/search.d.ts.map +1 -0
  25. package/dist/app/index.js +1 -1
  26. package/dist/bun/plugin.js +1 -1
  27. package/dist/bun/preload.js +1 -1
  28. package/dist/{chunk-rnp5k8m3.js → chunk-038xtqpm.js} +2 -2
  29. package/dist/{chunk-rnp5k8m3.js.map → chunk-038xtqpm.js.map} +1 -1
  30. package/dist/{chunk-5pdgh9a1.js → chunk-26yghzet.js} +2 -2
  31. package/dist/{chunk-5pdgh9a1.js.map → chunk-26yghzet.js.map} +1 -1
  32. package/dist/{chunk-ha15x5ns.js → chunk-27xv8kty.js} +2 -2
  33. package/dist/{chunk-ha15x5ns.js.map → chunk-27xv8kty.js.map} +1 -1
  34. package/dist/{chunk-k2xeskp6.js → chunk-3jkem5gq.js} +2 -2
  35. package/dist/{chunk-k2xeskp6.js.map → chunk-3jkem5gq.js.map} +1 -1
  36. package/dist/{chunk-q15f5g86.js → chunk-46bwknb5.js} +3 -3
  37. package/dist/{chunk-q15f5g86.js.map → chunk-46bwknb5.js.map} +1 -1
  38. package/dist/{chunk-8sde8337.js → chunk-4jc7wbet.js} +2 -2
  39. package/dist/{chunk-8sde8337.js.map → chunk-4jc7wbet.js.map} +1 -1
  40. package/dist/{chunk-3dpmkxp7.js → chunk-4zjtbgnr.js} +2 -2
  41. package/dist/{chunk-3dpmkxp7.js.map → chunk-4zjtbgnr.js.map} +1 -1
  42. package/dist/{chunk-feajsgns.js → chunk-5benn2ys.js} +3 -3
  43. package/dist/{chunk-feajsgns.js.map → chunk-5benn2ys.js.map} +1 -1
  44. package/dist/{chunk-rzqft8q8.js → chunk-6qzyq0g5.js} +2 -2
  45. package/dist/{chunk-rzqft8q8.js.map → chunk-6qzyq0g5.js.map} +1 -1
  46. package/dist/{chunk-6qty7at2.js → chunk-78zfqt54.js} +2 -2
  47. package/dist/{chunk-6qty7at2.js.map → chunk-78zfqt54.js.map} +1 -1
  48. package/dist/{chunk-ysc7ykss.js → chunk-7d26eqv1.js} +2 -2
  49. package/dist/{chunk-ysc7ykss.js.map → chunk-7d26eqv1.js.map} +1 -1
  50. package/dist/{chunk-6fr6j338.js → chunk-7t7jh8t2.js} +2 -2
  51. package/dist/{chunk-6fr6j338.js.map → chunk-7t7jh8t2.js.map} +1 -1
  52. package/dist/{chunk-xvvsc58s.js → chunk-7vxeqxxr.js} +2 -2
  53. package/dist/{chunk-xvvsc58s.js.map → chunk-7vxeqxxr.js.map} +1 -1
  54. package/dist/{chunk-zyhmn3hy.js → chunk-80fjsb26.js} +3 -3
  55. package/dist/{chunk-zyhmn3hy.js.map → chunk-80fjsb26.js.map} +1 -1
  56. package/dist/{chunk-xymr3asa.js → chunk-85k70cme.js} +3 -3
  57. package/dist/{chunk-xymr3asa.js.map → chunk-85k70cme.js.map} +1 -1
  58. package/dist/{chunk-ka991yx4.js → chunk-8dmhbj4m.js} +2 -2
  59. package/dist/{chunk-ka991yx4.js.map → chunk-8dmhbj4m.js.map} +1 -1
  60. package/dist/{chunk-8ryrjtn0.js → chunk-8ef5c93d.js} +2 -2
  61. package/dist/{chunk-8ryrjtn0.js.map → chunk-8ef5c93d.js.map} +1 -1
  62. package/dist/{chunk-t33yh84d.js → chunk-8p4t8x9c.js} +2 -2
  63. package/dist/{chunk-t33yh84d.js.map → chunk-8p4t8x9c.js.map} +1 -1
  64. package/dist/{chunk-7nxnyw7x.js → chunk-965gfa41.js} +2 -2
  65. package/dist/{chunk-7nxnyw7x.js.map → chunk-965gfa41.js.map} +1 -1
  66. package/dist/{chunk-swwkdm75.js → chunk-974p7em0.js} +2 -2
  67. package/dist/{chunk-swwkdm75.js.map → chunk-974p7em0.js.map} +1 -1
  68. package/dist/{chunk-krk880my.js → chunk-9s203ks3.js} +2 -2
  69. package/dist/{chunk-krk880my.js.map → chunk-9s203ks3.js.map} +1 -1
  70. package/dist/{chunk-0eamc2tr.js → chunk-9wc53ywv.js} +2 -2
  71. package/dist/{chunk-0eamc2tr.js.map → chunk-9wc53ywv.js.map} +1 -1
  72. package/dist/{chunk-hb9hm8za.js → chunk-a2fhbstt.js} +3 -3
  73. package/dist/{chunk-hb9hm8za.js.map → chunk-a2fhbstt.js.map} +1 -1
  74. package/dist/{chunk-cxsvzqd4.js → chunk-aj2sr77y.js} +2 -2
  75. package/dist/{chunk-cxsvzqd4.js.map → chunk-aj2sr77y.js.map} +1 -1
  76. package/dist/{chunk-0gg4e94v.js → chunk-an1nja68.js} +2 -2
  77. package/dist/{chunk-0gg4e94v.js.map → chunk-an1nja68.js.map} +1 -1
  78. package/dist/{chunk-jy9dkgt0.js → chunk-ant9ck0r.js} +2 -2
  79. package/dist/{chunk-jy9dkgt0.js.map → chunk-ant9ck0r.js.map} +1 -1
  80. package/dist/chunk-atmw5c0q.js +28 -0
  81. package/dist/chunk-atmw5c0q.js.map +27 -0
  82. package/dist/{chunk-sa6cxt3g.js → chunk-bg0e39dk.js} +2 -2
  83. package/dist/{chunk-sa6cxt3g.js.map → chunk-bg0e39dk.js.map} +1 -1
  84. package/dist/{chunk-1awxdnb6.js → chunk-c0m8pcbd.js} +1 -1
  85. package/dist/{chunk-65j32dtn.js → chunk-c6c7p43e.js} +2 -2
  86. package/dist/{chunk-65j32dtn.js.map → chunk-c6c7p43e.js.map} +1 -1
  87. package/dist/{chunk-x9bk5s21.js → chunk-c83e4ghx.js} +2 -2
  88. package/dist/{chunk-x9bk5s21.js.map → chunk-c83e4ghx.js.map} +1 -1
  89. package/dist/{chunk-jgx8ggbz.js → chunk-cedmppcy.js} +2 -2
  90. package/dist/{chunk-jgx8ggbz.js.map → chunk-cedmppcy.js.map} +1 -1
  91. package/dist/{chunk-wrsf2abe.js → chunk-chyt9th4.js} +2 -2
  92. package/dist/{chunk-wrsf2abe.js.map → chunk-chyt9th4.js.map} +1 -1
  93. package/dist/{chunk-qfra7gah.js → chunk-d368es1y.js} +2 -2
  94. package/dist/{chunk-qfra7gah.js.map → chunk-d368es1y.js.map} +1 -1
  95. package/dist/{chunk-dt95z6et.js → chunk-d492ae5e.js} +2 -2
  96. package/dist/{chunk-dt95z6et.js.map → chunk-d492ae5e.js.map} +1 -1
  97. package/dist/{chunk-beb265c9.js → chunk-e440f645.js} +2 -2
  98. package/dist/{chunk-beb265c9.js.map → chunk-e440f645.js.map} +1 -1
  99. package/dist/{chunk-njpnstck.js → chunk-eqzxvfvt.js} +2 -2
  100. package/dist/{chunk-njpnstck.js.map → chunk-eqzxvfvt.js.map} +1 -1
  101. package/dist/{chunk-99a4e6zf.js → chunk-f9w78tbd.js} +2 -2
  102. package/dist/{chunk-99a4e6zf.js.map → chunk-f9w78tbd.js.map} +1 -1
  103. package/dist/chunk-fjw51b91.js +10 -0
  104. package/dist/{chunk-3gx7wcrt.js.map → chunk-fjw51b91.js.map} +3 -3
  105. package/dist/chunk-fs4ntgdr.js +5 -0
  106. package/dist/{chunk-47e7fbsp.js.map → chunk-fs4ntgdr.js.map} +1 -1
  107. package/dist/{chunk-gng5e7pd.js → chunk-fwmmy0jn.js} +1 -1
  108. package/dist/{chunk-mw7ft5bs.js → chunk-g22q8j2s.js} +2 -2
  109. package/dist/{chunk-mw7ft5bs.js.map → chunk-g22q8j2s.js.map} +1 -1
  110. package/dist/{chunk-z9xxthp1.js → chunk-ghbzre7k.js} +3 -3
  111. package/dist/{chunk-z9xxthp1.js.map → chunk-ghbzre7k.js.map} +1 -1
  112. package/dist/{chunk-x5hj0mqp.js → chunk-gq4fr0zn.js} +3 -3
  113. package/dist/{chunk-x5hj0mqp.js.map → chunk-gq4fr0zn.js.map} +1 -1
  114. package/dist/{chunk-x51tegk3.js → chunk-gqcmnyc8.js} +2 -2
  115. package/dist/{chunk-x51tegk3.js.map → chunk-gqcmnyc8.js.map} +1 -1
  116. package/dist/{chunk-x16ckgq1.js → chunk-h0ydk8cc.js} +2 -2
  117. package/dist/{chunk-x16ckgq1.js.map → chunk-h0ydk8cc.js.map} +1 -1
  118. package/dist/{chunk-m9vwg9j1.js → chunk-jys3n8xv.js} +3 -3
  119. package/dist/{chunk-m9vwg9j1.js.map → chunk-jys3n8xv.js.map} +1 -1
  120. package/dist/{chunk-3h37f124.js → chunk-kpb8xvrv.js} +2 -2
  121. package/dist/{chunk-3h37f124.js.map → chunk-kpb8xvrv.js.map} +1 -1
  122. package/dist/{chunk-mpqvmge4.js → chunk-kzdkpz04.js} +1 -1
  123. package/dist/{chunk-0rhf4g12.js → chunk-md6wfc1h.js} +3 -3
  124. package/dist/{chunk-0rhf4g12.js.map → chunk-md6wfc1h.js.map} +1 -1
  125. package/dist/{chunk-s025aycr.js → chunk-n2czjpz9.js} +2 -2
  126. package/dist/{chunk-s025aycr.js.map → chunk-n2czjpz9.js.map} +1 -1
  127. package/dist/{chunk-ff60bzvf.js → chunk-n7576zsr.js} +3 -3
  128. package/dist/{chunk-ff60bzvf.js.map → chunk-n7576zsr.js.map} +1 -1
  129. package/dist/{chunk-s782bzeq.js → chunk-nbfksexg.js} +2 -2
  130. package/dist/{chunk-s782bzeq.js.map → chunk-nbfksexg.js.map} +1 -1
  131. package/dist/{chunk-p82868xx.js → chunk-p1y58p84.js} +2 -2
  132. package/dist/{chunk-p82868xx.js.map → chunk-p1y58p84.js.map} +1 -1
  133. package/dist/{chunk-zv5qyrqg.js → chunk-p2c7z2nr.js} +2 -2
  134. package/dist/{chunk-zv5qyrqg.js.map → chunk-p2c7z2nr.js.map} +1 -1
  135. package/dist/{chunk-vnw91fe1.js → chunk-pv2mtg8n.js} +2 -2
  136. package/dist/{chunk-vnw91fe1.js.map → chunk-pv2mtg8n.js.map} +1 -1
  137. package/dist/{chunk-jx5zx48j.js → chunk-qfhcec6q.js} +2 -2
  138. package/dist/{chunk-jx5zx48j.js.map → chunk-qfhcec6q.js.map} +1 -1
  139. package/dist/{chunk-6hz63ts4.js → chunk-qk6vmvr2.js} +4 -4
  140. package/dist/{chunk-6hz63ts4.js.map → chunk-qk6vmvr2.js.map} +1 -1
  141. package/dist/{chunk-w1cksc5z.js → chunk-qvx8473q.js} +3 -3
  142. package/dist/{chunk-w1cksc5z.js.map → chunk-qvx8473q.js.map} +1 -1
  143. package/dist/{chunk-4278e429.js → chunk-rqb52m93.js} +2 -2
  144. package/dist/{chunk-4278e429.js.map → chunk-rqb52m93.js.map} +1 -1
  145. package/dist/{chunk-py1twqh8.js → chunk-skmdmqv7.js} +2 -2
  146. package/dist/{chunk-py1twqh8.js.map → chunk-skmdmqv7.js.map} +1 -1
  147. package/dist/{chunk-04tkpna8.js → chunk-t0p6zb29.js} +2 -2
  148. package/dist/{chunk-04tkpna8.js.map → chunk-t0p6zb29.js.map} +1 -1
  149. package/dist/{chunk-53rr32zm.js → chunk-ted0qjps.js} +1 -1
  150. package/dist/{chunk-hj88dcss.js → chunk-v4dp93qv.js} +3 -3
  151. package/dist/{chunk-hj88dcss.js.map → chunk-v4dp93qv.js.map} +1 -1
  152. package/dist/{chunk-33hdxe7v.js → chunk-vmr4d6hc.js} +1 -1
  153. package/dist/{chunk-3g5q0cj5.js → chunk-vz5rrcnh.js} +2 -2
  154. package/dist/{chunk-3g5q0cj5.js.map → chunk-vz5rrcnh.js.map} +1 -1
  155. package/dist/{chunk-pm8wjatv.js → chunk-w17p2k8g.js} +3 -3
  156. package/dist/{chunk-pm8wjatv.js.map → chunk-w17p2k8g.js.map} +1 -1
  157. package/dist/{chunk-j5g7qc5f.js → chunk-wbvb1hcx.js} +2 -2
  158. package/dist/{chunk-j5g7qc5f.js.map → chunk-wbvb1hcx.js.map} +1 -1
  159. package/dist/{chunk-t8xs9ptb.js → chunk-x1j7e46e.js} +2 -2
  160. package/dist/{chunk-t8xs9ptb.js.map → chunk-x1j7e46e.js.map} +1 -1
  161. package/dist/{chunk-jx2mgvvt.js → chunk-xwmy6fby.js} +3 -3
  162. package/dist/{chunk-jx2mgvvt.js.map → chunk-xwmy6fby.js.map} +1 -1
  163. package/dist/{chunk-z61dj480.js → chunk-y6gr3stt.js} +3 -3
  164. package/dist/{chunk-z61dj480.js.map → chunk-y6gr3stt.js.map} +1 -1
  165. package/dist/{chunk-4t41m5f1.js → chunk-yhp70t40.js} +2 -2
  166. package/dist/{chunk-4t41m5f1.js.map → chunk-yhp70t40.js.map} +1 -1
  167. package/dist/{chunk-zypmy8yq.js → chunk-z0jazehw.js} +2 -2
  168. package/dist/{chunk-zypmy8yq.js.map → chunk-z0jazehw.js.map} +1 -1
  169. package/dist/{chunk-541s0vkt.js → chunk-z19rwc6x.js} +5 -5
  170. package/dist/{chunk-541s0vkt.js.map → chunk-z19rwc6x.js.map} +1 -1
  171. package/dist/{chunk-gqgpwb88.js → chunk-z969a4nt.js} +2 -2
  172. package/dist/{chunk-gqgpwb88.js.map → chunk-z969a4nt.js.map} +1 -1
  173. package/dist/{chunk-hf492gg2.js → chunk-zj8y4ak5.js} +1 -1
  174. package/dist/{chunk-qpwb3gnh.js → chunk-zvzvgrrn.js} +2 -2
  175. package/dist/{chunk-qpwb3gnh.js.map → chunk-zvzvgrrn.js.map} +1 -1
  176. package/dist/config/index.js +1 -1
  177. package/dist/console/run.js +2 -2
  178. package/dist/console/run.js.map +1 -1
  179. package/dist/container/index.js +2 -2
  180. package/dist/container/index.js.map +1 -1
  181. package/dist/database/index.js +2 -2
  182. package/dist/database/index.js.map +1 -1
  183. package/dist/email/index.js +2 -2
  184. package/dist/email/index.js.map +1 -1
  185. package/dist/facades/index.js +2 -2
  186. package/dist/facades/index.js.map +1 -1
  187. package/dist/foundation/index.js +2 -2
  188. package/dist/foundation/index.js.map +1 -1
  189. package/dist/http/index.js +2 -2
  190. package/dist/http/index.js.map +1 -1
  191. package/dist/i18n/dictionaryRuntime.js +2 -2
  192. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  193. package/dist/i18n/index.js +2 -2
  194. package/dist/i18n/index.js.map +1 -1
  195. package/dist/kernel/index.js +2 -2
  196. package/dist/kernel/index.js.map +1 -1
  197. package/dist/orm/index.js +2 -2
  198. package/dist/orm/index.js.map +1 -1
  199. package/dist/server/index.js +2 -2
  200. package/dist/server/index.js.map +1 -1
  201. package/dist/services/index.js +2 -2
  202. package/dist/services/index.js.map +1 -1
  203. package/dist/services/mcp/McpRegistry.d.ts.map +1 -1
  204. package/dist/services/queue/work.js +2 -2
  205. package/dist/services/queue/work.js.map +1 -1
  206. package/dist/stats/route-table.js +1 -1
  207. package/dist/support/index.js +2 -2
  208. package/dist/support/index.js.map +1 -1
  209. package/dist/vitest/index.js +1 -1
  210. package/package.json +1 -1
  211. package/dist/chunk-2cnawkke.js +0 -22
  212. package/dist/chunk-2cnawkke.js.map +0 -21
  213. package/dist/chunk-3gx7wcrt.js +0 -10
  214. package/dist/chunk-47e7fbsp.js +0 -5
  215. /package/dist/{chunk-1awxdnb6.js.map → chunk-c0m8pcbd.js.map} +0 -0
  216. /package/dist/{chunk-gng5e7pd.js.map → chunk-fwmmy0jn.js.map} +0 -0
  217. /package/dist/{chunk-mpqvmge4.js.map → chunk-kzdkpz04.js.map} +0 -0
  218. /package/dist/{chunk-53rr32zm.js.map → chunk-ted0qjps.js.map} +0 -0
  219. /package/dist/{chunk-33hdxe7v.js.map → chunk-vmr4d6hc.js.map} +0 -0
  220. /package/dist/{chunk-hf492gg2.js.map → chunk-zj8y4ak5.js.map} +0 -0
@@ -0,0 +1,355 @@
1
+ import type { Schema } from "../Schema";
2
+ import type { AgentMemoryKind, AgentMemoryRecord, AgentMemoryWriteAction } from "./AgentMemoryStore";
3
+ /** One scope an agent declares: a label the model sees, and what it is for. */
4
+ export type AgentMemoryScopeOptions = {
5
+ /** What the model is told the scope is for. One sentence. */
6
+ description: string;
7
+ /**
8
+ * Whether the model may write here with `remember` and `forget`. Default
9
+ * `true`. `false` makes the scope read-only for the model: it is still in
10
+ * the `<memory>` block and `recall`, and a tool's `ctx.memory` can still
11
+ * write to it.
12
+ */
13
+ write?: boolean;
14
+ /** The kinds the model may write here. Default `fact`, `preference` and `note`. */
15
+ kinds?: readonly string[];
16
+ /**
17
+ * Whether the model may change or delete a note the app wrote here
18
+ * (`source.by: "app"`, from `AgentMemories.put` or a tool's
19
+ * `ctx.memory.remember`). Default `false`: those notes are the app's, and a
20
+ * `remember` with the same `key` (or `replaces` naming one), or a `forget`
21
+ * of one, is turned down with `action: "app-managed"` and the note is left
22
+ * as it is. `true` lets the model correct them like its own notes.
23
+ */
24
+ replaceAppNotes?: boolean;
25
+ };
26
+ /** A built-in tool: on, off, or on behind the user's approval. */
27
+ export type AgentMemoryToolOption = boolean | {
28
+ requiresApproval?: boolean;
29
+ };
30
+ /**
31
+ * `Agent.create({ memory })` (#936): the scopes an agent remembers in, the
32
+ * `<memory>` block, the built-in tools and their limits.
33
+ *
34
+ * memory: {
35
+ * scopes: {
36
+ * project: { description: "This business and its brand: facts, tone, preferences." },
37
+ * user: { description: "The person, across their projects.", write: false },
38
+ * },
39
+ * maxTokens: 1500,
40
+ * }
41
+ *
42
+ * The labels are what the model sees. Which scope keys they stand for is
43
+ * decided per run, on the server: `AgentController.memoryScopes()`, or
44
+ * `memory.scopes` on `Agent.stream`. A label the run does not resolve is off
45
+ * for that run: not in the block, not in the tools.
46
+ */
47
+ export type AgentMemoryOptions = {
48
+ /**
49
+ * Labels and what each is for. Lowercase letters, digits and `_`. A
50
+ * `thread` label is resolved to the run's thread (`thread:<threadId>`)
51
+ * when the run has one and the caller does not resolve it otherwise.
52
+ */
53
+ scopes: Readonly<Record<string, AgentMemoryScopeOptions>>;
54
+ /**
55
+ * The `<memory>` block's budget, in tokens (about four characters each).
56
+ * Default 1,500. `0` leaves the block out. A run may set its own
57
+ * (`Agent.stream({ memory: { maxTokens } })`, or the controller's
58
+ * `memoryMaxTokens`).
59
+ */
60
+ maxTokens?: number;
61
+ /**
62
+ * Which kinds the block lists: all of them by default. `false` leaves the
63
+ * block out; the tools still work, and the model finds memories with
64
+ * `recall`.
65
+ */
66
+ context?: {
67
+ kinds?: readonly string[];
68
+ } | false;
69
+ /**
70
+ * The built-in `remember`, `forget` and `recall` tools, in the reserved
71
+ * `memory` namespace. All on by default and none needs approval;
72
+ * `{ remember: { requiresApproval: true } }` asks the user first.
73
+ * `false` turns all three off, leaving the block and `ctx.memory`.
74
+ */
75
+ tools?: boolean | {
76
+ remember?: AgentMemoryToolOption;
77
+ forget?: AgentMemoryToolOption;
78
+ recall?: boolean;
79
+ };
80
+ /** The limits on what one run may write. See `DEFAULT_MEMORY_LIMITS`. */
81
+ limits?: {
82
+ /** The longest content, in characters. Default 500. */
83
+ maxChars?: number;
84
+ /** The most memories a scope may hold before an agent may add another. Default 200. */
85
+ maxPerScope?: number;
86
+ /** The most writes (`remember` and `forget`) one run may make, its sub-runs included. Default 10. */
87
+ maxWritesPerRun?: number;
88
+ };
89
+ };
90
+ /**
91
+ * Labels resolved to scope keys for one run, e.g.
92
+ * `{ project: "project:clx…", user: null }`. `null`, `undefined` or a
93
+ * missing label: that label is off for the run.
94
+ */
95
+ export type AgentMemoryScopes = Record<string, string | null | undefined>;
96
+ /** `Agent.stream({ memory })`. */
97
+ export type AgentRunMemoryParams = {
98
+ /** The run's scope keys, by label. Decided on the server; never from the client. */
99
+ scopes: AgentMemoryScopes;
100
+ /** The `<memory>` block's budget for this run, overriding the agent's. */
101
+ maxTokens?: number;
102
+ };
103
+ export declare const DEFAULT_MEMORY_LIMITS: {
104
+ readonly maxChars: 500;
105
+ readonly maxPerScope: 200;
106
+ readonly maxWritesPerRun: 10;
107
+ };
108
+ /** The kinds the model may write when a scope does not say. */
109
+ export declare const DEFAULT_MEMORY_TOOL_KINDS: readonly ["fact", "preference", "note"];
110
+ /** Reserved: the built-in memory tools are lowered into a namespace of exactly this name. */
111
+ export declare const MEMORY_NAMESPACE = "memory";
112
+ export declare const MEMORY_NAMESPACE_DESCRIPTION = "Long-term memory: short notes kept across conversations with this user. Save what the user tells you to remember or clearly states as lasting (facts, preferences, corrections), forget what is wrong or outdated, and search the notes that are not shown.";
113
+ /** The built-in tools' names. Global within an agent, like every tool name. */
114
+ export declare const MEMORY_TOOL_NAMES: readonly ["remember", "forget", "recall"];
115
+ /** Throws at `Agent.create` for a declaration that cannot work. */
116
+ export declare function assertMemoryOptions(agent: string, options: AgentMemoryOptions): void;
117
+ /** Which built-in tools a declaration turns on. */
118
+ export declare function memoryToolsEnabled(options: AgentMemoryOptions): {
119
+ remember: {
120
+ requiresApproval: boolean;
121
+ } | null;
122
+ forget: {
123
+ requiresApproval: boolean;
124
+ } | null;
125
+ recall: boolean;
126
+ };
127
+ export type RememberInput = {
128
+ scope: string;
129
+ kind: string;
130
+ content: string;
131
+ key?: string;
132
+ replaces?: string;
133
+ tags?: string[];
134
+ };
135
+ /**
136
+ * What `remember` answers, and what a UI reads off the tool part to show
137
+ * "Saved to memory · Undo": `part.name === "remember"`, then `part.output`.
138
+ * `scope` is the label, never the key. Undo calls the app's own route, which
139
+ * calls `AgentMemories.delete(id)`.
140
+ */
141
+ export type RememberResult = {
142
+ id: string;
143
+ /** The label, e.g. `project`. */
144
+ scope: string;
145
+ kind: string;
146
+ content: string;
147
+ key: string | null;
148
+ action: AgentMemoryWriteAction;
149
+ } | AppManagedResult;
150
+ /**
151
+ * A `remember` or `forget` that would have changed a note the app wrote,
152
+ * in a scope without `replaceAppNotes`. Nothing was written: the fields
153
+ * describe the app's note as it stands, and `message` tells the model why.
154
+ * A UI shows nothing (there is nothing to undo).
155
+ */
156
+ export type AppManagedResult = {
157
+ id: string;
158
+ scope: string;
159
+ kind: string;
160
+ content: string;
161
+ key: string | null;
162
+ action: "app-managed";
163
+ message: string;
164
+ };
165
+ export type ForgetInput = {
166
+ id: string;
167
+ reason?: string;
168
+ };
169
+ /** What `forget` answers. */
170
+ export type ForgetResult = {
171
+ id: string;
172
+ scope: string;
173
+ content: string;
174
+ action: "forgotten";
175
+ } | AppManagedResult;
176
+ export type RecallInput = {
177
+ query: string;
178
+ scope?: string;
179
+ kinds?: string[];
180
+ limit?: number;
181
+ };
182
+ /** What `recall` answers. */
183
+ export type RecallResult = {
184
+ memories: {
185
+ id: string;
186
+ scope: string;
187
+ kind: string;
188
+ content: string;
189
+ key: string | null;
190
+ /** ISO 8601, UTC. */
191
+ updatedAt: string;
192
+ }[];
193
+ };
194
+ /**
195
+ * The built-in tools' shapes, added to an agent's tool shapes when it
196
+ * declares `memory`, so the client's tool parts are typed:
197
+ *
198
+ * if (part.type === "tool-result" && part.name === "remember") part.output.content;
199
+ */
200
+ export type MemoryToolShapes = {
201
+ remember: {
202
+ input: RememberInput;
203
+ output: RememberResult;
204
+ progress: never;
205
+ };
206
+ forget: {
207
+ input: ForgetInput;
208
+ output: ForgetResult;
209
+ progress: never;
210
+ };
211
+ recall: {
212
+ input: RecallInput;
213
+ output: RecallResult;
214
+ progress: never;
215
+ };
216
+ };
217
+ /**
218
+ * The tools' input schemas, built for the labels a run has. The scope is an
219
+ * enum of labels, so the model cannot name a key, and a label the run did
220
+ * not resolve is not a value it can send.
221
+ */
222
+ export declare function memoryToolSchema(name: (typeof MEMORY_TOOL_NAMES)[number], params: {
223
+ scopes: readonly string[];
224
+ descriptions: string;
225
+ kinds: readonly string[];
226
+ }): Schema<any>;
227
+ export declare const REMEMBER_DESCRIPTION = "Save a short note to long-term memory, so later conversations know it. Use it when the user asks you to remember something, corrects you, or states a lasting fact or preference; not for one-off requests about the current task. Only save what the user said or clearly confirmed, one fact per note, never passwords, keys or card numbers. Update an existing note (same key, or `replaces`) rather than saving a near-duplicate. The user sees each saved note and can undo it.";
228
+ export declare const FORGET_DESCRIPTION = "Delete a note from long-term memory by its id: when the user asks you to forget it, or it turned out wrong or outdated.";
229
+ export declare const RECALL_DESCRIPTION = "Search long-term memory for notes that are not shown in the <memory> block. Keyword search: use the words the note would contain.";
230
+ /**
231
+ * `ctx.memory`: the run's memory, for a tool (#936).
232
+ *
233
+ * Shaped like `ctx.attachments`: always present, and none of its methods
234
+ * takes a scope key. A tool names a scope by its label (`"project"`), the
235
+ * run maps it to the key the server resolved, and a label the run does not
236
+ * have is a `ToolError` ("No project memory in this conversation"). An id
237
+ * from another scope reads as not found, with the same words as an unknown
238
+ * id. So nothing a model puts in a tool's arguments can reach another
239
+ * tenant's memories.
240
+ *
241
+ * Reads are for passing memories on where there is no `<memory>` block: a
242
+ * `ctx.generate` sub-call, a prompt a tool builds.
243
+ *
244
+ * const prefs = await ctx.memory.list("project", { kinds: ["preference"], tags: ["pictures"] });
245
+ */
246
+ export interface ToolMemory {
247
+ /** The labels this run has, in the order the agent declares them. */
248
+ readonly scopes: readonly string[];
249
+ /** Whether the run has this label. */
250
+ has(scope: string): boolean;
251
+ /** A scope's memories, oldest first. Without a scope, every scope's. */
252
+ list(scope?: string, options?: {
253
+ kinds?: readonly string[];
254
+ tags?: readonly string[];
255
+ limit?: number;
256
+ }): Promise<AgentMemoryRecord[]>;
257
+ /** Keyword search, best first, across the run's scopes or one of them. */
258
+ recall(query: string, options?: {
259
+ scope?: string;
260
+ kinds?: readonly string[];
261
+ tags?: readonly string[];
262
+ limit?: number;
263
+ }): Promise<AgentMemoryRecord[]>;
264
+ /** A memory of the run's scopes, or `null`. */
265
+ get(id: string): Promise<AgentMemoryRecord | null>;
266
+ /**
267
+ * Saves a memory, as the app (`source.by: "app"`), held to the same checks
268
+ * and limits as the model's `remember`: length, secrets, the scope's size
269
+ * and the run's writes. A scope the agent declares read-only for the model
270
+ * (`write: false`) may still be written here.
271
+ */
272
+ remember(params: {
273
+ scope: string;
274
+ kind: AgentMemoryKind;
275
+ content: string;
276
+ key?: string;
277
+ tags?: string[];
278
+ pinned?: boolean;
279
+ replaces?: string;
280
+ }): Promise<{
281
+ record: AgentMemoryRecord;
282
+ action: AgentMemoryWriteAction;
283
+ }>;
284
+ /** Hard-deletes a memory of the run's scopes. `false` when there was none. */
285
+ forget(id: string): Promise<boolean>;
286
+ }
287
+ /** What only the built-in tools may call, behind a symbol `ctx.memory` does not show. */
288
+ export declare const MEMORY_TOOL_ACCESS: unique symbol;
289
+ type ToolAccess = {
290
+ remember(input: RememberInput): Promise<RememberResult>;
291
+ forget(input: ForgetInput): Promise<ForgetResult>;
292
+ recall(input: RecallInput): Promise<RecallResult>;
293
+ };
294
+ /** The internal half of `ctx.memory`, for the built-in tools. */
295
+ export declare function memoryToolAccess(memory: ToolMemory): ToolAccess;
296
+ /** Writes made by a run and its sub-runs, counted against `maxWritesPerRun`. */
297
+ export type MemoryWriteCounter = {
298
+ count: number;
299
+ };
300
+ /**
301
+ * One run's memory: its labels resolved to keys, its write counter, and the
302
+ * checks every write the run makes goes through.
303
+ */
304
+ export declare class RunMemory {
305
+ /** Resolved labels, in declared order. */
306
+ readonly labels: string[];
307
+ readonly writes: MemoryWriteCounter;
308
+ private readonly keys;
309
+ private readonly options;
310
+ private readonly limits;
311
+ private readonly origin;
312
+ constructor(params: {
313
+ options: AgentMemoryOptions | undefined;
314
+ scopes: AgentMemoryScopes | undefined;
315
+ agent: string;
316
+ runId: string;
317
+ threadId?: string;
318
+ writes?: MemoryWriteCounter;
319
+ });
320
+ /** Labels the model may write to: resolved and not `write: false`. */
321
+ writableLabels(): string[];
322
+ /** The kinds the model may write into any of its writable labels. */
323
+ toolKinds(): string[];
324
+ /** "project: …; user: …", for the tools' scope field. */
325
+ describeScopes(labels: readonly string[]): string;
326
+ /** The `<memory>` block for the run, or `null` when it has none. */
327
+ block(params: {
328
+ maxTokens: number;
329
+ recall: boolean;
330
+ tools: boolean;
331
+ }): Promise<string | null>;
332
+ /** `ctx.memory` for one tool call. */
333
+ handle(source?: {
334
+ messageId?: string;
335
+ }): ToolMemory;
336
+ private allKeys;
337
+ private keyOf;
338
+ private labelOf;
339
+ /** A note the app wrote, in a scope where the model may not change those. */
340
+ private isAppManaged;
341
+ private appManaged;
342
+ private kindsFor;
343
+ /** A memory in one of `labels`' scopes (all of the run's by default), or `null`. */
344
+ private find;
345
+ private spend;
346
+ /**
347
+ * One write the run makes: checked, counted, then `writeMemory`. Every
348
+ * failure is a `ToolError` written for the model.
349
+ */
350
+ private write;
351
+ }
352
+ /** `ctx.memory` for a call with no run memory at all (a remote MCP call). */
353
+ export declare function noToolMemory(): ToolMemory;
354
+ export {};
355
+ //# sourceMappingURL=runMemory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runMemory.d.ts","sourceRoot":"","sources":["../../../ai/memory/runMemory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOxC,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAEjB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAe5B,+EAA+E;AAC/E,MAAM,MAAM,uBAAuB,GAAG;IACpC,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;I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ACW,KAAK;CAoHpB;AAQD,6EAA6E;AAC7E,wBAAgB,YAAY,IAAI,UAAU,CAEzC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * What an agent's memory write is checked against before it is stored
3
+ * (#936): the text has to be a short note and must not look like a secret.
4
+ *
5
+ * A memory is shown to the model on every later turn and to the user in the
6
+ * app's memory screen, and it outlives the conversation it came from. A
7
+ * password or an API key the user pasted once must not become one. The
8
+ * patterns below are the common shapes; `AgentMemories.use(store, {
9
+ * beforeWrite })` is where an app adds its own.
10
+ */
11
+ /**
12
+ * Why `content` must not be stored, or `null` when it may be: "an API key",
13
+ * "a card number", and so on. Never the matched text itself.
14
+ */
15
+ export declare function secretIn(content: string): string | null;
16
+ /** One line of text: whitespace and newlines collapsed, trimmed. */
17
+ export declare function oneLine(text: string): string;
18
+ /**
19
+ * Text as it may sit inside the `<memory>` block. A memory is the user's (or
20
+ * a web page's) words, so anything that could close the block or open
21
+ * another one (`</memory>`, `<system>`) is escaped, and it is kept to one line.
22
+ */
23
+ export declare function blockText(text: string): string;
24
+ /** Two contents that differ only in case, spacing and closing punctuation. */
25
+ export declare function normalizedContent(text: string): string;
26
+ /** `business.hours`, `brand.voice`: letters, digits and `._:-`, at most 100. */
27
+ export declare const MEMORY_KEY_PATTERN: RegExp;
28
+ /** `fact`, `preference`, an app's own: lowercase letters, digits, `_` and `-`, at most 32. */
29
+ export declare const MEMORY_KIND_PATTERN: RegExp;
30
+ /** A tag: like a key, at most 32. */
31
+ export declare const MEMORY_TAG_PATTERN: RegExp;
32
+ /** How many tags a memory may carry. */
33
+ export declare const MAX_MEMORY_TAGS = 10;
34
+ //# sourceMappingURL=safety.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../../ai/memory/safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA0BH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOvD;AAuCD,oEAAoE;AACpE,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,QAAuC,CAAC;AACvE,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAA4B,CAAC;AAC7D,qCAAqC;AACrC,eAAO,MAAM,kBAAkB,QAAuC,CAAC;AACvE,wCAAwC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { AgentMemoryRecord } from "./AgentMemoryStore";
2
+ /** How many memories `recall` answers when it is not told. */
3
+ export declare const DEFAULT_RECALL_LIMIT = 8;
4
+ /**
5
+ * Lowercased words with their accents folded, so "Öztürk" finds "ozturk" and
6
+ * "Cafe" finds "café". Letters and digits of any script count as word
7
+ * characters.
8
+ */
9
+ export declare function tokenize(text: string): string[];
10
+ /**
11
+ * Keyword search over a scope's memories (#936 P1): BM25 over each memory's
12
+ * content, key and tags, with a word that only starts the same way ("photo",
13
+ * "photos") counted at half weight, and a small bonus for the more recently
14
+ * changed memory to break ties.
15
+ *
16
+ * In JavaScript rather than in SQL because a scope is small (a couple of
17
+ * hundred memories at most) and the same code then ranks the same way on
18
+ * every database. A store may answer `search` with something better.
19
+ *
20
+ * Only memories that match at least one word are returned, best first.
21
+ */
22
+ export declare function rankMemories(records: readonly AgentMemoryRecord[], query: string, limit?: number): AgentMemoryRecord[];
23
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../ai/memory/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAetC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAM/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,MAA6B,GACnC,iBAAiB,EAAE,CAoDrB"}
package/dist/app/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Da as a}from"../chunk-sa6cxt3g.js";import"../chunk-99a4e6zf.js";import"../chunk-rnp5k8m3.js";export{a as App};
2
+ import{Da as a}from"../chunk-bg0e39dk.js";import"../chunk-f9w78tbd.js";import"../chunk-038xtqpm.js";export{a as App};
3
3
 
4
4
  //# debugId=F6AD769F4DAEBF5D64756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ea as a}from"../chunk-33hdxe7v.js";import"../chunk-hb9hm8za.js";import"../chunk-s782bzeq.js";import"../chunk-k2xeskp6.js";import"../chunk-rnp5k8m3.js";export{a as gemiPlugin};
2
+ import{ea as a}from"../chunk-vmr4d6hc.js";import"../chunk-a2fhbstt.js";import"../chunk-nbfksexg.js";import"../chunk-3jkem5gq.js";import"../chunk-038xtqpm.js";export{a as gemiPlugin};
3
3
 
4
4
  //# debugId=2B4506B393745EFE64756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ea as k}from"../chunk-33hdxe7v.js";import"../chunk-hb9hm8za.js";import"../chunk-s782bzeq.js";import"../chunk-k2xeskp6.js";import{ya as j}from"../chunk-r3v2cnrj.js";import"../chunk-rnp5k8m3.js";var{plugin:q}=globalThis.Bun;q(k());var y=await j(process.cwd());for(let x of y.bun?.plugins??[])q(x);
2
+ import{ea as k}from"../chunk-vmr4d6hc.js";import"../chunk-a2fhbstt.js";import"../chunk-nbfksexg.js";import"../chunk-3jkem5gq.js";import{ya as j}from"../chunk-r3v2cnrj.js";import"../chunk-038xtqpm.js";var{plugin:q}=globalThis.Bun;q(k());var y=await j(process.cwd());for(let x of y.bun?.plugins??[])q(x);
3
3
 
4
4
  //# debugId=4C9148510A2605D864756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
2
  var j=Object.create;var{getPrototypeOf:k,defineProperty:f,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var g=a!=null&&typeof a==="object";if(g){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of l(a))if(!m.call(d,e))f(d,e,{get:n.bind(a,e),enumerable:!0});if(g)h.set(a,d);return d};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=(a,b)=>()=>(a&&(b=a(a=0)),b);var w=import.meta.require;
3
- export{s as al,t as bl,u as cl,v as dl,w as el};
3
+ export{s as ml,t as nl,u as ol,v as pl,w as ql};
4
4
 
5
- //# debugId=A2D047AA495A31A764756E2164756E21
5
+ //# debugId=E7D588CB7D2A60B264756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "A2D047AA495A31A764756E2164756E21",
7
+ "debugId": "E7D588CB7D2A60B264756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{bl as n}from"./chunk-rnp5k8m3.js";var w=n((p)=>{var r={warningEmitted:!1},a=(e)=>{if(e&&!r.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20)r.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ import{nl as n}from"./chunk-038xtqpm.js";var w=n((p)=>{var r={warningEmitted:!1},a=(e)=>{if(e&&!r.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20)r.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
3
3
  no longer support Node.js ${e} in January 2026.
4
4
 
5
5
  To continue receiving updates to AWS services, bug fixes, and security
@@ -8,4 +8,4 @@ updates please upgrade to a supported Node.js LTS version.
8
8
  More information can be found at: https://a.co/c895JFp`)};function o(e,t,s){if(!e.$source)e.$source={};return e.$source[t]=s,e}function u(e,t,s){if(!e.__aws_sdk_context)e.__aws_sdk_context={features:{}};else if(!e.__aws_sdk_context.features)e.__aws_sdk_context.features={};e.__aws_sdk_context.features[t]=s}function i(e,t,s){if(!e.$source)e.$source={};return e.$source[t]=s,e}p.emitWarningIfUnsupportedVersion=a;p.setCredentialFeature=o;p.setFeature=u;p.setTokenFeature=i;p.state=r});
9
9
  export{w as Q};
10
10
 
11
- //# debugId=8059BD8B44C2A50564756E2164756E21
11
+ //# debugId=E65D1F2DD7EADD5464756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "'use strict';\n\nconst state = {\n warningEmitted: false,\n};\nconst emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 20) {\n state.warningEmitted = true;\n process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${version} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n};\n\nfunction setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n\nfunction setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n\nfunction setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n\nexports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;\nexports.setCredentialFeature = setCredentialFeature;\nexports.setFeature = setFeature;\nexports.setTokenFeature = setTokenFeature;\nexports.state = state;\n"
6
6
  ],
7
7
  "mappings": ";uDAEA,IAAM,EAAQ,CACV,eAAgB,EACpB,EACM,EAAkC,CAAC,IAAY,CACjD,GAAI,GAAW,CAAC,EAAM,gBAAkB,SAAS,EAAQ,UAAU,EAAG,EAAQ,QAAQ,GAAG,CAAC,CAAC,EAAI,GAC3F,EAAM,eAAiB,GACvB,QAAQ,YAAY;AAAA,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA,uDAK2B,GAIvD,SAAS,CAAoB,CAAC,EAAa,EAAS,EAAO,CACvD,GAAI,CAAC,EAAY,QACb,EAAY,QAAU,CAAC,EAG3B,OADA,EAAY,QAAQ,GAAW,EACxB,EAGX,SAAS,CAAU,CAAC,EAAS,EAAS,EAAO,CACzC,GAAI,CAAC,EAAQ,kBACT,EAAQ,kBAAoB,CACxB,SAAU,CAAC,CACf,EAEC,QAAI,CAAC,EAAQ,kBAAkB,SAChC,EAAQ,kBAAkB,SAAW,CAAC,EAE1C,EAAQ,kBAAkB,SAAS,GAAW,EAGlD,SAAS,CAAe,CAAC,EAAO,EAAS,EAAO,CAC5C,GAAI,CAAC,EAAM,QACP,EAAM,QAAU,CAAC,EAGrB,OADA,EAAM,QAAQ,GAAW,EAClB,EAGH,kCAAkC,EAClC,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,QAAQ",
8
- "debugId": "8059BD8B44C2A50564756E2164756E21",
8
+ "debugId": "E65D1F2DD7EADD5464756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
2
  class A extends Error{constructor(p,q){super(`Target [${p}] is not bound in the container.`+(q.length>0?` Bound tokens: ${q.join(", ")}.`:" No tokens are bound \u2014 was the application booted?"));this.name="BindingResolutionError"}}class C{bindings=new Map;instances=new Map;bind(p,q){this.bindings.set(p.token,{factory:q,shared:!1}),this.instances.delete(p.token)}singleton(p,q){this.bindings.set(p.token,{factory:q,shared:!0}),this.instances.delete(p.token)}instance(p,q){return this.instances.set(p.token,q),q}bound(p){return this.bindings.has(p.token)||this.instances.has(p.token)}resolved(p){return this.instances.has(p.token)}make(p){let q=p.token;if(this.instances.has(q))return this.instances.get(q);let v=this.bindings.get(q);if(!v)throw new A(q,this.keys());let x=v.factory(this);if(v.shared)this.instances.set(q,x);return x}forget(p){this.instances.delete(p.token)}keys(){return[...new Set([...this.bindings.keys(),...this.instances.keys()])]}flush(){this.bindings.clear(),this.instances.clear()}}
3
- export{A as Hk,C as Ik};
3
+ export{A as Tk,C as Uk};
4
4
 
5
- //# debugId=C5D397B88DC2651664756E2164756E21
5
+ //# debugId=B2E2AD7F77BF6D8764756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "/**\n * Tokens are the service classes themselves, so `make(MailManager)` is typed\n * `MailManager` without a cast. The container keys its bindings off the class's\n * `static token` string rather than the constructor object: the built binary\n * (`dist/bin/gemi.js`) bundles its own copy of gemi while the app resolves\n * `gemi/*` to source, so the same service is two distinct class objects across\n * that boundary. A string survives it. Laravel binds both `'mail'` and\n * `MailManager::class` for the same reason.\n */\nexport type ServiceToken<T> = (abstract new (...args: any[]) => T) & {\n token: string;\n};\n\nexport type Factory<T> = (app: Container) => T;\n\ninterface Binding {\n factory: Factory<any>;\n shared: boolean;\n}\n\nexport class BindingResolutionError extends Error {\n constructor(token: string, known: string[]) {\n super(\n `Target [${token}] is not bound in the container.` +\n (known.length > 0\n ? ` Bound tokens: ${known.join(\", \")}.`\n : \" No tokens are bound — was the application booted?\"),\n );\n this.name = \"BindingResolutionError\";\n }\n}\n\nexport class Container {\n private bindings = new Map<string, Binding>();\n private instances = new Map<string, any>();\n\n bind<T>(token: ServiceToken<T>, factory: Factory<T>) {\n this.bindings.set(token.token, { factory, shared: false });\n this.instances.delete(token.token);\n }\n\n /**\n * Lazy by design — `factory` is not called until the first `make()`.\n */\n singleton<T>(token: ServiceToken<T>, factory: Factory<T>) {\n this.bindings.set(token.token, { factory, shared: true });\n this.instances.delete(token.token);\n }\n\n instance<T>(token: ServiceToken<T>, object: T): T {\n this.instances.set(token.token, object);\n return object;\n }\n\n bound<T>(token: ServiceToken<T>): boolean {\n return (\n this.bindings.has(token.token) || this.instances.has(token.token)\n );\n }\n\n resolved<T>(token: ServiceToken<T>): boolean {\n return this.instances.has(token.token);\n }\n\n make<T>(token: ServiceToken<T>): T {\n const key = token.token;\n\n if (this.instances.has(key)) {\n return this.instances.get(key) as T;\n }\n\n const binding = this.bindings.get(key);\n if (!binding) {\n throw new BindingResolutionError(key, this.keys());\n }\n\n const object = binding.factory(this) as T;\n if (binding.shared) {\n this.instances.set(key, object);\n }\n return object;\n }\n\n forget<T>(token: ServiceToken<T>) {\n this.instances.delete(token.token);\n }\n\n keys(): string[] {\n return [\n ...new Set([...this.bindings.keys(), ...this.instances.keys()]),\n ];\n }\n\n flush() {\n this.bindings.clear();\n this.instances.clear();\n }\n}\n"
6
6
  ],
7
7
  "mappings": ";AAoBO,MAAM,UAA+B,KAAM,CAChD,WAAW,CAAC,EAAe,EAAiB,CAC1C,MACE,WAAW,qCACR,EAAM,OAAS,EACZ,kBAAkB,EAAM,KAAK,IAAI,KACjC,0DACR,EACA,KAAK,KAAO,yBAEhB,CAEO,MAAM,CAAU,CACb,SAAW,IAAI,IACf,UAAY,IAAI,IAExB,IAAO,CAAC,EAAwB,EAAqB,CACnD,KAAK,SAAS,IAAI,EAAM,MAAO,CAAE,UAAS,OAAQ,EAAM,CAAC,EACzD,KAAK,UAAU,OAAO,EAAM,KAAK,EAMnC,SAAY,CAAC,EAAwB,EAAqB,CACxD,KAAK,SAAS,IAAI,EAAM,MAAO,CAAE,UAAS,OAAQ,EAAK,CAAC,EACxD,KAAK,UAAU,OAAO,EAAM,KAAK,EAGnC,QAAW,CAAC,EAAwB,EAAc,CAEhD,OADA,KAAK,UAAU,IAAI,EAAM,MAAO,CAAM,EAC/B,EAGT,KAAQ,CAAC,EAAiC,CACxC,OACE,KAAK,SAAS,IAAI,EAAM,KAAK,GAAK,KAAK,UAAU,IAAI,EAAM,KAAK,EAIpE,QAAW,CAAC,EAAiC,CAC3C,OAAO,KAAK,UAAU,IAAI,EAAM,KAAK,EAGvC,IAAO,CAAC,EAA2B,CACjC,IAAM,EAAM,EAAM,MAElB,GAAI,KAAK,UAAU,IAAI,CAAG,EACxB,OAAO,KAAK,UAAU,IAAI,CAAG,EAG/B,IAAM,EAAU,KAAK,SAAS,IAAI,CAAG,EACrC,GAAI,CAAC,EACH,MAAM,IAAI,EAAuB,EAAK,KAAK,KAAK,CAAC,EAGnD,IAAM,EAAS,EAAQ,QAAQ,IAAI,EACnC,GAAI,EAAQ,OACV,KAAK,UAAU,IAAI,EAAK,CAAM,EAEhC,OAAO,EAGT,MAAS,CAAC,EAAwB,CAChC,KAAK,UAAU,OAAO,EAAM,KAAK,EAGnC,IAAI,EAAa,CACf,MAAO,CACL,GAAG,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,KAAK,EAAG,GAAG,KAAK,UAAU,KAAK,CAAC,CAAC,CAChE,EAGF,KAAK,EAAG,CACN,KAAK,SAAS,MAAM,EACpB,KAAK,UAAU,MAAM,EAEzB",
8
- "debugId": "C5D397B88DC2651664756E2164756E21",
8
+ "debugId": "B2E2AD7F77BF6D8764756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{bl as LC}from"./chunk-rnp5k8m3.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
2
+ import{nl as LC}from"./chunk-038xtqpm.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
3
3
  export{OC as la};
4
4
 
5
- //# debugId=CEF5891D55CF2CA064756E2164756E21
5
+ //# debugId=05A6BD05AAE36DB664756E2164756E21