@opengeni/core 0.16.1 → 0.16.3

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.
@@ -1,11 +1,12 @@
1
1
  import { type Settings } from "@opengeni/config";
2
2
  import { type Database } from "@opengeni/db";
3
3
  import { type EventBus } from "@opengeni/events";
4
- import { type EstablishedSandboxSession, type SelfhostedRelayConfig } from "@opengeni/runtime/sandbox";
4
+ import { type EstablishedSandboxSession, type RoutingSandboxOperationObserver, type SelfhostedRelayConfig } from "@opengeni/runtime/sandbox";
5
5
  export type ChannelARoutingServices = {
6
6
  db: Database;
7
7
  settings: Settings;
8
8
  bus?: EventBus;
9
+ onSandboxOperation?: RoutingSandboxOperationObserver;
9
10
  };
10
11
  /** Map the deployment relay URL to the leaf's `SelfhostedRelayConfig` shape. The
11
12
  * relay URL (`OPENGENI_SELFHOSTED_RELAY_URL`) may carry a path (the relay's wss
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/core",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "description": "OpenGeni framework-agnostic core: the domain, access, and billing layers (neutral access, off-HTTP V2 surface). Behavior-preserving extraction from apps/api — keeps Hono's HTTPException for error throwing (typed-errors cleanup deferred).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -37,11 +37,11 @@
37
37
  "@opengeni/codex": "^0.2.9",
38
38
  "@opengeni/config": "^0.9.1",
39
39
  "@opengeni/contracts": "^0.28.1",
40
- "@opengeni/db": "^0.18.1",
41
- "@opengeni/documents": "^0.2.63",
42
- "@opengeni/events": "^0.3.54",
43
- "@opengeni/observability": "^0.3.0",
44
- "@opengeni/runtime": "^0.15.3",
40
+ "@opengeni/db": "^0.19.0",
41
+ "@opengeni/documents": "^0.2.64",
42
+ "@opengeni/events": "^0.3.55",
43
+ "@opengeni/observability": "^0.4.0",
44
+ "@opengeni/runtime": "^0.16.0",
45
45
  "@opengeni/storage": "^0.2.50",
46
46
  "hono": "^4.12.18"
47
47
  },
@@ -1,4 +1,4 @@
1
- // apps/api/src/sandbox/routing.ts — wire the agent-loop-free routing proxy to the
1
+ // apps/api/src/sandbox/channel-a.ts — wire the agent-loop-free routing proxy to the
2
2
  // real DB pointer + the live NATS control plane for the API-DIRECT Channel-A path
3
3
  // (M7). Symmetric with apps/worker/src/sandbox-routing.ts (the turn path).
4
4
  //
@@ -42,6 +42,7 @@ import {
42
42
  type RoutableSandbox,
43
43
  type RoutingRetainedProcess,
44
44
  type RoutingRetainedProcessTerminalProof,
45
+ type RoutingSandboxOperationObserver,
45
46
  type SelfhostedRelayConfig,
46
47
  } from "@opengeni/runtime/sandbox";
47
48
 
@@ -56,6 +57,7 @@ export type ChannelARoutingServices = {
56
57
  db: Database;
57
58
  settings: Settings;
58
59
  bus?: EventBus;
60
+ onSandboxOperation?: RoutingSandboxOperationObserver;
59
61
  };
60
62
 
61
63
  /** Map the deployment relay URL to the leaf's `SelfhostedRelayConfig` shape. The
@@ -432,6 +434,7 @@ export function wrapChannelABoxWithRouting(
432
434
  return pointer ?? { activeSandboxId: null, activeEpoch: 0 };
433
435
  },
434
436
  resolveActiveBackend: resolver,
437
+ ...(services.onSandboxOperation ? { onOperation: services.onSandboxOperation } : {}),
435
438
  ...(beforeMutation ? { beforeMutation } : {}),
436
439
  ...(afterMutation ? { afterMutation } : {}),
437
440
  ...(beforeProcessMutation ? { beforeProcessMutation } : {}),