@opengeni/worker-bundle 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/worker-bundle",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "OpenGeni worker entry: runOpenGeniWorker/createOpenGeniWorker(deps) + the un-bundled Temporal workflow source tree. An engine-distribution surface — its runtime closure includes engine-internal packages and the workflow bundle ships as on-disk TS source.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -39,15 +39,15 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@opengeni/codex": "^0.2.1",
42
- "@opengeni/config": "^0.3.0",
42
+ "@opengeni/config": "^0.4.0",
43
43
  "@opengeni/contracts": "^0.9.0",
44
- "@opengeni/core": "^0.4.4",
45
- "@opengeni/db": "^0.6.0",
46
- "@opengeni/documents": "^0.2.7",
47
- "@opengeni/events": "^0.2.7",
44
+ "@opengeni/core": "^0.4.5",
45
+ "@opengeni/db": "^0.6.1",
46
+ "@opengeni/documents": "^0.2.8",
47
+ "@opengeni/events": "^0.2.8",
48
48
  "@opengeni/observability": "^0.2.1",
49
- "@opengeni/runtime": "^0.5.0",
50
- "@opengeni/storage": "^0.2.7",
49
+ "@opengeni/runtime": "^0.6.0",
50
+ "@opengeni/storage": "^0.2.8",
51
51
  "@temporalio/activity": "^1.17.0",
52
52
  "@temporalio/client": "^1.17.0",
53
53
  "@temporalio/worker": "^1.17.0",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import { createNatsEventBus } from "@opengeni/events";
4
4
  import { createObservability, logStartupDependencyRetry, type Observability } from "@opengeni/observability";
5
5
  import { Connection, ScheduleAlreadyRunning, ScheduleOverlapPolicy, Client as TemporalClient } from "@temporalio/client";
6
6
  import { NativeConnection, Worker } from "@temporalio/worker";
7
+ import { ensureModalRegistryImage } from "@opengeni/runtime";
7
8
  import { createActivities, type ActivityDependencies } from "./activities";
8
9
  import type { WakeSessionWorkflowSignal } from "./activities/types";
9
10
  import { dbReadyCheck, natsReadyCheck, startWorkerHttpServer } from "./http";
@@ -33,6 +34,18 @@ export async function createOpenGeniWorker(options: WorkerOptions = {}): Promise
33
34
  }> {
34
35
  const settings = options.settings ?? getSettings();
35
36
  const observability = options.activityDependencies?.observability ?? createObservability(settings, { component: "worker" });
37
+ // Pre-resolve a PRIVATE-registry sandbox image before any turn creates a box.
38
+ // No-op unless OPENGENI_MODAL_IMAGE_REGISTRY_SECRET + OPENGENI_MODAL_IMAGE_REF are
39
+ // both set (so non-modal / public-image deployments are byte-unchanged and never
40
+ // load the modal SDK here). Memoized in the provider, so this runs once per process.
41
+ await retryStartupDependency(
42
+ "Modal private-registry image",
43
+ () => ensureModalRegistryImage(settings),
44
+ {
45
+ ...startupRetryOptions(settings),
46
+ onRetry: (event) => logStartupDependencyRetry(observability, event),
47
+ },
48
+ );
36
49
  const connection = await retryStartupDependency(
37
50
  "Temporal",
38
51
  () => NativeConnection.connect({ address: settings.temporalHost }),