@camstack/system 1.1.3 → 1.1.5

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,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-RihGbmpb.js");
2
+ const require_manifest_python_deps = require("./manifest-python-deps-CUPtSyZ8.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
4
4
  let node_fs = require("node:fs");
5
5
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { $ as setWorkerNativeCapsChangeListener, A as createUdsLoggerWithControl, X as getWorkerNativeCapProvider, Z as getWorkerNativeCapSnapshot, i as createUdsAddonContext, j as LocalChildClient, mt as resolveAddonClass, pt as installManifestNativeDeps, t as installManifestPythonDeps, tt as validateProviderRegistrations } from "./manifest-python-deps-8Wvwz-d1.mjs";
1
+ import { $ as setWorkerNativeCapsChangeListener, A as createUdsLoggerWithControl, X as getWorkerNativeCapProvider, Z as getWorkerNativeCapSnapshot, i as createUdsAddonContext, j as LocalChildClient, mt as resolveAddonClass, pt as installManifestNativeDeps, t as installManifestPythonDeps, tt as validateProviderRegistrations } from "./manifest-python-deps-i1IOGMpu.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
3
3
  import { register } from "node:module";
4
4
  import * as fs from "node:fs";
@@ -1568,12 +1568,7 @@ var BackupOrchestratorAddon = class extends _camstack_types.BaseAddon {
1568
1568
  super({});
1569
1569
  }
1570
1570
  async onInitialize() {
1571
- const envDataPath = process.env["CAMSTACK_DATA"];
1572
- const fallbackLocation = await this.ctx.api.storage.resolve.query({
1573
- location: "data",
1574
- relativePath: ""
1575
- }).catch(() => null);
1576
- this.dataDir = envDataPath ?? (fallbackLocation ? parentDir(fallbackLocation) : "camstack-data");
1571
+ this.dataDir = this.ctx.nodeDataDir;
1577
1572
  this.systemBackup = new SystemBackupService(this.dataDir, this.ctx.logger);
1578
1573
  this.policies = this.resolvePolicyService();
1579
1574
  if (this.policies) try {
@@ -2213,17 +2208,6 @@ function latestArchiveOf(manifest) {
2213
2208
  for (const a of manifest.archives) if (a.createdAt > newest.createdAt) newest = a;
2214
2209
  return newest;
2215
2210
  }
2216
- /**
2217
- * Tiny `path.dirname`-equivalent that only depends on `/` and `\`.
2218
- * Avoids a `node:path` import in this module purely so the
2219
- * destination-policy.ts and manifest-store.ts neighbours stay node-
2220
- * builtin-free at the import surface.
2221
- */
2222
- function parentDir(p) {
2223
- const sep = p.includes("/") ? "/" : "\\";
2224
- const i = p.lastIndexOf(sep);
2225
- return i <= 0 ? "" : p.slice(0, i);
2226
- }
2227
2211
  //#endregion
2228
2212
  exports.BackupOrchestratorAddon = BackupOrchestratorAddon;
2229
2213
  exports.default = BackupOrchestratorAddon;
@@ -1560,12 +1560,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
1560
1560
  super({});
1561
1561
  }
1562
1562
  async onInitialize() {
1563
- const envDataPath = process.env["CAMSTACK_DATA"];
1564
- const fallbackLocation = await this.ctx.api.storage.resolve.query({
1565
- location: "data",
1566
- relativePath: ""
1567
- }).catch(() => null);
1568
- this.dataDir = envDataPath ?? (fallbackLocation ? parentDir(fallbackLocation) : "camstack-data");
1563
+ this.dataDir = this.ctx.nodeDataDir;
1569
1564
  this.systemBackup = new SystemBackupService(this.dataDir, this.ctx.logger);
1570
1565
  this.policies = this.resolvePolicyService();
1571
1566
  if (this.policies) try {
@@ -2205,16 +2200,5 @@ function latestArchiveOf(manifest) {
2205
2200
  for (const a of manifest.archives) if (a.createdAt > newest.createdAt) newest = a;
2206
2201
  return newest;
2207
2202
  }
2208
- /**
2209
- * Tiny `path.dirname`-equivalent that only depends on `/` and `\`.
2210
- * Avoids a `node:path` import in this module purely so the
2211
- * destination-policy.ts and manifest-store.ts neighbours stay node-
2212
- * builtin-free at the import surface.
2213
- */
2214
- function parentDir(p) {
2215
- const sep = p.includes("/") ? "/" : "\\";
2216
- const i = p.lastIndexOf(sep);
2217
- return i <= 0 ? "" : p.slice(0, i);
2218
- }
2219
2203
  //#endregion
2220
2204
  export { BackupOrchestratorAddon, BackupOrchestratorAddon as default };
@@ -76,9 +76,9 @@ export declare class StorageOrchestratorAddon extends BaseAddon<StorageOrchestra
76
76
  * map is a no-op (each declared id's `<id>:default` is already in the
77
77
  * service's map).
78
78
  *
79
- * `basePath` is the filesystem storage root, falling back to
80
- * `process.env.CAMSTACK_DATA ?? path.resolve(process.cwd(), 'camstack-data')`.
81
- * Every declared default is attributed to the `filesystem-storage`
79
+ * `basePath` is this node's data root (`ctx.nodeDataDir` = `CAMSTACK_DATA`
80
+ * ?? the kernel boot dir). Every declared default is attributed to the
81
+ * `filesystem-storage`
82
82
  * provider; operators repoint individual locations (or add remote
83
83
  * SFTP/S3/WebDAV instances) through the admin UI afterwards.
84
84
  */
@@ -1062,9 +1062,9 @@ var StorageOrchestratorAddon = class extends _camstack_types.BaseAddon {
1062
1062
  * map is a no-op (each declared id's `<id>:default` is already in the
1063
1063
  * service's map).
1064
1064
  *
1065
- * `basePath` is the filesystem storage root, falling back to
1066
- * `process.env.CAMSTACK_DATA ?? path.resolve(process.cwd(), 'camstack-data')`.
1067
- * Every declared default is attributed to the `filesystem-storage`
1065
+ * `basePath` is this node's data root (`ctx.nodeDataDir` = `CAMSTACK_DATA`
1066
+ * ?? the kernel boot dir). Every declared default is attributed to the
1067
+ * `filesystem-storage`
1068
1068
  * provider; operators repoint individual locations (or add remote
1069
1069
  * SFTP/S3/WebDAV instances) through the admin UI afterwards.
1070
1070
  */
@@ -1074,10 +1074,9 @@ var StorageOrchestratorAddon = class extends _camstack_types.BaseAddon {
1074
1074
  const registry = (0, _camstack_system.buildStorageLocationRegistry)(this.ctx.kernel.listStorageLocationDeclarations?.() ?? []);
1075
1075
  this.service.setRegistry(registry);
1076
1076
  this.service.pruneUndeclaredSystemLocations();
1077
- const basePath = process.env["CAMSTACK_DATA"] ?? node_path.resolve(process.cwd(), "camstack-data");
1078
1077
  this.service.seedDefaults({
1079
1078
  providerId: "filesystem-storage",
1080
- basePath,
1079
+ basePath: this.ctx.nodeDataDir,
1081
1080
  declarations: registry.list()
1082
1081
  });
1083
1082
  await this.service.backfillNodeIds(HUB_NODE_ID);
@@ -1055,9 +1055,9 @@ var StorageOrchestratorAddon = class extends BaseAddon {
1055
1055
  * map is a no-op (each declared id's `<id>:default` is already in the
1056
1056
  * service's map).
1057
1057
  *
1058
- * `basePath` is the filesystem storage root, falling back to
1059
- * `process.env.CAMSTACK_DATA ?? path.resolve(process.cwd(), 'camstack-data')`.
1060
- * Every declared default is attributed to the `filesystem-storage`
1058
+ * `basePath` is this node's data root (`ctx.nodeDataDir` = `CAMSTACK_DATA`
1059
+ * ?? the kernel boot dir). Every declared default is attributed to the
1060
+ * `filesystem-storage`
1061
1061
  * provider; operators repoint individual locations (or add remote
1062
1062
  * SFTP/S3/WebDAV instances) through the admin UI afterwards.
1063
1063
  */
@@ -1067,10 +1067,9 @@ var StorageOrchestratorAddon = class extends BaseAddon {
1067
1067
  const registry = buildStorageLocationRegistry(this.ctx.kernel.listStorageLocationDeclarations?.() ?? []);
1068
1068
  this.service.setRegistry(registry);
1069
1069
  this.service.pruneUndeclaredSystemLocations();
1070
- const basePath = process.env["CAMSTACK_DATA"] ?? path$1.resolve(process.cwd(), "camstack-data");
1071
1070
  this.service.seedDefaults({
1072
1071
  providerId: "filesystem-storage",
1073
- basePath,
1072
+ basePath: this.ctx.nodeDataDir,
1074
1073
  declarations: registry.list()
1075
1074
  });
1076
1075
  await this.service.backfillNodeIds(HUB_NODE_ID);
@@ -83,10 +83,7 @@ var WinstonLoggingAddon = class extends _camstack_types.BaseAddon {
83
83
  });
84
84
  }
85
85
  async onInitialize() {
86
- const logsDir = await this.ctx.api.storage.resolve.query({
87
- location: "logs",
88
- relativePath: ""
89
- }).catch(() => "camstack-data/logs");
86
+ const logsDir = node_path.default.join(this.ctx.nodeDataDir, "logs");
90
87
  this.destination = new WinstonDestination();
91
88
  await this.destination.initialize({
92
89
  ...this.config,
@@ -1,5 +1,6 @@
1
1
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
2
2
  import * as path$1 from "node:path";
3
+ import path from "node:path";
3
4
  import { BaseAddon, logDestinationCapability } from "@camstack/types";
4
5
  import * as winston from "winston";
5
6
  import DailyRotateFile from "winston-daily-rotate-file";
@@ -75,10 +76,7 @@ var WinstonLoggingAddon = class extends BaseAddon {
75
76
  });
76
77
  }
77
78
  async onInitialize() {
78
- const logsDir = await this.ctx.api.storage.resolve.query({
79
- location: "logs",
80
- relativePath: ""
81
- }).catch(() => "camstack-data/logs");
79
+ const logsDir = path.join(this.ctx.nodeDataDir, "logs");
82
80
  this.destination = new WinstonDestination();
83
81
  await this.destination.initialize({
84
82
  ...this.config,
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
20
20
  require("./builtins/local-auth/index.js");
21
21
  const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
22
22
  require("./builtins/device-manager/index.js");
23
- const require_manifest_python_deps = require("./manifest-python-deps-RihGbmpb.js");
23
+ const require_manifest_python_deps = require("./manifest-python-deps-CUPtSyZ8.js");
24
24
  const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
25
25
  const require_graceful_fs$1 = require("./graceful-fs-lg19SZNz.js");
26
26
  let _camstack_types_node = require("@camstack/types/node");
package/dist/index.mjs CHANGED
@@ -19,7 +19,7 @@ import { LocalAuthAddon, a as require_safe_buffer, i as AuthManager, n as ApiKey
19
19
  import "./builtins/local-auth/index.mjs";
20
20
  import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
21
21
  import "./builtins/device-manager/index.mjs";
22
- import { A as createUdsLoggerWithControl, B as createLocalTransport, C as ipcParentLink, D as createUdsEventBus, E as createUdsEventBridge, F as AGENT_CAP_FWD_SERVICE, G as FrameDecoder, H as UdsLocalTransportServer, I as CapRouteResolver, J as buildUdsNativeCapProxy, K as encodeFrame, L as CapRouteError, M as LocalChildRegistry, N as UDS_NO_ROUTE_PREFIX, O as udsChildLogToWorkerEntry, P as AGENT_CAP_FWD_ACTION, Q as mountNativeCapService, R as classifyCapRoute, S as ipcChildLink, T as createParentUnownedCallHandler, U as SocketChannel, V as UdsLocalTransportClient, W as localEndpointPath, Y as createBrokerDeviceManagerApi, _ as __resetCapUsageRegistryForTests, a as getWorkerDeviceRegistry, at as capBareAction, b as brokerTransportLink, c as setHubConnected, ct as deserializeTypedArrays, d as registerEventBusService, dt as CapabilityHandle, et as createAddonService, f as AddonDepsManager, ft as CapabilityUnavailableError, g as CapUsageRegistry, h as createHwAccelService, i as createUdsAddonContext, it as capActionSuffix, j as LocalChildClient, k as createUdsLogger, l as EVENT_TOPIC_PREFIX, lt as serializeTypedArrays, m as resolveHwAccel, mt as resolveAddonClass, n as adaptBrokerToCluster, nt as NATIVE_PROVIDER_SERVICE_INFIX, o as getOrInitReadinessRegistry, ot as capServiceName, p as createKernelHwAccel, pt as installManifestNativeDeps, q as buildNativeCapProxy, r as createAddonContext, rt as capActionName, s as getOrInitReadinessRegistryForClient, st as parseCapAction, t as installManifestPythonDeps, tt as validateProviderRegistrations, u as getBrokerEventBus, ut as DeviceRegistry, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as callWithServiceDiscovery } from "./manifest-python-deps-8Wvwz-d1.mjs";
22
+ import { A as createUdsLoggerWithControl, B as createLocalTransport, C as ipcParentLink, D as createUdsEventBus, E as createUdsEventBridge, F as AGENT_CAP_FWD_SERVICE, G as FrameDecoder, H as UdsLocalTransportServer, I as CapRouteResolver, J as buildUdsNativeCapProxy, K as encodeFrame, L as CapRouteError, M as LocalChildRegistry, N as UDS_NO_ROUTE_PREFIX, O as udsChildLogToWorkerEntry, P as AGENT_CAP_FWD_ACTION, Q as mountNativeCapService, R as classifyCapRoute, S as ipcChildLink, T as createParentUnownedCallHandler, U as SocketChannel, V as UdsLocalTransportClient, W as localEndpointPath, Y as createBrokerDeviceManagerApi, _ as __resetCapUsageRegistryForTests, a as getWorkerDeviceRegistry, at as capBareAction, b as brokerTransportLink, c as setHubConnected, ct as deserializeTypedArrays, d as registerEventBusService, dt as CapabilityHandle, et as createAddonService, f as AddonDepsManager, ft as CapabilityUnavailableError, g as CapUsageRegistry, h as createHwAccelService, i as createUdsAddonContext, it as capActionSuffix, j as LocalChildClient, k as createUdsLogger, l as EVENT_TOPIC_PREFIX, lt as serializeTypedArrays, m as resolveHwAccel, mt as resolveAddonClass, n as adaptBrokerToCluster, nt as NATIVE_PROVIDER_SERVICE_INFIX, o as getOrInitReadinessRegistry, ot as capServiceName, p as createKernelHwAccel, pt as installManifestNativeDeps, q as buildNativeCapProxy, r as createAddonContext, rt as capActionName, s as getOrInitReadinessRegistryForClient, st as parseCapAction, t as installManifestPythonDeps, tt as validateProviderRegistrations, u as getBrokerEventBus, ut as DeviceRegistry, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as callWithServiceDiscovery } from "./manifest-python-deps-i1IOGMpu.mjs";
23
23
  import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
24
24
  import { n as require_src, t as require_graceful_fs } from "./graceful-fs-BoR9GuPS.mjs";
25
25
  import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
@@ -80,6 +80,13 @@ export interface CapRouteResolverDeps {
80
80
  * Decouples the resolver from CapabilityRegistry.
81
81
  */
82
82
  readonly inProcessProviders: InProcessProviderLookup;
83
+ /**
84
+ * Per-cap-method RPC timeout (ms). Lets a long-running cap method (e.g.
85
+ * `model-convert.convert`, minutes) override the default 60s remote/forward
86
+ * timeout that would otherwise kill it mid-run. Returns undefined to use the
87
+ * default. Resolved from the cap definition's `methods[method].timeoutMs`.
88
+ */
89
+ readonly capTimeoutMs?: (capName: string, method: string) => number | undefined;
83
90
  }
84
91
  /**
85
92
  * Params envelope sent to the agent's `$agent-cap-fwd.forward` Moleculer action.
@@ -126,8 +133,11 @@ export declare class CapRouteResolver {
126
133
  private readonly hubLocalRegistry;
127
134
  private readonly nodeAuthority;
128
135
  private readonly inProcessProviders;
136
+ private readonly capTimeoutMs?;
129
137
  private readonly snapshot;
130
138
  constructor(deps: CapRouteResolverDeps);
139
+ /** Per-call RPC timeout: the cap method's declared override, else the default. */
140
+ private callTimeout;
131
141
  resolveCapRoute(capName: string, opts: CapRouteOpts): CapRoute;
132
142
  /**
133
143
  * Resolve the hub-local-uds route for a cap owned by a forked hub-local
@@ -3592,6 +3592,7 @@ var CapRouteResolver = class {
3592
3592
  hubLocalRegistry;
3593
3593
  nodeAuthority;
3594
3594
  inProcessProviders;
3595
+ capTimeoutMs;
3595
3596
  snapshot;
3596
3597
  constructor(deps) {
3597
3598
  this.hubNodeId = deps.hubNodeId;
@@ -3599,8 +3600,13 @@ var CapRouteResolver = class {
3599
3600
  this.hubLocalRegistry = deps.hubLocalRegistry;
3600
3601
  this.nodeAuthority = deps.nodeAuthority;
3601
3602
  this.inProcessProviders = deps.inProcessProviders;
3603
+ this.capTimeoutMs = deps.capTimeoutMs;
3602
3604
  this.snapshot = this.buildSnapshot();
3603
3605
  }
3606
+ /** Per-call RPC timeout: the cap method's declared override, else the default. */
3607
+ callTimeout(capName, method) {
3608
+ return this.capTimeoutMs?.(capName, method) ?? REMOTE_CALL_TIMEOUT_MS;
3609
+ }
3604
3610
  resolveCapRoute(capName, opts) {
3605
3611
  return classifyCapRoute(capName, opts, this.snapshot);
3606
3612
  }
@@ -3692,7 +3698,7 @@ var CapRouteResolver = class {
3692
3698
  const action = capActionName(addonId, route.capName, method, isNative);
3693
3699
  return callWithServiceDiscovery(this.broker, addonId, action, args, {
3694
3700
  nodeID: route.nodeId,
3695
- timeout: REMOTE_CALL_TIMEOUT_MS
3701
+ timeout: this.callTimeout(route.capName, method)
3696
3702
  });
3697
3703
  }
3698
3704
  case "agent-child-forward": {
@@ -3706,7 +3712,7 @@ var CapRouteResolver = class {
3706
3712
  };
3707
3713
  return callWithServiceDiscovery(this.broker, AGENT_CAP_FWD_SERVICE, AGENT_CAP_FWD_ACTION, params, {
3708
3714
  nodeID: route.agentNodeId,
3709
- timeout: REMOTE_CALL_TIMEOUT_MS
3715
+ timeout: this.callTimeout(route.capName, method)
3710
3716
  });
3711
3717
  }
3712
3718
  }
@@ -6236,11 +6242,8 @@ async function createUdsAddonContext(client, nodeId, declaration, dataDir, optio
6236
6242
  async function buildAddonContext(runtime, declaration, dataDir, options) {
6237
6243
  const nodeId = runtimeNodeId(runtime);
6238
6244
  const addonId = declaration.id;
6239
- const storage = options?.storageProvider;
6240
- const addonDataDir = storage ? await storage.resolve({
6241
- location: "addons-data",
6242
- relativePath: addonId
6243
- }) : node_path.resolve(dataDir, "addons-data", addonId);
6245
+ const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
6246
+ const addonDataDir = node_path.resolve(nodeDataDir, "addons-data", addonId);
6244
6247
  node_fs.mkdirSync(addonDataDir, { recursive: true });
6245
6248
  if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
6246
6249
  const regs = getRegistries(nodeId);
@@ -6413,6 +6416,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6413
6416
  eventBus: scopedEventBus,
6414
6417
  addonConfig: options?.addonConfig ?? {},
6415
6418
  dataDir: addonDataDir,
6419
+ nodeDataDir,
6416
6420
  dataPlane: dataPlaneFacility.dataPlane,
6417
6421
  api,
6418
6422
  deps: new AddonDepsManager(addonDataDir, scopedLogger),
@@ -6441,7 +6445,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6441
6445
  const hwaccel = createKernelHwAccel();
6442
6446
  return {
6443
6447
  localNodeId: nodeId,
6444
- storage: storage ?? void 0,
6448
+ storage: options?.storageProvider ?? void 0,
6445
6449
  capabilityRegistry: options?.capabilityRegistry,
6446
6450
  ...options?.listStorageLocationDeclarations ? { listStorageLocationDeclarations: options.listStorageLocationDeclarations } : {},
6447
6451
  readinessRegistry: readinessRegistry(),
@@ -3591,6 +3591,7 @@ var CapRouteResolver = class {
3591
3591
  hubLocalRegistry;
3592
3592
  nodeAuthority;
3593
3593
  inProcessProviders;
3594
+ capTimeoutMs;
3594
3595
  snapshot;
3595
3596
  constructor(deps) {
3596
3597
  this.hubNodeId = deps.hubNodeId;
@@ -3598,8 +3599,13 @@ var CapRouteResolver = class {
3598
3599
  this.hubLocalRegistry = deps.hubLocalRegistry;
3599
3600
  this.nodeAuthority = deps.nodeAuthority;
3600
3601
  this.inProcessProviders = deps.inProcessProviders;
3602
+ this.capTimeoutMs = deps.capTimeoutMs;
3601
3603
  this.snapshot = this.buildSnapshot();
3602
3604
  }
3605
+ /** Per-call RPC timeout: the cap method's declared override, else the default. */
3606
+ callTimeout(capName, method) {
3607
+ return this.capTimeoutMs?.(capName, method) ?? REMOTE_CALL_TIMEOUT_MS;
3608
+ }
3603
3609
  resolveCapRoute(capName, opts) {
3604
3610
  return classifyCapRoute(capName, opts, this.snapshot);
3605
3611
  }
@@ -3691,7 +3697,7 @@ var CapRouteResolver = class {
3691
3697
  const action = capActionName(addonId, route.capName, method, isNative);
3692
3698
  return callWithServiceDiscovery(this.broker, addonId, action, args, {
3693
3699
  nodeID: route.nodeId,
3694
- timeout: REMOTE_CALL_TIMEOUT_MS
3700
+ timeout: this.callTimeout(route.capName, method)
3695
3701
  });
3696
3702
  }
3697
3703
  case "agent-child-forward": {
@@ -3705,7 +3711,7 @@ var CapRouteResolver = class {
3705
3711
  };
3706
3712
  return callWithServiceDiscovery(this.broker, AGENT_CAP_FWD_SERVICE, AGENT_CAP_FWD_ACTION, params, {
3707
3713
  nodeID: route.agentNodeId,
3708
- timeout: REMOTE_CALL_TIMEOUT_MS
3714
+ timeout: this.callTimeout(route.capName, method)
3709
3715
  });
3710
3716
  }
3711
3717
  }
@@ -6235,11 +6241,8 @@ async function createUdsAddonContext(client, nodeId, declaration, dataDir, optio
6235
6241
  async function buildAddonContext(runtime, declaration, dataDir, options) {
6236
6242
  const nodeId = runtimeNodeId(runtime);
6237
6243
  const addonId = declaration.id;
6238
- const storage = options?.storageProvider;
6239
- const addonDataDir = storage ? await storage.resolve({
6240
- location: "addons-data",
6241
- relativePath: addonId
6242
- }) : path$1.resolve(dataDir, "addons-data", addonId);
6244
+ const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
6245
+ const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
6243
6246
  fs.mkdirSync(addonDataDir, { recursive: true });
6244
6247
  if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
6245
6248
  const regs = getRegistries(nodeId);
@@ -6412,6 +6415,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6412
6415
  eventBus: scopedEventBus,
6413
6416
  addonConfig: options?.addonConfig ?? {},
6414
6417
  dataDir: addonDataDir,
6418
+ nodeDataDir,
6415
6419
  dataPlane: dataPlaneFacility.dataPlane,
6416
6420
  api,
6417
6421
  deps: new AddonDepsManager(addonDataDir, scopedLogger),
@@ -6440,7 +6444,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6440
6444
  const hwaccel = createKernelHwAccel();
6441
6445
  return {
6442
6446
  localNodeId: nodeId,
6443
- storage: storage ?? void 0,
6447
+ storage: options?.storageProvider ?? void 0,
6444
6448
  capabilityRegistry: options?.capabilityRegistry,
6445
6449
  ...options?.listStorageLocationDeclarations ? { listStorageLocationDeclarations: options.listStorageLocationDeclarations } : {},
6446
6450
  readinessRegistry: readinessRegistry(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -46,14 +46,6 @@
46
46
  {
47
47
  "name": "filesystem-browse"
48
48
  }
49
- ],
50
- "storageLocations": [
51
- {
52
- "id": "data",
53
- "displayName": "Local Data",
54
- "description": "SQLite database and core state.",
55
- "cardinality": "single"
56
- }
57
49
  ]
58
50
  },
59
51
  {
@@ -65,14 +57,6 @@
65
57
  {
66
58
  "name": "settings-store"
67
59
  }
68
- ],
69
- "storageLocations": [
70
- {
71
- "id": "addons-data",
72
- "displayName": "Addons Data",
73
- "description": "Per-addon persistent store.",
74
- "cardinality": "single"
75
- }
76
60
  ]
77
61
  },
78
62
  {
@@ -84,14 +68,6 @@
84
68
  {
85
69
  "name": "log-destination"
86
70
  }
87
- ],
88
- "storageLocations": [
89
- {
90
- "id": "logs",
91
- "displayName": "Logs",
92
- "description": "Rotated log files.",
93
- "cardinality": "single"
94
- }
95
71
  ]
96
72
  },
97
73
  {