gemi 0.131.0 → 0.133.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 (230) hide show
  1. package/dist/ai/AgentController.d.ts +73 -0
  2. package/dist/ai/AgentController.d.ts.map +1 -1
  3. package/dist/ai/AgentProvider.d.ts +25 -0
  4. package/dist/ai/AgentProvider.d.ts.map +1 -1
  5. package/dist/ai/VoiceBridge.d.ts +365 -0
  6. package/dist/ai/VoiceBridge.d.ts.map +1 -0
  7. package/dist/ai/index.d.ts +13 -0
  8. package/dist/ai/index.d.ts.map +1 -1
  9. package/dist/ai/index.js +18 -18
  10. package/dist/ai/index.js.map +11 -6
  11. package/dist/ai/providers/endpoints.d.ts +19 -0
  12. package/dist/ai/providers/endpoints.d.ts.map +1 -1
  13. package/dist/ai/providers/realtime.d.ts +272 -0
  14. package/dist/ai/providers/realtime.d.ts.map +1 -0
  15. package/dist/ai/providers/sideband.d.ts +254 -0
  16. package/dist/ai/providers/sideband.d.ts.map +1 -0
  17. package/dist/ai/runtime.d.ts.map +1 -1
  18. package/dist/ai/types.d.ts +15 -0
  19. package/dist/ai/types.d.ts.map +1 -1
  20. package/dist/ai/voice/index.d.ts +23 -0
  21. package/dist/ai/voice/index.d.ts.map +1 -0
  22. package/dist/ai/voice/index.js +433 -0
  23. package/dist/ai/voice/index.js.map +1 -0
  24. package/dist/ai/voice/state.d.ts +34 -0
  25. package/dist/ai/voice/state.d.ts.map +1 -0
  26. package/dist/ai/voice/useVoiceSession.d.ts +82 -0
  27. package/dist/ai/voice/useVoiceSession.d.ts.map +1 -0
  28. package/dist/ai/voice/voiceCall.d.ts +57 -0
  29. package/dist/ai/voice/voiceCall.d.ts.map +1 -0
  30. package/dist/ai/voice/wire.d.ts +66 -0
  31. package/dist/ai/voice/wire.d.ts.map +1 -0
  32. package/dist/ai/voiceConfig.d.ts +70 -0
  33. package/dist/ai/voiceConfig.d.ts.map +1 -0
  34. package/dist/ai/voiceMcp.d.ts +89 -0
  35. package/dist/ai/voiceMcp.d.ts.map +1 -0
  36. package/dist/ai/voiceStore.d.ts +52 -0
  37. package/dist/ai/voiceStore.d.ts.map +1 -0
  38. package/dist/app/index.js +1 -1
  39. package/dist/bun/plugin.js +1 -1
  40. package/dist/bun/preload.js +1 -1
  41. package/dist/{chunk-4gmhx2ba.js → chunk-0eamc2tr.js} +2 -2
  42. package/dist/{chunk-4gmhx2ba.js.map → chunk-0eamc2tr.js.map} +1 -1
  43. package/dist/{chunk-2x0n3ze1.js → chunk-0gg4e94v.js} +2 -2
  44. package/dist/{chunk-2x0n3ze1.js.map → chunk-0gg4e94v.js.map} +1 -1
  45. package/dist/{chunk-p642ja42.js → chunk-0rhf4g12.js} +3 -3
  46. package/dist/{chunk-p642ja42.js.map → chunk-0rhf4g12.js.map} +1 -1
  47. package/dist/{chunk-dxm5gxqk.js → chunk-1awxdnb6.js} +1 -1
  48. package/dist/{chunk-2senwsdq.js → chunk-2cnawkke.js} +12 -12
  49. package/dist/{chunk-2senwsdq.js.map → chunk-2cnawkke.js.map} +3 -3
  50. package/dist/{chunk-fxm8fqh9.js → chunk-33hdxe7v.js} +1 -1
  51. package/dist/{chunk-63xekerg.js → chunk-3g5q0cj5.js} +2 -2
  52. package/dist/{chunk-63xekerg.js.map → chunk-3g5q0cj5.js.map} +1 -1
  53. package/dist/{chunk-xjs72pb0.js → chunk-3h37f124.js} +2 -2
  54. package/dist/{chunk-xjs72pb0.js.map → chunk-3h37f124.js.map} +1 -1
  55. package/dist/{chunk-65fq5a9d.js → chunk-4278e429.js} +2 -2
  56. package/dist/{chunk-65fq5a9d.js.map → chunk-4278e429.js.map} +1 -1
  57. package/dist/chunk-47e7fbsp.js +5 -0
  58. package/dist/{chunk-mvka90rq.js.map → chunk-47e7fbsp.js.map} +1 -1
  59. package/dist/{chunk-p6b0cyf8.js → chunk-4pvv8qs0.js} +2 -2
  60. package/dist/{chunk-p6b0cyf8.js.map → chunk-4pvv8qs0.js.map} +1 -1
  61. package/dist/{chunk-rjyw1thg.js → chunk-4t41m5f1.js} +2 -2
  62. package/dist/{chunk-rjyw1thg.js.map → chunk-4t41m5f1.js.map} +1 -1
  63. package/dist/{chunk-f21v4n2v.js → chunk-53rr32zm.js} +1 -1
  64. package/dist/{chunk-xhvknqvn.js → chunk-5pdgh9a1.js} +2 -2
  65. package/dist/{chunk-xhvknqvn.js.map → chunk-5pdgh9a1.js.map} +1 -1
  66. package/dist/{chunk-e4ay1vg9.js → chunk-65j32dtn.js} +2 -2
  67. package/dist/{chunk-e4ay1vg9.js.map → chunk-65j32dtn.js.map} +1 -1
  68. package/dist/{chunk-jxvec7jc.js → chunk-6fr6j338.js} +2 -2
  69. package/dist/{chunk-jxvec7jc.js.map → chunk-6fr6j338.js.map} +1 -1
  70. package/dist/{chunk-jd1afbrs.js → chunk-6hz63ts4.js} +4 -4
  71. package/dist/{chunk-jd1afbrs.js.map → chunk-6hz63ts4.js.map} +1 -1
  72. package/dist/{chunk-4z0rt6ws.js → chunk-6qty7at2.js} +2 -2
  73. package/dist/{chunk-4z0rt6ws.js.map → chunk-6qty7at2.js.map} +1 -1
  74. package/dist/{chunk-pzb3agv9.js → chunk-7nxnyw7x.js} +2 -2
  75. package/dist/{chunk-pzb3agv9.js.map → chunk-7nxnyw7x.js.map} +1 -1
  76. package/dist/{chunk-7n0zn5h4.js → chunk-8ryrjtn0.js} +2 -2
  77. package/dist/{chunk-7n0zn5h4.js.map → chunk-8ryrjtn0.js.map} +1 -1
  78. package/dist/{chunk-c1gq2ttb.js → chunk-8sde8337.js} +2 -2
  79. package/dist/{chunk-c1gq2ttb.js.map → chunk-8sde8337.js.map} +1 -1
  80. package/dist/{chunk-cggywjzz.js → chunk-99a4e6zf.js} +2 -2
  81. package/dist/{chunk-cggywjzz.js.map → chunk-99a4e6zf.js.map} +1 -1
  82. package/dist/chunk-b6yb3svm.js +6 -0
  83. package/dist/{chunk-539w9yt3.js.map → chunk-b6yb3svm.js.map} +2 -2
  84. package/dist/{chunk-822p54vc.js → chunk-beb265c9.js} +2 -2
  85. package/dist/{chunk-822p54vc.js.map → chunk-beb265c9.js.map} +1 -1
  86. package/dist/{chunk-hdgbh8hn.js → chunk-cxsvzqd4.js} +2 -2
  87. package/dist/{chunk-hdgbh8hn.js.map → chunk-cxsvzqd4.js.map} +1 -1
  88. package/dist/{chunk-pahr13xg.js → chunk-dt95z6et.js} +2 -2
  89. package/dist/{chunk-pahr13xg.js.map → chunk-dt95z6et.js.map} +1 -1
  90. package/dist/{chunk-hr8annr1.js → chunk-feajsgns.js} +2 -2
  91. package/dist/{chunk-hr8annr1.js.map → chunk-feajsgns.js.map} +1 -1
  92. package/dist/{chunk-2tda49mv.js → chunk-ff60bzvf.js} +2 -2
  93. package/dist/{chunk-2tda49mv.js.map → chunk-ff60bzvf.js.map} +1 -1
  94. package/dist/{chunk-b00z33zg.js → chunk-gng5e7pd.js} +1 -1
  95. package/dist/{chunk-mz73066c.js → chunk-gqgpwb88.js} +2 -2
  96. package/dist/{chunk-mz73066c.js.map → chunk-gqgpwb88.js.map} +1 -1
  97. package/dist/{chunk-h0xye69a.js → chunk-ha15x5ns.js} +2 -2
  98. package/dist/{chunk-h0xye69a.js.map → chunk-ha15x5ns.js.map} +1 -1
  99. package/dist/{chunk-d5g1caxb.js → chunk-hb9hm8za.js} +3 -3
  100. package/dist/{chunk-d5g1caxb.js.map → chunk-hb9hm8za.js.map} +1 -1
  101. package/dist/{chunk-8fvt7kys.js → chunk-hf492gg2.js} +1 -1
  102. package/dist/{chunk-fgtr9cds.js → chunk-hj88dcss.js} +3 -3
  103. package/dist/{chunk-fgtr9cds.js.map → chunk-hj88dcss.js.map} +1 -1
  104. package/dist/{chunk-hnf11jhc.js → chunk-j5g7qc5f.js} +2 -2
  105. package/dist/{chunk-hnf11jhc.js.map → chunk-j5g7qc5f.js.map} +1 -1
  106. package/dist/{chunk-e1fhy2h5.js → chunk-jgx8ggbz.js} +2 -2
  107. package/dist/{chunk-e1fhy2h5.js.map → chunk-jgx8ggbz.js.map} +1 -1
  108. package/dist/{chunk-35zw2s61.js → chunk-jx2mgvvt.js} +3 -3
  109. package/dist/{chunk-35zw2s61.js.map → chunk-jx2mgvvt.js.map} +1 -1
  110. package/dist/{chunk-w26cw41m.js → chunk-jx5zx48j.js} +2 -2
  111. package/dist/{chunk-w26cw41m.js.map → chunk-jx5zx48j.js.map} +1 -1
  112. package/dist/{chunk-z1gjgr1c.js → chunk-jy9dkgt0.js} +2 -2
  113. package/dist/{chunk-z1gjgr1c.js.map → chunk-jy9dkgt0.js.map} +1 -1
  114. package/dist/{chunk-7j48ymk1.js → chunk-k2xeskp6.js} +2 -2
  115. package/dist/{chunk-7j48ymk1.js.map → chunk-k2xeskp6.js.map} +1 -1
  116. package/dist/{chunk-jxmc33m9.js → chunk-ka991yx4.js} +2 -2
  117. package/dist/{chunk-jxmc33m9.js.map → chunk-ka991yx4.js.map} +1 -1
  118. package/dist/{chunk-65s63bdh.js → chunk-krk880my.js} +2 -2
  119. package/dist/{chunk-65s63bdh.js.map → chunk-krk880my.js.map} +1 -1
  120. package/dist/{chunk-x4yq0c9v.js → chunk-m9vwg9j1.js} +3 -3
  121. package/dist/{chunk-x4yq0c9v.js.map → chunk-m9vwg9j1.js.map} +1 -1
  122. package/dist/{chunk-x07rp3fc.js → chunk-mpqvmge4.js} +1 -1
  123. package/dist/{chunk-n7sbwpce.js → chunk-mw7ft5bs.js} +2 -2
  124. package/dist/{chunk-n7sbwpce.js.map → chunk-mw7ft5bs.js.map} +1 -1
  125. package/dist/{chunk-v5esvs66.js → chunk-njpnstck.js} +2 -2
  126. package/dist/{chunk-v5esvs66.js.map → chunk-njpnstck.js.map} +1 -1
  127. package/dist/{chunk-p320fd3g.js → chunk-p82868xx.js} +2 -2
  128. package/dist/{chunk-p320fd3g.js.map → chunk-p82868xx.js.map} +1 -1
  129. package/dist/{chunk-jbd723h1.js → chunk-pm8wjatv.js} +3 -3
  130. package/dist/{chunk-jbd723h1.js.map → chunk-pm8wjatv.js.map} +1 -1
  131. package/dist/{chunk-t227jn4b.js → chunk-q15f5g86.js} +2 -2
  132. package/dist/{chunk-t227jn4b.js.map → chunk-q15f5g86.js.map} +1 -1
  133. package/dist/{chunk-838cdh6v.js → chunk-qfra7gah.js} +2 -2
  134. package/dist/{chunk-838cdh6v.js.map → chunk-qfra7gah.js.map} +1 -1
  135. package/dist/{chunk-aprjvzrz.js → chunk-rnp5k8m3.js} +2 -2
  136. package/dist/{chunk-aprjvzrz.js.map → chunk-rnp5k8m3.js.map} +1 -1
  137. package/dist/{chunk-qz89m7ss.js → chunk-rzqft8q8.js} +2 -2
  138. package/dist/{chunk-qz89m7ss.js.map → chunk-rzqft8q8.js.map} +1 -1
  139. package/dist/{chunk-zc5962gh.js → chunk-s025aycr.js} +2 -2
  140. package/dist/{chunk-zc5962gh.js.map → chunk-s025aycr.js.map} +1 -1
  141. package/dist/{chunk-y14weak4.js → chunk-s21kn0x8.js} +2 -2
  142. package/dist/{chunk-y14weak4.js.map → chunk-s21kn0x8.js.map} +1 -1
  143. package/dist/{chunk-3wnczt5w.js → chunk-s55t7rxw.js} +2 -2
  144. package/dist/{chunk-3wnczt5w.js.map → chunk-s55t7rxw.js.map} +1 -1
  145. package/dist/{chunk-fzs7g6mc.js → chunk-s782bzeq.js} +2 -2
  146. package/dist/{chunk-fzs7g6mc.js.map → chunk-s782bzeq.js.map} +1 -1
  147. package/dist/{chunk-77ymcf7q.js → chunk-sa6cxt3g.js} +2 -2
  148. package/dist/{chunk-77ymcf7q.js.map → chunk-sa6cxt3g.js.map} +1 -1
  149. package/dist/{chunk-dz76qhx8.js → chunk-swwkdm75.js} +2 -2
  150. package/dist/{chunk-dz76qhx8.js.map → chunk-swwkdm75.js.map} +1 -1
  151. package/dist/{chunk-58mg4rpd.js → chunk-t33yh84d.js} +2 -2
  152. package/dist/{chunk-58mg4rpd.js.map → chunk-t33yh84d.js.map} +1 -1
  153. package/dist/{chunk-mym7egdq.js → chunk-vnw91fe1.js} +2 -2
  154. package/dist/{chunk-mym7egdq.js.map → chunk-vnw91fe1.js.map} +1 -1
  155. package/dist/{chunk-4wda9teq.js → chunk-w1cksc5z.js} +3 -3
  156. package/dist/{chunk-4wda9teq.js.map → chunk-w1cksc5z.js.map} +1 -1
  157. package/dist/chunk-wevj4981.js +122 -0
  158. package/dist/{chunk-fx7r6pdf.js.map → chunk-wevj4981.js.map} +3 -3
  159. package/dist/{chunk-ayjfs5mm.js → chunk-wrsf2abe.js} +2 -2
  160. package/dist/{chunk-ayjfs5mm.js.map → chunk-wrsf2abe.js.map} +1 -1
  161. package/dist/{chunk-j1wc4afr.js → chunk-x16ckgq1.js} +2 -2
  162. package/dist/{chunk-j1wc4afr.js.map → chunk-x16ckgq1.js.map} +1 -1
  163. package/dist/{chunk-gnaxedwh.js → chunk-x51tegk3.js} +2 -2
  164. package/dist/{chunk-gnaxedwh.js.map → chunk-x51tegk3.js.map} +1 -1
  165. package/dist/{chunk-qspam5cf.js → chunk-x5hj0mqp.js} +2 -2
  166. package/dist/{chunk-qspam5cf.js.map → chunk-x5hj0mqp.js.map} +1 -1
  167. package/dist/{chunk-dp2yz8bj.js → chunk-x9bk5s21.js} +2 -2
  168. package/dist/{chunk-dp2yz8bj.js.map → chunk-x9bk5s21.js.map} +1 -1
  169. package/dist/{chunk-p462p2xe.js → chunk-xvvsc58s.js} +2 -2
  170. package/dist/{chunk-p462p2xe.js.map → chunk-xvvsc58s.js.map} +1 -1
  171. package/dist/{chunk-0g5f8ymy.js → chunk-xymr3asa.js} +2 -2
  172. package/dist/{chunk-0g5f8ymy.js.map → chunk-xymr3asa.js.map} +1 -1
  173. package/dist/{chunk-j4y0sjdc.js → chunk-ysc7ykss.js} +2 -2
  174. package/dist/{chunk-j4y0sjdc.js.map → chunk-ysc7ykss.js.map} +1 -1
  175. package/dist/{chunk-3xy41vc0.js → chunk-z61dj480.js} +3 -3
  176. package/dist/{chunk-3xy41vc0.js.map → chunk-z61dj480.js.map} +1 -1
  177. package/dist/{chunk-0q68t71d.js → chunk-z9xxthp1.js} +3 -3
  178. package/dist/{chunk-0q68t71d.js.map → chunk-z9xxthp1.js.map} +1 -1
  179. package/dist/{chunk-47eav3ex.js → chunk-zv5qyrqg.js} +2 -2
  180. package/dist/{chunk-47eav3ex.js.map → chunk-zv5qyrqg.js.map} +1 -1
  181. package/dist/{chunk-asmszzkp.js → chunk-zyhmn3hy.js} +3 -3
  182. package/dist/{chunk-asmszzkp.js.map → chunk-zyhmn3hy.js.map} +1 -1
  183. package/dist/{chunk-zzgt759n.js → chunk-zypmy8yq.js} +2 -2
  184. package/dist/{chunk-zzgt759n.js.map → chunk-zypmy8yq.js.map} +1 -1
  185. package/dist/config/index.js +1 -1
  186. package/dist/console/run.js +2 -2
  187. package/dist/console/run.js.map +1 -1
  188. package/dist/container/index.js +2 -2
  189. package/dist/container/index.js.map +1 -1
  190. package/dist/database/index.js +2 -2
  191. package/dist/database/index.js.map +1 -1
  192. package/dist/email/index.js +2 -2
  193. package/dist/email/index.js.map +1 -1
  194. package/dist/facades/index.js +2 -2
  195. package/dist/facades/index.js.map +1 -1
  196. package/dist/foundation/index.js +2 -2
  197. package/dist/foundation/index.js.map +1 -1
  198. package/dist/http/ApiRouter.d.ts +27 -5
  199. package/dist/http/ApiRouter.d.ts.map +1 -1
  200. package/dist/http/index.js +2 -2
  201. package/dist/http/index.js.map +1 -1
  202. package/dist/i18n/dictionaryRuntime.js +2 -2
  203. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  204. package/dist/i18n/index.js +2 -2
  205. package/dist/i18n/index.js.map +1 -1
  206. package/dist/kernel/index.js +2 -2
  207. package/dist/kernel/index.js.map +1 -1
  208. package/dist/orm/defaults.d.ts.map +1 -1
  209. package/dist/orm/index.js +3 -3
  210. package/dist/orm/index.js.map +3 -3
  211. package/dist/server/index.js +2 -2
  212. package/dist/server/index.js.map +1 -1
  213. package/dist/services/index.js +2 -2
  214. package/dist/services/index.js.map +1 -1
  215. package/dist/services/queue/work.js +2 -2
  216. package/dist/services/queue/work.js.map +1 -1
  217. package/dist/stats/route-table.js +1 -1
  218. package/dist/support/index.js +2 -2
  219. package/dist/support/index.js.map +1 -1
  220. package/dist/vitest/index.js +1 -1
  221. package/package.json +2 -1
  222. package/dist/chunk-539w9yt3.js +0 -6
  223. package/dist/chunk-fx7r6pdf.js +0 -122
  224. package/dist/chunk-mvka90rq.js +0 -5
  225. /package/dist/{chunk-dxm5gxqk.js.map → chunk-1awxdnb6.js.map} +0 -0
  226. /package/dist/{chunk-fxm8fqh9.js.map → chunk-33hdxe7v.js.map} +0 -0
  227. /package/dist/{chunk-f21v4n2v.js.map → chunk-53rr32zm.js.map} +0 -0
  228. /package/dist/{chunk-b00z33zg.js.map → chunk-gng5e7pd.js.map} +0 -0
  229. /package/dist/{chunk-8fvt7kys.js.map → chunk-hf492gg2.js.map} +0 -0
  230. /package/dist/{chunk-x07rp3fc.js.map → chunk-mpqvmge4.js.map} +0 -0
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The browser's half of a voice call (#921): the microphone, the peer
3
+ * connection, the vendor's data channel and the app's three routes.
4
+ *
5
+ * Only `gemi/ai/voice` reaches it, so it is in an app's bundle only where the
6
+ * app uses that entry. The packaging test checks it stays out of the entry
7
+ * chunk.
8
+ *
9
+ * No vendor SDK: a raw `RTCPeerConnection`, with the audio going straight to
10
+ * the vendor and the SDP offer going to the app's route, which creates the
11
+ * call with the server's key. The browser never holds a key or a secret.
12
+ */
13
+ export type VoiceCallOptions = {
14
+ /** `/api/<route>`. */
15
+ url: string;
16
+ threadId?: string;
17
+ body?: unknown;
18
+ pushToTalk?: boolean;
19
+ headers?: Record<string, string>;
20
+ /** Every vendor event from the data channel. */
21
+ onEvent: (event: {
22
+ type: string;
23
+ [key: string]: unknown;
24
+ }) => void;
25
+ /** The connection closed or failed. */
26
+ onClose: (error?: Error) => void;
27
+ /** What push-to-talk turns detection back on to. Default semantic VAD. */
28
+ turnDetection?: Record<string, unknown>;
29
+ };
30
+ export type VoiceCall = {
31
+ sessionId: string;
32
+ threadId: string;
33
+ delegate: string;
34
+ endsAt?: number;
35
+ mute(muted: boolean): void;
36
+ setPushToTalk(on: boolean): void;
37
+ /** Push-to-talk: start speaking. */
38
+ press(): void;
39
+ /** Push-to-talk: done speaking; the turn is committed and answered. */
40
+ release(): void;
41
+ setBody(body: unknown): Promise<void>;
42
+ /** Hangs up through the app's route and closes everything. */
43
+ end(): Promise<void>;
44
+ /** Closes everything without telling the server (it learns from the vendor). */
45
+ close(): void;
46
+ };
47
+ export declare class VoiceCallError extends Error {
48
+ readonly status?: number;
49
+ readonly code?: string;
50
+ constructor(message: string, options?: {
51
+ status?: number;
52
+ code?: string;
53
+ cause?: unknown;
54
+ });
55
+ }
56
+ export declare function startVoiceCall(options: VoiceCallOptions): Promise<VoiceCall>;
57
+ //# sourceMappingURL=voiceCall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voiceCall.d.ts","sourceRoot":"","sources":["../../../ai/voice/voiceCall.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,gDAAgD;IAChD,OAAO,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,uCAAuC;IACvC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,oCAAoC;IACpC,KAAK,IAAI,IAAI,CAAC;IACd,uEAAuE;IACvE,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,8DAA8D;IAC9D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,gFAAgF;IAChF,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO;CAM/F;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CA0KlF"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * What the voice routes and `useVoiceSession` say to each other (#921).
3
+ *
4
+ * Imports nothing, like `ai/types.ts`, so the browser half can read it without
5
+ * a path to the server half.
6
+ */
7
+ /** `POST /<route>` — the browser's offer, its thread and the app's `body`. */
8
+ export type VoiceStartBody = {
9
+ /** The browser's SDP offer. */
10
+ sdp: string;
11
+ /** The chat thread the voice delegates to, as `useChat` names it. */
12
+ threadId?: string;
13
+ /** Start with voice activity detection off: the client commits each turn. */
14
+ pushToTalk?: boolean;
15
+ };
16
+ /** What `POST /<route>` answers. */
17
+ export type VoiceStartResponse = {
18
+ /** The voice session's id: `PATCH` and `DELETE` `/<route>/<sessionId>`. */
19
+ sessionId: string;
20
+ /** The vendor's SDP answer, for `setRemoteDescription`. */
21
+ sdp: string;
22
+ /** The thread delegated turns are stored on. */
23
+ threadId: string;
24
+ /** The delegate tool's name, so the client can show `working`. */
25
+ delegate: string;
26
+ /** When the server will end the call at the latest, in epoch ms. */
27
+ endsAt?: number;
28
+ };
29
+ /**
30
+ * What the client shows.
31
+ *
32
+ * - `idle`: not started.
33
+ * - `connecting`: asking for the microphone and setting up the call.
34
+ * - `listening`: the call is up and nobody is speaking, or the user is.
35
+ * - `thinking`: the user stopped speaking and no answer has started.
36
+ * - `speaking`: the voice is talking.
37
+ * - `working`: the agent is working on a delegated request (and the voice is
38
+ * not speaking).
39
+ * - `ended`: the call is over. `error` is set when it ended on a failure.
40
+ */
41
+ export type VoiceStatus = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "working" | "ended";
42
+ /** One line of live captions. */
43
+ export type VoiceCaption = {
44
+ /** The vendor's item id. */
45
+ id: string;
46
+ role: "user" | "assistant";
47
+ text: string;
48
+ /** `false` while it is still arriving. */
49
+ final: boolean;
50
+ };
51
+ /** Why a voice session ended. */
52
+ export type VoiceEndReason =
53
+ /** `DELETE /<route>/<id>`, `useVoiceSession().end()` or `bridge.end()`. */
54
+ "hangup"
55
+ /** The vendor ended the call (the browser left, or the vendor's own limit). */
56
+ | "call_ended"
57
+ /** The sideband was lost and could not be re-opened. */
58
+ | "sideband_lost" | "max_duration" | "idle"
59
+ /** `onUsage` or `onTick` threw a `VoiceHangup`. */
60
+ | "usage"
61
+ /** A `session.updated` showed instructions or tool names other than the
62
+ * session's: a speed bump against casual edits, not a security boundary. */
63
+ | "session_tampered"
64
+ /** The call could not be started. */
65
+ | "start_failed" | "error";
66
+ //# sourceM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70 @@
1
+ import type { HttpRequest } from "../http/HttpRequest";
2
+ import type { RealtimeClient, RealtimeSession } from "./providers/realtime";
3
+ import type { VoiceBridgeParams, VoiceDelegate } from "./VoiceBridge";
4
+ import type { VoiceMcpOptions } from "./voiceMcp";
5
+ /**
6
+ * What an `AgentController` sets for `this.voice(Controller)` (#921):
7
+ *
8
+ * ```ts
9
+ * export class PageBuilderController extends AgentController<typeof siteAgent, PageBody> {
10
+ * agent = siteAgent;
11
+ * voice: VoiceConfig<PageBody> = {
12
+ * realtime: AzureOpenAIProvider.model("gpt-realtime-mini").realtime,
13
+ * start: async ({ req, body, threadId }) => {
14
+ * await chargeVoiceBlock(req); // throw to refuse (402, 429…)
15
+ * return {
16
+ * session: { instructions: voiceFront(body), voice: "marin" },
17
+ * onUsage: (usage, info) => meter(info),
18
+ * onEnd: (summary) => settle(summary),
19
+ * };
20
+ * },
21
+ * };
22
+ * }
23
+ * ```
24
+ *
25
+ * `start` must enforce the abuse limits: gemi has no per-user concurrency cap
26
+ * or rate limit for voice.
27
+ *
28
+ * @experimental Not yet verified against a live Azure or OpenAI call.
29
+ */
30
+ export type VoiceConfig<Body extends object = Record<string, unknown>> = {
31
+ /** A provider's realtime client, e.g. `AzureOpenAIProvider.model("gpt-realtime-mini").realtime`. */
32
+ realtime: RealtimeClient;
33
+ /** The delegate tool's name and description. */
34
+ delegate?: VoiceDelegate;
35
+ /**
36
+ * Called on `POST /<route>` after `authorizeRequest`, before the call is
37
+ * created: check credits, rate limits, a feature flag, and throw to refuse.
38
+ * Answers the session's options.
39
+ */
40
+ start(context: VoiceStartContext<Body>): VoiceSessionOptions<Body> | Promise<VoiceSessionOptions<Body>>;
41
+ };
42
+ export type VoiceStartContext<Body extends object> = {
43
+ req: HttpRequest<any, any>;
44
+ /** The client's `body`, as `useVoiceSession` sent it. */
45
+ body: Body;
46
+ /** The thread the client named, checked by `authorizeRequest`. */
47
+ threadId?: string;
48
+ /** `req.ctx().user`: who delegated turns run as. */
49
+ user: unknown;
50
+ /** The client asked to start with push-to-talk (no voice activity detection). */
51
+ pushToTalk: boolean;
52
+ };
53
+ /** One session's options, from `VoiceConfig.start`. */
54
+ export type VoiceSessionOptions<Body extends object> = Pick<VoiceBridgeParams<Body>, "limits" | "lines" | "progress" | "contextNote" | "onUsage" | "onTranscriptionUsage" | "onTick" | "onToolCall" | "onEnd" | "onEvent" | "tools"> & {
55
+ /**
56
+ * The app's MCP tools in this call, run in this process as the signed-in
57
+ * user (see `mcpVoiceTools`): no token is minted, and none reaches the
58
+ * browser. Their definitions are added to `session.tools`.
59
+ */
60
+ mcp?: VoiceMcpOptions;
61
+ /** The thread delegated turns go to, when it is not the client's. Checked
62
+ * with `authorizeRequest` like the client's. */
63
+ threadId?: string;
64
+ /** Instructions, voice, turn detection, transcription… The bridge's tools
65
+ * are added to `tools`. */
66
+ session?: RealtimeSession;
67
+ /** Sent as `OpenAI-Safety-Identifier`: a hash of the user's id. */
68
+ safetyIdentifier?: string;
69
+ };
70
+ //# sourceMappingURL=voiceConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voiceConfig.d.ts","sourceRoot":"","sources":["../../ai/voiceConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,WAAW,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACvE,oGAAoG;IACpG,QAAQ,EAAE,cAAc,CAAC;IACzB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,KAAK,CACH,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAC/B,mBAAmB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,MAAM,IAAI;IACnD,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3B,yDAAyD;IACzD,IAAI,EAAE,IAAI,CAAC;IACX,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,IAAI,EAAE,OAAO,CAAC;IACd,iFAAiF;IACjF,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,MAAM,IAAI,IAAI,CACzD,iBAAiB,CAAC,IAAI,CAAC,EACrB,QAAQ,GACR,OAAO,GACP,UAAU,GACV,aAAa,GACb,SAAS,GACT,sBAAsB,GACtB,QAAQ,GACR,YAAY,GACZ,OAAO,GACP,SAAS,GACT,OAAO,CACV,GAAG;IACF;;;;OAIG;IACH,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB;qDACiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;gCAC4B;IAC5B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type { McpRegistry, McpToolFilter } from "../services/mcp/McpRegistry";
2
+ import type { RealtimeTool } from "./providers/realtime";
3
+ /**
4
+ * The app's MCP tools in a voice call (#921), run in this process on the
5
+ * call's sideband.
6
+ *
7
+ * WHY NOT THE REALTIME API'S NATIVE `mcp` TOOL. The native tool has the vendor
8
+ * call the app's `/mcp` endpoint with an `authorization` the session carries.
9
+ * The browser holds the call's data channel, and that channel delivers
10
+ * `session.created` / `session.updated` with the session's tools. Nothing the
11
+ * vendors document says the `mcp` tool's `authorization` (or its `headers`) is
12
+ * left out of those events, so a token in it has to be assumed visible to the
13
+ * browser. The native tool also runs the calls at the vendor: the server sees
14
+ * them only after the fact, so it can't refuse, rate-limit or meter them
15
+ * before they run, and the endpoint has to be reachable from the internet.
16
+ *
17
+ * So the calls come to the server instead, like every other tool call of the
18
+ * voice: the model calls a plain function tool, the bridge receives it on the
19
+ * sideband, and runs it here through `McpRegistry.execute`. That means:
20
+ *
21
+ * - No token is minted at all. The caller is a principal built here from the
22
+ * user `start` saw, exactly as the MCP endpoint builds one from a verified
23
+ * credential: `{ kind: "remote", principal: { user, via: "voice", id, scopes } }`.
24
+ * - The registry applies its remote rules: only tools exposed to remote
25
+ * callers and reached by `scopes`, features checked per call, and nothing
26
+ * of the browser's own request crosses over (the route runs as the
27
+ * principal's user).
28
+ * - `authorize` runs before each call (keep it on the session's site, say),
29
+ * and the bridge's limits and `onToolCall` hook apply, the same hook chain
30
+ * as `onUsage`, so `VoiceHangup` works there too.
31
+ *
32
+ * Tools with `requiresApproval` are left out. A voice call has no approval
33
+ * screen, and the registry refuses a remote call to such a tool without one.
34
+ */
35
+ /** A tool the voice model may call that the bridge runs in this process. */
36
+ export type VoiceToolHandler = {
37
+ /** What the voice model sees: name, description, parameters. */
38
+ tool: RealtimeTool;
39
+ /**
40
+ * Runs one call. `input` is the model's arguments, parsed from JSON and not
41
+ * validated: validate them. Throw a `ToolError` for a failure the model
42
+ * should read; any other error reaches the model as "The tool failed."
43
+ */
44
+ run(input: unknown, info: VoiceToolRunInfo): Promise<unknown>;
45
+ /** Overrides `limits.toolTimeoutMs` for this tool. */
46
+ timeoutMs?: number;
47
+ };
48
+ export type VoiceToolRunInfo = {
49
+ sessionId: string;
50
+ /** Aborted when the call takes longer than its timeout. */
51
+ signal: AbortSignal;
52
+ };
53
+ /** One call to a `VoiceToolHandler`, as `authorize` sees it. */
54
+ export type VoiceToolCall = {
55
+ name: string;
56
+ input: unknown;
57
+ sessionId: string;
58
+ };
59
+ export type VoiceMcpOptions = {
60
+ /** The app's registry: `app(McpRegistry)`. */
61
+ registry: McpRegistry<any>;
62
+ /** Narrows the tools, as `McpRegistry.list` does. */
63
+ filter?: McpToolFilter;
64
+ /**
65
+ * The scopes this call's principal carries, which decide the tools it sees
66
+ * and may call. Default: every scope the registry declares.
67
+ */
68
+ scopes?: readonly string[];
69
+ /**
70
+ * Before each call. Throw a `ToolError` to refuse with a sentence the model
71
+ * reads (a tool aimed at another site), or a `VoiceHangup` to end the call.
72
+ */
73
+ authorize?: (call: VoiceToolCall) => void | Promise<void>;
74
+ /** Per call. Default: `limits.toolTimeoutMs`. */
75
+ timeoutMs?: number;
76
+ };
77
+ /**
78
+ * The registry's tools as `VoiceToolHandler`s, for the user `user`. Call it
79
+ * inside the request that starts the call: features are evaluated against it
80
+ * for the listing (and again, per call, by `execute`).
81
+ *
82
+ * Throws when `user` is empty: MCP tools run as a signed-in user, never as
83
+ * nobody.
84
+ */
85
+ export declare function mcpVoiceTools(options: VoiceMcpOptions, who: {
86
+ user: unknown;
87
+ sessionId: string;
88
+ }): Promise<VoiceToolHandler[]>;
89
+ //# sourceMappingURL=voiceMcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voiceMcp.d.ts","sourceRoot":"","sources":["../../ai/voiceMcp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,WAAW,EAEX,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gEAAgE;IAChE,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,eAAe,GAAG;IAC5B,8CAA8C;IAC9C,QAAQ,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAC3B,qDAAqD;IACrD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACxC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAgD7B"}
@@ -0,0 +1,52 @@
1
+ import type { VoiceEndReason } from "./voice/wire";
2
+ /**
3
+ * A voice session's state, outside the process that holds its sideband (#921).
4
+ *
5
+ * A `PATCH` (the selection changed) or a `DELETE` (the user pressed End) can
6
+ * land on any instance behind a load balancer. The instance that answers it
7
+ * reads and writes the session here; the instance holding the sideband reads
8
+ * the latest `body` before every delegated turn. Ending does not need the
9
+ * holder at all: whoever answers the `DELETE` hangs the call up at the vendor,
10
+ * and the holder's sideband sees the call close.
11
+ *
12
+ * Small and JSON-shaped on purpose, so a database or Redis implementation is a
13
+ * page of code. `MemoryVoiceSessionStore` is the process-local default.
14
+ */
15
+ export type VoiceSessionRecord = {
16
+ id: string;
17
+ /** The vendor's call id. */
18
+ callId: string;
19
+ threadId: string;
20
+ /** `runOwner` of the request that started it; `null` is nobody. */
21
+ owner: string | null;
22
+ /** The controller's `Body`, as last sent. */
23
+ body: Record<string, unknown>;
24
+ /** Epoch ms. */
25
+ startedAt: number;
26
+ endedAt?: number;
27
+ endReason?: VoiceEndReason;
28
+ };
29
+ export interface VoiceSessionStore {
30
+ create(record: VoiceSessionRecord): Promise<void>;
31
+ get(id: string): Promise<VoiceSessionRecord | null>;
32
+ /** Merges `patch` into the record. A missing record is not an error. */
33
+ update(id: string, patch: Partial<Omit<VoiceSessionRecord, "id">>): Promise<void>;
34
+ }
35
+ /**
36
+ * Process-local. Ended sessions are dropped after `retainEndedMs` (default 10
37
+ * minutes), so a long-lived process does not keep every call it ever had.
38
+ */
39
+ export declare class MemoryVoiceSessionStore implements VoiceSessionStore {
40
+ private readonly records;
41
+ private readonly retainEndedMs;
42
+ constructor(options?: {
43
+ retainEndedMs?: number;
44
+ });
45
+ create(record: VoiceSessionRecord): Promise<void>;
46
+ get(id: string): Promise<VoiceSessionRecord | null>;
47
+ update(id: string, patch: Partial<Omit<VoiceSessionRecord, "id">>): Promise<void>;
48
+ private sweep;
49
+ }
50
+ /** The store `AgentController.voiceStore` uses unless an app sets another. */
51
+ export declare const defaultVoiceStore: MemoryVoiceSessionStore;
52
+ //# sourceMappingURL=voiceStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voiceStore.d.ts","sourceRoot":"","sources":["../../ai/voiceStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,C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8E;AAC9E,eAAO,MAAM,iBAAiB,yBAAgC,CAAC"}
package/dist/app/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Da as a}from"../chunk-77ymcf7q.js";import"../chunk-cggywjzz.js";import"../chunk-aprjvzrz.js";export{a as App};
2
+ import{Da as a}from"../chunk-sa6cxt3g.js";import"../chunk-99a4e6zf.js";import"../chunk-rnp5k8m3.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-fxm8fqh9.js";import"../chunk-d5g1caxb.js";import"../chunk-fzs7g6mc.js";import"../chunk-7j48ymk1.js";import"../chunk-aprjvzrz.js";export{a as gemiPlugin};
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};
3
3
 
4
4
  //# debugId=2B4506B393745EFE64756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ea as k}from"../chunk-fxm8fqh9.js";import"../chunk-d5g1caxb.js";import"../chunk-fzs7g6mc.js";import"../chunk-7j48ymk1.js";import{ya as j}from"../chunk-r3v2cnrj.js";import"../chunk-aprjvzrz.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-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);
3
3
 
4
4
  //# debugId=4C9148510A2605D864756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{al as h}from"./chunk-aprjvzrz.js";var A=h((f)=>{f.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpAuthLocation||(f.HttpAuthLocation={}));f.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpApiKeyAuthLocation||(f.HttpApiKeyAuthLocation={}));f.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(f.EndpointURLScheme||(f.EndpointURLScheme={}));f.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(f.AlgorithmId||(f.AlgorithmId={}));var x=(t)=>{let o=[];if(t.sha256!==void 0)o.push({algorithmId:()=>f.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)o.push({algorithmId:()=>f.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){o.push(s)},checksumAlgorithms(){return o}}},d=(t)=>{let o={};return t.checksumAlgorithms().forEach((s)=>{o[s.algorithmId()]=s.checksumConstructor()}),o},a=(t)=>{return x(t)},E=(t)=>{return d(t)};f.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(f.FieldPosition||(f.FieldPosition={}));var m="__smithy_context";f.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(f.IniSectionType||(f.IniSectionType={}));f.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(f.RequestHandlerProtocol||(f.RequestHandlerProtocol={}));f.SMITHY_CONTEXT_KEY=m;f.getDefaultClientConfiguration=a;f.resolveDefaultRuntimeConfig=E});
2
+ import{bl as h}from"./chunk-rnp5k8m3.js";var A=h((f)=>{f.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpAuthLocation||(f.HttpAuthLocation={}));f.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpApiKeyAuthLocation||(f.HttpApiKeyAuthLocation={}));f.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(f.EndpointURLScheme||(f.EndpointURLScheme={}));f.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(f.AlgorithmId||(f.AlgorithmId={}));var x=(t)=>{let o=[];if(t.sha256!==void 0)o.push({algorithmId:()=>f.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)o.push({algorithmId:()=>f.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){o.push(s)},checksumAlgorithms(){return o}}},d=(t)=>{let o={};return t.checksumAlgorithms().forEach((s)=>{o[s.algorithmId()]=s.checksumConstructor()}),o},a=(t)=>{return x(t)},E=(t)=>{return d(t)};f.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(f.FieldPosition||(f.FieldPosition={}));var m="__smithy_context";f.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(f.IniSectionType||(f.IniSectionType={}));f.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(f.RequestHandlerProtocol||(f.RequestHandlerProtocol={}));f.SMITHY_CONTEXT_KEY=m;f.getDefaultClientConfiguration=a;f.resolveDefaultRuntimeConfig=E});
3
3
  export{A as $};
4
4
 
5
- //# debugId=6AFBF96899690AC764756E2164756E21
5
+ //# debugId=DA8C1E7555498AFD64756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "'use strict';\n\nexports.HttpAuthLocation = void 0;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));\n\nexports.HttpApiKeyAuthLocation = void 0;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));\n\nexports.EndpointURLScheme = void 0;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));\n\nexports.AlgorithmId = void 0;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(exports.AlgorithmId || (exports.AlgorithmId = {}));\nconst getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nconst resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n\nconst getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nconst resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n\nexports.FieldPosition = void 0;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(exports.FieldPosition || (exports.FieldPosition = {}));\n\nconst SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\nexports.IniSectionType = void 0;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(exports.IniSectionType || (exports.IniSectionType = {}));\n\nexports.RequestHandlerProtocol = void 0;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));\n\nexports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;\nexports.getDefaultClientConfiguration = getDefaultClientConfiguration;\nexports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;\n"
6
6
  ],
7
7
  "mappings": ";uDAEQ,mBAAwB,QAC/B,QAAS,CAAC,EAAkB,CACzB,EAAiB,OAAY,SAC7B,EAAiB,MAAW,UACrB,qBAA6B,mBAAmB,CAAC,EAAE,EAEtD,yBAA8B,QACrC,QAAS,CAAC,EAAwB,CAC/B,EAAuB,OAAY,SACnC,EAAuB,MAAW,UAC3B,2BAAmC,yBAAyB,CAAC,EAAE,EAElE,oBAAyB,QAChC,QAAS,CAAC,EAAmB,CAC1B,EAAkB,KAAU,OAC5B,EAAkB,MAAW,UACtB,sBAA8B,oBAAoB,CAAC,EAAE,EAExD,cAAmB,QAC1B,QAAS,CAAC,EAAa,CACpB,EAAY,IAAS,MACrB,EAAY,MAAW,QACvB,EAAY,OAAY,SACxB,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E7555498AFD64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Q as C}from"./chunk-xhvknqvn.js";import{aa as A}from"./chunk-p462p2xe.js";import{$k as _}from"./chunk-aprjvzrz.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as a,a as b,i as c,I as d,d as e,v as f,T as g};
2
+ import{Q as C}from"./chunk-5pdgh9a1.js";import{aa as A}from"./chunk-xvvsc58s.js";import{al as _}from"./chunk-rnp5k8m3.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as a,a as b,i as c,I as d,d as e,v as f,T as g};
3
3
 
4
- //# debugId=3D5997734468C47A64756E2164756E21
4
+ //# debugId=C577836EF6520E2C64756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
6
6
  ],
7
7
  "mappings": ";sIAAA,SACA,KACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
8
- "debugId": "3D5997734468C47A64756E2164756E21",
8
+ "debugId": "C577836EF6520E2C64756E2164756E21",
9
9
  "names": []
10
10
  }