bazilion 0.12.2 → 0.13.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 (159) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +795 -240
  3. package/dist/cli.js.map +1 -1
  4. package/dist/daemon.js +4532 -1277
  5. package/dist/daemon.js.map +1 -1
  6. package/dist/migrations/0001_init.sql +21 -0
  7. package/dist/web/client/assets/{ProductionTeamPolicyEditor-CsWpTsy6.js → ProductionTeamPolicyEditor-DdpYInwV.js} +1 -1
  8. package/dist/web/client/assets/{ProfileCommunicationEditor-C43HvUe-.js → ProfileCommunicationEditor-BcSf2Hao.js} +1 -1
  9. package/dist/web/client/assets/{TeamTabs-DvqWieCq.js → TeamTabs-Bk89JfN7.js} +1 -1
  10. package/dist/web/client/assets/{TemplatesTabs-6Jd_xQj7.js → TemplatesTabs-CyDVzrOl.js} +1 -1
  11. package/dist/web/client/assets/{_id-BrA4Crh_.js → _id-CAJTTnee.js} +1 -1
  12. package/dist/web/client/assets/{_id-BUuz7Drv.js → _id-CN6jPaBu.js} +1 -1
  13. package/dist/web/client/assets/{_id-BegmVRmT.js → _id-DGwJqqDc.js} +1 -1
  14. package/dist/web/client/assets/{_id-AOAT0H_5.js → _id-DWTMH7Eb.js} +1 -1
  15. package/dist/web/client/assets/{activity-n0Fw9_w3.js → activity-DK_M0-bn.js} +1 -1
  16. package/dist/web/client/assets/{agents-C50pdxp7.js → agents-B-i5pASm.js} +1 -1
  17. package/dist/web/client/assets/{agents-B33VQtbl.js → agents-n8U7qNxw.js} +1 -1
  18. package/dist/web/client/assets/{approvals-DVW0hX8h.js → approvals-CmVxCy0Z.js} +1 -1
  19. package/dist/web/client/assets/{attention-B2490jcN.js → attention-F0lUQCWE.js} +1 -1
  20. package/dist/web/client/assets/chevron-down-OndG7r1U.js +1 -0
  21. package/dist/web/client/assets/config-DuApZ9xS.js +3 -0
  22. package/dist/web/client/assets/{context-DcFzsfZ3.js → context-C1sMnW6K.js} +1 -1
  23. package/dist/web/client/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
  24. package/dist/web/client/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
  25. package/dist/web/client/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
  26. package/dist/web/client/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
  27. package/dist/web/client/assets/dm-sans-latin-600-normal-Aqo67rzb.woff2 +0 -0
  28. package/dist/web/client/assets/dm-sans-latin-600-normal-BmdmIIQ2.woff +0 -0
  29. package/dist/web/client/assets/dm-sans-latin-700-normal-CUSSCpQX.woff +0 -0
  30. package/dist/web/client/assets/dm-sans-latin-700-normal-DvUfVpUG.woff2 +0 -0
  31. package/dist/web/client/assets/dm-serif-display-latin-400-normal-C5_t9oOD.woff2 +0 -0
  32. package/dist/web/client/assets/dm-serif-display-latin-400-normal-_kVFYEpx.woff +0 -0
  33. package/dist/web/client/assets/{inbox-Bn1GbUsJ.js → inbox-D2NypLee.js} +1 -1
  34. package/dist/web/client/assets/{index-3nrK5iFr.js → index-B3vdrEEg.js} +4 -4
  35. package/dist/web/client/assets/index-Cofc7zhl.css +1 -0
  36. package/dist/web/client/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  37. package/dist/web/client/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  38. package/dist/web/client/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  39. package/dist/web/client/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  40. package/dist/web/client/assets/{learning-BUX1MFu2.js → learning-zYDCfVxT.js} +1 -1
  41. package/dist/web/client/assets/{login-CMWpGDKv.js → login-B1Un51Zx.js} +1 -1
  42. package/dist/web/client/assets/{mcp-lZV08dqc.js → mcp-DSVmJBdv.js} +1 -1
  43. package/dist/web/client/assets/{members-DAeaY2Cy.js → members-Pl7hXJcN.js} +1 -1
  44. package/dist/web/client/assets/{memory-HmMWxxdF.js → memory-Co3BEaAq.js} +1 -1
  45. package/dist/web/client/assets/plus-Dor-_wmL.js +1 -0
  46. package/dist/web/client/assets/{policy-DaijITy7.js → policy-CHM95pMU.js} +1 -1
  47. package/dist/web/client/assets/{routes-BNk270AM.js → routes-D29qjwG0.js} +1 -1
  48. package/dist/web/client/assets/{services-DtrpJrdo.js → services-CCQ_6YWQ.js} +1 -1
  49. package/dist/web/client/assets/{skills-Cv93A3P3.js → skills-3xAIvzvP.js} +1 -1
  50. package/dist/web/client/assets/styles-D6RPN7RK.css +2 -0
  51. package/dist/web/client/assets/{teams-D92R9Pb7.js → teams-Dm_huGxn.js} +1 -1
  52. package/dist/web/client/assets/{teams-CCFnSNKi.js → teams-UGLyjHYj.js} +1 -1
  53. package/dist/web/client/assets/telegram-3KvrJVO6.js +1 -0
  54. package/dist/web/client/assets/tokens-DUSFmV5_.js +1 -0
  55. package/dist/web/client/assets/{triggers-NT24i4hZ.js → triggers-DlQ2KF1h.js} +1 -1
  56. package/dist/web/client/assets/{welcome-D0cy68eZ.js → welcome-DkP8qzK1.js} +1 -1
  57. package/dist/web/server/assets/{_id-CwyGjJeP.js → _id-BENqNBfK.js} +4 -4
  58. package/dist/web/server/assets/{_id-D3Ap7zZA.js → _id-BFELaMIN.js} +1 -1
  59. package/dist/web/server/assets/{_id-LrvXU4Nr.js → _id-BQ2zoMiR.js} +1 -1
  60. package/dist/web/server/assets/{_id-D27T85mU.js → _id-BZWunvy7.js} +4 -4
  61. package/dist/web/server/assets/{_id-BHYLL8M-.js → _id-BreRHYV2.js} +1 -1
  62. package/dist/web/server/assets/{_id-C3HY4lWg.js → _id-CPIXIqyO.js} +1 -1
  63. package/dist/web/server/assets/{_id-FcHdSocl.js → _id-CvYqVJPU.js} +4 -4
  64. package/dist/web/server/assets/{_id-DinTp_7X.js → _id-DkrNqqTw.js} +3 -3
  65. package/dist/web/server/assets/{_id-IzadFZV9.js → _id-DvlDkk04.js} +4 -4
  66. package/dist/web/server/assets/{_id-BhOB8Umi.js → _id-DxCnEFpm.js} +4 -4
  67. package/dist/web/server/assets/{_id-tB47Vsfp.js → _id-HMy7jM3P.js} +3 -3
  68. package/dist/web/server/assets/{_id-Dj1yZ3zJ.js → _id-xTD_6ApX.js} +4 -4
  69. package/dist/web/server/assets/{_tanstack-start-manifest_v-BGDBdnUs.js → _tanstack-start-manifest_v-COkJjXt_.js} +57 -56
  70. package/dist/web/server/assets/{activity-DohitgwW.js → activity-9VP6QDTH.js} +3 -3
  71. package/dist/web/server/assets/{activity-BCI4mfNS.js → activity-B6N1T_5N.js} +1 -1
  72. package/dist/web/server/assets/{activity-D9SMqBhy.js → activity-BazZNfvf.js} +3 -3
  73. package/dist/web/server/assets/{agents-BY74v7fM.js → agents-BJAv919x.js} +3 -3
  74. package/dist/web/server/assets/{agents-C9xlWK0Z.js → agents-BpSeOA30.js} +4 -4
  75. package/dist/web/server/assets/{agents-BvttypqB.js → agents-DY630p6x.js} +3 -3
  76. package/dist/web/server/assets/{agents-DZuFEj0D.js → agents-DfoLnTyD.js} +1 -1
  77. package/dist/web/server/assets/{agents-BPKOshR5.js → agents-DjyQk94u.js} +4 -4
  78. package/dist/web/server/assets/{agents-CgZMHj80.js → agents-wSYNPuyK.js} +1 -1
  79. package/dist/web/server/assets/{approvals-DCaVw1Mz.js → approvals-BYajNOdE.js} +1 -1
  80. package/dist/web/server/assets/{approvals-BGU-XGIO.js → approvals-BYi84gwl.js} +3 -3
  81. package/dist/web/server/assets/{approvals-CWcFHlor.js → approvals-BkUGmYU9.js} +3 -3
  82. package/dist/web/server/assets/{attention-BxkTf337.js → attention-Bw_wiiqI.js} +3 -3
  83. package/dist/web/server/assets/{attention-CM-Ks1N9.js → attention-UhqPK_Ro.js} +3 -3
  84. package/dist/web/server/assets/{attention-w21GQIGH.js → attention-Z3bGuxOD.js} +1 -1
  85. package/dist/web/server/assets/{auth-byfSx6Ja.js → auth-7BHTH-KS.js} +5 -5
  86. package/dist/web/server/assets/{config-BDCJdtj2.js → config-BMiajTZP.js} +10 -5
  87. package/dist/web/server/assets/{config-BmixCpz-.js → config-DGzM28F_.js} +197 -15
  88. package/dist/web/server/assets/{config-1w2GiJUn.js → config-wYtIhkRm.js} +3 -3
  89. package/dist/web/server/assets/context-BkDDwbby.js +12 -0
  90. package/dist/web/server/assets/context-DMc0KyHh.js +12 -0
  91. package/dist/web/server/assets/{context-DrkrIWun.js → context-poimKI7w.js} +1 -1
  92. package/dist/web/server/assets/{createServerRpc-pU-IQV2Y.js → createServerRpc-B7Yr1K8i.js} +1 -1
  93. package/dist/web/server/assets/{createSsrRpc-DFsIAfFd.js → createSsrRpc-6LHNEsSK.js} +1 -1
  94. package/dist/web/server/assets/{daemon-client-2NRMzlTr.js → daemon-client-CI5NHwNC.js} +16 -4
  95. package/dist/web/server/assets/{inbox-ZvDNAjaM.js → inbox-0iiSg-Y1.js} +4 -4
  96. package/dist/web/server/assets/{inbox-BLUzA5sQ.js → inbox-DTTfSuGU.js} +1 -1
  97. package/dist/web/server/assets/{inbox-CzlKT9Wg.js → inbox-Dv55rGYq.js} +4 -4
  98. package/dist/web/server/assets/{learning-8zav4pIT.js → learning-C2upa1CE.js} +4 -4
  99. package/dist/web/server/assets/{learning-B7PBkvER.js → learning-DpyLNVe8.js} +4 -4
  100. package/dist/web/server/assets/{learning-Cq7K2heb.js → learning-fG8316uc.js} +1 -1
  101. package/dist/web/server/assets/{login-Bx5LEyGP.js → login-CrFVVUaE.js} +1 -1
  102. package/dist/web/server/assets/{login-CmWvxfTK.js → login-D_GDeTrB.js} +7 -7
  103. package/dist/web/server/assets/{mcp-DIWTogHM.js → mcp-BQtp2T87.js} +3 -3
  104. package/dist/web/server/assets/{mcp-2pwT9HU8.js → mcp-BvnvlVFd.js} +3 -3
  105. package/dist/web/server/assets/{mcp-BJjLIdP0.js → mcp-DlgXUcAS.js} +1 -1
  106. package/dist/web/server/assets/members-BP3UTqu1.js +12 -0
  107. package/dist/web/server/assets/{members-CCv17cjQ.js → members-CteHKPSF.js} +1 -1
  108. package/dist/web/server/assets/members-DXu2oAS_.js +12 -0
  109. package/dist/web/server/assets/{memory-Dngc13Nw.js → memory-BqV-Afy1.js} +4 -4
  110. package/dist/web/server/assets/{memory-a8Kz57Kh.js → memory-C6fX_FKI.js} +1 -1
  111. package/dist/web/server/assets/{memory-pZ4pZT7p.js → memory-Iq2M0-Yc.js} +4 -4
  112. package/dist/web/server/assets/{policy-Bb-vEgqg.js → policy-18fdTFO4.js} +3 -3
  113. package/dist/web/server/assets/{policy-BcGELcc9.js → policy-Bg6u-rTq.js} +1 -1
  114. package/dist/web/server/assets/{policy-C30AeFIb.js → policy-D7kj3Cy7.js} +3 -3
  115. package/dist/web/server/assets/public-origin-xV0lm0Ty.js +25 -0
  116. package/dist/web/server/assets/{router-CIVjTgNp.js → router-D-6TzLRZ.js} +167 -64
  117. package/dist/web/server/assets/{routes-BrA-U_Hm.js → routes-CNRzy79H.js} +4 -4
  118. package/dist/web/server/assets/{routes-B6cMLIPk.js → routes-CiPfEldd.js} +1 -1
  119. package/dist/web/server/assets/{routes-C19CMLZt.js → routes-D933ngZS.js} +4 -4
  120. package/dist/web/server/assets/{services-B9yBWDX0.js → services-DJRA1A0-.js} +1 -1
  121. package/dist/web/server/assets/{services-wG8I06oS.js → services-DozuJtzX.js} +3 -3
  122. package/dist/web/server/assets/{services-C4szdhPx.js → services-OB4LAr2A.js} +3 -3
  123. package/dist/web/server/assets/{skills-BZdqiDig.js → skills-Babb9jsQ.js} +1 -1
  124. package/dist/web/server/assets/{skills-C-UgkuCW.js → skills-D5DQL8bM.js} +3 -3
  125. package/dist/web/server/assets/{skills-a9VSWHWq.js → skills-DfGSJTCB.js} +3 -3
  126. package/dist/web/server/assets/start-uKQNK6if.js +70 -0
  127. package/dist/web/server/assets/{teams-CpQ0YgWf.js → teams-Bk6ZT0MD.js} +1 -1
  128. package/dist/web/server/assets/{teams-jBtvnk59.js → teams-Cc2Czynq.js} +1 -1
  129. package/dist/web/server/assets/{teams-DqfrEoH6.js → teams-DPnAX4wD.js} +4 -4
  130. package/dist/web/server/assets/{teams-DEpQR2QA.js → teams-DqC4wZxu.js} +3 -3
  131. package/dist/web/server/assets/{teams-OIkHuxy1.js → teams-Dz6ZEMRo.js} +3 -3
  132. package/dist/web/server/assets/{teams-MjqgsmC3.js → teams-be05ci17.js} +3 -3
  133. package/dist/web/server/assets/{telegram-DNgCWebD.js → telegram-1AWL6lFw.js} +3 -3
  134. package/dist/web/server/assets/{telegram-CBF8SJzB.js → telegram-DUbDIVGX.js} +122 -3
  135. package/dist/web/server/assets/{telegram-XwyKSEtj.js → telegram-J4T0XhwQ.js} +3 -3
  136. package/dist/web/server/assets/{tokens-yyTSfBSN.js → tokens-CJM_0NDa.js} +126 -22
  137. package/dist/web/server/assets/{tokens-BnwFbV7T.js → tokens-DO5BzNOn.js} +4 -4
  138. package/dist/web/server/assets/tokens-DjM8GsgS.js +19 -0
  139. package/dist/web/server/assets/{triggers-CSNNzRIi.js → triggers-B87fycBl.js} +1 -1
  140. package/dist/web/server/assets/{triggers-BZPl5CHs.js → triggers-BdBx-HwR.js} +4 -4
  141. package/dist/web/server/assets/{triggers-D79NoSXk.js → triggers-Nezfw-Bd.js} +4 -4
  142. package/dist/web/server/server.js +30 -30
  143. package/dist/web-server.js +4 -0
  144. package/dist/web-server.js.map +1 -1
  145. package/dist/worker.js +1744 -362
  146. package/dist/worker.js.map +1 -1
  147. package/package.json +7 -6
  148. package/dist/web/client/assets/chevron-down-B0aNNOyn.js +0 -1
  149. package/dist/web/client/assets/config-CMMxxeX2.js +0 -3
  150. package/dist/web/client/assets/plus-CPzRJg1V.js +0 -1
  151. package/dist/web/client/assets/styles-DMltY3su.css +0 -2
  152. package/dist/web/client/assets/telegram-BF1vdgDB.js +0 -1
  153. package/dist/web/client/assets/tokens-BXj6hWW-.js +0 -1
  154. package/dist/web/server/assets/context-B-XDf6Ym.js +0 -12
  155. package/dist/web/server/assets/context-BXGo5Vfi.js +0 -12
  156. package/dist/web/server/assets/members-CW5aBe81.js +0 -12
  157. package/dist/web/server/assets/members-VdPwD6CE.js +0 -12
  158. package/dist/web/server/assets/start-WH8WzTL_.js +0 -4
  159. package/dist/web/server/assets/tokens-DPDMSN5O.js +0 -12
@@ -1,4 +1,4 @@
1
- import { t as Route } from "./telegram-XwyKSEtj.js";
1
+ import { t as Route } from "./telegram-J4T0XhwQ.js";
2
2
  import { t as Button } from "./Button-Dsnw22OF.js";
3
3
  import { t as ConfigPage } from "./ConfigPage-BKlh5vOU.js";
4
4
  import { useEffect, useState } from "react";
@@ -222,10 +222,114 @@ function TelegramIntegrationPage() {
222
222
  health?.polling && /* @__PURE__ */ jsx(PollingState, { polling: health.polling })
223
223
  ]
224
224
  }),
225
+ initial.configured && /* @__PURE__ */ jsx(OwnerPairingCard, {}),
225
226
  initial.configured && /* @__PURE__ */ jsx(AccessControlCard, {})
226
227
  ]
227
228
  });
228
229
  }
230
+ function OwnerPairingCard() {
231
+ const [status, setStatus] = useState(null);
232
+ const [code, setCode] = useState(null);
233
+ const [err, setErr] = useState(null);
234
+ const load = async () => {
235
+ const res = await fetch("/api/config/telegram/pairing");
236
+ if (!res.ok) throw new Error(res.statusText);
237
+ setStatus(await res.json());
238
+ };
239
+ useEffect(() => {
240
+ load().catch((e) => setErr(e.message));
241
+ }, []);
242
+ async function createChallenge() {
243
+ setErr(null);
244
+ const res = await fetch("/api/config/telegram/pairing/challenge", { method: "POST" });
245
+ const body = await res.json().catch(() => ({}));
246
+ if (!res.ok || !body.code) return setErr(body.error ?? res.statusText);
247
+ setCode(body.code);
248
+ setStatus(body);
249
+ }
250
+ async function cancelChallenge() {
251
+ await fetch("/api/config/telegram/pairing/challenge", { method: "DELETE" });
252
+ setCode(null);
253
+ await load();
254
+ }
255
+ async function resetOwner() {
256
+ if (!confirm("Revoke the Telegram owner now? Ingress will close until a new owner pairs.")) return;
257
+ if (!(await fetch("/api/config/telegram/pairing/reset", {
258
+ method: "POST",
259
+ headers: { "content-type": "application/json" },
260
+ body: JSON.stringify({ confirm: true })
261
+ })).ok) return setErr("Could not reset Telegram owner");
262
+ setCode(null);
263
+ await load();
264
+ }
265
+ return /* @__PURE__ */ jsxs("section", {
266
+ className: "rounded-lg border bg-card p-5",
267
+ children: [
268
+ /* @__PURE__ */ jsx("h3", {
269
+ className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-1",
270
+ children: "Owner pairing"
271
+ }),
272
+ /* @__PURE__ */ jsxs("p", {
273
+ className: "text-xs text-muted-foreground mb-3",
274
+ children: [
275
+ "Telegram stays closed until one owner consumes a short-lived code in the configured",
276
+ " ",
277
+ /* @__PURE__ */ jsx("code", {
278
+ className: "font-mono",
279
+ children: "⚙ bazilion"
280
+ }),
281
+ " service topic."
282
+ ]
283
+ }),
284
+ status?.paired ? /* @__PURE__ */ jsxs("div", {
285
+ className: "flex flex-wrap items-center gap-3",
286
+ children: [/* @__PURE__ */ jsx("span", {
287
+ className: "text-sm text-success",
288
+ children: "✓ owner paired"
289
+ }), /* @__PURE__ */ jsx(Button, {
290
+ variant: "danger",
291
+ onClick: resetOwner,
292
+ children: "reset owner"
293
+ })]
294
+ }) : /* @__PURE__ */ jsxs("div", {
295
+ className: "space-y-2",
296
+ children: [
297
+ /* @__PURE__ */ jsx("p", {
298
+ className: "text-sm text-warning",
299
+ children: "Unpaired — all Telegram ingress is closed."
300
+ }),
301
+ code ? /* @__PURE__ */ jsxs("div", {
302
+ className: "rounded-md border bg-muted/30 p-3 text-sm",
303
+ children: [
304
+ "Send ",
305
+ /* @__PURE__ */ jsxs("code", {
306
+ className: "font-mono",
307
+ children: ["/pair ", code]
308
+ }),
309
+ " in the service topic. This code is shown once and expires in ten minutes."
310
+ ]
311
+ }) : null,
312
+ /* @__PURE__ */ jsxs("div", {
313
+ className: "flex flex-wrap gap-2",
314
+ children: [/* @__PURE__ */ jsx(Button, {
315
+ variant: "primary",
316
+ onClick: createChallenge,
317
+ children: "generate pairing code"
318
+ }), status?.challengeActive && /* @__PURE__ */ jsx(Button, {
319
+ variant: "ghost",
320
+ onClick: cancelChallenge,
321
+ children: "cancel code"
322
+ })]
323
+ })
324
+ ]
325
+ }),
326
+ err && /* @__PURE__ */ jsx("p", {
327
+ className: "mt-2 text-xs text-danger",
328
+ children: err
329
+ })
330
+ ]
331
+ });
332
+ }
229
333
  function AccessControlCard() {
230
334
  const [users, setUsers] = useState(null);
231
335
  const [userId, setUserId] = useState("");
@@ -298,7 +402,7 @@ function AccessControlCard() {
298
402
  /* @__PURE__ */ jsxs("p", {
299
403
  className: "text-xs text-muted-foreground mb-3",
300
404
  children: [
301
- "Allowlisted Telegram users can use the bot (commands + chat). While the list is empty the bot is open and the first person to message it becomes owner. Users find their id via",
405
+ "Allowlisted Telegram users can use the bot (commands + chat). An empty list is closed; ownership begins only through the one-time pairing flow. Users find their id via",
302
406
  " ",
303
407
  /* @__PURE__ */ jsx("code", {
304
408
  className: "font-mono",
@@ -312,7 +416,7 @@ function AccessControlCard() {
312
416
  children: "loading…"
313
417
  }) : users.length === 0 ? /* @__PURE__ */ jsx("p", {
314
418
  className: "text-xs text-warning mb-3",
315
- children: "Open — no allowlist yet. The first user to message the bot claims owner."
419
+ children: "Closed — no paired owner or allowlisted members."
316
420
  }) : /* @__PURE__ */ jsx("ul", {
317
421
  className: "mb-3 space-y-1 text-sm",
318
422
  children: users.map((u) => /* @__PURE__ */ jsxs("li", {
@@ -508,6 +612,21 @@ function PreflightResult({ health }) {
508
612
  ok: p.privacyModeOff,
509
613
  label: "Privacy Mode is OFF",
510
614
  children: p.privacyModeOff ? "can_read_all_group_messages: true" : "BotFather → /mybots → select bot → Bot Settings → Team Privacy → Turn off"
615
+ }),
616
+ /* @__PURE__ */ jsx(Check, {
617
+ ok: p.chatIsPrivate,
618
+ label: "Supergroup is private",
619
+ children: p.chatIsPrivate ? "no public @username" : "public groups expose topic content to readers"
620
+ }),
621
+ /* @__PURE__ */ jsx(Check, {
622
+ ok: p.memberCount === 2,
623
+ label: "Expected membership",
624
+ children: p.memberCount === null ? "member count unavailable — verify one owner plus the bot manually" : `${p.memberCount} members reported; secure posture is one owner plus the bot`
625
+ }),
626
+ p.ownerPresent !== null && /* @__PURE__ */ jsx(Check, {
627
+ ok: p.ownerPresent,
628
+ label: "Paired owner is present",
629
+ children: p.ownerPresent ? "owner membership confirmed" : "owner missing — Telegram ingress is degraded"
511
630
  })
512
631
  ]
513
632
  });
@@ -1,8 +1,8 @@
1
- import { t as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-DFsIAfFd.js";
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/config/integrations/telegram.tsx
5
- var $$splitComponentImporter = () => import("./telegram-CBF8SJzB.js");
5
+ var $$splitComponentImporter = () => import("./telegram-DUbDIVGX.js");
6
6
  var fetchTelegramConfig = createServerFn({ method: "GET" }).handler(createSsrRpc("00a157dd07824e1f126f06646effd1d876f280f6fc64c144d2f6429414a4e58a"));
7
7
  var Route = createFileRoute("/config/integrations/telegram")({
8
8
  loader: () => fetchTelegramConfig(),
@@ -1,4 +1,4 @@
1
- import { t as Route } from "./tokens-BnwFbV7T.js";
1
+ import { t as Route } from "./tokens-DO5BzNOn.js";
2
2
  import { t as ConfigPage } from "./ConfigPage-BKlh5vOU.js";
3
3
  import { useState } from "react";
4
4
  import { useRouter } from "@tanstack/react-router";
@@ -8,12 +8,13 @@ function fmtTs(ts) {
8
8
  return new Date(ts).toISOString().slice(0, 16).replace("T", " ");
9
9
  }
10
10
  function TokensPage() {
11
- const { tokens } = Route.useLoaderData();
11
+ const { tokens, sessions } = Route.useLoaderData();
12
12
  const { all } = Route.useSearch();
13
13
  const includeRevoked = all === "1";
14
14
  const router = useRouter();
15
15
  const [label, setLabel] = useState("");
16
16
  const [created, setCreated] = useState(null);
17
+ const [expiresDays, setExpiresDays] = useState("90");
17
18
  const [err, setErr] = useState(null);
18
19
  const [busy, setBusy] = useState(false);
19
20
  async function mint(e) {
@@ -24,7 +25,10 @@ function TokensPage() {
24
25
  const res = await fetch("/api/tokens", {
25
26
  method: "POST",
26
27
  headers: { "content-type": "application/json" },
27
- body: JSON.stringify({ label })
28
+ body: JSON.stringify({
29
+ label,
30
+ expiresInDays: Number(expiresDays)
31
+ })
28
32
  });
29
33
  if (!res.ok) {
30
34
  const j = await res.json().catch(() => ({}));
@@ -43,6 +47,14 @@ function TokensPage() {
43
47
  await fetch(`/api/tokens/${id}`, { method: "DELETE" });
44
48
  await router.invalidate();
45
49
  }
50
+ async function revokeSession(id) {
51
+ const response = await fetch(`/api/sessions/${encodeURIComponent(id)}`, { method: "DELETE" });
52
+ if (!response.ok) {
53
+ setErr((await response.json().catch(() => ({}))).error ?? "Could not revoke browser session");
54
+ return;
55
+ }
56
+ await router.invalidate();
57
+ }
46
58
  return /* @__PURE__ */ jsxs(ConfigPage, {
47
59
  active: "tokens",
48
60
  title: "API tokens",
@@ -72,23 +84,38 @@ function TokensPage() {
72
84
  /* @__PURE__ */ jsxs("form", {
73
85
  onSubmit: mint,
74
86
  className: "mb-3 flex flex-col items-stretch gap-2 sm:flex-row sm:items-end",
75
- children: [/* @__PURE__ */ jsxs("label", {
76
- className: "w-full text-sm sm:w-auto",
77
- children: ["Label", /* @__PURE__ */ jsx("input", {
78
- type: "text",
79
- value: label,
80
- onChange: (e) => setLabel(e.target.value),
81
- required: true,
82
- placeholder: "e.g. laptop-tailscale",
83
- autoComplete: "off",
84
- className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-72"
85
- })]
86
- }), /* @__PURE__ */ jsx("button", {
87
- type: "submit",
88
- disabled: busy,
89
- className: "rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50",
90
- children: busy ? "creating…" : "create"
91
- })]
87
+ children: [
88
+ /* @__PURE__ */ jsxs("label", {
89
+ className: "w-full text-sm sm:w-auto",
90
+ children: ["Label", /* @__PURE__ */ jsx("input", {
91
+ type: "text",
92
+ value: label,
93
+ onChange: (e) => setLabel(e.target.value),
94
+ required: true,
95
+ placeholder: "e.g. laptop-tailscale",
96
+ autoComplete: "off",
97
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-72"
98
+ })]
99
+ }),
100
+ /* @__PURE__ */ jsxs("label", {
101
+ className: "w-full text-sm sm:w-auto",
102
+ children: ["Expires in days", /* @__PURE__ */ jsx("input", {
103
+ type: "number",
104
+ min: 1,
105
+ max: 365,
106
+ value: expiresDays,
107
+ onChange: (e) => setExpiresDays(e.target.value),
108
+ required: true,
109
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-36"
110
+ })]
111
+ }),
112
+ /* @__PURE__ */ jsx("button", {
113
+ type: "submit",
114
+ disabled: busy,
115
+ className: "rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50",
116
+ children: busy ? "creating…" : "create"
117
+ })
118
+ ]
92
119
  }),
93
120
  created && /* @__PURE__ */ jsxs("div", {
94
121
  className: "rounded-md border border-warning/25 bg-warning/10 p-3",
@@ -127,18 +154,20 @@ function TokensPage() {
127
154
  className: "py-2",
128
155
  children: "label"
129
156
  }),
157
+ /* @__PURE__ */ jsx("th", { children: "kind" }),
130
158
  /* @__PURE__ */ jsx("th", { children: "id" }),
131
159
  /* @__PURE__ */ jsx("th", { children: "state" }),
132
160
  /* @__PURE__ */ jsx("th", { children: "created" }),
133
161
  /* @__PURE__ */ jsx("th", { children: "last used" }),
162
+ /* @__PURE__ */ jsx("th", { children: "expires" }),
134
163
  /* @__PURE__ */ jsx("th", {})
135
164
  ] })
136
165
  }), /* @__PURE__ */ jsxs("tbody", { children: [tokens.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
137
- colSpan: 6,
166
+ colSpan: 8,
138
167
  className: "py-6 text-center text-muted-foreground italic",
139
168
  children: "no tokens yet — mint one above"
140
169
  }) }), tokens.map((t) => {
141
- const isBootstrap = t.label === "bootstrap";
170
+ const isBootstrap = t.kind === "bootstrap";
142
171
  return /* @__PURE__ */ jsxs("tr", {
143
172
  className: "border-b last:border-0 hover:bg-accent/30",
144
173
  children: [
@@ -149,6 +178,7 @@ function TokensPage() {
149
178
  children: "auth.json"
150
179
  })]
151
180
  }),
181
+ /* @__PURE__ */ jsx("td", { children: t.kind }),
152
182
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", {
153
183
  className: "font-mono text-xs",
154
184
  children: t.id
@@ -168,6 +198,10 @@ function TokensPage() {
168
198
  className: "text-muted-foreground text-xs",
169
199
  children: t.lastUsedAt ? fmtTs(t.lastUsedAt) : "(never)"
170
200
  }),
201
+ /* @__PURE__ */ jsx("td", {
202
+ className: "text-muted-foreground text-xs",
203
+ children: t.expiresAt ? fmtTs(t.expiresAt) : "(never)"
204
+ }),
171
205
  /* @__PURE__ */ jsx("td", { children: !t.revokedAt && !isBootstrap && /* @__PURE__ */ jsx("button", {
172
206
  type: "button",
173
207
  onClick: () => revoke(t.id),
@@ -178,6 +212,76 @@ function TokensPage() {
178
212
  }, t.id);
179
213
  })] })]
180
214
  })
215
+ }),
216
+ /* @__PURE__ */ jsxs("section", {
217
+ className: "space-y-3",
218
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
219
+ className: "font-serif text-xl",
220
+ children: "Browser sessions"
221
+ }), /* @__PURE__ */ jsx("p", {
222
+ className: "text-sm text-muted-foreground",
223
+ children: "Sessions expire after 12 idle hours or seven days absolute. Revoking a device also revokes every session created from it."
224
+ })] }), /* @__PURE__ */ jsx("div", {
225
+ className: "overflow-x-auto",
226
+ children: /* @__PURE__ */ jsxs("table", {
227
+ className: "w-full min-w-[720px] text-sm",
228
+ children: [/* @__PURE__ */ jsx("thead", {
229
+ className: "border-b text-left text-muted-foreground",
230
+ children: /* @__PURE__ */ jsxs("tr", { children: [
231
+ /* @__PURE__ */ jsx("th", {
232
+ className: "py-2",
233
+ children: "device"
234
+ }),
235
+ /* @__PURE__ */ jsx("th", { children: "session" }),
236
+ /* @__PURE__ */ jsx("th", { children: "last seen" }),
237
+ /* @__PURE__ */ jsx("th", { children: "idle expiry" }),
238
+ /* @__PURE__ */ jsx("th", { children: "absolute expiry" }),
239
+ /* @__PURE__ */ jsx("th", {})
240
+ ] })
241
+ }), /* @__PURE__ */ jsxs("tbody", { children: [sessions.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
242
+ colSpan: 6,
243
+ className: "py-6 text-center italic text-muted-foreground",
244
+ children: "no active browser sessions"
245
+ }) }), sessions.map((session) => /* @__PURE__ */ jsxs("tr", {
246
+ className: "border-b last:border-0 hover:bg-accent/30",
247
+ children: [
248
+ /* @__PURE__ */ jsxs("td", {
249
+ className: "py-2",
250
+ children: [
251
+ session.deviceLabel,
252
+ " ",
253
+ session.current && /* @__PURE__ */ jsx("span", {
254
+ className: "text-xs text-success",
255
+ children: "current"
256
+ })
257
+ ]
258
+ }),
259
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", {
260
+ className: "font-mono text-xs",
261
+ children: session.id
262
+ }) }),
263
+ /* @__PURE__ */ jsx("td", {
264
+ className: "text-xs text-muted-foreground",
265
+ children: fmtTs(session.lastSeenAt)
266
+ }),
267
+ /* @__PURE__ */ jsx("td", {
268
+ className: "text-xs text-muted-foreground",
269
+ children: fmtTs(session.idleExpiresAt)
270
+ }),
271
+ /* @__PURE__ */ jsx("td", {
272
+ className: "text-xs text-muted-foreground",
273
+ children: fmtTs(session.absoluteExpiresAt)
274
+ }),
275
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", {
276
+ type: "button",
277
+ onClick: () => revokeSession(session.id),
278
+ className: "rounded-md border px-2 py-1 text-xs text-danger hover:bg-danger/10",
279
+ children: "revoke"
280
+ }) })
281
+ ]
282
+ }, session.id))] })]
283
+ })
284
+ })]
181
285
  })
182
286
  ]
183
287
  });
@@ -1,9 +1,9 @@
1
- import { t as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-DFsIAfFd.js";
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/config/tokens.tsx
5
- var $$splitComponentImporter = () => import("./tokens-yyTSfBSN.js");
6
- var fetchTokens = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1"));
5
+ var $$splitComponentImporter = () => import("./tokens-CJM_0NDa.js");
6
+ var fetchTokens = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1"));
7
7
  var Route = createFileRoute("/config/tokens")({
8
8
  validateSearch: (s) => ({ all: s.all === "1" ? "1" : void 0 }),
9
9
  loaderDeps: ({ search }) => ({ all: search.all === "1" }),
@@ -0,0 +1,19 @@
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
3
+ import { n as daemonClient } from "./daemon-client-CI5NHwNC.js";
4
+ //#region src/routes/config/tokens.tsx?tss-serverfn-split
5
+ var fetchTokens_createServerFn_handler = createServerRpc({
6
+ id: "46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1",
7
+ name: "fetchTokens",
8
+ filename: "src/routes/config/tokens.tsx"
9
+ }, (opts) => fetchTokens.__executeServer(opts));
10
+ var fetchTokens = createServerFn({ method: "POST" }).validator((d) => d).handler(fetchTokens_createServerFn_handler, async ({ data }) => {
11
+ const client = daemonClient();
12
+ const [tokenResult, sessionResult] = await Promise.all([client.get(`/api/tokens${data.all ? "?includeRevoked=1" : ""}`), client.get("/api/sessions")]);
13
+ return {
14
+ ...tokenResult,
15
+ ...sessionResult
16
+ };
17
+ });
18
+ //#endregion
19
+ export { fetchTokens_createServerFn_handler };
@@ -1,4 +1,4 @@
1
- import { t as Route } from "./triggers-BZPl5CHs.js";
1
+ import { t as Route } from "./triggers-BdBx-HwR.js";
2
2
  import { r as PageShell } from "./Page-LENulSXY.js";
3
3
  import { t as AgentTabs } from "./AgentTabs-aXdsiiMp.js";
4
4
  import { useState } from "react";
@@ -1,9 +1,9 @@
1
- import { t as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-DFsIAfFd.js";
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
4
4
  //#region src/routes/agents/$id/triggers.tsx
5
- var $$splitComponentImporter = () => import("./triggers-CSNNzRIi.js");
6
- var fetchTriggers = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d"));
5
+ var $$splitComponentImporter = () => import("./triggers-B87fycBl.js");
6
+ var fetchTriggers = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d"));
7
7
  var Route = createFileRoute("/agents/$id/triggers")({
8
8
  loader: async ({ params }) => {
9
9
  const data = await fetchTriggers({ data: { id: params.id } });
@@ -1,13 +1,13 @@
1
- import { t as createServerFn } from "../server.js";
2
- import { t as createServerRpc } from "./createServerRpc-pU-IQV2Y.js";
3
- import { n as daemonClient, r as ApiClientError } from "./daemon-client-2NRMzlTr.js";
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
3
+ import { n as daemonClient, r as ApiClientError } from "./daemon-client-CI5NHwNC.js";
4
4
  //#region src/routes/agents/$id/triggers.tsx?tss-serverfn-split
5
5
  var fetchTriggers_createServerFn_handler = createServerRpc({
6
6
  id: "57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d",
7
7
  name: "fetchTriggers",
8
8
  filename: "src/routes/agents/$id/triggers.tsx"
9
9
  }, (opts) => fetchTriggers.__executeServer(opts));
10
- var fetchTriggers = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(fetchTriggers_createServerFn_handler, async ({ data }) => {
10
+ var fetchTriggers = createServerFn({ method: "POST" }).validator((d) => d).handler(fetchTriggers_createServerFn_handler, async ({ data }) => {
11
11
  const c = daemonClient();
12
12
  let resolved;
13
13
  try {
@@ -3558,7 +3558,7 @@ var defaultSerovalPlugins = [
3558
3558
  * the dev styles URL for route-scoped CSS collection.
3559
3559
  */
3560
3560
  async function getStartManifest(matchedRoutes) {
3561
- const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-BGDBdnUs.js");
3561
+ const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-COkJjXt_.js");
3562
3562
  const startManifest = tsrStartManifest();
3563
3563
  let routes = startManifest.routes;
3564
3564
  routes[rootRouteId];
@@ -3582,107 +3582,107 @@ async function getStartManifest(matchedRoutes) {
3582
3582
  var manifest = {
3583
3583
  "00a157dd07824e1f126f06646effd1d876f280f6fc64c144d2f6429414a4e58a": {
3584
3584
  functionName: "fetchTelegramConfig_createServerFn_handler",
3585
- importer: () => import("./assets/telegram-DNgCWebD.js")
3585
+ importer: () => import("./assets/telegram-1AWL6lFw.js")
3586
3586
  },
3587
3587
  "032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e": {
3588
3588
  functionName: "fetchProfile_createServerFn_handler",
3589
- importer: () => import("./assets/_id-D27T85mU.js")
3589
+ importer: () => import("./assets/_id-BZWunvy7.js")
3590
3590
  },
3591
3591
  "0a6e766d2b4ea526da34cefed5342a6ecc5ff35ad1ce38fba4129b8c24d8e6e5": {
3592
3592
  functionName: "fetchMembers_createServerFn_handler",
3593
- importer: () => import("./assets/members-CW5aBe81.js")
3593
+ importer: () => import("./assets/members-BP3UTqu1.js")
3594
3594
  },
3595
3595
  "1ab05a58944792f34ad279deeaa56f70e9360687856b18327f335b022e8d21a5": {
3596
3596
  functionName: "fetchTeamsData_createServerFn_handler",
3597
- importer: () => import("./assets/teams-DqfrEoH6.js")
3597
+ importer: () => import("./assets/teams-DPnAX4wD.js")
3598
3598
  },
3599
3599
  "1bb12262aaa902fa208aafaa70b69c63da34c1fe523ab0322fe766903fc6b4c1": {
3600
3600
  functionName: "fetchTeams_createServerFn_handler",
3601
- importer: () => import("./assets/teams-MjqgsmC3.js")
3601
+ importer: () => import("./assets/teams-be05ci17.js")
3602
3602
  },
3603
3603
  "26dbbcbe40063e8aedfd343cf1dfd4dfe5589f24591c0ba35e80c611d7c57c7c": {
3604
3604
  functionName: "fetchHomeData_createServerFn_handler",
3605
- importer: () => import("./assets/routes-BrA-U_Hm.js")
3605
+ importer: () => import("./assets/routes-CNRzy79H.js")
3606
3606
  },
3607
3607
  "278849457893891c3d22806d15e11a0a42cc3630b30e9e62b74cf2d3b982ded7": {
3608
3608
  functionName: "fetchServers_createServerFn_handler",
3609
- importer: () => import("./assets/mcp-2pwT9HU8.js")
3609
+ importer: () => import("./assets/mcp-BvnvlVFd.js")
3610
3610
  },
3611
3611
  "2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb": {
3612
3612
  functionName: "fetchInbox_createServerFn_handler",
3613
- importer: () => import("./assets/inbox-CzlKT9Wg.js")
3613
+ importer: () => import("./assets/inbox-Dv55rGYq.js")
3614
3614
  },
3615
3615
  "46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1": {
3616
3616
  functionName: "fetchTokens_createServerFn_handler",
3617
- importer: () => import("./assets/tokens-DPDMSN5O.js")
3617
+ importer: () => import("./assets/tokens-DjM8GsgS.js")
3618
3618
  },
3619
3619
  "4773184b3ddd3656fb80ec74375a6d304e25acb56b79f1d349dcabf9f0914359": {
3620
3620
  functionName: "fetchGroup_createServerFn_handler",
3621
- importer: () => import("./assets/_id-IzadFZV9.js")
3621
+ importer: () => import("./assets/_id-DvlDkk04.js")
3622
3622
  },
3623
3623
  "57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d": {
3624
3624
  functionName: "fetchTriggers_createServerFn_handler",
3625
- importer: () => import("./assets/triggers-D79NoSXk.js")
3625
+ importer: () => import("./assets/triggers-Nezfw-Bd.js")
3626
3626
  },
3627
3627
  "5cdb81f2b930818ee9ab1d626ac99828ea652ff447fcbfc21b24dea415f8b39e": {
3628
3628
  functionName: "fetchActivity_createServerFn_handler",
3629
- importer: () => import("./assets/activity-DohitgwW.js")
3629
+ importer: () => import("./assets/activity-9VP6QDTH.js")
3630
3630
  },
3631
3631
  "6afd81bef0ee381d6e3641cd8e269968429c874e2f9d56c8f818cc9d180ee477": {
3632
3632
  functionName: "fetchServices_createServerFn_handler",
3633
- importer: () => import("./assets/services-wG8I06oS.js")
3633
+ importer: () => import("./assets/services-DozuJtzX.js")
3634
3634
  },
3635
3635
  "816fcbc7b3c7f2952660d3a2c8f49bb0c91084627a284c185b333b1d418fadf8": {
3636
3636
  functionName: "loadApprovals_createServerFn_handler",
3637
- importer: () => import("./assets/approvals-BGU-XGIO.js")
3637
+ importer: () => import("./assets/approvals-BYi84gwl.js")
3638
3638
  },
3639
3639
  "846c9081aed17057351730985f133b0aab67a5dabfca9562552829a90ff30849": {
3640
3640
  functionName: "fetchAgent_createServerFn_handler",
3641
- importer: () => import("./assets/_id-BhOB8Umi.js")
3641
+ importer: () => import("./assets/_id-DxCnEFpm.js")
3642
3642
  },
3643
3643
  "883b401299422096ee31ee824f9a24b49d06bdcedce398789778c4c549a92f3a": {
3644
3644
  functionName: "loadAttention_createServerFn_handler",
3645
- importer: () => import("./assets/attention-CM-Ks1N9.js")
3645
+ importer: () => import("./assets/attention-UhqPK_Ro.js")
3646
3646
  },
3647
3647
  "a0bbbee5d0c1240a05e35c04d56a0e95ec78f05265e4e937eec48c8ac2041e58": {
3648
3648
  functionName: "fetchTeam_createServerFn_handler",
3649
- importer: () => import("./assets/_id-tB47Vsfp.js")
3649
+ importer: () => import("./assets/_id-HMy7jM3P.js")
3650
3650
  },
3651
3651
  "a5d3825fc69573bb55bab6df578c750ebb0240dd394c3acee3adea02918a5dc2": {
3652
3652
  functionName: "fetchAuthState_createServerFn_handler",
3653
- importer: () => import("./assets/auth-byfSx6Ja.js")
3653
+ importer: () => import("./assets/auth-7BHTH-KS.js")
3654
3654
  },
3655
3655
  "ae1d30575b229c1e2622fbaf2252800a9a7acc84afdd68cba025ca890b8d52c5": {
3656
3656
  functionName: "fetchSkills_createServerFn_handler",
3657
- importer: () => import("./assets/skills-a9VSWHWq.js")
3657
+ importer: () => import("./assets/skills-DfGSJTCB.js")
3658
3658
  },
3659
3659
  "b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e": {
3660
3660
  functionName: "fetchProvidersData_createServerFn_handler",
3661
- importer: () => import("./assets/config-BDCJdtj2.js")
3661
+ importer: () => import("./assets/config-BMiajTZP.js")
3662
3662
  },
3663
3663
  "b859e1340a80871c50b0d3e60bd3f3b48fe3c66b083f8ff9d5b2981720d36a81": {
3664
3664
  functionName: "fetchContext_createServerFn_handler",
3665
- importer: () => import("./assets/context-B-XDf6Ym.js")
3665
+ importer: () => import("./assets/context-DMc0KyHh.js")
3666
3666
  },
3667
3667
  "b96a98e3ed6c8a3ab5f6a4ed8458e93da753ffd74e2912ef1724bb6e58030cb5": {
3668
3668
  functionName: "fetchMemory_createServerFn_handler",
3669
- importer: () => import("./assets/memory-Dngc13Nw.js")
3669
+ importer: () => import("./assets/memory-BqV-Afy1.js")
3670
3670
  },
3671
3671
  "bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3": {
3672
3672
  functionName: "fetchProfiles_createServerFn_handler",
3673
- importer: () => import("./assets/agents-BY74v7fM.js")
3673
+ importer: () => import("./assets/agents-BJAv919x.js")
3674
3674
  },
3675
3675
  "f715bab0037380aa3db7e237e7cf1e74168c363f48a960bb1ddfa5560de3a74e": {
3676
3676
  functionName: "fetchAgents_createServerFn_handler",
3677
- importer: () => import("./assets/agents-BPKOshR5.js")
3677
+ importer: () => import("./assets/agents-DjyQk94u.js")
3678
3678
  },
3679
3679
  "fc940d6dec5305aa64bdb9b9f5f7d4f925b2ba0608cb6d39af854a94872fc867": {
3680
3680
  functionName: "fetchPolicy_createServerFn_handler",
3681
- importer: () => import("./assets/policy-Bb-vEgqg.js")
3681
+ importer: () => import("./assets/policy-18fdTFO4.js")
3682
3682
  },
3683
3683
  "fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9": {
3684
3684
  functionName: "fetchLearning_createServerFn_handler",
3685
- importer: () => import("./assets/learning-8zav4pIT.js")
3685
+ importer: () => import("./assets/learning-C2upa1CE.js")
3686
3686
  }
3687
3687
  };
3688
3688
  async function getServerFnById(id, access) {
@@ -5560,8 +5560,8 @@ var getBaseManifest = getProdBaseManifest;
5560
5560
  var createEarlyHintsForRequest = createEarlyHintsCollector;
5561
5561
  async function loadEntries() {
5562
5562
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
5563
- import("./assets/router-CIVjTgNp.js"),
5564
- import("./assets/start-WH8WzTL_.js"),
5563
+ import("./assets/router-D-6TzLRZ.js"),
5564
+ import("./assets/start-uKQNK6if.js"),
5565
5565
  import("./assets/empty-plugin-adapters-Cq4--YW-.js")
5566
5566
  ]);
5567
5567
  return {
@@ -5947,4 +5947,4 @@ function createServerEntry(entry) {
5947
5947
  }
5948
5948
  var server_default = createServerEntry({ fetch: fetch$1 });
5949
5949
  //#endregion
5950
- export { createServerEntry, server_default as default, getCookie as i, TSS_SERVER_FUNCTION as n, getServerFnById as r, createServerFn as t };
5950
+ export { getCookie as a, createServerEntry, server_default as default, getServerFnById as i, createServerFn as n, TSS_SERVER_FUNCTION as r, createMiddleware as t };
@@ -12,6 +12,10 @@ var port = Number.parseInt(process.env.WEB_PORT ?? "4322", 10);
12
12
  var webDist = process.env.BAZILION_WEB_DIST ?? join(import.meta.dirname, "web");
13
13
  var clientDir = join(webDist, "client");
14
14
  var serverEntry = join(webDist, "server", "server.js");
15
+ if (process.env.BAZILION_PUBLIC_ORIGIN && !["127.0.0.1", "localhost", "::1"].includes(host)) {
16
+ console.error("BAZILION_PUBLIC_ORIGIN requires the web server to bind loopback only");
17
+ process.exit(1);
18
+ }
15
19
  if (!existsSync(clientDir) || !existsSync(serverEntry)) {
16
20
  console.error("error: bundled bazilion web UI not found");
17
21
  console.error(` expected client assets at ${clientDir}`);