@powerhousedao/switchboard 6.2.3-dev.54 → 6.2.3-dev.55

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,24 @@
1
+ ## 6.2.3-dev.55 (2026-10-13)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **reactor-monitor:** build remote inspection queries from the wire fields ([d16699f94e](https://github.com/powerhouse-inc/powerhouse/commit/d16699f94e))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **switchboard:** release the lease and retry when the late runtime fails to start ([ef83820e0f](https://github.com/powerhouse-inc/powerhouse/commit/ef83820e0f))
10
+ - **switchboard:** log a failed start of the late workflow runtime ([82e9b88f48](https://github.com/powerhouse-inc/powerhouse/commit/82e9b88f48))
11
+ - **switchboard:** mount the late workflow subgraph without the debounce ([ed64d75da4](https://github.com/powerhouse-inc/powerhouse/commit/ed64d75da4))
12
+ - **switchboard:** register the reactor-drive listing subgraph as reactor-drive-nodes ([8beff0a01f](https://github.com/powerhouse-inc/powerhouse/commit/8beff0a01f))
13
+ - **reactor-workflow:** upload a step's output as a file-backed Blob ([8c943bfbeb](https://github.com/powerhouse-inc/powerhouse/commit/8c943bfbeb))
14
+ - **reactor-attachments:** hash and upload attachments without reading the whole file into memory ([f6532d6449](https://github.com/powerhouse-inc/powerhouse/commit/f6532d6449))
15
+
16
+ ### ❤️ Thank You
17
+
18
+ - acaldas
19
+ - Benjamin Jordan
20
+ - Claude Opus 5.5
21
+
1
22
  ## 6.2.3-dev.54 (2026-10-12)
2
23
 
3
24
  This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
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]="c9eef974-47b1-5e45-aad6-5ebb1885b76a")}catch(e){}}();
4
- import { a as StoredDocumentsRefusedError, c as initProfilerFromEnv, i as startSwitchboard, l as parseForcePgVersion } from "./server-J9fpd42v.mjs";
4
+ import { a as StoredDocumentsRefusedError, c as initProfilerFromEnv, i as startSwitchboard, l as parseForcePgVersion } from "./server-kc2kg0hU.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
7
7
  import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
@@ -1,5 +1,5 @@
1
1
 
2
- !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]="e3d937b6-2957-5fe0-8fc9-bf4fd0c18c93")}catch(e){}}();
2
+ !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]="ec03f0c0-5719-589a-9dcf-ef409bb7cc1d")}catch(e){}}();
3
3
  import { n as addDefaultReactorDrive, r as isPostgresUrl, t as addDefaultDrive } from "./utils-uaBlzyjS.mjs";
4
4
  import { createRequire, register } from "node:module";
5
5
  import { metrics, trace } from "@opentelemetry/api";
@@ -16,7 +16,7 @@ import { AuthorizationPolicy, BaseSubgraph, ForbiddenError, HttpPackageLoader, I
16
16
  import { httpsHooksPath } from "@powerhousedao/reactor-api/https-hooks";
17
17
  import { AttachmentAlreadyExists, AttachmentNotFound, AttachmentPending, AttachmentReferenceReadModel, AttachmentSchemaCompiler, HashMismatch, InvalidAttachmentMetadata, InvalidAttachmentRef, ReservationNotFound, SizeMismatch, UploadTooLarge, createRef, createRemoteAttachmentService, parseAttachmentDownloadTarget, parseRef, validateReserveMetadata } from "@powerhousedao/reactor-attachments";
18
18
  import { createAttachmentClient } from "@powerhousedao/reactor-attachments/client";
19
- import { DriveNodeView, NodeProcessor, ReactorDriveClient, createReactorDriveResolvers, reactorDriveDocumentModelModule, reactorDriveSubgraphTypeDefs } from "@powerhousedao/reactor-drive";
19
+ import { DriveNodeView, NodeProcessor, REACTOR_DRIVE_SUBGRAPH_NAME, ReactorDriveClient, createReactorDriveResolvers, reactorDriveDocumentModelModule, reactorDriveSubgraphTypeDefs } from "@powerhousedao/reactor-drive";
20
20
  import { DEFAULT_KEYPAIR_PATH, DEFAULT_RENOWN_URL, NodeKeyStorage, RENOWN_READ_MODEL_SUBGRAPH, RenownBuilder, RenownCryptoBuilder, createLocalCredentialVerifier, createRenownTrustPolicy, resolveSwitchboardEndpoint } from "@renown/sdk/node";
21
21
  import { Kysely, PostgresDialect } from "kysely";
22
22
  import net from "node:net";
@@ -194,10 +194,11 @@ function requireAuth(authService, handler, options) {
194
194
  * mounted through here inherits it without each one remembering to.
195
195
  */
196
196
  function mountAuthenticatedNodeRoute(api, method, path, handler, options) {
197
+ const { rawBody, ...authOptions } = options ?? {};
197
198
  api.httpAdapter.mountNodeRoute(method, path, requireAuth(api.authService, handler, {
198
- ...options,
199
+ ...authOptions,
199
200
  requireAuthenticatedCaller: api.requireAuthenticatedCaller
200
- }));
201
+ }), { rawBody: rawBody ?? false });
201
202
  }
202
203
  //#endregion
203
204
  //#region src/attachments/routes.ts
@@ -789,7 +790,7 @@ function registerAttachmentRoutes(api, options = {}) {
789
790
  mountAuthenticatedNodeRoute(api, "POST", "/attachments/reservations", makeReserveHandler(attachments));
790
791
  mountAuthenticatedNodeRoute(api, "GET", "/attachments/reservations/:reservationId", makeGetReservationHandler(attachments));
791
792
  mountAuthenticatedNodeRoute(api, "DELETE", "/attachments/reservations/:reservationId", makeDeleteReservationHandler(attachments));
792
- mountAuthenticatedNodeRoute(api, "PUT", "/attachments/reservations/:reservationId", makeUploadHandler(attachments));
793
+ mountAuthenticatedNodeRoute(api, "PUT", "/attachments/reservations/:reservationId", makeUploadHandler(attachments), { rawBody: true });
793
794
  mountAuthenticatedNodeRoute(api, "HEAD", "/attachments/:hash", makeStatHandler(attachments, attachmentAccess, urlSigner), { allowAnonymous: true });
794
795
  mountAuthenticatedNodeRoute(api, "GET", "/attachments/:hash/download-target", makeDownloadTargetHandler(attachments, attachmentAccess, urlSigner), { allowAnonymous: true });
795
796
  mountAuthenticatedNodeRoute(api, "GET", "/attachments/:hash", makeDownloadHandler(attachments, attachmentAccess, urlSigner), { allowAnonymous: true });
@@ -2217,7 +2218,12 @@ function retryWorkflowSingleton(options) {
2217
2218
  return;
2218
2219
  }
2219
2220
  options.logger.info("Claimed the workflow singleton after boot; starting the workflow runtime");
2220
- await options.onComposed(workflows);
2221
+ try {
2222
+ await options.onComposed(workflows);
2223
+ } catch (error) {
2224
+ options.logger.error("Starting the workflow runtime after the singleton came free failed: @error", error);
2225
+ schedule();
2226
+ }
2221
2227
  };
2222
2228
  const schedule = () => {
2223
2229
  if (stopped) return;
@@ -3331,15 +3337,24 @@ async function initServer(serverPort, options, renown, renownConfig) {
3331
3337
  workflowsRetry = retryWorkflowSingleton({
3332
3338
  compose: composeWorkflows,
3333
3339
  onComposed: async (composed) => {
3340
+ try {
3341
+ await composed.start();
3342
+ } catch (error) {
3343
+ try {
3344
+ await composed.stop();
3345
+ } catch (stopError) {
3346
+ logger.error("Stopping the late workflow runtime failed: @error", stopError);
3347
+ }
3348
+ throw error;
3349
+ }
3350
+ logger.info("Workflow runtime started");
3334
3351
  workflows = composed;
3335
3352
  await registerWorkflowSubgraph(composed);
3336
3353
  try {
3337
- await graphqlManager.updateRouter();
3354
+ await graphqlManager.updateRouter(true);
3338
3355
  } catch (error) {
3339
3356
  logger.error("Mounting the late workflow-runtime subgraph failed: @error", error);
3340
3357
  }
3341
- await composed.start();
3342
- logger.info("Workflow runtime started");
3343
3358
  },
3344
3359
  logger
3345
3360
  });
@@ -3410,7 +3425,7 @@ async function initServer(serverPort, options, renown, renownConfig) {
3410
3425
  graphqlManager.setAdditionalContextFields({ readModel: driveNodeView });
3411
3426
  const authorizationService = graphqlManager.getAuthorizationService();
3412
3427
  const reactorDriveSubgraph = {
3413
- name: "reactor-drive",
3428
+ name: REACTOR_DRIVE_SUBGRAPH_NAME,
3414
3429
  path: graphqlManager.getBasePath(),
3415
3430
  resolvers: createReactorDriveResolvers({
3416
3431
  reactorClient: client,
@@ -3545,5 +3560,5 @@ if (import.meta.main) await startSwitchboard({ fatalErrorShutdown: true });
3545
3560
  //#endregion
3546
3561
  export { StoredDocumentsRefusedError as a, initProfilerFromEnv as c, startSwitchboard as i, parseForcePgVersion as l, deriveAttachmentServiceConfig as n, resolveUnsupportedStoredDocuments as o, isPortAvailable as r, applySwitchboardReactorDefaults as s, createReactorKysely as t };
3547
3562
 
3548
- //# sourceMappingURL=server-J9fpd42v.mjs.map
3549
- //# debugId=e3d937b6-2957-5fe0-8fc9-bf4fd0c18c93
3563
+ //# sourceMappingURL=server-kc2kg0hU.mjs.map
3564
+ //# debugId=ec03f0c0-5719-589a-9dcf-ef409bb7cc1d