@powerhousedao/switchboard 6.2.2-dev.3 → 6.2.2-dev.30
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.
- package/.tsbuild/test/attachment-reference-read-model.test.d.ts +2 -0
- package/.tsbuild/test/attachment-reference-read-model.test.d.ts.map +1 -0
- package/.tsbuild/test/attachments/download-target.test.d.ts +2 -0
- package/.tsbuild/test/attachments/download-target.test.d.ts.map +1 -0
- package/.tsbuild/test/worker-pool.test.d.ts +2 -0
- package/.tsbuild/test/worker-pool.test.d.ts.map +1 -0
- package/.tsbuild/tsconfig.tsbuildinfo +1 -1
- package/CHANGELOG.md +162 -0
- package/README.md +44 -0
- package/dist/index.mjs +1 -1
- package/dist/{server-DgBz3TJW.mjs → server-B4w0-8kx.mjs} +450 -27
- package/dist/server-B4w0-8kx.mjs.map +1 -0
- package/dist/server.d.mts +19 -10
- package/dist/server.d.mts.map +1 -1
- package/dist/server.mjs +3 -3
- package/package.json +12 -12
- package/test/attachment-reference-read-model.test.ts +425 -0
- package/test/attachments/auth.test.ts +138 -8
- package/test/attachments/download-target.test.ts +445 -0
- package/test/attachments/index.test.ts +37 -2
- package/test/attachments/routes-integration.test.ts +98 -1
- package/test/worker-pool.test.ts +232 -0
- package/dist/server-DgBz3TJW.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,165 @@
|
|
|
1
|
+
## 6.2.2-dev.30 (2026-07-31)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 6.2.2-dev.29 (2026-07-31)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 6.2.2-dev.28 (2026-07-30)
|
|
10
|
+
|
|
11
|
+
### 🚀 Features
|
|
12
|
+
|
|
13
|
+
- **reactor-browser:** add IReactorBrowserClient and a light GraphQL client ([#2893](https://github.com/powerhouse-inc/powerhouse/pull/2893))
|
|
14
|
+
- **reactor:** plugging in the first decision model ([27e9b2772](https://github.com/powerhouse-inc/powerhouse/commit/27e9b2772))
|
|
15
|
+
|
|
16
|
+
### ❤️ Thank You
|
|
17
|
+
|
|
18
|
+
- Benjamin Jordan
|
|
19
|
+
- Guillermo Puente Sandoval @gpuente
|
|
20
|
+
|
|
21
|
+
## 6.2.2-dev.27 (2026-07-30)
|
|
22
|
+
|
|
23
|
+
### 🩹 Fixes
|
|
24
|
+
|
|
25
|
+
- **connect:** pin @privy-io/react-auth to 3.35.0 ([909352ce3](https://github.com/powerhouse-inc/powerhouse/commit/909352ce3))
|
|
26
|
+
|
|
27
|
+
### ❤️ Thank You
|
|
28
|
+
|
|
29
|
+
- acaldas
|
|
30
|
+
|
|
31
|
+
## 6.2.2-dev.26 (2026-07-30)
|
|
32
|
+
|
|
33
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
34
|
+
|
|
35
|
+
## 6.2.2-dev.25 (2026-07-29)
|
|
36
|
+
|
|
37
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
38
|
+
|
|
39
|
+
## 6.2.2-dev.24 (2026-07-29)
|
|
40
|
+
|
|
41
|
+
### 🩹 Fixes
|
|
42
|
+
|
|
43
|
+
- **reactor:** fix an issue exacerbated by auth where snapshots were ordered by insertion not revision ([4aa32fe1b](https://github.com/powerhouse-inc/powerhouse/commit/4aa32fe1b))
|
|
44
|
+
|
|
45
|
+
### ❤️ Thank You
|
|
46
|
+
|
|
47
|
+
- Benjamin Jordan
|
|
48
|
+
|
|
49
|
+
## 6.2.2-dev.23 (2026-07-28)
|
|
50
|
+
|
|
51
|
+
### 🩹 Fixes
|
|
52
|
+
|
|
53
|
+
- **deps:** pin qr to 0.5.5 so RainbowKit can render the WalletConnect QR ([5343f9178](https://github.com/powerhouse-inc/powerhouse/commit/5343f9178))
|
|
54
|
+
|
|
55
|
+
### ❤️ Thank You
|
|
56
|
+
|
|
57
|
+
- acaldas
|
|
58
|
+
|
|
59
|
+
## 6.2.2-dev.22 (2026-07-28)
|
|
60
|
+
|
|
61
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
62
|
+
|
|
63
|
+
## 6.2.2-dev.21 (2026-07-27)
|
|
64
|
+
|
|
65
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
66
|
+
|
|
67
|
+
## 6.2.2-dev.20 (2026-07-27)
|
|
68
|
+
|
|
69
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
70
|
+
|
|
71
|
+
## 6.2.2-dev.19 (2026-07-27)
|
|
72
|
+
|
|
73
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
74
|
+
|
|
75
|
+
## 6.2.2-dev.18 (2026-07-27)
|
|
76
|
+
|
|
77
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
78
|
+
|
|
79
|
+
## 6.2.2-dev.17 (2026-07-26)
|
|
80
|
+
|
|
81
|
+
### 🚀 Features
|
|
82
|
+
|
|
83
|
+
- **attachments:** S3-compatible storage, direct transfers, and document-derived authorization ([#2884](https://github.com/powerhouse-inc/powerhouse/pull/2884))
|
|
84
|
+
|
|
85
|
+
### ❤️ Thank You
|
|
86
|
+
|
|
87
|
+
- Guillermo Puente Sandoval @gpuente
|
|
88
|
+
|
|
89
|
+
## 6.2.2-dev.16 (2026-07-25)
|
|
90
|
+
|
|
91
|
+
### 🩹 Fixes
|
|
92
|
+
|
|
93
|
+
- code review fixes ([318cbefa9](https://github.com/powerhouse-inc/powerhouse/commit/318cbefa9))
|
|
94
|
+
- version 0 is reserved and only 1 and on is available for setting ([193ac4c56](https://github.com/powerhouse-inc/powerhouse/commit/193ac4c56))
|
|
95
|
+
- resolve a contradiction in group membership ([39845a65c](https://github.com/powerhouse-inc/powerhouse/commit/39845a65c))
|
|
96
|
+
- grant evaluation needs to ignore features that do not exist yet ([0c1d06396](https://github.com/powerhouse-inc/powerhouse/commit/0c1d06396))
|
|
97
|
+
|
|
98
|
+
### ❤️ Thank You
|
|
99
|
+
|
|
100
|
+
- Benjamin Jordan
|
|
101
|
+
|
|
102
|
+
## 6.2.2-dev.15 (2026-07-24)
|
|
103
|
+
|
|
104
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
105
|
+
|
|
106
|
+
## 6.2.2-dev.14 (2026-07-23)
|
|
107
|
+
|
|
108
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
109
|
+
|
|
110
|
+
## 6.2.2-dev.13 (2026-07-23)
|
|
111
|
+
|
|
112
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
113
|
+
|
|
114
|
+
## 6.2.2-dev.12 (2026-07-23)
|
|
115
|
+
|
|
116
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
117
|
+
|
|
118
|
+
## 6.2.2-dev.11 (2026-07-22)
|
|
119
|
+
|
|
120
|
+
### 🚀 Features
|
|
121
|
+
|
|
122
|
+
- **connect:** dynamic packages can contribute to the PWA configuration ([da867e21d](https://github.com/powerhouse-inc/powerhouse/commit/da867e21d))
|
|
123
|
+
|
|
124
|
+
### ❤️ Thank You
|
|
125
|
+
|
|
126
|
+
- Yasiel Cabrera @YasielCabrera
|
|
127
|
+
|
|
128
|
+
## 6.2.2-dev.10 (2026-07-21)
|
|
129
|
+
|
|
130
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
131
|
+
|
|
132
|
+
## 6.2.2-dev.9 (2026-07-20)
|
|
133
|
+
|
|
134
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
135
|
+
|
|
136
|
+
## 6.2.2-dev.8 (2026-07-19)
|
|
137
|
+
|
|
138
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
139
|
+
|
|
140
|
+
## 6.2.2-dev.7 (2026-07-18)
|
|
141
|
+
|
|
142
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
143
|
+
|
|
144
|
+
## 6.2.2-dev.6 (2026-07-17)
|
|
145
|
+
|
|
146
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
147
|
+
|
|
148
|
+
## 6.2.2-dev.5 (2026-07-17)
|
|
149
|
+
|
|
150
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
151
|
+
|
|
152
|
+
## 6.2.2-dev.4 (2026-07-17)
|
|
153
|
+
|
|
154
|
+
### 🚀 Features
|
|
155
|
+
|
|
156
|
+
- **switchboard, reactor:** worker config integration on switchboard, including auto mode ([38c3b3de6](https://github.com/powerhouse-inc/powerhouse/commit/38c3b3de6))
|
|
157
|
+
- **vetra-e2e:** full e2e spec for shared worker ([ed1b3fbd2](https://github.com/powerhouse-inc/powerhouse/commit/ed1b3fbd2))
|
|
158
|
+
|
|
159
|
+
### ❤️ Thank You
|
|
160
|
+
|
|
161
|
+
- Benjamin Jordan
|
|
162
|
+
|
|
1
163
|
## 6.2.2-dev.3 (2026-07-16)
|
|
2
164
|
|
|
3
165
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -112,6 +112,50 @@ pnpm add -g @powerhousedao/switchboard
|
|
|
112
112
|
|
|
113
113
|
See [Observability](#observability) below for Sentry and OpenTelemetry variables.
|
|
114
114
|
|
|
115
|
+
### Executor Worker Pool
|
|
116
|
+
|
|
117
|
+
By default the reactor executes jobs on a single in-process executor. Setting
|
|
118
|
+
`REACTOR_WORKERS` to a value greater than 0 moves job execution into N
|
|
119
|
+
`node:worker_threads` workers; jobs route to a worker stickily by document id,
|
|
120
|
+
and each worker opens its own Postgres pool.
|
|
121
|
+
|
|
122
|
+
| Variable | Description | Default |
|
|
123
|
+
| ------------------------------- | -------------------------------------------------------------- | ------- |
|
|
124
|
+
| `REACTOR_WORKERS` | Executor worker threads: a number (0 = in-process) or `auto` | `0` |
|
|
125
|
+
| `REACTOR_DB_POOL_SIZE_WORKER` | Per-worker Postgres pool size | `2` |
|
|
126
|
+
| `REACTOR_DB_ACQUIRE_TIMEOUT_MS` | Pool connection acquire timeout (ms) | `5000` |
|
|
127
|
+
|
|
128
|
+
`REACTOR_WORKERS=auto` lets the runtime size the pool from the machine's
|
|
129
|
+
available cores (`os.availableParallelism()`, which respects container CPU
|
|
130
|
+
limits): `max(1, min(8, cores - 2))`. Two cores stay reserved for the host
|
|
131
|
+
event loop and the cap keeps the worker connection budget bounded; `auto`
|
|
132
|
+
always enables worker mode with at least one worker.
|
|
133
|
+
|
|
134
|
+
Requirements when `REACTOR_WORKERS > 0`:
|
|
135
|
+
|
|
136
|
+
- **Postgres only.** The reactor database must be a `postgres://` URL with
|
|
137
|
+
explicit credentials (`PH_REACTOR_DATABASE_URL` or
|
|
138
|
+
`PH_SWITCHBOARD_DATABASE_URL`). PGlite cannot be shared across threads,
|
|
139
|
+
so switchboard refuses to start on local PGlite storage.
|
|
140
|
+
- **Built packages only.** Worker threads import document models by file path,
|
|
141
|
+
so every configured package needs a built `document-models` entry. `dev`
|
|
142
|
+
mode (Vite-loaded models, e.g. `ph vetra`) is rejected.
|
|
143
|
+
- **Connection budget.** Total Postgres connections are roughly
|
|
144
|
+
`host pool + REACTOR_WORKERS x REACTOR_DB_POOL_SIZE_WORKER`; keep this
|
|
145
|
+
under the server's `max_connections`.
|
|
146
|
+
|
|
147
|
+
Example:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
PH_SWITCHBOARD_DATABASE_URL=postgres://reactor:reactor@localhost:5433/switchboard \
|
|
151
|
+
REACTOR_WORKERS=4 \
|
|
152
|
+
ph switchboard
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The same settings are available programmatically via
|
|
156
|
+
`startSwitchboard({ workerPool: { numWorkers, dbPoolSizePerWorker, acquireTimeoutMs } })`,
|
|
157
|
+
which takes precedence over the environment variables.
|
|
158
|
+
|
|
115
159
|
### Authentication Configuration
|
|
116
160
|
|
|
117
161
|
```typescript
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
!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]="5a65c537-fadb-5705-95c0-4cec44d7b4d2")}catch(e){}}();
|
|
4
|
-
import { a as parseForcePgVersion, r as startSwitchboard } from "./server-
|
|
4
|
+
import { a as parseForcePgVersion, r as startSwitchboard } from "./server-B4w0-8kx.mjs";
|
|
5
5
|
import "./utils-Baw7rThP.mjs";
|
|
6
6
|
import { metrics } from "@opentelemetry/api";
|
|
7
7
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|