@powerhousedao/switchboard 6.0.0-dev.9 → 6.0.0-staging.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,479 @@
1
+ ## 6.0.0-staging.1 (2026-02-25)
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.0.0-dev.58 (2026-02-25)
6
+
7
+ ### 🚀 Features
8
+
9
+ - added ability to configure max reshuffle depth in reactor orchestrator ([94f3ae986](https://github.com/powerhouse-inc/powerhouse/commit/94f3ae986))
10
+
11
+ ### 🔥 Performance
12
+
13
+ - **reducer:** pre-allocate operation arrays to avoid resize overhead ([1cf1c0078](https://github.com/powerhouse-inc/powerhouse/commit/1cf1c0078))
14
+
15
+ ### ❤️ Thank You
16
+
17
+ - Benjamin Jordan
18
+ - Samuel Hawksby-Robinson @Samyoul
19
+
20
+ ## 6.0.0-dev.57 (2026-02-24)
21
+
22
+ ### 🚀 Features
23
+
24
+ - run sync integration test as part of reactor flow ([7dea8bf3e](https://github.com/powerhouse-inc/powerhouse/commit/7dea8bf3e))
25
+
26
+ ### 🩹 Fixes
27
+
28
+ - switchboard needs build:misc ([916f761b8](https://github.com/powerhouse-inc/powerhouse/commit/916f761b8))
29
+ - arg, workflow changes should trigger the workflow ([645cca08f](https://github.com/powerhouse-inc/powerhouse/commit/645cca08f))
30
+ - build step before integration test ([0b6b48f74](https://github.com/powerhouse-inc/powerhouse/commit/0b6b48f74))
31
+
32
+ ### ❤️ Thank You
33
+
34
+ - Benjamin Jordan
35
+
36
+ ## 6.0.0-dev.56 (2026-02-21)
37
+
38
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
39
+
40
+ ## 6.0.0-dev.55 (2026-02-20)
41
+
42
+ ### 🚀 Features
43
+
44
+ - test-connect and reactor gql updates to pass along more context ([ae581e8e8](https://github.com/powerhouse-inc/powerhouse/commit/ae581e8e8))
45
+
46
+ ### ❤️ Thank You
47
+
48
+ - Benjamin Jordan
49
+
50
+ ## 6.0.0-dev.54 (2026-02-19)
51
+
52
+ ### 🚀 Features
53
+
54
+ - wip orchestrator for the test-client ([186d7c015](https://github.com/powerhouse-inc/powerhouse/commit/186d7c015))
55
+ - **connect:** build tweaks ([22b6bc7d5](https://github.com/powerhouse-inc/powerhouse/commit/22b6bc7d5))
56
+ - improved logging on vetra, switchboard and connect ([3fb127687](https://github.com/powerhouse-inc/powerhouse/commit/3fb127687))
57
+
58
+ ### 🩹 Fixes
59
+
60
+ - **ph-cli,switchboard:** create preview drive on new reactor ([1e5ed8794](https://github.com/powerhouse-inc/powerhouse/commit/1e5ed8794))
61
+
62
+ ### ❤️ Thank You
63
+
64
+ - acaldas @acaldas
65
+ - Benjamin Jordan
66
+
67
+ ## 6.0.0-dev.53 (2026-02-18)
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.0.0-dev.52 (2026-02-17)
72
+
73
+ ### 🩹 Fixes
74
+
75
+ - **reactor-api:** improved subgraph path matching and removed name parameter from reactor subgraph ([dcadf7fb3](https://github.com/powerhouse-inc/powerhouse/commit/dcadf7fb3))
76
+
77
+ ### ❤️ Thank You
78
+
79
+ - acaldas @acaldas
80
+
81
+ ## 6.0.0-dev.51 (2026-02-17)
82
+
83
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
84
+
85
+ ## 6.0.0-dev.50 (2026-02-17)
86
+
87
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
88
+
89
+ ## 6.0.0-dev.49 (2026-02-17)
90
+
91
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
92
+
93
+ ## 6.0.0-dev.47 (2026-02-17)
94
+
95
+ ### 🩹 Fixes
96
+
97
+ - **monorepo:** make shared package publicly available ([#2348](https://github.com/powerhouse-inc/powerhouse/pull/2348))
98
+
99
+ ### ❤️ Thank You
100
+
101
+ - Ryan Wolhuter @ryanwolhuter
102
+
103
+ ## 6.0.0-dev.46 (2026-02-17)
104
+
105
+ ### 🚀 Features
106
+
107
+ - **connect:** re enable processors in connect ([#2342](https://github.com/powerhouse-inc/powerhouse/pull/2342))
108
+
109
+ ### ❤️ Thank You
110
+
111
+ - Ryan Wolhuter @ryanwolhuter
112
+
113
+ ## 6.0.0-dev.45 (2026-02-16)
114
+
115
+ ### 🚀 Features
116
+
117
+ - **monorepo:** ensure shared is only in dev deps ([#2341](https://github.com/powerhouse-inc/powerhouse/pull/2341))
118
+
119
+ ### ❤️ Thank You
120
+
121
+ - Ryan Wolhuter @ryanwolhuter
122
+
123
+ ## 6.0.0-dev.44 (2026-02-15)
124
+
125
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
126
+
127
+ ## 6.0.0-dev.43 (2026-02-14)
128
+
129
+ ### 🚀 Features
130
+
131
+ - **monorepo:** move more shared stuff to shared ([#2335](https://github.com/powerhouse-inc/powerhouse/pull/2335))
132
+
133
+ ### ❤️ Thank You
134
+
135
+ - Ryan Wolhuter @ryanwolhuter
136
+
137
+ ## 6.0.0-dev.42 (2026-02-13)
138
+
139
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
140
+
141
+ ## 6.0.0-dev.41 (2026-02-12)
142
+
143
+ ### 🚀 Features
144
+
145
+ - **monorepo:** use catalog for other shared deps ([#2330](https://github.com/powerhouse-inc/powerhouse/pull/2330))
146
+ - **vetra:** add processor apps input to vetra ([#2329](https://github.com/powerhouse-inc/powerhouse/pull/2329))
147
+
148
+ ### 🩹 Fixes
149
+
150
+ - **builder-tools:** use same class-variance-authority as design-systom ([d600feb49](https://github.com/powerhouse-inc/powerhouse/commit/d600feb49))
151
+ - **design-system:** copy assets to dist folder to enable relative path import ([de5cb5e4e](https://github.com/powerhouse-inc/powerhouse/commit/de5cb5e4e))
152
+ - **monorepo:** add build-cli to old release workflow ([a30624bd2](https://github.com/powerhouse-inc/powerhouse/commit/a30624bd2))
153
+
154
+ ### ❤️ Thank You
155
+
156
+ - acaldas @acaldas
157
+ - Ryan Wolhuter @ryanwolhuter
158
+ - ryanwolhuter @ryanwolhuter
159
+
160
+ ## 6.0.0-dev.40 (2026-02-12)
161
+
162
+ ### 🚀 Features
163
+
164
+ - **monorepo:** add shared package ([#2324](https://github.com/powerhouse-inc/powerhouse/pull/2324))
165
+
166
+ ### ❤️ Thank You
167
+
168
+ - Ryan Wolhuter @ryanwolhuter
169
+
170
+ ## 6.0.0-dev.39 (2026-02-11)
171
+
172
+ ### 🚀 Features
173
+
174
+ - **reactor,codegen:** handle processor apps in cli ([#2319](https://github.com/powerhouse-inc/powerhouse/pull/2319))
175
+
176
+ ### ❤️ Thank You
177
+
178
+ - Ryan Wolhuter @ryanwolhuter
179
+
180
+ ## 6.0.0-dev.38 (2026-02-10)
181
+
182
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
183
+
184
+ ## 6.0.0-dev.37 (2026-02-10)
185
+
186
+ ### 🚀 Features
187
+
188
+ - **reactor-api:** added nested operations query on phdocument and Graphql client update ([67584e3fc](https://github.com/powerhouse-inc/powerhouse/commit/67584e3fc))
189
+
190
+ ### ❤️ Thank You
191
+
192
+ - acaldas
193
+
194
+ ## 6.0.0-dev.36 (2026-02-06)
195
+
196
+ ### 🚀 Features
197
+
198
+ - **codegen:** use bun for the slowest tests ([#2303](https://github.com/powerhouse-inc/powerhouse/pull/2303))
199
+
200
+ ### ❤️ Thank You
201
+
202
+ - Ryan Wolhuter @ryanwolhuter
203
+
204
+ ## 6.0.0-dev.35 (2026-02-06)
205
+
206
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
207
+
208
+ ## 6.0.0-dev.34 (2026-02-05)
209
+
210
+ ### 🚀 Features
211
+
212
+ - **codegen:** update processors codegen ([#2293](https://github.com/powerhouse-inc/powerhouse/pull/2293))
213
+
214
+ ### 🩹 Fixes
215
+
216
+ - **ci:** allow release to continue when academy build fails ([477d9ef71](https://github.com/powerhouse-inc/powerhouse/commit/477d9ef71))
217
+
218
+ ### 🔥 Performance
219
+
220
+ - **document-model:** optimize getDocumentLastModified from O(n log n) to O(n) ([bb94ff310](https://github.com/powerhouse-inc/powerhouse/commit/bb94ff310))
221
+
222
+ ### ❤️ Thank You
223
+
224
+ - Frank
225
+ - Ryan Wolhuter @ryanwolhuter
226
+ - Samuel Hawksby-Robinson @Samyoul
227
+
228
+ ## 6.0.0-dev.33 (2026-02-05)
229
+
230
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
231
+
232
+ ## 6.0.0-dev.32 (2026-02-04)
233
+
234
+ ### 🩹 Fixes
235
+
236
+ - remove duplicate trigger-downstream from publish-docker-images ([1f70c8041](https://github.com/powerhouse-inc/powerhouse/commit/1f70c8041))
237
+
238
+ ### ❤️ Thank You
239
+
240
+ - Frank
241
+
242
+ ## 6.0.0-dev.31 (2026-02-04)
243
+
244
+ ### 🚀 Features
245
+
246
+ - trigger powerhouse-demo after release ([f5b63728d](https://github.com/powerhouse-inc/powerhouse/commit/f5b63728d))
247
+ - **profiling:** add Pyroscope monitoring to reactor-direct ([2c7779229](https://github.com/powerhouse-inc/powerhouse/commit/2c7779229))
248
+ - **profiling:** add reactor-direct.ts for direct reactor performance profiling ([806714e27](https://github.com/powerhouse-inc/powerhouse/commit/806714e27))
249
+ - align document-model-subgraph with ReactorSubgraph patterns ([0c0813ef7](https://github.com/powerhouse-inc/powerhouse/commit/0c0813ef7))
250
+ - add new document model subgraph with new reactor API ([a282586c3](https://github.com/powerhouse-inc/powerhouse/commit/a282586c3))
251
+
252
+ ### 🩹 Fixes
253
+
254
+ - linting issues ([e1eb2c806](https://github.com/powerhouse-inc/powerhouse/commit/e1eb2c806))
255
+ - ignore release.ts ([25a40d2a6](https://github.com/powerhouse-inc/powerhouse/commit/25a40d2a6))
256
+
257
+ ### ❤️ Thank You
258
+
259
+ - Benjamin Jordan
260
+ - Frank
261
+ - Guillermo Puente @gpuente
262
+ - Samuel Hawksby-Robinson @Samyoul
263
+
264
+ ## 6.0.0-dev.30 (2026-02-03)
265
+
266
+ ### 🩹 Fixes
267
+
268
+ - **release:** ignore errors on git stage ([e0c10d604](https://github.com/powerhouse-inc/powerhouse/commit/e0c10d604))
269
+ - **releases:** remove problematic publish dry run ([8b9b065b9](https://github.com/powerhouse-inc/powerhouse/commit/8b9b065b9))
270
+ - **releases:** include git side effects check in all booleans ([19c44503d](https://github.com/powerhouse-inc/powerhouse/commit/19c44503d))
271
+
272
+ ### ❤️ Thank You
273
+
274
+ - ryanwolhuter @ryanwolhuter
275
+
276
+ ## 6.0.0-dev.29 (2026-02-03)
277
+
278
+ ### 🚀 Features
279
+
280
+ - **release:** add doc comments ([3ab9879d4](https://github.com/powerhouse-inc/powerhouse/commit/3ab9879d4))
281
+ - **monorepo:** simplified release workflow ([#2276](https://github.com/powerhouse-inc/powerhouse/pull/2276))
282
+
283
+ ### 🩹 Fixes
284
+
285
+ - package.json onlyBuilt ([3b6165267](https://github.com/powerhouse-inc/powerhouse/commit/3b6165267))
286
+ - **release:** move checkout action ([4ed305d57](https://github.com/powerhouse-inc/powerhouse/commit/4ed305d57))
287
+
288
+ ### ❤️ Thank You
289
+
290
+ - Benjamin Jordan (@thegoldenmule)
291
+ - Ryan Wolhuter @ryanwolhuter
292
+ - ryanwolhuter @ryanwolhuter
293
+
294
+ ## 6.0.0-dev.28 (2026-01-31)
295
+
296
+ ### 🚀 Features
297
+
298
+ - add e2e tests to simulate ([6ba43d19b](https://github.com/powerhouse-inc/powerhouse/commit/6ba43d19b))
299
+ - adding signal handlers and removing old feature flags ([f08253a2d](https://github.com/powerhouse-inc/powerhouse/commit/f08253a2d))
300
+
301
+ ### ❤️ Thank You
302
+
303
+ - Benjamin Jordan (@thegoldenmule)
304
+
305
+ ## 6.0.0-dev.27 (2026-01-30)
306
+
307
+ ### 🚀 Features
308
+
309
+ - renown sdk improvements ([bc1099d94](https://github.com/powerhouse-inc/powerhouse/commit/bc1099d94))
310
+ - **ph-cmd:** fix forwarding and versioning bug ([#2272](https://github.com/powerhouse-inc/powerhouse/pull/2272))
311
+
312
+ ### ❤️ Thank You
313
+
314
+ - acaldas
315
+ - Ryan Wolhuter @ryanwolhuter
316
+
317
+ ## 6.0.0-dev.26 (2026-01-29)
318
+
319
+ ### 🚀 Features
320
+
321
+ - update minimum node version to 24 ([7a71107c5](https://github.com/powerhouse-inc/powerhouse/commit/7a71107c5))
322
+
323
+ ### 🩹 Fixes
324
+
325
+ - undo my changes to the tsc script ([0a36d0a49](https://github.com/powerhouse-inc/powerhouse/commit/0a36d0a49))
326
+
327
+ ### ❤️ Thank You
328
+
329
+ - acaldas @acaldas
330
+ - Benjamin Jordan (@thegoldenmule)
331
+
332
+ ## 6.0.0-dev.25 (2026-01-28)
333
+
334
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
335
+
336
+ ## 6.0.0-dev.24 (2026-01-27)
337
+
338
+ ### 🚀 Features
339
+
340
+ - **switchboard:** enhance pyroscope profiler with wall and heap support ([254c0cea9](https://github.com/powerhouse-inc/powerhouse/commit/254c0cea9))
341
+ - **monorepo:** ensure the same typescript version is used everywhere ([#2258](https://github.com/powerhouse-inc/powerhouse/pull/2258))
342
+
343
+ ### 🩹 Fixes
344
+
345
+ - **vetra,switchboard:** fix TypeScript errors in permission tests and profiler ([7726f95a3](https://github.com/powerhouse-inc/powerhouse/commit/7726f95a3))
346
+
347
+ ### ❤️ Thank You
348
+
349
+ - Frank
350
+ - Ryan Wolhuter @ryanwolhuter
351
+
352
+ ## 6.0.0-dev.23 (2026-01-27)
353
+
354
+ ### 🚀 Features
355
+
356
+ - **monorepo:** add diff filter to exclude deleted files in changed files action ([e86961e79](https://github.com/powerhouse-inc/powerhouse/commit/e86961e79))
357
+ - **academy:** added release slides to academy project ([eab5e56fe](https://github.com/powerhouse-inc/powerhouse/commit/eab5e56fe))
358
+
359
+ ### ❤️ Thank You
360
+
361
+ - acaldas @acaldas
362
+ - ryanwolhuter @ryanwolhuter
363
+
364
+ ## 6.0.0-dev.22 (2026-01-27)
365
+
366
+ ### 🩹 Fixes
367
+
368
+ - **monorepo:** inefficient workflows ([#2250](https://github.com/powerhouse-inc/powerhouse/pull/2250))
369
+
370
+ ### ❤️ Thank You
371
+
372
+ - Ryan Wolhuter @ryanwolhuter
373
+
374
+ ## 6.0.0-dev.21 (2026-01-27)
375
+
376
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
377
+
378
+ ## 6.0.0-dev.20 (2026-01-26)
379
+
380
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
381
+
382
+ ## 6.0.0-dev.19 (2026-01-26)
383
+
384
+ ### 🩹 Fixes
385
+
386
+ - **docker:** add ph-cli to global install for switchboard ([6cea7f52e](https://github.com/powerhouse-inc/powerhouse/commit/6cea7f52e))
387
+
388
+ ### ❤️ Thank You
389
+
390
+ - Frank
391
+
392
+ ## 6.0.0-dev.18 (2026-01-26)
393
+
394
+ ### 🚀 Features
395
+
396
+ - **ph-cli, ph-cmd:** use cmd ts for remaining ph cmd commands ([#2209](https://github.com/powerhouse-inc/powerhouse/pull/2209))
397
+
398
+ ### 🩹 Fixes
399
+
400
+ - trailing newline in publish-docker-images workflow ([7d2e30db4](https://github.com/powerhouse-inc/powerhouse/commit/7d2e30db4))
401
+ - **ci:** remove deploy-k8s from publish-docker-images workflow ([c5869e82f](https://github.com/powerhouse-inc/powerhouse/commit/c5869e82f))
402
+
403
+ ### ❤️ Thank You
404
+
405
+ - Frank
406
+ - Ryan Wolhuter @ryanwolhuter
407
+
408
+ ## 6.0.0-dev.17 (2026-01-26)
409
+
410
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
411
+
412
+ ## 6.0.0-dev.16 (2026-01-24)
413
+
414
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
415
+
416
+ ## 6.0.0-dev.15 (2026-01-23)
417
+
418
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
419
+
420
+ ## 6.0.0-dev.14 (2026-01-22)
421
+
422
+ ### 🩹 Fixes
423
+
424
+ - pnpm filtering ([3875e271c](https://github.com/powerhouse-inc/powerhouse/commit/3875e271c))
425
+ - do not run profiling tests by default ([a196a19da](https://github.com/powerhouse-inc/powerhouse/commit/a196a19da))
426
+ - **profiling:** add TypeScript configuration for profiling scripts ([d0ee094c7](https://github.com/powerhouse-inc/powerhouse/commit/d0ee094c7))
427
+ - **design-system:** declare document-drive and reactor-browser as runtime dependencies ([3db4afa38](https://github.com/powerhouse-inc/powerhouse/commit/3db4afa38))
428
+
429
+ ### ❤️ Thank You
430
+
431
+ - acaldas @acaldas
432
+ - Benjamin Jordan (@thegoldenmule)
433
+ - Samuel Hawksby-Robinson @Samyoul
434
+
435
+ ## 6.0.0-dev.13 (2026-01-21)
436
+
437
+ ### 🚀 Features
438
+
439
+ - add workflow to trigger downstream package updates ([e8c6cce75](https://github.com/powerhouse-inc/powerhouse/commit/e8c6cce75))
440
+
441
+ ### ❤️ Thank You
442
+
443
+ - Frank
444
+
445
+ ## 6.0.0-dev.12 (2026-01-20)
446
+
447
+ ### 🩹 Fixes
448
+
449
+ - **docker:** install prettier globally for ph init project ([7817c65ba](https://github.com/powerhouse-inc/powerhouse/commit/7817c65ba))
450
+
451
+ ### ❤️ Thank You
452
+
453
+ - Frank
454
+
455
+ ## 6.0.0-dev.11 (2026-01-20)
456
+
457
+ ### 🩹 Fixes
458
+
459
+ - **monorepo:** exclude root package from recursive build to prevent infinite loop ([099139393](https://github.com/powerhouse-inc/powerhouse/commit/099139393))
460
+ - **codegen:** fix failing codegen tests ([#2227](https://github.com/powerhouse-inc/powerhouse/pull/2227))
461
+
462
+ ### ❤️ Thank You
463
+
464
+ - Frank
465
+ - Ryan Wolhuter @ryanwolhuter
466
+
467
+ ## 6.0.0-dev.10 (2026-01-19)
468
+
469
+ ### 🚀 Features
470
+
471
+ - **ph-cmd:** move dependencies to dev dependencies ([8aa16c346](https://github.com/powerhouse-inc/powerhouse/commit/8aa16c346))
472
+
473
+ ### ❤️ Thank You
474
+
475
+ - ryanwolhuter @ryanwolhuter
476
+
1
477
  ## 6.0.0-dev.9 (2026-01-19)
2
478
 
3
479
  ### 🚀 Features
package/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # Build stage
2
- FROM node:22-alpine AS build
2
+ FROM node:24-alpine AS build
3
3
 
4
4
  WORKDIR /app
5
5
 
@@ -19,8 +19,8 @@ RUN pnpm config set @jsr:registry https://npm.jsr.io
19
19
  ARG TAG=latest
20
20
  ARG PH_PACKAGES=""
21
21
 
22
- # Install ph-cmd and prisma
23
- RUN pnpm add -g ph-cmd@$TAG prisma@5.17.0
22
+ # Install ph-cmd, prisma, and prettier
23
+ RUN pnpm add -g ph-cmd@$TAG prisma@5.17.0 prettier
24
24
 
25
25
  # Initialize project based on tag
26
26
  RUN case "$TAG" in \
@@ -44,7 +44,7 @@ RUN if [ -n "$PH_PACKAGES" ]; then \
44
44
  RUN prisma generate --schema node_modules/document-drive/dist/prisma/schema.prisma
45
45
 
46
46
  # Final stage - slim node image
47
- FROM node:22-alpine
47
+ FROM node:24-alpine
48
48
 
49
49
  WORKDIR /app
50
50
 
package/dist/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { config } from "./config.js";
3
3
  import { startSwitchboard } from "./server.js";
4
- function ensureNodeVersion(minVersion = "22") {
4
+ function ensureNodeVersion(minVersion = "24") {
5
5
  const version = process.versions.node;
6
6
  if (!version) {
7
7
  return;
@@ -12,7 +12,7 @@ function ensureNodeVersion(minVersion = "22") {
12
12
  }
13
13
  }
14
14
  // Ensure minimum Node.js version
15
- ensureNodeVersion("22");
15
+ ensureNodeVersion("24");
16
16
  process.on("SIGINT", () => {
17
17
  console.log("\nShutting down...");
18
18
  process.exit(0);
@@ -1,4 +1,9 @@
1
1
  import type { PyroscopeConfig } from "@pyroscope/nodejs";
2
2
  export declare function initProfilerFromEnv(env: typeof process.env): Promise<void>;
3
- export declare function initProfiler(options?: PyroscopeConfig): Promise<void>;
3
+ interface ProfilerFlags {
4
+ wallEnabled?: boolean;
5
+ heapEnabled?: boolean;
6
+ }
7
+ export declare function initProfiler(options?: PyroscopeConfig, flags?: ProfilerFlags): Promise<void>;
8
+ export {};
4
9
  //# sourceMappingURL=profiler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,OAAO,OAAO,CAAC,GAAG,iBAehE;AAED,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,iBAK3D"}
1
+ {"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,OAAO,OAAO,CAAC,GAAG,iBAgChE;AAED,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,eAAe,EACzB,KAAK,GAAE,aAAyD,iBAqBjE"}
@@ -1,17 +1,43 @@
1
1
  export async function initProfilerFromEnv(env) {
2
- const { PYROSCOPE_SERVER_ADDRESS: serverAddress, PYROSCOPE_APPLICATION_NAME: appName, PYROSCOPE_USER: basicAuthUser, PYROSCOPE_PASSWORD: basicAuthPassword, } = env;
2
+ const { PYROSCOPE_SERVER_ADDRESS: serverAddress, PYROSCOPE_APPLICATION_NAME: appName, PYROSCOPE_USER: basicAuthUser, PYROSCOPE_PASSWORD: basicAuthPassword, PYROSCOPE_WALL_ENABLED: wallEnabled, PYROSCOPE_HEAP_ENABLED: heapEnabled, } = env;
3
3
  const options = {
4
4
  serverAddress,
5
5
  appName,
6
6
  basicAuthUser,
7
7
  basicAuthPassword,
8
+ // Wall profiling captures wall-clock time (includes async I/O waits)
9
+ // This shows GraphQL resolvers even when waiting for database
10
+ wall: {
11
+ samplingDurationMs: 10000, // 10 second sampling windows
12
+ samplingIntervalMicros: 10000, // 10ms sampling interval (100 samples/sec)
13
+ collectCpuTime: true, // Also collect CPU time alongside wall time
14
+ },
15
+ // Heap profiling for memory allocation tracking
16
+ heap: {
17
+ samplingIntervalBytes: 512 * 1024, // Sample every 512KB allocated
18
+ stackDepth: 64, // Capture deeper stacks for better context
19
+ },
8
20
  };
9
- return initProfiler(options);
21
+ return initProfiler(options, {
22
+ wallEnabled: wallEnabled !== "false",
23
+ heapEnabled: heapEnabled === "true",
24
+ });
10
25
  }
11
- export async function initProfiler(options) {
26
+ export async function initProfiler(options, flags = { wallEnabled: true, heapEnabled: false }) {
12
27
  console.log("Initializing Pyroscope profiler at:", options?.serverAddress);
13
- const Pyroscope = await import("@pyroscope/nodejs");
28
+ console.log(" Wall profiling:", flags.wallEnabled ? "enabled" : "disabled");
29
+ console.log(" Heap profiling:", flags.heapEnabled ? "enabled" : "disabled");
30
+ const { default: Pyroscope } = await import("@pyroscope/nodejs");
14
31
  Pyroscope.init(options);
15
- Pyroscope.start();
32
+ // Start wall profiling (captures async I/O time - shows resolvers)
33
+ if (flags.wallEnabled) {
34
+ Pyroscope.startWallProfiling();
35
+ }
36
+ // Start CPU profiling (captures CPU-bound work)
37
+ Pyroscope.startCpuProfiling();
38
+ // Optionally start heap profiling (memory allocations)
39
+ if (flags.heapEnabled) {
40
+ Pyroscope.startHeapProfiling();
41
+ }
16
42
  }
17
43
  //# sourceMappingURL=profiler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.js","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAuB;IAC/D,MAAM,EACJ,wBAAwB,EAAE,aAAa,EACvC,0BAA0B,EAAE,OAAO,EACnC,cAAc,EAAE,aAAa,EAC7B,kBAAkB,EAAE,iBAAiB,GACtC,GAAG,GAAG,CAAC;IAER,MAAM,OAAO,GAAoB;QAC/B,aAAa;QACb,OAAO;QACP,aAAa;QACb,iBAAiB;KAClB,CAAC;IACF,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAyB;IAC1D,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAC3E,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACpD,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"profiler.js","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAuB;IAC/D,MAAM,EACJ,wBAAwB,EAAE,aAAa,EACvC,0BAA0B,EAAE,OAAO,EACnC,cAAc,EAAE,aAAa,EAC7B,kBAAkB,EAAE,iBAAiB,EACrC,sBAAsB,EAAE,WAAW,EACnC,sBAAsB,EAAE,WAAW,GACpC,GAAG,GAAG,CAAC;IAER,MAAM,OAAO,GAAoB;QAC/B,aAAa;QACb,OAAO;QACP,aAAa;QACb,iBAAiB;QACjB,qEAAqE;QACrE,8DAA8D;QAC9D,IAAI,EAAE;YACJ,kBAAkB,EAAE,KAAK,EAAE,6BAA6B;YACxD,sBAAsB,EAAE,KAAK,EAAE,2CAA2C;YAC1E,cAAc,EAAE,IAAI,EAAE,4CAA4C;SACnE;QACD,gDAAgD;QAChD,IAAI,EAAE;YACJ,qBAAqB,EAAE,GAAG,GAAG,IAAI,EAAE,+BAA+B;YAClE,UAAU,EAAE,EAAE,EAAE,2CAA2C;SAC5D;KACF,CAAC;IACF,OAAO,YAAY,CAAC,OAAO,EAAE;QAC3B,WAAW,EAAE,WAAW,KAAK,OAAO;QACpC,WAAW,EAAE,WAAW,KAAK,MAAM;KACpC,CAAC,CAAC;AACL,CAAC;AAOD,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAyB,EACzB,QAAuB,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;IAEhE,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAE7E,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACjE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAExB,mEAAmE;IACnE,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;QACtB,SAAS,CAAC,kBAAkB,EAAE,CAAC;IACjC,CAAC;IAED,gDAAgD;IAChD,SAAS,CAAC,iBAAiB,EAAE,CAAC;IAE9B,uDAAuD;IACvD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;QACtB,SAAS,CAAC,kBAAkB,EAAE,CAAC;IACjC,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type IRenown } from "@renown/sdk/node";
2
+ export interface RenownOptions {
3
+ /** Path to the keypair file. Defaults to .ph/.keypair.json in cwd */
4
+ keypairPath?: string;
5
+ /** If true, won't generate a new keypair if none exists */
6
+ requireExisting?: boolean;
7
+ /** Base url of the Renown instance to use */
8
+ baseUrl?: string;
9
+ }
10
+ /**
11
+ * Initialize Renown for the Switchboard instance.
12
+ * This allows Switchboard to authenticate with remote services
13
+ * using the same identity established during `ph login`.
14
+ */
15
+ export declare function initRenown(options?: RenownOptions): Promise<IRenown | null>;
16
+ //# sourceMappingURL=renown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renown.d.ts","sourceRoot":"","sources":["../../src/renown.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAqCzB"}
@@ -0,0 +1,33 @@
1
+ import { childLogger } from "document-drive";
2
+ import { DEFAULT_RENOWN_URL, NodeKeyStorage, RenownBuilder, RenownCryptoBuilder, } from "@renown/sdk/node";
3
+ const logger = childLogger(["switchboard", "renown"]);
4
+ /**
5
+ * Initialize Renown for the Switchboard instance.
6
+ * This allows Switchboard to authenticate with remote services
7
+ * using the same identity established during `ph login`.
8
+ */
9
+ export async function initRenown(options = {}) {
10
+ const { keypairPath, requireExisting = false, baseUrl = DEFAULT_RENOWN_URL, } = options;
11
+ const keyStorage = new NodeKeyStorage(keypairPath, {
12
+ logger,
13
+ });
14
+ // Check if we have an existing keypair
15
+ const existingKeyPair = await keyStorage.loadKeyPair();
16
+ if (!existingKeyPair && requireExisting) {
17
+ throw new Error("No existing keypair found and requireExisting is true. " +
18
+ 'Run "ph login" to create one.');
19
+ }
20
+ if (!existingKeyPair) {
21
+ logger.info("No existing keypair found. A new one will be generated.");
22
+ }
23
+ const renownCrypto = await new RenownCryptoBuilder()
24
+ .withKeyPairStorage(keyStorage)
25
+ .build();
26
+ const renown = await new RenownBuilder("switchboard", {})
27
+ .withCrypto(renownCrypto)
28
+ .withBaseUrl(baseUrl)
29
+ .build();
30
+ logger.info("Switchboard identity initialized: @did", renownCrypto.did);
31
+ return renown;
32
+ }
33
+ //# sourceMappingURL=renown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renown.js","sourceRoot":"","sources":["../../src/renown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;AAWtD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,UAAyB,EAAE;IAE3B,MAAM,EACJ,WAAW,EACX,eAAe,GAAG,KAAK,EACvB,OAAO,GAAG,kBAAkB,GAC7B,GAAG,OAAO,CAAC;IAEZ,MAAM,UAAU,GAAG,IAAI,cAAc,CAAC,WAAW,EAAE;QACjD,MAAM;KACP,CAAC,CAAC;IAEH,uCAAuC;IACvC,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,WAAW,EAAE,CAAC;IAEvD,IAAI,CAAC,eAAe,IAAI,eAAe,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,yDAAyD;YACvD,+BAA+B,CAClC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,IAAI,mBAAmB,EAAE;SACjD,kBAAkB,CAAC,UAAU,CAAC;SAC9B,KAAK,EAAE,CAAC;IAEX,MAAM,MAAM,GAAG,MAAM,IAAI,aAAa,CAAC,aAAa,EAAE,EAAE,CAAC;SACtD,UAAU,CAAC,YAAY,CAAC;SACxB,WAAW,CAAC,OAAO,CAAC;SACpB,KAAK,EAAE,CAAC;IAEX,MAAM,CAAC,IAAI,CAAC,wCAAwC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAExE,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import type { StartServerOptions, SwitchboardReactor } from "./types.js";
3
3
  export declare const startSwitchboard: (options?: StartServerOptions) => Promise<SwitchboardReactor>;
4
- export { getBearerToken, getConnectCrypto, getConnectDid, } from "./connect-crypto.js";
5
4
  export * from "./types.js";
6
5
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AA2CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAiSzE,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAiE5B,CAAC;AAEF,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AA4CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA0UzE,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAmF5B,CAAC;AAEF,cAAc,YAAY,CAAC"}