@powerhousedao/switchboard 6.2.3-dev.10 → 6.2.3-dev.101

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 (310) hide show
  1. package/.tsbuild/test/ai-gateway.test.d.ts +2 -0
  2. package/.tsbuild/test/ai-gateway.test.d.ts.map +1 -0
  3. package/.tsbuild/test/attachments/byte-grants.test.d.ts +2 -0
  4. package/.tsbuild/test/attachments/byte-grants.test.d.ts.map +1 -0
  5. package/.tsbuild/test/attachments/byte-routes-read-gate.integration.test.d.ts +2 -0
  6. package/.tsbuild/test/attachments/byte-routes-read-gate.integration.test.d.ts.map +1 -0
  7. package/.tsbuild/test/attachments/reserve-metadata-parity.test.d.ts +2 -0
  8. package/.tsbuild/test/attachments/reserve-metadata-parity.test.d.ts.map +1 -0
  9. package/.tsbuild/test/attachments/url-signer.test.d.ts +2 -0
  10. package/.tsbuild/test/attachments/url-signer.test.d.ts.map +1 -0
  11. package/.tsbuild/test/boot-auth-config.test.d.ts +2 -0
  12. package/.tsbuild/test/boot-auth-config.test.d.ts.map +1 -0
  13. package/.tsbuild/test/boot-create-signature-policy.test.d.ts +2 -0
  14. package/.tsbuild/test/boot-create-signature-policy.test.d.ts.map +1 -0
  15. package/.tsbuild/test/boot-desktop-auth.test.d.ts +2 -0
  16. package/.tsbuild/test/boot-desktop-auth.test.d.ts.map +1 -0
  17. package/.tsbuild/test/boot-env-isolation.test.d.ts +2 -0
  18. package/.tsbuild/test/boot-env-isolation.test.d.ts.map +1 -0
  19. package/.tsbuild/test/boot-helpers.d.ts +5 -0
  20. package/.tsbuild/test/boot-helpers.d.ts.map +1 -0
  21. package/.tsbuild/test/boot-inspection-enabled.test.d.ts +2 -0
  22. package/.tsbuild/test/boot-inspection-enabled.test.d.ts.map +1 -0
  23. package/.tsbuild/test/boot-mcp-auth.test.d.ts +2 -0
  24. package/.tsbuild/test/boot-mcp-auth.test.d.ts.map +1 -0
  25. package/.tsbuild/test/boot-mcp-enabled.test.d.ts +2 -0
  26. package/.tsbuild/test/boot-mcp-enabled.test.d.ts.map +1 -0
  27. package/.tsbuild/test/boot-port-zero.test.d.ts +2 -0
  28. package/.tsbuild/test/boot-port-zero.test.d.ts.map +1 -0
  29. package/.tsbuild/test/boot-preconditions.test.d.ts +2 -0
  30. package/.tsbuild/test/boot-preconditions.test.d.ts.map +1 -0
  31. package/.tsbuild/test/boot-privacy.test.d.ts +2 -0
  32. package/.tsbuild/test/boot-privacy.test.d.ts.map +1 -0
  33. package/.tsbuild/test/boot-ready-drives.test.d.ts +2 -0
  34. package/.tsbuild/test/boot-ready-drives.test.d.ts.map +1 -0
  35. package/.tsbuild/test/boot-undo-v3-flag.test.d.ts +2 -0
  36. package/.tsbuild/test/boot-undo-v3-flag.test.d.ts.map +1 -0
  37. package/.tsbuild/test/boot-unsupported-stored-documents.test.d.ts +2 -0
  38. package/.tsbuild/test/boot-unsupported-stored-documents.test.d.ts.map +1 -0
  39. package/.tsbuild/test/boot-without-renown.test.d.ts +2 -0
  40. package/.tsbuild/test/boot-without-renown.test.d.ts.map +1 -0
  41. package/.tsbuild/test/boot-without-require-signatures.test.d.ts +2 -0
  42. package/.tsbuild/test/boot-without-require-signatures.test.d.ts.map +1 -0
  43. package/.tsbuild/test/boot-worker-trust-policy.test.d.ts +2 -0
  44. package/.tsbuild/test/boot-worker-trust-policy.test.d.ts.map +1 -0
  45. package/.tsbuild/test/boot-workflow-singleton-conflict.test.d.ts +2 -0
  46. package/.tsbuild/test/boot-workflow-singleton-conflict.test.d.ts.map +1 -0
  47. package/.tsbuild/test/boot-workflow-singleton-retry.test.d.ts +2 -0
  48. package/.tsbuild/test/boot-workflow-singleton-retry.test.d.ts.map +1 -0
  49. package/.tsbuild/test/builder-defaults.test.d.ts +2 -0
  50. package/.tsbuild/test/builder-defaults.test.d.ts.map +1 -0
  51. package/.tsbuild/test/config-from-env.test.d.ts +2 -0
  52. package/.tsbuild/test/config-from-env.test.d.ts.map +1 -0
  53. package/.tsbuild/test/config-merge.test.d.ts +2 -0
  54. package/.tsbuild/test/config-merge.test.d.ts.map +1 -0
  55. package/.tsbuild/test/config-schema.test.d.ts +2 -0
  56. package/.tsbuild/test/config-schema.test.d.ts.map +1 -0
  57. package/.tsbuild/test/create-signature-policy.test.d.ts +2 -0
  58. package/.tsbuild/test/create-signature-policy.test.d.ts.map +1 -0
  59. package/.tsbuild/test/default-drive-protocol-versions.test.d.ts +2 -0
  60. package/.tsbuild/test/default-drive-protocol-versions.test.d.ts.map +1 -0
  61. package/.tsbuild/test/default-drive-slug.test.d.ts +2 -0
  62. package/.tsbuild/test/default-drive-slug.test.d.ts.map +1 -0
  63. package/.tsbuild/test/delegated-publish.test.d.ts +2 -0
  64. package/.tsbuild/test/delegated-publish.test.d.ts.map +1 -0
  65. package/.tsbuild/test/durable-node-fs-pg16.test.d.ts +2 -0
  66. package/.tsbuild/test/durable-node-fs-pg16.test.d.ts.map +1 -0
  67. package/.tsbuild/test/fatal-shutdown.test.d.ts +2 -0
  68. package/.tsbuild/test/fatal-shutdown.test.d.ts.map +1 -0
  69. package/.tsbuild/test/inspection-throttle.test.d.ts +2 -0
  70. package/.tsbuild/test/inspection-throttle.test.d.ts.map +1 -0
  71. package/.tsbuild/test/keyframe-reclaim-store.test.d.ts +2 -0
  72. package/.tsbuild/test/keyframe-reclaim-store.test.d.ts.map +1 -0
  73. package/.tsbuild/test/observability-signals.test.d.ts +2 -0
  74. package/.tsbuild/test/observability-signals.test.d.ts.map +1 -0
  75. package/.tsbuild/test/permissions-backfill.test.d.ts +2 -0
  76. package/.tsbuild/test/permissions-backfill.test.d.ts.map +1 -0
  77. package/.tsbuild/test/pglite-preflight.test.d.ts +2 -0
  78. package/.tsbuild/test/pglite-preflight.test.d.ts.map +1 -0
  79. package/.tsbuild/test/pglite-storage-dirs.test.d.ts +2 -0
  80. package/.tsbuild/test/pglite-storage-dirs.test.d.ts.map +1 -0
  81. package/.tsbuild/test/pglite-store.test.d.ts +2 -0
  82. package/.tsbuild/test/pglite-store.test.d.ts.map +1 -0
  83. package/.tsbuild/test/plugin-config-schemas.test.d.ts +2 -0
  84. package/.tsbuild/test/plugin-config-schemas.test.d.ts.map +1 -0
  85. package/.tsbuild/test/plugin-presence.test.d.ts +2 -0
  86. package/.tsbuild/test/plugin-presence.test.d.ts.map +1 -0
  87. package/.tsbuild/test/port-probe.test.d.ts +2 -0
  88. package/.tsbuild/test/port-probe.test.d.ts.map +1 -0
  89. package/.tsbuild/test/processor-timing-log.test.d.ts +2 -0
  90. package/.tsbuild/test/processor-timing-log.test.d.ts.map +1 -0
  91. package/.tsbuild/test/renown-storage-path.test.d.ts +2 -0
  92. package/.tsbuild/test/renown-storage-path.test.d.ts.map +1 -0
  93. package/.tsbuild/test/renown-trust-policy.test.d.ts +2 -0
  94. package/.tsbuild/test/renown-trust-policy.test.d.ts.map +1 -0
  95. package/.tsbuild/test/served-schemas.test.d.ts +2 -0
  96. package/.tsbuild/test/served-schemas.test.d.ts.map +1 -0
  97. package/.tsbuild/test/shutdown.test.d.ts +2 -0
  98. package/.tsbuild/test/shutdown.test.d.ts.map +1 -0
  99. package/.tsbuild/test/snapshot-writer.d.ts +18 -0
  100. package/.tsbuild/test/snapshot-writer.d.ts.map +1 -0
  101. package/.tsbuild/test/store-lock.test.d.ts +2 -0
  102. package/.tsbuild/test/store-lock.test.d.ts.map +1 -0
  103. package/.tsbuild/test/two-switchboards.test.d.ts +2 -0
  104. package/.tsbuild/test/two-switchboards.test.d.ts.map +1 -0
  105. package/.tsbuild/test/unsupported-stored-documents.test.d.ts +2 -0
  106. package/.tsbuild/test/unsupported-stored-documents.test.d.ts.map +1 -0
  107. package/.tsbuild/test/workflow/harness.d.ts +56 -0
  108. package/.tsbuild/test/workflow/harness.d.ts.map +1 -0
  109. package/.tsbuild/test/workflow/oauth-apps-config.test.d.ts +2 -0
  110. package/.tsbuild/test/workflow/oauth-apps-config.test.d.ts.map +1 -0
  111. package/.tsbuild/test/workflow/oauth.test.d.ts +2 -0
  112. package/.tsbuild/test/workflow/oauth.test.d.ts.map +1 -0
  113. package/.tsbuild/test/workflow/resolvers.test.d.ts +2 -0
  114. package/.tsbuild/test/workflow/resolvers.test.d.ts.map +1 -0
  115. package/.tsbuild/test/workflow/runtime-host.test.d.ts +2 -0
  116. package/.tsbuild/test/workflow/runtime-host.test.d.ts.map +1 -0
  117. package/.tsbuild/test/workflow/waitpoint-routes.test.d.ts +2 -0
  118. package/.tsbuild/test/workflow/waitpoint-routes.test.d.ts.map +1 -0
  119. package/.tsbuild/test/workflow/waitpoint-runtime.test.d.ts +2 -0
  120. package/.tsbuild/test/workflow/waitpoint-runtime.test.d.ts.map +1 -0
  121. package/.tsbuild/test/workflow/webhook-dedupe.test.d.ts +2 -0
  122. package/.tsbuild/test/workflow/webhook-dedupe.test.d.ts.map +1 -0
  123. package/.tsbuild/test/workflow/webhook-signed.test.d.ts +2 -0
  124. package/.tsbuild/test/workflow/webhook-signed.test.d.ts.map +1 -0
  125. package/.tsbuild/test/workflow/webhook-trigger-test.test.d.ts +2 -0
  126. package/.tsbuild/test/workflow/webhook-trigger-test.test.d.ts.map +1 -0
  127. package/.tsbuild/test/workflow/webhook-unsigned.test.d.ts +2 -0
  128. package/.tsbuild/test/workflow/webhook-unsigned.test.d.ts.map +1 -0
  129. package/.tsbuild/test/workflow-reactor-access.test.d.ts +2 -0
  130. package/.tsbuild/test/workflow-reactor-access.test.d.ts.map +1 -0
  131. package/.tsbuild/test/workflow-reactor-enforcement.test.d.ts +2 -0
  132. package/.tsbuild/test/workflow-reactor-enforcement.test.d.ts.map +1 -0
  133. package/.tsbuild/test/workflow-read-gate.test.d.ts +2 -0
  134. package/.tsbuild/test/workflow-read-gate.test.d.ts.map +1 -0
  135. package/.tsbuild/test/workflow-runtime.test.d.ts +2 -0
  136. package/.tsbuild/test/workflow-runtime.test.d.ts.map +1 -0
  137. package/.tsbuild/test/workflows-plugin-config.test.d.ts +2 -0
  138. package/.tsbuild/test/workflows-plugin-config.test.d.ts.map +1 -0
  139. package/.tsbuild/tsconfig.tsbuildinfo +1 -1
  140. package/.tsbuild/tsdown.config.d.ts.map +1 -1
  141. package/.tsbuild/vitest.config.d.ts.map +1 -1
  142. package/Auth.md +144 -2
  143. package/CHANGELOG.md +1299 -0
  144. package/README.md +102 -22
  145. package/dist/boot.d.mts +46 -0
  146. package/dist/boot.d.mts.map +1 -0
  147. package/dist/boot.mjs +67 -0
  148. package/dist/boot.mjs.map +1 -0
  149. package/dist/config/from-env.d.mts +15 -0
  150. package/dist/config/from-env.d.mts.map +1 -0
  151. package/dist/config/from-env.mjs +4 -0
  152. package/dist/config/schema.d.mts +3 -0
  153. package/dist/config/schema.mjs +4 -0
  154. package/dist/from-env-FH4fPeIE.mjs +481 -0
  155. package/dist/from-env-FH4fPeIE.mjs.map +1 -0
  156. package/dist/index.d.mts +2 -1
  157. package/dist/index.mjs +84 -84
  158. package/dist/index.mjs.map +1 -1
  159. package/dist/install-packages.d.mts +2 -1
  160. package/dist/install-packages.mjs +2 -2
  161. package/dist/install-packages.mjs.map +1 -1
  162. package/dist/mcp-SsBK14Jm.mjs +32 -0
  163. package/dist/mcp-SsBK14Jm.mjs.map +1 -0
  164. package/dist/migrate.d.mts +2 -1
  165. package/dist/migrate.mjs +7 -5
  166. package/dist/migrate.mjs.map +1 -1
  167. package/dist/plugin-host-CK9_tVak.d.mts +46 -0
  168. package/dist/plugin-host-CK9_tVak.d.mts.map +1 -0
  169. package/dist/plugins/ai.d.mts +37 -0
  170. package/dist/plugins/ai.d.mts.map +1 -0
  171. package/dist/plugins/ai.mjs +400 -0
  172. package/dist/plugins/ai.mjs.map +1 -0
  173. package/dist/plugins/attachments.d.mts +33 -0
  174. package/dist/plugins/attachments.d.mts.map +1 -0
  175. package/dist/plugins/attachments.mjs +4 -0
  176. package/dist/plugins/mcp.d.mts +31 -0
  177. package/dist/plugins/mcp.d.mts.map +1 -0
  178. package/dist/plugins/mcp.mjs +4 -0
  179. package/dist/plugins/privacy.d.mts +22 -0
  180. package/dist/plugins/privacy.d.mts.map +1 -0
  181. package/dist/plugins/privacy.mjs +4 -0
  182. package/dist/plugins/workflows.d.mts +79 -0
  183. package/dist/plugins/workflows.d.mts.map +1 -0
  184. package/dist/plugins/workflows.mjs +4 -0
  185. package/dist/postgres-url-DTDhBjXX.mjs +11 -0
  186. package/dist/postgres-url-DTDhBjXX.mjs.map +1 -0
  187. package/dist/privacy-BO8Q25xI.mjs +44 -0
  188. package/dist/privacy-BO8Q25xI.mjs.map +1 -0
  189. package/dist/privacy-DxIJGH4P.mjs +91 -0
  190. package/dist/privacy-DxIJGH4P.mjs.map +1 -0
  191. package/dist/renown-layers-DmbWLt46.mjs +42 -0
  192. package/dist/renown-layers-DmbWLt46.mjs.map +1 -0
  193. package/dist/schema-CsY8bjsu.mjs +329 -0
  194. package/dist/schema-CsY8bjsu.mjs.map +1 -0
  195. package/dist/schema-MAUTnmj1.d.mts +251 -0
  196. package/dist/schema-MAUTnmj1.d.mts.map +1 -0
  197. package/dist/server-CirQ9hyu.mjs +2732 -0
  198. package/dist/server-CirQ9hyu.mjs.map +1 -0
  199. package/dist/server.d.mts +129 -189
  200. package/dist/server.d.mts.map +1 -1
  201. package/dist/server.mjs +5 -5
  202. package/dist/types-CidZdkhU.d.mts +314 -0
  203. package/dist/types-CidZdkhU.d.mts.map +1 -0
  204. package/dist/utils-Cm0TE6dP.mjs +148 -0
  205. package/dist/utils-Cm0TE6dP.mjs.map +1 -0
  206. package/dist/utils.d.mts +30 -5
  207. package/dist/utils.d.mts.map +1 -1
  208. package/dist/utils.mjs +5 -4
  209. package/dist/worker-pool-gyxJnCxA.mjs +304 -0
  210. package/dist/worker-pool-gyxJnCxA.mjs.map +1 -0
  211. package/dist/workflow-runtime-CF5pc8mt.d.mts +33 -0
  212. package/dist/workflow-runtime-CF5pc8mt.d.mts.map +1 -0
  213. package/dist/workflows-C9BQlyT0.mjs +1943 -0
  214. package/dist/workflows-C9BQlyT0.mjs.map +1 -0
  215. package/package.json +85 -24
  216. package/scripts/install-packages.sh +0 -0
  217. package/test/ai-gateway.test.ts +612 -0
  218. package/test/attachment-reference-read-model.test.ts +28 -20
  219. package/test/attachments/auth.test.ts +85 -0
  220. package/test/attachments/byte-grants.test.ts +290 -0
  221. package/test/attachments/byte-routes-read-gate.integration.test.ts +314 -0
  222. package/test/attachments/download-target.test.ts +211 -32
  223. package/test/attachments/index.test.ts +47 -4
  224. package/test/attachments/reserve-metadata-parity.test.ts +96 -0
  225. package/test/attachments/routes-integration.test.ts +60 -4
  226. package/test/attachments/routes.test.ts +297 -35
  227. package/test/attachments/service-config.test.ts +41 -19
  228. package/test/attachments/url-signer.test.ts +105 -0
  229. package/test/boot-auth-config.test.ts +109 -0
  230. package/test/boot-create-signature-policy.test.ts +110 -0
  231. package/test/boot-desktop-auth.test.ts +278 -0
  232. package/test/boot-env-isolation.test.ts +26 -0
  233. package/test/boot-helpers.ts +19 -0
  234. package/test/boot-inspection-enabled.test.ts +140 -0
  235. package/test/boot-mcp-auth.test.ts +449 -0
  236. package/test/boot-mcp-enabled.test.ts +119 -0
  237. package/test/boot-port-zero.test.ts +101 -0
  238. package/test/boot-preconditions.test.ts +213 -0
  239. package/test/boot-privacy.test.ts +232 -0
  240. package/test/boot-ready-drives.test.ts +141 -0
  241. package/test/boot-undo-v3-flag.test.ts +120 -0
  242. package/test/boot-unsupported-stored-documents.test.ts +214 -0
  243. package/test/boot-without-renown.test.ts +83 -0
  244. package/test/boot-without-require-signatures.test.ts +76 -0
  245. package/test/boot-worker-trust-policy.test.ts +91 -0
  246. package/test/boot-workflow-singleton-conflict.test.ts +109 -0
  247. package/test/boot-workflow-singleton-retry.test.ts +122 -0
  248. package/test/builder-defaults.test.ts +80 -0
  249. package/test/config-from-env.test.ts +963 -0
  250. package/test/config-merge.test.ts +248 -0
  251. package/test/config-schema.test.ts +167 -0
  252. package/test/create-signature-policy.test.ts +69 -0
  253. package/test/default-drive-protocol-versions.test.ts +79 -0
  254. package/test/default-drive-slug.test.ts +265 -0
  255. package/test/delegated-publish.test.ts +435 -0
  256. package/test/durable-node-fs-pg16.test.ts +80 -0
  257. package/test/fatal-shutdown.test.ts +205 -0
  258. package/test/goldens/packages.graphql +797 -0
  259. package/test/goldens/privacy.graphql +853 -0
  260. package/test/goldens/reactor-drive-nodes.graphql +827 -0
  261. package/test/goldens/resolvers.json +327 -0
  262. package/test/goldens/supergraph.graphql +5918 -0
  263. package/test/goldens/workflow-runtime.graphql +1548 -0
  264. package/test/inspection-throttle.test.ts +23 -0
  265. package/test/keyframe-reclaim-store.test.ts +156 -0
  266. package/test/observability-signals.test.ts +131 -0
  267. package/test/permissions-backfill.test.ts +486 -0
  268. package/test/pglite-dialect.test.ts +237 -2
  269. package/test/pglite-preflight.test.ts +313 -0
  270. package/test/pglite-storage-dirs.test.ts +113 -0
  271. package/test/pglite-store.test.ts +441 -0
  272. package/test/pglite-version.test.ts +9 -1
  273. package/test/plugin-config-schemas.test.ts +83 -0
  274. package/test/plugin-presence.test.ts +262 -0
  275. package/test/port-probe.test.ts +45 -0
  276. package/test/processor-timing-log.test.ts +109 -0
  277. package/test/reactor-feature-flags.test.ts +20 -0
  278. package/test/redact-webhook-path.test.ts +9 -0
  279. package/test/renown-storage-path.test.ts +40 -0
  280. package/test/renown-trust-policy.test.ts +313 -0
  281. package/test/served-schemas.test.ts +134 -0
  282. package/test/shutdown.test.ts +278 -0
  283. package/test/snapshot-writer.ts +94 -0
  284. package/test/store-lock.test.ts +65 -0
  285. package/test/two-switchboards.test.ts +146 -0
  286. package/test/unsupported-stored-documents.test.ts +72 -0
  287. package/test/worker-pool.test.ts +27 -1
  288. package/test/workflow/harness.ts +289 -0
  289. package/test/workflow/oauth-apps-config.test.ts +66 -0
  290. package/test/workflow/oauth.test.ts +286 -0
  291. package/test/workflow/resolvers.test.ts +488 -0
  292. package/test/workflow/runtime-host.test.ts +19 -0
  293. package/test/workflow/waitpoint-routes.test.ts +306 -0
  294. package/test/workflow/waitpoint-runtime.test.ts +204 -0
  295. package/test/workflow/webhook-dedupe.test.ts +295 -0
  296. package/test/workflow/webhook-signed.test.ts +509 -0
  297. package/test/workflow/webhook-trigger-test.test.ts +82 -0
  298. package/test/workflow/webhook-unsigned.test.ts +345 -0
  299. package/test/workflow-reactor-access.test.ts +384 -0
  300. package/test/workflow-reactor-enforcement.test.ts +808 -0
  301. package/test/workflow-read-gate.test.ts +213 -0
  302. package/test/workflow-runtime.test.ts +1254 -0
  303. package/test/workflows-plugin-config.test.ts +77 -0
  304. package/tsconfig.json +11 -2
  305. package/tsdown.config.ts +13 -1
  306. package/vitest.config.ts +66 -1
  307. package/dist/server-CiKkVE6g.mjs +0 -1555
  308. package/dist/server-CiKkVE6g.mjs.map +0 -1
  309. package/dist/utils-Baw7rThP.mjs +0 -80
  310. package/dist/utils-Baw7rThP.mjs.map +0 -1
package/dist/server.d.mts CHANGED
@@ -1,211 +1,149 @@
1
+ import { a as SwitchboardConfigInput, i as SwitchboardConfig } from "./schema-MAUTnmj1.mjs";
2
+ import { n as WorkflowTriggersCapability } from "./workflow-runtime-CF5pc8mt.mjs";
3
+ import { a as SwitchboardDriveDocumentType, i as SwitchboardDeps, n as StartServerOptions, o as SwitchboardDriveInput, r as StorageOptions, s as SwitchboardReactor, t as IdentityOptions } from "./types-CidZdkhU.mjs";
1
4
  import { ILogger } from "document-model";
2
- import { ChannelScheme, IDocumentModelLoader, IReactorClient, InProcessReactorClientModule, JwtHandler, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, SignerConfig } from "@powerhousedao/reactor";
3
- import { AttachmentReferenceProjectionCapability } from "@powerhousedao/reactor-api";
4
- import { IAttachmentService } from "@powerhousedao/reactor-attachments";
5
+ import { ChannelScheme, Database, IDocumentModelLoader, IStoreMaintenance, JwtHandler, KeyframeSettings, PoolInstrumentation, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, ReactorStorageFacts, SignerConfig, StoredProtocolRefusal, UnsupportedStoredDocuments, UnsupportedStoredProtocolError } from "@powerhousedao/reactor";
6
+ import { PGliteLike, PgliteMaintenanceSettings, resolvePgliteMaintenance } from "@powerhousedao/reactor-api/pglite-node";
7
+ import { DocumentModelModule, SignaturePolicy, UpgradeManifest } from "@powerhousedao/shared/document-model";
5
8
  import { IRenown } from "@renown/sdk/node";
6
- import { DriveInput } from "@powerhousedao/shared/document-drive";
7
- import { IRenown as IRenown$1 } from "@renown/sdk";
8
- import { DocumentModelModule, UpgradeManifest } from "@powerhousedao/shared/document-model";
9
-
10
- //#region src/types.d.ts
11
- /**
12
- * Drive container document type chosen for the boot-time default drive. The
13
- * legacy `powerhouse/document-drive` keeps the existing behavior; the newer
14
- * `powerhouse/reactor-drive` is wired through `addDefaultReactorDrive` and
15
- * uses the relationship-based child graph.
16
- */
17
- type SwitchboardDriveDocumentType = "powerhouse/document-drive" | "powerhouse/reactor-drive";
18
- /** A {@link DriveInput} extended with the optional drive-container type. */
19
- type SwitchboardDriveInput = DriveInput & {
20
- documentType?: SwitchboardDriveDocumentType;
21
- };
22
- type StorageOptions = {
23
- type: "filesystem" | "memory" | "postgres" | "browser";
24
- filesystemPath?: string;
25
- postgresUrl?: string;
26
- };
27
- type IdentityOptions = {
28
- /** Path to the keypair file. Defaults to ~/.ph/keypair.json */keypairPath?: string;
29
- /**
30
- * If true, won't start without an existing keypair.
31
- * Use this to ensure the switchboard only runs with an authenticated identity.
32
- */
33
- requireExisting?: boolean; /** Base url of the Renown instance to use */
34
- baseUrl?: string; /** If true, unsigned actions will be rejected */
35
- requireSignatures?: boolean;
36
- };
37
- type StartServerOptions = {
38
- /**
39
- * Pre-built ReactorClientModule (typically from
40
- * `@powerhousedao/reactor#ReactorClientBuilder.buildModule`). When set, the
41
- * switchboard reuses the caller's reactor instead of building its own,
42
- * and the caller owns the reactor's lifecycle. The API, GraphQL manager,
43
- * MCP, attachments, package management subgraph, and registry HTTP loader
44
- * are still configured around it.
45
- *
46
- * Lifecycle contract: switchboard does NOT wire itself into the caller's
47
- * reactor shutdown. Callers must invoke `shutdown()` on the returned
48
- * `SwitchboardReactor` from their own teardown (and SIGINT handlers) to
49
- * drain `/graphql`, MCP, attachments, etc. Killing the caller's reactor
50
- * alone will not release these resources.
51
- *
52
- * Setup contract: the reactor must have switchboard's expected wiring
53
- * already applied — channel scheme, document models, signal handlers,
54
- * etc. Use `applySwitchboardReactorDefaults` from this module to apply
55
- * the same defaults switchboard uses internally; opt out of individual
56
- * pieces as needed.
57
- */
58
- reactor?: InProcessReactorClientModule;
59
- /**
60
- * Registry URL for the HttpPackageLoader. Enables `PackagesSubgraph`
61
- * (install/uninstall mutations) plus dynamic package resolution.
62
- * Falls back to PH_REGISTRY_URL env, then `packageRegistryUrl` in the
63
- * powerhouse config file.
64
- */
65
- registryUrl?: string;
66
- configFile?: string;
67
- port?: number;
68
- /**
69
- * If true, fail immediately when the requested port is in use instead of
70
- * falling back to the next free port. Matches the semantics of Vite's
71
- * `--strictPort` flag that flows through the `ph vetra` command.
72
- */
73
- strictPort?: boolean;
74
- dev?: boolean;
75
- dbPath?: string;
76
- drive?: SwitchboardDriveInput;
77
- packages?: string[];
78
- remoteDrives?: string[];
79
- https?: {
80
- keyPath: string;
81
- certPath: string;
82
- } | boolean | undefined;
83
- /**
84
- * Identity options for Renown.
85
- * When configured, the switchboard will load the keypair from `ph login`
86
- * and can authenticate with remote services on behalf of the user.
87
- */
88
- identity?: IdentityOptions; /** Base URL for the attachment service; defaults to `PH_SWITCHBOARD_PUBLIC_URL` then `http(s)://localhost:${port}`. */
89
- attachmentServiceUrl?: string;
90
- mcp?: boolean;
91
- processorConfig?: Map<string, unknown>;
92
- disableLocalPackages?: boolean;
93
- enableDocumentModelSubgraphs?: boolean;
94
- /**
95
- * When true, enables dynamic loading of document models from the registry
96
- * when an unknown document type is encountered during sync.
97
- * Disabled by default — enable with DYNAMIC_MODEL_LOADING=true env var.
98
- */
99
- dynamicModelLoading?: boolean;
100
- logger?: ILogger;
101
- /**
102
- * When true, on startup any local PGLite data dirs whose `PG_VERSION` is
103
- * older than the bundled PGLite are migrated to the current version
104
- * (backup → dump → restore) before the server boots. When false, the
105
- * server logs a warning and runs against the legacy data using the
106
- * matching legacy PGLite module.
107
- *
108
- * Triggered by the `--migrate-pglite` CLI flag or `PH_MIGRATE_PGLITE=true`.
109
- */
110
- migratePglite?: boolean;
111
- /**
112
- * Force a specific PGLite-embedded PG major (16 or 17) on startup.
113
- *
114
- * **Destructive**: any existing local PGLite data dirs are wiped before
115
- * the chosen PGLite re-`initdb`'s them at the requested version. Postgres
116
- * URLs are unaffected. Takes precedence over `migratePglite`.
117
- *
118
- * Triggered by `PH_FORCE_PG_VERSION=16|17`.
119
- */
120
- forcePgVersion?: 16 | 17;
121
- /**
122
- * Executor worker pool: `numWorkers > 0` runs jobs in N worker threads;
123
- * `"auto"` sizes the pool from the machine's available cores; 0 or unset
124
- * keeps the in-process executor (the default). Unset fields fall back to
125
- * the REACTOR_WORKERS / REACTOR_DB_* env vars. Requires a Postgres reactor
126
- * database; incompatible with `dev` mode (Vite-loaded models cannot cross
127
- * a thread boundary).
128
- */
129
- workerPool?: {
130
- numWorkers?: number | "auto";
131
- dbPoolSizePerWorker?: number;
132
- acquireTimeoutMs?: number;
133
- };
134
- /**
135
- * Projection worker: `enabled` runs the built-in document-view /
136
- * document-indexer read models in one worker thread, off the host event
137
- * loop; unset keeps them in-process (the default). Unset fields fall back
138
- * to the REACTOR_PROJECTION_WORKER / REACTOR_DB_POOL_SIZE_PROJECTION env
139
- * vars. Requires a Postgres reactor database and worker-importable
140
- * document-model sources (switchboard resolves them itself); incompatible
141
- * with `dev` mode (Vite-loaded models cannot cross a thread boundary).
142
- */
143
- projectionWorker?: {
144
- enabled?: boolean;
145
- dbPoolSize?: number;
146
- };
147
- };
148
- type SwitchboardReactor = {
149
- defaultDriveUrl: string | undefined;
150
- reactor: IReactorClient; /** Switchboard-backed remote attachment service over its own `/attachments/*` API, for downstream consumers. */
151
- attachmentService: IAttachmentService; /** Whether the authoritative attachment-reference projection is active. */
152
- attachmentReferenceProjection: AttachmentReferenceProjectionCapability; /** The Renown instance if identity was initialized */
153
- renown: IRenown$1 | null;
154
- /**
155
- * Port the HTTP server actually bound to. May differ from the requested
156
- * port when the requested port was in use and fallback kicked in.
157
- */
158
- port: number;
159
- /**
160
- * Drain switchboard-owned resources: HTTP server, GraphQL manager,
161
- * attachments, MCP, packages subgraph, and the read-model DB. This does
162
- * NOT kill the reactor — in owned-reactor mode the reactor lifecycle is
163
- * handled by its own SIGINT signal handlers, which then drain the api via
164
- * the shutdown hook switchboard registered on the builder. In
165
- * caller-provided mode the caller owns the reactor lifecycle separately.
166
- *
167
- * Callers using a caller-provided reactor must invoke this from their own
168
- * teardown / SIGINT path so api resources are released; killing the
169
- * reactor alone won't release them.
170
- */
171
- shutdown: () => Promise<void>;
172
- };
9
+ import { Kysely } from "kysely";
10
+ import "@electric-sql/pglite";
11
+ //#region src/pglite-version.d.ts
12
+ declare const SUPPORTED_PG_MAJORS: readonly [16, 17];
13
+ type SupportedPgMajor = (typeof SUPPORTED_PG_MAJORS)[number];
14
+ //#endregion
15
+ //#region src/pglite-store.d.mts
16
+ /** How each PGlite store runs; unset fields take the defaults. */
17
+ interface PgliteStoreSettings {
18
+ fsync?: boolean;
19
+ maintenance?: PgliteMaintenanceSettings;
20
+ workerMemoryMb?: number;
21
+ }
173
22
  //#endregion
174
23
  //#region src/builder-defaults.d.mts
175
24
  type SwitchboardReactorDefaultsOptions = {
176
- documentModels?: DocumentModelModule[]; /** Upgrade manifests for versioned models, one per document type. */
177
- upgradeManifests?: UpgradeManifest<readonly number[]>[]; /** Default true. */
25
+ documentModels?: DocumentModelModule[];
26
+ /** Upgrade manifests for versioned models, one per document type. */
27
+ upgradeManifests?: UpgradeManifest<readonly number[]>[];
28
+ /** Default true. */
178
29
  includeBaseModels?: boolean;
179
30
  /**
180
31
  * Channel scheme. Defaults to `ChannelScheme.SWITCHBOARD`, which populates
181
32
  * `reactorModule.syncModule.syncManager` — required by reactor-api. Set
182
- * to `false` only if the caller will configure a scheme themselves.
33
+ * to `false` if the caller configures sync itself (`withChannelScheme` or
34
+ * `withSync`); the builder refuses both together.
183
35
  */
184
- channelScheme?: ChannelScheme | false; /** Defaults to true. Set false when the caller owns SIGINT handling. */
185
- signalHandlers?: boolean; /** Executor tuning. Omit to use the reactor's own defaults. */
36
+ channelScheme?: ChannelScheme | false;
37
+ /** Defaults to true. Set false when the caller owns SIGINT handling. */
38
+ signalHandlers?: boolean;
39
+ /** Executor tuning. Omit to use the reactor's own defaults. */
186
40
  executorConfig?: {
187
41
  maxSkipThreshold?: number;
188
42
  featureFlags?: Partial<ReactorFeatureFlags>;
189
- }; /** Wire dynamic document-model loading via HTTP. */
43
+ };
44
+ /** Wire dynamic document-model loading via HTTP. */
190
45
  documentModelLoader?: IDocumentModelLoader;
191
46
  logger?: ILogger;
192
47
  /**
193
- * Identity signer (typically from `getRenownSignerConfig`). Applied to the
194
- * `ReactorClientBuilder`; omit for unsigned operation.
48
+ * Identity signer (typically from `getRenownSignerConfig`). Signs client
49
+ * writes and the operations the executor synthesizes, in pooled workers
50
+ * through `workerSigner`; omit for unsigned operation.
195
51
  */
196
52
  signer?: SignerConfig;
53
+ /**
54
+ * Which keys may sign as which users (typically from
55
+ * `getRenownTrustPolicyConfig`); wins over one carried by `signer`.
56
+ */
57
+ trustPolicy?: Pick<SignerConfig, "trustPolicy" | "workerTrustPolicy">;
58
+ /** What the client creates new documents as; see `resolveCreateSignaturePolicy`. */
59
+ createSignaturePolicy?: SignaturePolicy;
197
60
  };
198
- declare function applySwitchboardReactorDefaults(reactorBuilder: ReactorBuilder, clientBuilder: ReactorClientBuilder, options?: SwitchboardReactorDefaultsOptions): void;
61
+ export declare function applySwitchboardReactorDefaults(reactorBuilder: ReactorBuilder, clientBuilder: ReactorClientBuilder, options?: SwitchboardReactorDefaultsOptions): void;
62
+ //#endregion
63
+ //#region src/unsupported-stored-documents.d.mts
64
+ /** From REACTOR_UNSUPPORTED_STORED_DOCUMENTS; `input` wins when defined. */
65
+ export declare function resolveUnsupportedStoredDocuments(input: UnsupportedStoredDocuments | undefined, env: NodeJS.ProcessEnv): UnsupportedStoredDocuments;
66
+ /** The reactor refused to start over documents this build does not run. */
67
+ export declare class StoredDocumentsRefusedError extends Error {
68
+ readonly versions: readonly StoredProtocolRefusal[];
69
+ readonly documents: number;
70
+ constructor(cause: UnsupportedStoredProtocolError);
71
+ static isError(error: unknown): error is StoredDocumentsRefusedError;
72
+ }
199
73
  //#endregion
200
74
  //#region src/server.d.mts
75
+ /** Process-wide settings an edge applies once, before its first `startSwitchboard`. */
76
+ export declare function initSwitchboardProcess(options?: Pick<SwitchboardConfigInput, "logLevel">): void;
201
77
  /**
202
78
  * Attempt to bind a throwaway TCP server to the given port. Resolves true if
203
79
  * the port is free, false if the OS reports it in use. Any other error is
204
80
  * surfaced so we don't silently mask real issues (permissions, bad host, …).
205
81
  */
206
- declare function isPortAvailable(port: number): Promise<boolean>;
207
- /** Derive the remote attachment service config for switchboard's own `/attachments/*` API. */
208
- declare function deriveAttachmentServiceConfig(options: Pick<StartServerOptions, "attachmentServiceUrl" | "https">, serverPort: number, renown: IRenown | null): {
82
+ export declare function isPortAvailable(port: number): Promise<boolean>;
83
+ /** `PH_KEYFRAMES` (or a caller's layer) wins whole over the project config. */
84
+ export declare function resolveKeyframes(configured: SwitchboardConfig["storage"]["keyframes"], fromFile: unknown, configPath: string): KeyframeSettings | undefined;
85
+ /**
86
+ * The reactor's storage handle, plus the pool instrumentation when that
87
+ * storage is Postgres. The PGlite branch has no `pg.Pool` at all, so the
88
+ * instrumentation is absent rather than optional-by-convention.
89
+ */
90
+ type ReactorStorage = {
91
+ kysely: Kysely<Database>;
92
+ poolInstrumentation: PoolInstrumentation | undefined;
93
+ storageFacts: ReactorStorageFacts;
94
+ /** Absent on Postgres, where the host does not own the connection. */
95
+ storeMaintenance?: IStoreMaintenance;
96
+ };
97
+ export declare function createReactorKysely(opts: {
98
+ reactorDbUrl: string | undefined;
99
+ reactorPgliteDir: string | null;
100
+ reactorPgliteMajor: SupportedPgMajor | null;
101
+ inMemory: boolean;
102
+ /** Called only on the Postgres branch, the one with a host pool. */
103
+ hostPoolSize: () => number;
104
+ /** Open the PGlite store in its own worker thread. */
105
+ pgliteWorkers: boolean;
106
+ pgliteSettings?: PgliteStoreSettings;
107
+ /** The store, when it's already opening. */
108
+ openingStore?: PGliteLike;
109
+ logger: ILogger;
110
+ }): Promise<ReactorStorage>;
111
+ export interface PgliteStorageDirs {
112
+ /** Read-model store: a Postgres URL or a PGlite dir. */
113
+ readModelPath: string;
114
+ /** Reactor store: a Postgres URL or a PGlite dir. */
115
+ reactorPath: string;
116
+ /** PGlite dir for the reactor, null for Postgres or a caller-owned reactor. */
117
+ reactorPgliteDir: string | null;
118
+ /** PGlite dir for the read model, null for Postgres. */
119
+ readModelPgliteDir: string | null;
120
+ /** The PGlite dirs for the pre-flight, as before (not deduplicated). */
121
+ pgliteDirs: string[];
122
+ /** Set when BOTH stores are PGlite on one dir (see resolvePgliteStorageDirs). */
123
+ sharedPgliteDir: string | null;
124
+ }
125
+ /**
126
+ * Where the two stores live — the classic resolution, relocated verbatim.
127
+ * Classic layout: `./.ph/reactor-storage` for the reactor and
128
+ * `.ph/read-storage` for the read model (the same names inside
129
+ * `${userData}/.ph` under a shell's PH_USER_DATA_DIR). `dbPath` also names
130
+ * the reactor store unless PH_REACTOR_DATABASE_URL does: with `dbPath` alone
131
+ * both stores share one location. That is the long-standing contract of
132
+ * `--db-path` and fine for one Postgres database, but for PGlite it is two
133
+ * postmasters on one data dir — reported via `sharedPgliteDir` so the caller
134
+ * warns. Not refused: changing that contract is a separate decision.
135
+ */
136
+ export declare function resolvePgliteStorageDirs(opts: {
137
+ dbPath: string | undefined;
138
+ reactorDbUrl: string | undefined;
139
+ /** The caller passed its own reactor — the reactor-side dir is unused. */
140
+ callerReactor: boolean;
141
+ /** The relocated `.ph` root (PH_USER_DATA_DIR at the edge). */
142
+ userDataDir?: string;
143
+ phDir?: string;
144
+ }): PgliteStorageDirs;
145
+ /** The remote attachment service config for switchboard's own `/attachments/*` API; `attachments.serviceUrl` carries PH_SWITCHBOARD_PUBLIC_URL. */
146
+ export declare function deriveAttachmentServiceConfig(options: Pick<StartServerOptions, "attachmentServiceUrl" | "https">, serverPort: number, renown: IRenown | null): {
209
147
  remoteUrl: string;
210
148
  jwtHandler: JwtHandler | undefined;
211
149
  };
@@ -220,13 +158,15 @@ declare function deriveAttachmentServiceConfig(options: Pick<StartServerOptions,
220
158
  * dangling until the process exits.
221
159
  *
222
160
  * When `options.reactor` is omitted, the switchboard builds and owns the
223
- * reactor. `shutdown()` on the returned handle only drains the api (HTTP
224
- * server, GraphQL, MCP, attachments); the reactor itself is torn down by
225
- * its own signal handlers (`withSignalHandlers`), which call `kill()` and
226
- * trigger the `withShutdownHook` chain that disposes the api. Programmatic
227
- * full teardown isn't currently exposed — wire it via SIGINT/SIGTERM.
161
+ * reactor. `shutdown()` on the returned handle then runs the reactor
162
+ * module's `shutdown()`: `kill()`, the `withShutdownHook` chain that drains
163
+ * the api (HTTP server, GraphQL, MCP, attachments, read-model db), then the
164
+ * reactor database. It does not exit the process. It is the same memoized
165
+ * teardown the SIGINT/SIGTERM handlers (`withSignalHandlers`) run, so calling
166
+ * it twice, or receiving a signal around it, tears down once.
228
167
  */
229
- declare const startSwitchboard: (options?: StartServerOptions) => Promise<SwitchboardReactor>;
168
+ export declare const startSwitchboard: (input?: SwitchboardConfigInput, deps?: SwitchboardDeps) => Promise<SwitchboardReactor>;
230
169
  //#endregion
231
- export { IdentityOptions, StartServerOptions, StorageOptions, SwitchboardDriveDocumentType, SwitchboardDriveInput, SwitchboardReactor, type SwitchboardReactorDefaultsOptions, applySwitchboardReactorDefaults, deriveAttachmentServiceConfig, isPortAvailable, startSwitchboard };
170
+ export { IdentityOptions, StartServerOptions, StorageOptions, SwitchboardDeps, SwitchboardDriveDocumentType, SwitchboardDriveInput, SwitchboardReactor, type SwitchboardReactorDefaultsOptions, type WorkflowTriggersCapability };
171
+ export {};
232
172
  //# sourceMappingURL=server.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.mts","names":[],"sources":["../src/types.ts","../src/builder-defaults.mts","../src/server.mts"],"mappings":";;;;;;;;;;;;;;;AAgBA;KAAY,4BAAA;;KAKA,qBAAA,GAAwB,UAAA;EAClC,YAAA,GAAe,4BAAA;AAAA;AAAA,KAGL,cAAA;EACV,IAAA;EACA,cAAA;EACA,WAAA;AAAA;AAAA,KAGU,eAAA;EATiC,+DAW3C,WAAA;EARU;;;;EAaV,eAAA,YAXA;EAcA,OAAA,WAbW;EAgBX,iBAAA;AAAA;AAAA,KAGU,kBAAA;;;;;;;;;AAAZ;;;;;;;;;;;;EAqBE,OAAA,GAAU,4BAAA;EAQV;;;;;;EADA,WAAA;EACA,UAAA;EACA,IAAA;EAYA;;;;;EANA,UAAA;EACA,GAAA;EACA,MAAA;EACA,KAAA,GAAQ,qBAAA;EACR,QAAA;EACA,YAAA;EACA,KAAA;IAEM,OAAA;IACA,QAAA;EAAA;EA0CN;;;;;EAjCA,QAAA,GAAW,eAAA,EAyDT;EAvDF,oBAAA;EACA,GAAA;EACA,eAAA,GAAkB,GAAA;EAClB,oBAAA;EACA,4BAAA;;;;;;EAMA,mBAAA;EACA,MAAA,GAAS,OAAA;EA2Ec;;;;;;;;;EAjEvB,aAAA;EAoDA;;;;;;;;AC5JF;EDkHE,cAAA;;;;;;;;;EASA,UAAA;IACE,UAAA;IACA,mBAAA;IACA,gBAAA;EAAA;ECxHF;;;;;;;;;EDmIA,gBAAA;IACE,OAAA;IACA,UAAA;EAAA;AAAA;AAAA,KAIQ,kBAAA;EACV,eAAA;EACA,OAAA,EAAS,cAAA,ECpHY;EDsHrB,iBAAA,EAAmB,kBAAA,EChGL;EDkGd,6BAAA,EAA+B,uCAAA;EAE/B,MAAA,EAAQ,SAAA;EClGO;;;;EDuGf,IAAA;ECxGA;;;;;;;;;;ACyDF;;EF4DE,QAAA,QAAgB,OAAA;AAAA;;;KCzKN,iCAAA;EAIV,cAAA,GAAiB,mBAAA;EAEjB,gBAAA,GAAmB,eAAA;EAEnB,iBAAA;;ADZF;;;;ECkBE,aAAA,GAAgB,aAAA,UDbN;ECeV,cAAA;EAEA,cAAA;IACE,gBAAA;IACA,YAAA,GAAe,OAAA,CAAQ,mBAAA;EAAA,GDlBkB;ECqB3C,mBAAA,GAAsB,oBAAA;EACtB,MAAA,GAAS,OAAA;EDnBe;;;;ECwBxB,MAAA,GAAS,YAAA;AAAA;AAAA,iBAsBK,+BAAA,CACd,cAAA,EAAgB,cAAA,EAChB,aAAA,EAAe,oBAAA,EACf,OAAA,GAAS,iCAAA;;;;;;;;iBCuDK,eAAA,CAAgB,IAAA,WAAe,OAAA;;iBA0H/B,6BAAA,CACd,OAAA,EAAS,IAAA,CAAK,kBAAA,qCACd,UAAA,UACA,MAAA,EAAQ,OAAA;EACL,SAAA;EAAmB,UAAA,EAAY,UAAA;AAAA;;AF1OpC;;;;;;;;;AAIA;;;;;;;cEogCa,gBAAA,GACX,OAAA,GAAS,kBAAA,KACR,OAAA,CAAQ,kBAAA"}
1
+ {"version":3,"file":"server.d.mts","names":[],"sources":["../src/pglite-version.ts","../src/pglite-store.mts","../src/builder-defaults.mts","../src/unsupported-stored-documents.mts","../src/server.mts"],"mappings":";;;;;;;;;;;cAYa;KACD,2BAA2B;;;;UCuHtB;EACf;EACA,cAAc;EACd;;;;KClHU;EAIV,iBAAiB;;EAEjB,mBAAmB;;EAEnB;;;;;;;EAOA,gBAAgB;;EAEhB;;EAEA;IACE;IACA,eAAe,QAAQ;;;EAGzB,sBAAsB;EACtB,SAAS;;;;;;EAMT,SAAS;;;;;EAKT,cAAc,KAAK;;EAEnB,wBAAwB;;wBAiBV,gCACd,gBAAgB,gBAChB,eAAe,sBACf,UAAS;;;;wBCrEK,kCACd,OAAO,wCACP,KAAK,OAAO,aACX;;qBAaU,oCAAoC;WACtC,mBAAmB;WACnB;EAET,YAAY,OAAO;SAYH,QACd,iBACC,SAAS;;;;;wBC+JE,uBACd,UAAS,KAAK;;;;;;wBAgCM,gBAAgB,eAAe;;wBA6ErC,iBACd,YAAY,2CACZ,mBACA,qBACC;;;;;;KA2CE;EACH,QAAQ,OAAO;EACf,qBAAqB;EACrB,cAAc;;EAEd,mBAAmB;;wBAGC,oBAAoB;EACxC;EACA;EACA,oBAAoB;EACpB;;EAEA;;EAEA;EACA,iBAAiB;;EAEjB,eAAe;EACf,QAAQ;IACN,QAAQ;iBAkEK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,yBAAyB;EACvC;EACA;;EAEA;;EAEA;EACA;IACE;;wBAmCY,8BACd,SAAS,KAAK,uDACd,oBACA,QAAQ;EACL;EAAmB,YAAY;;;;;;;;;;;;;;;;;;;;qBA01CvB,mBAAgB,QACpB,wBAAsB,OACvB,oBACL,QAAQ"}
package/dist/server.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { i as applySwitchboardReactorDefaults, n as isPortAvailable, r as startSwitchboard, t as deriveAttachmentServiceConfig } from "./server-CiKkVE6g.mjs";
3
- import "./utils-Baw7rThP.mjs";
4
- export { applySwitchboardReactorDefaults, deriveAttachmentServiceConfig, isPortAvailable, startSwitchboard };
5
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="43d97572-0a08-5683-83a3-d8477151600e")}catch(e){}}();
6
- //# debugId=43d97572-0a08-5683-83a3-d8477151600e
2
+ import { n as StoredDocumentsRefusedError, r as resolveUnsupportedStoredDocuments } from "./from-env-FH4fPeIE.mjs";
3
+ import { a as resolveKeyframes, i as isPortAvailable, n as deriveAttachmentServiceConfig, o as resolvePgliteStorageDirs, r as initSwitchboardProcess, s as startSwitchboard, t as createReactorKysely, u as applySwitchboardReactorDefaults } from "./server-CirQ9hyu.mjs";
4
+ export { StoredDocumentsRefusedError, applySwitchboardReactorDefaults, createReactorKysely, deriveAttachmentServiceConfig, initSwitchboardProcess, isPortAvailable, resolveKeyframes, resolvePgliteStorageDirs, resolveUnsupportedStoredDocuments, startSwitchboard };
5
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="01aa58bc-0ec6-5923-8412-e78bff9b0247")}catch(e){}}();
6
+ //# debugId=01aa58bc-0ec6-5923-8412-e78bff9b0247